From b0db41615e3524a708eab20236c21d2d7e47da49 Mon Sep 17 00:00:00 2001 From: Erin Mullaney <erin.mullaney@torchbox.com> Date: Thu, 7 Feb 2019 08:23:04 -0500 Subject: [PATCH] new include and some style cleanup on dashboard --- .../templates/dashboard/dashboard.html | 26 ++--------------- .../includes/waiting-for-review.html | 24 +++++++++++++++ .../dashboard/reviewer_dashboard.html | 29 ++----------------- 3 files changed, 30 insertions(+), 49 deletions(-) create mode 100644 opentech/apply/dashboard/templates/dashboard/includes/waiting-for-review.html diff --git a/opentech/apply/dashboard/templates/dashboard/dashboard.html b/opentech/apply/dashboard/templates/dashboard/dashboard.html index 350a7f3f5..fb2eb89a0 100644 --- a/opentech/apply/dashboard/templates/dashboard/dashboard.html +++ b/opentech/apply/dashboard/templates/dashboard/dashboard.html @@ -21,31 +21,11 @@ </div> </div> <div class="wrapper wrapper--large wrapper--inner-space-medium"> - <div class="wrapper wrapper--large wrapper--inner-space-medium"> - <h4 class="heading heading--normal"> - Waiting for your review <span class="heading heading--submission-count">{{ in_review_count }}</span> - </h4> + <div> - {% if my_review.data %} - {% render_table my_review %} + {% include "dashboard/includes/waiting-for-review.html" with in_review_count=in_review_count my_review=my_review display_more=display_more %} - {% if display_more %} - <div class="all-submissions-table__more"> - <a href="{% url 'apply:submissions:list' %}?reviewers={{ request.user.pk }}">Show all</a> - </div> - {% endif %} - - {% else %} - <div class="grid wrapper wrapper--large "> - <div class="reviewer-dash-box"> - <h5 class="reviewer-dash-box__title">Nice! You're all caught up.</h5> - <a class="button button--primary" href="{% url 'apply:submissions:list' %}">Find new applications to review</a> - </div> - {# TODO Fill in data and update styles in future ticket #} - <div>{# Since you last logged in #}</div> - </div> - {% endif %} {% if closed_rounds or open_rounds %} {% include "funds/includes/round-block.html" with closed_rounds=closed_rounds open_rounds=open_rounds title=rounds_title %} @@ -53,7 +33,7 @@ </div> - <div class="wrapper wrapper--large wrapper--inner-space-medium"> + <div> {% if my_reviewed.data %} <h4 class="heading heading--normal"> diff --git a/opentech/apply/dashboard/templates/dashboard/includes/waiting-for-review.html b/opentech/apply/dashboard/templates/dashboard/includes/waiting-for-review.html new file mode 100644 index 000000000..2caf8fb81 --- /dev/null +++ b/opentech/apply/dashboard/templates/dashboard/includes/waiting-for-review.html @@ -0,0 +1,24 @@ +{% load render_table from django_tables2 %} + +<h4 class="heading heading--normal"> + Waiting for your review <span class="heading heading--submission-count">{{ in_review_count }}</span> +</h4> + +{% if my_review.data %} + {% render_table my_review %} + + {% if display_more %} + <div class="all-submissions-table__more"> + <a href="{% url 'apply:submissions:list' %}?reviewers={{ request.user.pk }}">Show all</a> + </div> + {% endif %} + +{% else %} + <div class="reviewer-dash-box"> + <h5 class="reviewer-dash-box__title">Nice! You're all caught up.</h5> + <a class="button button--primary" href="{% url 'apply:submissions:list' %}">Find new applications to review</a> + </div> + {# TODO Fill in data and update styles in future ticket #} + <div>{# Since you last logged in #}</div> + +{% endif %} \ No newline at end of file diff --git a/opentech/apply/dashboard/templates/dashboard/reviewer_dashboard.html b/opentech/apply/dashboard/templates/dashboard/reviewer_dashboard.html index 20d0d17ca..a9497f496 100644 --- a/opentech/apply/dashboard/templates/dashboard/reviewer_dashboard.html +++ b/opentech/apply/dashboard/templates/dashboard/reviewer_dashboard.html @@ -18,37 +18,14 @@ </div> <div class="wrapper wrapper--large wrapper--inner-space-medium"> - <div class="wrapper wrapper--large wrapper--inner-space-medium"> - <h4 class="heading heading--normal"> - Waiting for your review <span class="heading heading--submission-count">{{ in_review_count }}</span> - </h4> + <div> - {% if my_review.data %} - {% render_table my_review %} + {% include "dashboard/includes/waiting-for-review.html" with in_review_count=in_review_count my_review=my_review display_more=display_more %} - {% if display_more %} - <div class="all-submissions-table__more"> - <a href="{% url 'apply:submissions:list' %}">Show all</a> - </div> - {% endif %} - - {% else %} - <div class="grid wrapper wrapper--large "> - <div class="reviewer-dash-box"> - <h5 class="reviewer-dash-box__title">Nice! You're all caught up.</h5> - <a class="button button--primary" href="{% url 'apply:submissions:list' %}">Find new applications to review</a> - </div> - {# TODO Fill in data and update styles in future ticket #} - <div>{# Since you last logged in #}</div> - </div> - {% endif %} </div> -</div> - -<div class="wrapper wrapper--large wrapper--inner-space-medium"> - <div class="wrapper wrapper--large wrapper--inner-space-medium"> + <div> {% if my_reviewed.data %} <h4 class="heading heading--normal"> -- GitLab