From 1787b63d1e4cb4dea094b4fdef0494453e861d3f Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Thu, 6 Sep 2018 11:33:35 +0100 Subject: [PATCH] Add a link into the message --- .../templates/activity/include/listing_base.html | 6 ++++++ opentech/apply/review/models.py | 2 +- .../static_src/src/sass/apply/components/_feed.scss | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/opentech/apply/activity/templates/activity/include/listing_base.html b/opentech/apply/activity/templates/activity/include/listing_base.html index 8efeb3ba4..b744902f7 100644 --- a/opentech/apply/activity/templates/activity/include/listing_base.html +++ b/opentech/apply/activity/templates/activity/include/listing_base.html @@ -22,6 +22,12 @@ {% endif %} - {{ activity.message }} + + {% if activity.related_object %} + <a href="{{ activity.related_object.get_absolute_url }}" class="feed__related-item"> + <svg><use xlink:href="#arrow-head-pixels--solid"></use></svg> + </a> + {% endif %} </p> </div> </div> diff --git a/opentech/apply/review/models.py b/opentech/apply/review/models.py index e7247750b..aa0d0c09e 100644 --- a/opentech/apply/review/models.py +++ b/opentech/apply/review/models.py @@ -139,7 +139,7 @@ class Review(ReviewFormFieldsMixin, BaseStreamForm, AccessFormData, models.Model return '{:.1f}'.format(self.score) if self.score != NA else 'NA' def get_absolute_url(self): - return reverse('apply:reviews:review', args=(self.id,)) + return reverse('apply:submissions:reviews:review', args=(self.submission.pk, self.id,)) def __str__(self): return f'Review for {self.submission.title} by {self.author!s}' diff --git a/opentech/static_src/src/sass/apply/components/_feed.scss b/opentech/static_src/src/sass/apply/components/_feed.scss index 71c84edea..246f10e3b 100644 --- a/opentech/static_src/src/sass/apply/components/_feed.scss +++ b/opentech/static_src/src/sass/apply/components/_feed.scss @@ -110,6 +110,16 @@ } } + &__related-item { + svg { + width: 10px; + height: 14px; + margin-left: 10px; + margin-top: 0.25em; + fill: $color--dark-blue; + } + } + &__heading { margin-bottom: 0; -- GitLab