Skip to content

Commit

Permalink
Fix proposal comment template parameters
Browse files Browse the repository at this point in the history
Fix userprofile dashboard url
  • Loading branch information
Ananya Maiti authored and Ananya Maiti committed May 8, 2023
1 parent f306c6e commit f24de39
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
7 changes: 7 additions & 0 deletions junction/proposals/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def proposals_dashboard(request, conference_slug):
"group_by_section": by_section,
"group_by_reviewer_section": by_reviewer,
"by_target_audience": by_audience,
"is_proposal_reviewer": permissions.is_proposal_reviewer(
user=request.user, conference=conference
)
}
return render(request, "proposals/dashboard.html", ctx)

Expand Down Expand Up @@ -144,6 +147,7 @@ def reviewer_comments_dashboard(request, conference_slug):
proposal__status=ProposalStatus.PUBLIC,
proposal__conference=conference,
)
.order_by("proposal")
.distinct("proposal")
.count()
)
Expand Down Expand Up @@ -183,6 +187,9 @@ def reviewer_comments_dashboard(request, conference_slug):
"conference_reviewers": conference_reviewers,
"by_conference": by_conference,
"by_section": by_section,
"is_proposal_reviewer": permissions.is_proposal_reviewer(
user=request.user, conference=conference
)
}

return render(request, "proposals/reviewers_dashboard.html", ctx)
Expand Down
5 changes: 5 additions & 0 deletions junction/proposals/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ def detail_proposal(request, conference_slug, slug, hashid=None):
"is_reviewer": is_reviewer,
"is_section_reviewer": is_section_reviewer,
"can_view_feedback": False,
"schedule_item": False,
"reviewers_comments": False,
"reviewers_proposal_comment_form": False,
"reviewers_only_proposal_comment_form": False,
"reviewers_only_comments": False,
"can_vote": permissions.is_proposal_voting_allowed(proposal),
"public_voting_setting": public_voting_setting_value,
}
Expand Down
2 changes: 1 addition & 1 deletion junction/templates/profiles/userprofile.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% block breadcrumbs %}
{{ block.super }}
<!-- breadcrumb takes 2 mandatory arguments (label & viewname) -->
{% breadcrumb "Dashboard" "/profiles" %}
{% breadcrumb "Dashboard" "profiles:dashboard" %}
{% breadcrumb "Profile" "dummy-url" %}
{% endblock %}

Expand Down
4 changes: 2 additions & 2 deletions junction/templates/proposals/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<span class="end_date">{{ conference.end_date }}</span>
</b>
{% if is_proposal_reviewer %}
<a class='btn btn-primary pull-right' href="{% url 'proposal-dashboard' conference.slug %}">
Reviewer Dashboard
<a class='btn btn-primary pull-right' href="{% url 'proposal-reviewers-dashboard' conference.slug %}">
Reviewer Comments Dashboard
</a>
{% endif %}
<span class="status status-{{conference.status}}">
Expand Down
2 changes: 1 addition & 1 deletion junction/templates/proposals/detail/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{% endblock %}

{% block navbar_logo %}
{% if conference.logo %}
{% if proposal.conference.logo %}
<a href="{% url "conference-detail" conference.slug %}">
<img src="{{ conference.logo.url }}">
</a>
Expand Down
2 changes: 1 addition & 1 deletion junction/templates/proposals/detail/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h5 class="text-muted clear-margin vote-count">
{% if comment.is_spam %}
<div class="comment-description spam" id="comment-{{comment.id}}">
<span>The comment is marked as spam.</span>
{% if request.user.is_authenticated and request.user == comment.marked_marked_as_spam_by %}
{% if request.user.is_authenticated and request.user == comment.marked_as_spam_by %}
<a href="#" data-url="{{ comment.get_unmark_spam_url }}" class="js-unmark-spam">Unmark as spam</a>
{% endif %}<br/><br/>
{% else %}
Expand Down

0 comments on commit f24de39

Please sign in to comment.