From 80099058582478468212170d84cc2b21b0dbd103 Mon Sep 17 00:00:00 2001 From: Sandeep Chauhan <sandeepsajan0@gmail.com> Date: Thu, 21 Mar 2024 18:15:53 +0530 Subject: [PATCH] Fix project current status for applicant dashboard, mobile screen (#3824) Fixes #3660 --- .../dashboard/includes/project_status_bar.html | 10 +++++----- .../dashboard/partials/applicant_projects.html | 4 ++-- .../dashboard/partials/applicant_submissions.html | 4 ++-- .../dashboard/templatetags/dashboard_statusbar_tags.py | 1 + .../funds/templates/funds/includes/status_bar.html | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hypha/apply/dashboard/templates/dashboard/includes/project_status_bar.html b/hypha/apply/dashboard/templates/dashboard/includes/project_status_bar.html index 47ca9d6e8..21b49360a 100644 --- a/hypha/apply/dashboard/templates/dashboard/includes/project_status_bar.html +++ b/hypha/apply/dashboard/templates/dashboard/includes/project_status_bar.html @@ -1,5 +1,5 @@ {% load dashboard_statusbar_tags %} -<div class="status-bar {{ class }}"> +<div class="status-bar my-6 {{ class }}"> {% for status, text in statuses %} {% if forloop.counter0 == current_status_index %} {% include "funds/includes/status_bar_item.html" with is_current=True is_complete=False label=text %} @@ -11,8 +11,8 @@ {% endfor %} </div> -<div class="status-bar--mobile"> - <h6 class="status-bar__subheading"> - {{ object.get_status_display }} - </h6> +<div class="status-bar--mobile mt-5"> + <div class="status-bar__subheading status-bar__text"> + {{ current_status }} + </div> </div> diff --git a/hypha/apply/dashboard/templates/dashboard/partials/applicant_projects.html b/hypha/apply/dashboard/templates/dashboard/partials/applicant_projects.html index 784081f54..b6c293266 100644 --- a/hypha/apply/dashboard/templates/dashboard/partials/applicant_projects.html +++ b/hypha/apply/dashboard/templates/dashboard/partials/applicant_projects.html @@ -2,8 +2,8 @@ {% for project in page.object_list %} <div class="wrapper wrapper--status-bar-outer"> - <div class="wrapper wrapper--status-bar-inner"> - <div class="mt-5 ms-4 lg:max-w-[30%]"> + <div class="wrapper wrapper--status-bar-inner ms-4"> + <div class="mt-5 lg:max-w-[30%]"> <h4 class="heading mb-0 font-bold line-clamp-3 hover:line-clamp-none"><a class="link" href="{% url 'apply:projects:detail' project.id %}">{{ project.title }}</a></h4> <p class="m-0 text-fg-muted text-sm">{% trans "Project start date: " %} {{ project.created_at.date }}</p> </div> diff --git a/hypha/apply/dashboard/templates/dashboard/partials/applicant_submissions.html b/hypha/apply/dashboard/templates/dashboard/partials/applicant_submissions.html index a4036589b..c5b9f454d 100644 --- a/hypha/apply/dashboard/templates/dashboard/partials/applicant_submissions.html +++ b/hypha/apply/dashboard/templates/dashboard/partials/applicant_submissions.html @@ -2,8 +2,8 @@ {% for submission in page.object_list %} <div class="wrapper wrapper--status-bar-outer"> - <div class="wrapper wrapper--status-bar-inner"> - <div class="mt-5 ms-4 lg:max-w-[30%]"> + <div class="wrapper wrapper--status-bar-inner ms-4"> + <div class="mt-5 lg:max-w-[30%]"> <h4 class="heading mb-0 font-bold line-clamp-3 hover:line-clamp-none"><a class="link {% if not submission.is_active %} text-gray-400 {% endif %}" href="{% url 'funds:submissions:detail' submission.id %}">{{ submission.title }}</a></h4> <p class="m-0 text-fg-muted mb-4 text-sm"> {% if submission.is_draft %} diff --git a/hypha/apply/dashboard/templatetags/dashboard_statusbar_tags.py b/hypha/apply/dashboard/templatetags/dashboard_statusbar_tags.py index c60f8e1f4..4411068c9 100644 --- a/hypha/apply/dashboard/templatetags/dashboard_statusbar_tags.py +++ b/hypha/apply/dashboard/templatetags/dashboard_statusbar_tags.py @@ -22,5 +22,6 @@ def project_status_bar(current_status, user, author=False, css_class=""): "current_status_index": [status for status, _ in PROJECT_STATUS_CHOICES].index( current_status ), + "current_status": current_status, "class": css_class, } diff --git a/hypha/apply/funds/templates/funds/includes/status_bar.html b/hypha/apply/funds/templates/funds/includes/status_bar.html index beff7c317..d54e5ab45 100644 --- a/hypha/apply/funds/templates/funds/includes/status_bar.html +++ b/hypha/apply/funds/templates/funds/includes/status_bar.html @@ -14,7 +14,7 @@ {% endifchanged %} {% endfor %} </div> -<div class="status-bar--mobile my-2"> +<div class="status-bar--mobile mt-5"> <div class="status-bar__subheading status-bar__text"> {% if public %} {{ current_phase.public_name }} -- GitLab