Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions hypha/apply/review/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
from hypha.apply.activity.messaging import MESSAGES, messenger
from hypha.apply.funds.models import ApplicationSubmission, AssignedReviewers
from hypha.apply.funds.workflows import INITIAL_STATE
from hypha.apply.review.blocks import RecommendationBlock, RecommendationCommentsBlock
from hypha.apply.review.blocks import (
RecommendationBlock,
RecommendationCommentsBlock,
VisibilityBlock,
)
from hypha.apply.review.forms import ReviewModelForm, ReviewOpinionForm
from hypha.apply.stream_forms.models import BaseStreamForm
from hypha.apply.todo.options import REVIEW_DRAFT
Expand Down Expand Up @@ -408,7 +412,12 @@ def get_queryset(self):
def should_display(self, field):
return not isinstance(
field.block,
(RecommendationBlock, RecommendationCommentsBlock, RichTextBlock),
(
RecommendationBlock,
RecommendationCommentsBlock,
RichTextBlock,
VisibilityBlock,
),
)

def get_context_data(self, **kwargs):
Expand All @@ -420,6 +429,7 @@ def get_context_data(self, **kwargs):
review_data["score"] = {"question": "Overall Score", "answers": []}
review_data["recommendation"] = {"question": "Recommendation", "answers": []}
review_data["revision"] = {"question": "Revision", "answers": []}
review_data["visibility"] = {"question": "Visibility", "answers": []}
review_data["comments"] = {"question": "Comments", "answers": []}

responses = self.object_list.count()
Expand Down Expand Up @@ -459,6 +469,7 @@ def get_context_data(self, **kwargs):
else:
revision = '<a href="{}">Compare</a>'.format(review.get_compare_url())
review_data["revision"]["answers"].append(revision)
review_data["visibility"]["answers"].append(review.get_visibility_display())

for field_id in review.fields:
field = review.field(field_id)
Expand Down
Loading