Skip to content

Commit 39a9b4c

Browse files
authored
Modernize the task-list UI (#4466)
### Notable changes: - Show tasks in chronological order - Add relative timestamp against each tasks - Review view button to save some spaces and make the row clickable - Update the tasks copy to include the fund name and application id - admin bar sub-heading truncates now for submissions with long title ### Worth considering (up for discussion): - should be update and make use of `[fund_name] #{application_id}` as generic indentier for applications instead of the current "title" only. - When it comes to selecting a main fund name, should use priorities name of the "round" or name of the "fund" from which the round is derived. ## Internal changes Included `fund_name` and `application_id` on both the submission and project instance to easily access them, while abstracting the complexity around fallback on submission.id when the `submission.public_id` is missing
1 parent 0ef2713 commit 39a9b4c

File tree

34 files changed

+157
-92
lines changed

34 files changed

+157
-92
lines changed

hypha/apply/activity/templates/activity/notifications.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<div class="relative timeline-item" id="communications#{{ activity.id }}">
3636
{% ifchanged activity.source.id %}
3737
<div class="py-0.5 mt-4 bg-gray-100 ps-5 pe-2 border-s-2 border-slate-300">
38-
<span class="text-sm font-semibold text-fg-muted">{{ activity.source_content_type.name|source_type }}</span> <a href="{{ activity.source.get_absolute_url }}">{{ activity.source.title|capfirst }}</a>
38+
<span class="text-sm font-semibold text-fg-muted">{{ activity.source_content_type.name|source_type }}</span> <a href="{{ activity.source.get_absolute_url }}">{{ activity.source.fund_name }} #{{ activity.source.application_id }}: {{ activity.source.title|capfirst|truncatechars:50 }}</a>
3939
</div>
4040
{% endifchanged %}
4141
<div

hypha/apply/activity/templates/messages/email/batch_ready_to_review.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{% block content %}{# fmt:off #}
77
{% trans "New applications have been added to your review list." %}
88
{% for submission in sources %}
9-
{% trans "ID" %}: {{ submission.public_id|default:submission.id }}
9+
{% trans "ID" %}: {{ submission.application_id }}
1010
{% trans "Title" %}: {{ submission.title }}
1111
{% trans "Link" %}: {{ request.scheme }}://{{ request.get_host }}{{ submission.get_absolute_url }}
1212
{% endfor %}

hypha/apply/activity/templates/messages/email/partners_update_applicant.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{% for partner in added %}
77
* {{ partner }}
88
{% endfor %}
9-
{% trans "ID" %}: {{ source.public_id|default:source.id }}
9+
{% trans "ID" %}: {{ source.application_id }}
1010
{% trans "Title" %}: {{ source.title }}
1111
{% trans "Link" %}: {{ request.scheme }}://{{ request.get_host }}{{ source.get_absolute_url }}
1212
{% endblock %}{# fmt:on #}

hypha/apply/activity/templates/messages/email/partners_update_partner.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{% block content %}{# fmt:off #}
77
{% trans "You have been added as a partner the following submission." %}
88

9-
{% trans "ID" %}: {{ source.public_id|default:source.id }}
9+
{% trans "ID" %}: {{ source.application_id }}
1010
{% trans "Title" %}: {{ source.title }}
1111
{% trans "Link" %}: {{ request.scheme }}://{{ request.get_host }}{{ source.get_absolute_url }}
1212
{% endblock %}{# fmt:on #}

hypha/apply/activity/templates/messages/email/submission_confirmation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
{% with email_context=source.page.specific %}{{ email_context.confirmation_text_extra }}{% endwith %}
1717

18-
{% trans "Project ID" %}: {{ source.public_id|default:source.id }}
18+
{% trans "Project ID" %}: {{ source.application_id }}
1919
{% trans "Project name" %}: {{ source.title }}
2020
{% trans "Contact name" %}: {{ source.user.get_full_name }}
2121
{% trans "Contact email" %}: {{ source.user.email }}

hypha/apply/dashboard/templates/dashboard/community_dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ <h2 class="mb-2 text-xl">
5252
<h3 class="text-base font-bold heading heading--no-margin">
5353
<a class="{% if not submission.is_active %} text-slate-500 {% endif %} hover:underline" href="{% url 'funds:submissions:detail' submission.id %}">
5454
{{ submission.title }}
55-
<span class="text-gray-400">#{{ submission.public_id|default:submission.id }}</span>
55+
<span class="text-gray-400">#{{ submission.application_id }}</span>
5656
</a>
5757
</h3>
5858
<p class="text-sm heading heading--no-margin text-fg-muted">
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{% load i18n %}
22

3-
<div class="mx-auto mb-10 max-w-3xl" id="task-list" hx-swap-oob="true">
3+
<section class="mx-auto mb-10 max-w-4xl" id="task-list" hx-swap-oob="true">
44
{% if my_tasks.data %}
55
<h2 class="font-light text-center">{% trans "My tasks" %}</h2>
66

77
<div class="border divide-y shadow-xs task--list">
88
{% for task in my_tasks.data %}
9-
{% include "todo/todolist_item.html" with button_type_class="button--transparent" %}
9+
{% include "todo/todolist_item.html" %}
1010
{% endfor %}
1111
</div>
1212
{% endif %}
13-
</div>
13+
</section>

hypha/apply/dashboard/templates/dashboard/partials/applicant_submissions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h4 class="mb-0 font-bold heading line-clamp-3 hover:line-clamp-none">
99
<a class="{% if not submission.is_active %} text-slate-500 {% endif %} hover:underline" href="{% url 'funds:submissions:detail' submission.id %}">
1010
{{ submission.title }}
11-
<span class="text-gray-400">#{{ submission.public_id|default:submission.id }}</span>
11+
<span class="text-gray-400">#{{ submission.application_id }}</span>
1212
</a>
1313
</h4>
1414
<p class="m-0 mb-4 text-sm text-fg-muted">

hypha/apply/determinations/templates/determinations/determination_detail.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
{% adminbar %}
88
{% slot back_link %}
99
<a class="admin-bar__back-link" href="{{ determination.submission.get_absolute_url }}">
10-
{% trans "View submission" %}
10+
{% trans "View application" %}
1111
</a>
1212
{% endslot %}
1313

1414
{% slot header %} {% trans "Determination" %} {% if determination.is_draft %}[{% trans "DRAFT" %}] {% endif %}{% endslot %}
15-
{% slot sub_heading %}{% trans "For" %} <a class="text-blue-300 hover:underline" href="{% url "funds:submissions:detail" determination.submission.id %}">{{ determination.submission.title_text_display }}</a>{% endslot %}
15+
{% slot sub_heading %}
16+
{% trans "For" %} <a class="text-blue-300 hover:underline" href="{% url "funds:submissions:detail" determination.submission.id %}">{{ determination.submission.title_text_display }}</a>
17+
{% endslot %}
1618

1719
{% endadminbar %}
1820

hypha/apply/determinations/templates/determinations/includes/determination_button.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{% load i18n determination_tags workflow_tags %}
22
{% if request.user|show_determination_button:submission %}
3-
<a target="_blank" href="{% url 'apply:submissions:determinations:form' submission_pk=submission.id %}" class="button button--primary button--full-width {{ class }}">
3+
<a
4+
href="{% url 'apply:submissions:determinations:form' submission_pk=submission.id %}"
5+
class="button button--primary button--full-width {{ class }}"
6+
>
47
{% if submission.determinations.last.is_draft %}
58
{% if draft_text %}
69
{{ draft_text }}

0 commit comments

Comments
 (0)