Skip to content

Commit 533061f

Browse files
committed
fix SOW detail
1 parent 7d9814e commit 533061f

11 files changed

Lines changed: 77 additions & 83 deletions

File tree

hypha/apply/funds/templates/funds/applicationsubmission_detail.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
{% block content %}
5858
<div class="my-4 mx-auto layout layout-sidebar-end layout-flowrow-until-md layout-sidebar-flowrow-end md:[--layout-sidebar-width:20.5rem]">
59-
<div class="layout-main">
59+
<article class="layout-main">
6060
{% if request.user|has_edit_perm:object and object.status == 'draft_proposal' and not request.user.is_apply_staff %}
6161
<h4>{% trans "Congratulations!" %}</h4>
6262
<h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} application has been accepted.{% endblocktrans %}</h5>
@@ -147,7 +147,7 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
147147

148148
</article>
149149
{% endif %}
150-
</div>
150+
</article>
151151

152152
<aside class="flex flex-col gap-4 layout-sidebar">
153153
{% block sidebar_top %}

hypha/apply/funds/templates/funds/revisions_compare.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{% block content %}
1616
<div class="my-4 mx-auto layout layout-flowrow-until-md layout-sidebar-flowrow-start">
1717

18-
<div class="layout-main">
18+
<article class="layout-main">
1919
<div class="mb-4">
2020
<h2 class="section-header">{% trans "Changes" %}</h2>
2121
<div class="flex flex-wrap gap-2">
@@ -77,9 +77,9 @@ <h4 class="pb-1 mb-2 font-medium border-b text-h3 border-base-300 question">{% t
7777
{% endfor %}
7878
</div>
7979
</div>
80-
</div>
80+
</article>
8181

82-
<div class="layout-sidebar">
82+
<aside class="layout-sidebar">
8383
<div class="sticky top-4">
8484
<h2 class="mb-4 card-title">{% trans "Revisions" %}</h2>
8585
<div class="list">
@@ -123,6 +123,6 @@ <h2 class="mb-4 card-title">{% trans "Revisions" %}</h2>
123123
{% endfor %}
124124
</div>
125125
</div>
126-
</div>
126+
</aside>
127127
</div>
128128
{% endblock %}

hypha/apply/projects/templates/application_projects/includes/project_documents.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -150,29 +150,29 @@ <h3 class="flex gap-2 items-center font-medium text-h4 list-col-grow">
150150
</h3>
151151

152152
<div class="inline-flex gap-3">
153+
{% if object.user_has_updated_sow_details %}
154+
<a
155+
class="btn btn-outline btn-secondary btn-sm"
156+
href="{% url 'apply:projects:sow' pk=project.submission.pk %}"
157+
>
158+
{% heroicon_micro "eye" class="opacity-80 size-4" aria_hidden=true %}
159+
{% trans "View" %}
160+
</a>
161+
{% endif %}
162+
153163
{% if can_edit_pfs %}
154164
<a
155-
class="btn btn-sm {% if not object.user_has_updated_sow_details %}btn-primary{% else %}btn-outline{% endif %}"
165+
class="btn btn-sm btn-square {% if not object.user_has_updated_sow_details %}btn-primary{% else %}btn-outline btn-secondary{% endif %}"
156166
href="{% url 'apply:projects:edit_sow' pk=object.submission.pk %}"
157167
>
158168
{% if object.user_has_updated_sow_details %}
159-
{% heroicon_micro "pencil-square" class="opacity-80 size-4" aria_hidden=true %}
160-
{% trans "Edit" %}
169+
{% heroicon_micro "pencil-square" class="size-4" aria_hidden=true %}
170+
<span class="sr-only">{% trans "Edit" %}</span>
161171
{% else %}
162172
{% trans "Fill in" %}
163173
{% endif %}
164174
</a>
165175
{% endif %}
166-
167-
{% if object.user_has_updated_sow_details %}
168-
<a
169-
class="btn btn-outline btn-secondary btn-sm"
170-
href="{% url 'apply:projects:sow' pk=project.submission.pk %}"
171-
>
172-
{% heroicon_micro "eye" class="inline size-4" aria_hidden=true %}
173-
{% trans "View" %}
174-
</a>
175-
{% endif %}
176176
</div>
177177
</div>
178178
{% endif %}

hypha/apply/projects/templates/application_projects/invoice_detail.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{% display_invoice_status_for_user user object as invoice_status %}
1919
{% can_show_paid_date invoice as show_paid_date %}
2020
<div class="my-4 layout layout-sidebar-end layout-flowrow-until-md layout-sidebar-flowrow-end">
21-
<div class="flex flex-col gap-4 layout-main">
21+
<article class="flex flex-col gap-4 layout-main">
2222

2323
<!-- meta -->
2424
<section class="card card-border bg-base-200">
@@ -98,7 +98,7 @@ <h2 class="card-title">{% trans "Supporting Documents" %}</h2>
9898
</div>
9999
</section>
100100
{% endif %}
101-
</div>
101+
</article>
102102

103103
<aside class="layout-sidebar">
104104
<div

hypha/apply/projects/templates/application_projects/modals/pafstatus_update.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% load i18n project_tags %}
2-
<c-modal.header>{% trans "Update project form status" %}</c-modal.header>
2+
<c-modal.header>{% trans "Project form status" %}</c-modal.header>
33

44
<div class="p-4">
55
{% include 'includes/dialog_form_base.html' with form=form value=value %}

hypha/apply/projects/templates/application_projects/project_approval_form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
{% block content %}
1616
<div class="my-4 layout layout-sidebar-end layout-flowrow-until-md layout-sidebar-flowrow-end">
17-
<section class="layout-main">
17+
<article class="layout-main">
1818
{% if approval_form_exists %}
1919
<h2 class="pb-1 font-semibold border-b text-h3">{% trans "Project form" %}</h2>
2020
<form
@@ -66,7 +66,7 @@ <h2 class="pb-1 font-semibold border-b text-h3">{% trans "Project form" %}</h2>
6666
<a href="{% url 'wagtailadmin_pages:edit' object.submission.page.id %}" target="_blank">{% trans "fund settings" %}</a>.
6767
</p>
6868
{% endif %}
69-
</section>
69+
</article>
7070

7171
{% if approval_form_exists and submissions_attachments %}
7272
<aside class="layout-sidebar">

hypha/apply/projects/templates/application_projects/project_sow_detail.html

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,62 @@
11
{% extends "application_projects/project_approval_detail.html" %}
2-
{% load i18n static approval_tools project_tags apply_tags %}
2+
{% load i18n static approval_tools project_tags apply_tags heroicons %}
33

44
{% block hero %}
55
<c-hero>
66
<c-hero.header
77
back_link="{{ object.get_absolute_url }}"
88
back_link_text="{% trans 'View project' %} #{{ project.application_id }}"
9-
title="{{ object.title }}"
10-
subtitle="<div class='mt-1 text-sm heading heading--meta'><span>{{ object.submission.page }}</span><span>{{ object.submission.round }}</span><span>{% trans 'Lead' %}: {{ object.lead }}</span></div>"
9+
title="{% trans 'Scope of work' %}: {{ object.title|truncatechars_middle:45 }}"
10+
subtitle="<div class='text-sm'>{% trans 'Lead' %}: {{ object.lead }}</span></div>"
1111
/>
1212
</c-hero>
1313
{% endblock %}
1414

1515
{% block content %}
1616
<div class="my-4">
17-
<div class="wrapper wrapper--sidebar">
18-
<article class="grow">
17+
<div class="layout layout-sidebar-end layout-flowrow-until-md layout-sidebar-flowrow-start">
18+
<article class="layout-main">
1919
<h2 class="section-header">{% trans "Scope of Work" %}</h2>
20-
<div class="p-4 mb-4 card card-border rounded-box bg-base-200">
20+
21+
<div class="p-4 mb-4 card card-border">
2122
{% if object.sow.output_answers %}
22-
<div class="rich-text">
23+
<div class="flex flex-col gap-8 rich-text">
2324
{{ object.sow.output_answers }}
2425
</div>
2526
{% endif %}
2627
</div>
2728
</article>
29+
2830
{% user_can_take_actions object user as can_take_actions %}
2931
{% if can_take_actions %}
30-
<aside class="sidebar sidebar__project">
31-
<div class="sidebar__inner sidebar__inner--light-blue sidebar__inner--actions">
32-
<h5>{% trans "Actions to take" %}</h5>
33-
{% user_can_edit_pfs object user as can_edit_pfs %}
34-
{% if can_edit_pfs %}
35-
<a
36-
class="btn btn-primary btn-block {% if user_can_approve %}btn-disabled{% endif %}"
37-
href="{% url 'apply:projects:edit_sow' pk=object.submission.pk %}"
38-
>
39-
{% trans "Edit" %}
40-
</a>
41-
{% endif %}
42-
<div x-data="{ show: false }" class="relative">
43-
<button
44-
x-on:click="show = ! show"
45-
class="btn btn-primary btn-block"
46-
type="button"
47-
>
48-
{% trans 'Download SOW' %}
49-
</button>
50-
<div x-show="show" x-transition class="dropdown__content">
51-
<a href="{% url 'apply:projects:download-sow' pk=object.submission.id export_type='pdf' %}"
32+
<aside class="layout-sidebar">
33+
<div class="card card-border">
34+
<div class="card-body">
35+
<h2 class="card-title">{% trans "Actions to take" %}</h2>
36+
37+
{% user_can_edit_pfs object user as can_edit_pfs %}
38+
{% if can_edit_pfs %}
39+
<a
40+
class="btn btn-primary btn-block {% if user_can_approve %}btn-disabled{% endif %}"
41+
href="{% url 'apply:projects:edit_sow' pk=object.submission.pk %}"
5242
>
53-
{% trans 'Download as PDF' %}
54-
</a>
55-
<a href="{% url 'apply:projects:download-sow' pk=object.submission.id export_type='docx' %}">
56-
{% trans 'Download as DOCX' %}
43+
{% heroicon_mini "pencil-square" class="opacity-80 size-4" %}
44+
{% trans "Edit" %}
5745
</a>
46+
{% endif %}
47+
48+
<div class="dropdown dropdown-hover">
49+
<div tabindex="0" role="button" class="w-full btn btn-outline">{% trans 'Export' %}</div>
50+
<ul tabindex="0" class="p-2 w-52 shadow-sm dropdown-content menu bg-base-100 rounded-box z-1">
51+
<li>
52+
<a href="{% url 'apply:projects:download-sow' pk=object.submission.id export_type='pdf' %}">
53+
{% trans 'Download as PDF' %}</a>
54+
</li>
55+
<li>
56+
<a href="{% url 'apply:projects:download-sow' pk=object.submission.id export_type='docx' %}">
57+
{% trans 'Download as DOCX' %}</a>
58+
</li>
59+
</ul>
5860
</div>
5961
</div>
6062
</div>

hypha/apply/projects/templates/application_projects/project_sow_form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div class="my-4">
1717
{% if sow_form_exists %}
1818
<div class="layout layout-sidebar-end layout-flowrow-until-md layout-sidebar-flowrow-start">
19-
<section class="layout-main">
19+
<article class="layout-main">
2020
{% include "forms/includes/form_errors.html" with form=sow_form %}
2121

2222
<form
@@ -58,7 +58,7 @@
5858
{% endfor %}
5959
</div>
6060
</form>
61-
</section>
61+
</article>
6262

6363
{% if submissions_attachments %}
6464
<aside class="layout-sidebar">

hypha/apply/review/templates/review/review_confirm_delete.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@
1010
{% endblock %}
1111

1212
{% block content %}
13-
<div class="wrapper wrapper--form wrapper--sidebar">
14-
<div class="grow">
15-
<form class="form" action="" method="post">
16-
{% csrf_token %}
17-
<p><strong>{% trans "Are you sure you want to delete" %} "{{ object }}"?</strong></p>
18-
<button class="mt-4 btn btn-error" type="submit">{% trans "Confirm" %}</button>
19-
</form>
20-
</div>
21-
</div>
13+
<form
14+
method="post"
15+
class="my-4 mx-auto w-full max-w-3xl form"
16+
action=""
17+
>
18+
{% csrf_token %}
19+
<p>
20+
<strong>{% trans "Are you sure you want to delete" %} "{{ object }}"?</strong>
21+
</p>
22+
23+
<button class="mt-4 btn btn-error" type="submit">{% trans "Confirm" %}</button>
24+
</form>
2225
{% endblock %}

hypha/apply/review/templates/review/review_detail.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
{% block content %}
1818
<div class="my-4 layout layout-sidebar-end layout-flowrow-until-md layout-sidebar-flowrow-start">
19-
<div class="layout-main">
19+
<article class="layout-main">
2020
<div class="">
2121

2222
{% if not review.for_latest %}
@@ -69,9 +69,9 @@ <h3 class="pb-1 mb-2 font-medium border-b text-h3 border-base-300">{% trans "Opi
6969
{% endif %}
7070
</div>
7171
</div>
72-
</div>
72+
</article>
7373

74-
<div class="flex flex-col gap-4 layout-sidebar">
74+
<aside class="flex flex-col gap-4 layout-sidebar">
7575
<div class="flex gap-3 justify-end items-start">
7676
{% if not perms.funds.change_review or request.user == review.author.reviewer %}
7777
<a
@@ -109,7 +109,6 @@ <h2 class="card-title">{% trans "Your opinions" %}</h2>
109109
</div>
110110
</section>
111111
{% endif %}
112-
113-
</div>
112+
</aside>
114113
</div>
115114
{% endblock %}

0 commit comments

Comments
 (0)