diff --git a/opentech/apply/funds/templates/funds/includes/review_table.html b/opentech/apply/funds/templates/funds/includes/review_table.html index 7b724dae305ec68a9d6eb550343dd0bd755414ae..ef85008ac12605eb1e73e7b6b318644b97d77355 100644 --- a/opentech/apply/funds/templates/funds/includes/review_table.html +++ b/opentech/apply/funds/templates/funds/includes/review_table.html @@ -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 %} diff --git a/opentech/apply/funds/templates/funds/includes/review_table_row.html b/opentech/apply/funds/templates/funds/includes/review_table_row.html index d212a64742d04816888e33db4eddb36b2def2263..1e30276ad9b72a5a618a400e51b0f3cdd0386958 100644 --- a/opentech/apply/funds/templates/funds/includes/review_table_row.html +++ b/opentech/apply/funds/templates/funds/includes/review_table_row.html @@ -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 diff --git a/opentech/apply/review/views.py b/opentech/apply/review/views.py index 0f7e0c46d7dc27e6c2d9ffc0ad98ef083c4eef98..fc08fea9016f79ed40b7302fa391f836d3265fc5 100644 --- a/opentech/apply/review/views.py +++ b/opentech/apply/review/views.py @@ -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