From a84c93991f6a75f1a70e04a9dca167100eef3fc7 Mon Sep 17 00:00:00 2001 From: Sandeep Chauhan Date: Mon, 6 Nov 2023 22:42:40 +0530 Subject: [PATCH] Custom applicant dashboard header (#3587) Updated the applicant dashboard header as per the latest designs. Used a custom code instead of admin bar component because needed custom implementation that is different from other or common admin bars(headers) --- .../dashboard/applicant_dashboard.html | 147 ++++++++++-------- .../src/sass/apply/components/_button.scss | 15 ++ .../src/sass/apply/components/_wrapper.scss | 6 +- hypha/templates/base-apply.html | 8 +- 4 files changed, 99 insertions(+), 77 deletions(-) diff --git a/hypha/apply/dashboard/templates/dashboard/applicant_dashboard.html b/hypha/apply/dashboard/templates/dashboard/applicant_dashboard.html index 2cf78fcb20..7bd4f583db 100644 --- a/hypha/apply/dashboard/templates/dashboard/applicant_dashboard.html +++ b/hypha/apply/dashboard/templates/dashboard/applicant_dashboard.html @@ -4,83 +4,94 @@ {% block title %}{% trans "Dashboard" %}{% endblock %} -{% block content %} - {% adminbar %} - {% slot header %}{% trans "Dashboard" %}{% endslot %} - {% slot sub_heading %}{% trans "An overview of active and past submissions and projects" %}{% endslot %} - -
-

{% trans "Submit a new application" %}

-

{% trans "Apply now for our open rounds" %}

- {% trans "Apply" %} -
- {% endadminbar %} - -
- {% if my_active_submissions %} -
-
-

{% trans "My active submissions" %}

-
- {% for submission in my_active_submissions %} -
-
-
-

{{ submission.title }}

-

{% trans "Submitted on " %} {{ submission.submit_time.date }} {% trans "by" %} {{ submission.user.get_full_name }}

-
- {% status_bar submission.workflow submission.phase request.user css_class="status-bar--small" %} +{% block content_wrapper %} +
+ {% block content %} +
+
+
+

{% trans "My dashboard" %}

+

{% trans "An overview of active and past submissions and projects" %}

+
+
+
+

{% trans "Submit a new application" %}

+

{% trans "Apply now for our open rounds" %}

+
+ - {% if request.user|has_edit_perm:submission %} - - {% if submission.status == 'draft_proposal' %} - {% trans "Start your" %} {{ submission.stage }} {% trans "application" %} - {% else %} - {% trans "Edit" %} - {% endif %} - - {% endif %}
- {% empty %} - {% trans "No active submissions" %} - {% endfor %} +
- {% endif %} - {% if active_projects.count %} -
-
-

{% trans "My active projects" %}

-
- {% for project in active_projects.data %} -
-
-
-

{{ project.title }}

-

{% trans "Project start date: " %} {{ project.created_at.date }}

+
+ {% if my_active_submissions %} +
+
+

{% trans "My active submissions" %}

+
+ {% for submission in my_active_submissions %} +
+
+
+

{{ submission.title }}

+

{% trans "Submitted on " %} {{ submission.submit_time.date }} {% trans "by" %} {{ submission.user.get_full_name }}

+
+ {% status_bar submission.workflow submission.phase request.user css_class="status-bar--small" %} +
+ {% if request.user|has_edit_perm:submission %} + + {% if submission.status == 'draft_proposal' %} + {% trans "Start your" %} {{ submission.stage }} {% trans "application" %} + {% else %} + {% trans "Edit" %} + {% endif %} + + {% endif %}
- {% project_status_bar project.status request.user css_class="status-bar--small" %} + {% empty %} + {% trans "No active submissions" %} + {% endfor %} +
+ {% endif %} + + {% if active_projects.count %} +
+
+

{% trans "My active projects" %}

+ {% for project in active_projects.data %} +
+
+
+

{{ project.title }}

+

{% trans "Project start date: " %} {{ project.created_at.date }}

+
+ {% project_status_bar project.status request.user css_class="status-bar--small" %} +
+
+ {% empty %} + {% trans "No active projects" %} + {% endfor %}
- {% empty %} - {% trans "No active projects" %} - {% endfor %} + {% endif %}
- {% endif %} -
- {% if historical_submissions.count %} -
-

{% trans "Submission history" %}

- {% render_table historical_submissions.table %} -
- {% endif %} + {% if historical_submissions.count %} +
+

{% trans "Submission history" %}

+ {% render_table historical_submissions.table %} +
+ {% endif %} - {% if historical_projects.count %} -
-

{% trans "Project history" %}

- {% render_table historical_projects.table %} -
- {% endif %} + {% if historical_projects.count %} +
+

{% trans "Project history" %}

+ {% render_table historical_projects.table %} +
+ {% endif %} + {% endblock %} +
{% endblock %} diff --git a/hypha/static_src/src/sass/apply/components/_button.scss b/hypha/static_src/src/sass/apply/components/_button.scss index 15cb9472bd..9c066c7c8e 100644 --- a/hypha/static_src/src/sass/apply/components/_button.scss +++ b/hypha/static_src/src/sass/apply/components/_button.scss @@ -121,6 +121,21 @@ } } + &--blue-white { + @include button($color--white, $color--light-blue); + display: inline-block; + color: $color--light-blue; + border: 1px solid $color--light-blue; + + &:focus { + color: $color--light-blue; + } + + &:hover { + color: $color--white; + } + } + &-danger, &--warning { @include button($color--error, $color--error); diff --git a/hypha/static_src/src/sass/apply/components/_wrapper.scss b/hypha/static_src/src/sass/apply/components/_wrapper.scss index cb10365319..bff0fd4fd6 100644 --- a/hypha/static_src/src/sass/apply/components/_wrapper.scss +++ b/hypha/static_src/src/sass/apply/components/_wrapper.scss @@ -222,7 +222,7 @@ } &--cta-box { - width: 385px; + width: 500px; padding: 20px; color: $color--default; background-color: $color--white; @@ -232,10 +232,6 @@ display: flex; flex-wrap: wrap; justify-content: space-between; - - @include media-query(tablet-portrait) { - padding: 20px; - } } &--status-bar-outer { diff --git a/hypha/templates/base-apply.html b/hypha/templates/base-apply.html index 7036e103ce..4982053b5a 100644 --- a/hypha/templates/base-apply.html +++ b/hypha/templates/base-apply.html @@ -176,11 +176,11 @@
-
- {% block content_wrapper %} + {% block content_wrapper %} +
{% block content %}{% endblock %} - {% endblock %} -
+
+ {% endblock %}