Skip to content

Commit 17ec4b4

Browse files
committed
co-applicant & text-gray-500
1 parent 0c9a17d commit 17ec4b4

9 files changed

Lines changed: 74 additions & 60 deletions

hypha/apply/funds/templates/funds/applicationsubmission_admin_detail.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ <h2 class="card-title">{% trans "Reviews & assignees" %}</h2>
8585
<div class="flex gap-4 justify-between pb-4">
8686
<h2 class="card-title">{% trans "Reminders" %}</h2>
8787
<button
88-
class="flex items-center py-1 px-2 font-bold rounded-sm transition-colors text-dark-blue -me-2 hover:bg-base-200"
88+
role="button"
89+
class="btn btn-sm btn-soft btn-secondary"
8990
hx-get="{% url 'funds:submissions:create_reminder' pk=object.pk %}"
9091
hx-target="#htmx-modal"
91-
role="button"
92-
aria-label="{% trans "Create reminder" %}"
92+
aria-label="{% trans "Create new reminder" %}"
9393
>
94-
{% heroicon_micro "plus" class="inline align-middle me-1" stroke_width=5 aria_hidden=true %}
94+
{% heroicon_micro "plus" stroke_width=5 aria_hidden=true %}
9595
Add
9696
</button>
9797
</div>

hypha/apply/funds/templates/funds/applicationsubmission_confirm_delete.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
<h3 class="text-base font-semibold leading-6 text-base-content" id="modal-title">Delete submission</h3>
1515
<div class="mt-2">
1616
{% if request.user.is_applicant %}
17-
<p class="text-sm text-gray-500">
17+
<p class="text-sm text-fg-muted">
1818
Are you sure you want to delete draft submission? All of your data for this submission
1919
will be permanently removed from our servers forever. This action cannot be undone.
2020
</p>
2121
{% else %}
22-
<p class="text-sm text-gray-500">
22+
<p class="text-sm text-fg-muted">
2323
Are you sure you want to delete submission? All of your data
2424
will be permanently removed from our servers forever. This
2525
includes reviews, determinations and comments. This action cannot be undone.

hypha/apply/funds/templates/funds/includes/co-applicant-block.html

Lines changed: 47 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,67 @@
33
<div class="card card-border bg-base-100 shadow-xs">
44
<div class="card-body">
55
<details {% if user.is_applicant or not co_applicants %} open {% endif %} class="group">
6-
<summary class="flex gap-4 justify-between items-center list-none">
6+
<summary class="flex gap-4 justify-between items-center mb-2 list-none">
77
<h2 class="card-title">
8-
{% trans "Co-applicants" %} <span class="text-base font-medium">({{ co_applicants.count }})</span>
8+
{% trans "Co-applicants" %} <span class="text-xs text-fg-muted">({{ co_applicants.count }})</span>
99
{% heroicon_solid "chevron-down" size="16" class="w-4 h-4 transition-transform rotate-90 group-open:rotate-0" %}
1010
</h2>
1111
<button
12-
class="btn btn-sm btn-ghost"
13-
{% if object.co_applicant_invites.count >= invite_max_limit %}disabled{% endif %}
12+
role="button"
13+
class="btn btn-sm btn-soft btn-secondary"
1414
hx-get="{% url 'apply:submissions:invite_co_applicant' pk=object.id %}"
1515
hx-target="#htmx-modal"
16-
{% if object.co_applicant_invites.count >= invite_max_limit %}disabled title='{% trans "Max limit reached" %}'{% endif %}
17-
role="button"
18-
aria-label="{% trans "Invite co-applicant" %}"
16+
{% if object.co_applicant_invites.count >= invite_max_limit %}
17+
disabled
18+
title='{% trans "Max limit reached" %}'
19+
{% else %}
20+
title='{% trans "Invite co-applicant" %}'
21+
aria-label="{% trans "Invite co-applicant" %}"
22+
{% endif %}
1923
>
20-
{% heroicon_micro "plus" stroke_width=5 aria_hidden=true %}
2124
{% trans "Invite" %}
2225
</button>
2326
</summary>
2427

25-
{% if co_applicants %}
26-
<div class="flex flex-col gap-2 justify-between">
27-
{% for invite in co_applicants %}
28-
<div>
29-
<a
30-
class="font-bold line-clamp-2 group/coapplicant"
31-
href="{% url 'apply:submissions:edit_co_applicant' invite_pk=invite.id %}"
32-
hx-get="{% url 'apply:submissions:edit_co_applicant' invite_pk=invite.id %}"
33-
hx-target="#htmx-modal"
34-
>
35-
<div class="flex justify-between">
36-
{% if invite.status == "accepted" %}
37-
{{ invite.co_applicant.user }}
38-
{% else %}
39-
{{ invite.invited_user_email }}
40-
{% endif %}
28+
<div class="list">
29+
{% for invite in co_applicants %}
30+
<div class="list-row list-row-card">
31+
<div class="min-w-0 list-col-grow">
32+
<div class="font-medium truncate">
33+
{% if invite.status == "accepted" %}
34+
{{ invite.co_applicant.user }}
35+
{% else %}
36+
{{ invite.invited_user_email }}
37+
{% endif %}
38+
</div>
4139

42-
{% heroicon_solid "pencil" class="hidden align-middle me-1 group-hover/coapplicant:inline" width=16 height=16 stroke_width=2 aria_hidden=true %}
43-
</div>
44-
</a>
45-
{% if invite.status == "accepted" %}
46-
<div class="text-xs text-fg-muted" >{{ invite.co_applicant.get_role_display }}</div>
47-
{% else %}
48-
<div class="text-xs text-fg-muted" >{{ invite.get_status_display }}</div>
49-
{% endif %}
40+
<div class="label">
41+
{% if invite.status != "accepted" %}
42+
{{ invite.get_role_display }}
43+
&middot;
44+
{{ invite.get_status_display }}
45+
{% else %}
46+
{{ invite.co_applicant.get_role_display }}
47+
{% endif %}
48+
</div>
5049
</div>
5150

52-
{% endfor %}
53-
</div>
54-
{% else %}
55-
<div>
56-
{% trans "No co-applicants yet." %}
57-
</div>
58-
{% endif %}
51+
<a
52+
href="{% url 'apply:submissions:edit_co_applicant' invite_pk=invite.id %}"
53+
hx-get="{% url 'apply:submissions:edit_co_applicant' invite_pk=invite.id %}"
54+
hx-target="#htmx-modal"
55+
>
56+
<div class="btn btn-sm btn-square btn-ghost">
57+
{% heroicon_mini "pencil-square" stroke_width=2 aria_hidden=true %}
58+
</div>
59+
</a>
60+
</div>
61+
{% empty %}
62+
<div class="list-row list-row-card">
63+
{% trans "No co-applicants yet." %}
64+
</div>
65+
{% endfor %}
66+
</div>
5967
</details>
6068
</div>
6169
</div>

hypha/apply/funds/templates/funds/includes/modal_archive_submission_confirm.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
1111
<h3 class="text-base font-semibold leading-6 text-base-content" id="modal-title">Archive Submission</h3>
1212
<div class="mt-2">
13-
<p class="text-sm text-gray-500">
13+
<p class="text-sm text-fg-muted">
1414
{% blocktrans %}
1515
Are you sure you want to archive submission? Archived submissions will be hidden from the
1616
main list of submissions and can not be edited.

hypha/apply/funds/templates/funds/includes/modal_unarchive_submission_confirm.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h3 class="text-base font-semibold leading-6 text-base-content" id="modal-title"
1212
{% trans "Unarchive Submission" %}
1313
</h3>
1414
<div class="mt-2">
15-
<p class="text-sm text-gray-500">
15+
<p class="text-sm text-fg-muted">
1616
{% blocktrans %}
1717
Are you sure you want to unarchive this submission?
1818
This submission will be visible in the main list of submissions and can be edited.

hypha/apply/funds/templates/funds/modals/edit_co_applicant_form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
>
1414
{% csrf_token %}
1515
{% if co_applicant_exists %}
16-
<p class="text-sm text-gray-500">
16+
<p class="text-sm text-fg-muted">
1717
{% trans "Update the role for co-applicant." %}
1818
<br>
1919
{% trans "1. Read Only: Co-applicant can only view the submission." %}
@@ -50,7 +50,7 @@
5050
>{% trans "Delete" %}</button>
5151
</div>
5252
{% else %}
53-
<div class="text-sm text-gray-500 fields--visible">
53+
<div class="text-sm text-fg-muted fields--visible">
5454
{% trans "You can not update until co-applicant accepts the invite. You may re-invite them." %}
5555
</div>
5656

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{% load i18n %}
22
{% modal_title %}{% trans "Invite Co-Applicant" %}{% endmodal_title %}
33

4-
<div class="p-4">
5-
<p class="text-sm text-gray-500">{% trans "Enter a valid email address to invite a co-applicant. It'll send an email invite to provided email address that can be used one time only. Invite will have the expiry of" %} {{ expiry }} {% trans "days." %}</p>
6-
<p class="text-sm text-gray-500">{% trans "You may also assign the appropriate role:" %}
7-
<br>
8-
{% trans "1. Read Only: Co-applicant can only view the submission." %}
9-
<br>
10-
{% trans "2. Comment: Co-applicant can view and write comment." %}
11-
<br>
12-
{% trans "3. Edit: Co-applicant can view, comment and edit the submission." %}
13-
</p>
4+
<div class="p-4 prose prose-sm text-fg-muted">
5+
{% blocktrans %}
6+
<p>Enter a valid email address to invite a co-applicant. We will send a one-time email invitation to this address. The invitation will expire in {{ expiry }} days.</p>
7+
<p>Select a role for the co-applicant:
8+
<ol>
9+
<li>Read Only: They can view the submission only.</li>
10+
<li>Comment: They can view the submission and add comments.</li>
11+
<li>Edit: They can view, comment on, and edit the submission.</li>
12+
</ol>
13+
</p>
14+
{% endblocktrans %}
1415
{% include 'includes/dialog_form_base.html' with form=form value=value %}
1516
</div>

hypha/apply/todo/templates/todo/todolist_item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
datetime="{{ task.created_at|date:'c' }}"
2929
prefix=""
3030
format-style="narrow"
31-
class="text-sm text-gray-500 group-hover:hidden"
31+
class="text-sm group-hover:hidden text-fg-muted"
3232
>
3333
{{ task.created_at }}
3434
</relative-time>

hypha/static_src/tailwind/main.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,8 @@
6969
/* see https://github.com/tailwindlabs/tailwindcss/pull/12128 */
7070
overflow-wrap: anywhere;
7171
}
72+
73+
@utility list-row-card {
74+
--radius-box: 0;
75+
@apply px-0 gap-2 py-2;
76+
}

0 commit comments

Comments
 (0)