Skip to content
Snippets Groups Projects
Commit b20f94ab authored by Erin Mullaney's avatar Erin Mullaney Committed by Todd Dembrey
Browse files

GH-962 simplify opinion data on the review block on the submission detail page

parent 040d3eaf
No related branches found
No related tags found
No related merge requests found
......@@ -13,11 +13,11 @@
{% endif %}
{% for review_data in reviews_block.role_reviewed %}
{% include 'funds/includes/review_table_row.html' with review=review_data.review reviewer=review_data.reviewer role=review_data.role opinions=review_data.opinions %}
{% include 'funds/includes/review_table_row.html' with review=review_data.review reviewer=review_data.reviewer role=review_data.role %}
{% endfor %}
{% for review_data in reviews_block.staff_reviewed %}
{% include 'funds/includes/review_table_row.html' with review=review_data.review reviewer=review_data.reviewer opinions=review_data.opinions %}
{% include 'funds/includes/review_table_row.html' with review=review_data.review reviewer=review_data.reviewer %}
{% endfor %}
{% for review_data in reviews_block.role_not_reviewed %}
......@@ -33,7 +33,7 @@
{% if reviews_block.external_reviewed or reviews_block.external_not_reviewed %}
{% for review_data in reviews_block.external_reviewed %}
{% include 'funds/includes/review_table_row.html' with review=review_data.review reviewer=review_data.reviewer opinions=review_data.opinions %}
{% include 'funds/includes/review_table_row.html' with review=review_data.review reviewer=review_data.reviewer %}
{% endfor %}
{% for review_data in reviews_block.external_not_reviewed %}
......
......@@ -31,15 +31,16 @@
<td>{{ review.get_score_display }}</td>
{% endif %}
</tr>
{% for opinion in opinions %}
{% for opinion in review.opinions.all %}
<tr class="tr--subchild">
<td class="reviews-sidebar__author" colspan="2">
<span>
{{ opinion.author }}
{% if opinion.role %}{% image opinion.role.icon max-12x12 %}{% endif %}
{% if opinion.get_author_assignment %}{% image opinion.get_author_assignment.icon max-12x12 %}{% endif %}
</span>
</td>
<td></td>
<td>{{ opinion.opinion }}</td>
<td>{{ opinion.get_opinion_display }}</td>
</tr>
{% endfor %}
{% endfor %}
\ No newline at end of file
......@@ -62,16 +62,6 @@ class ReviewContextMixin:
'review': review,
'role': role,
}
opinions_list = []
if review:
# Loop through all opinions and include the current author's role for this submission
for opinion in review.opinions.all():
opinions_list.append({
'author': opinion.author,
'opinion': opinion.get_opinion_display(),
'role': opinion.get_author_role(),
})
review_info_dict['opinions'] = opinions_list
reviews_block[key].append(review_info_dict)
# Calculate the recommendation based on role and staff reviews
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment