Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion hypha/apply/funds/templates/funds/admin/widgets/read_only.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
{% load i18n %}
<div class="col8">{{ widget.value }}</div>{% if widget.edit_link %}<div class="col4"><a class="button button-small" href="{{ widget.edit_link }}">{% trans "Edit" %}</a></div>{% endif %}

<div class="col8">
{{ widget.value }}
</div>

{% if widget.edit_link %}
<div class="col4">
<a class="button button-small" href="{{ widget.edit_link }}">
{% trans "Edit" %}
</a>
</div>
{% endif %}
22 changes: 19 additions & 3 deletions hypha/apply/funds/templates/funds/applicationrevision_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
{% block content %}
{% adminbar %}
{% slot header %}{% trans "Revisions" %}{% endslot %}
{% slot sub_heading %}{% trans "For" %} <a class="text-blue-300 hover:underline" href="{% url "funds:submissions:detail" submission.id %}">{{ submission.title_text_display }}</a>{% endslot %}
{% slot sub_heading %}
{% trans "For" %}
<a
class="text-blue-300 hover:underline"
href="{% url "funds:submissions:detail" submission.id %}"
>
{{ submission.title_text_display }}
</a>
{% endslot %}
{% endadminbar %}

<div class="wrapper wrapper--medium">
Expand All @@ -19,11 +27,19 @@
<span class="font-semibold">({% trans "current" %})</span>
{% endif %}
{% if revision.is_draft %}
<span class="font-semibold">(<span class="text-red-600">{% trans "draft" %}</span>)</span
<span class="font-semibold text-red-600">
({% trans "draft" %})
</span>
{% endif %}
</p>

{% if not forloop.first %}
<a class="button button--compare" href="{{ revision.get_compare_url_to_latest }}">{% trans "Compare" %}</a>
<a
class="button button--compare"
href="{{ revision.get_compare_url_to_latest }}"
>
{% trans "Compare" %}
</a>
{% endif %}
</li>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
{% load i18n static workflow_tags review_tags determination_tags translate_tags heroicons %}

{% block sidebar_top %}
<div class="sidebar__inner sidebar__inner--light-blue sidebar__inner--actions" data-testid="sidebar-primary-actions">
<div
class="sidebar__inner sidebar__inner--light-blue sidebar__inner--actions"
data-testid="sidebar-primary-actions"
>
{% include "funds/includes/admin_primary_actions.html" %}
</div>
{% endblock %}
Expand All @@ -19,7 +22,11 @@ <h5>{% trans "Flags" %}</h5>
<div class="sidebar__inner">
<h5>{% trans "Reviews & assignees" %}</h5>

<div hx-trigger="revealed, reviewerUpdated from:body" hx-get="{% url "funds:submissions:partial-reviews-card" object.id %}" hx-target="this">
<div
hx-trigger="revealed, reviewerUpdated from:body"
hx-get="{% url 'funds:submissions:partial-reviews-card' object.id %}"
hx-target="this"
>
<div class="animate-pulse min-h-30">
<div class="mb-3 w-full h-9 bg-gray-200"></div>
<div class="mb-1 w-full h-6 bg-gray-200"></div>
Expand All @@ -31,7 +38,12 @@ <h5>{% trans "Reviews & assignees" %}</h5>
<div class="gap-4 wrapper wrapper--sidebar-buttons">
{% include 'review/includes/review_button.html' with submission=object class="button--half-width" %}
{% if request.user.is_apply_staff and object.reviews.exists %}
<a href="{% url 'apply:submissions:reviews:list' submission_pk=object.id %}" class="button button--white button--half-width">{% trans "View all" %}</a>
<a
href="{% url 'apply:submissions:reviews:list' submission_pk=object.id %}"
class="button button--white button--half-width"
>
{% trans "View all" %}
</a>
{% endif %}
</div>
</div>
Expand Down Expand Up @@ -76,7 +88,11 @@ <h5 class="m-0">{% trans "Reminders" %}</h5>
</button>
</div>

<div hx-trigger="load, remindersUpdated from:body" hx-get="{% url "funds:submissions:partial-reminder-card" object.id %}" hx-target="this">
<div
hx-trigger="load, remindersUpdated from:body"
hx-get="{% url 'funds:submissions:partial-reminder-card' object.id %}"
hx-target="this"
>
<div class="animate-pulse min-h-30">
<div class="mb-3 w-full h-9 bg-gray-200"></div>
<div class="mb-1 w-full h-6 bg-gray-200"></div>
Expand Down
60 changes: 48 additions & 12 deletions hypha/apply/funds/templates/funds/applicationsubmission_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@

{# is_staff is only used for Django Admin. #}
{% if request.user.is_staff %}
<a class="tab__item tab__item--right js-tabs-off" href="{% url 'admin:activity_event_changelist' %}?submission__id={{ object.id }}">
<a
class="hidden md:block tab__item ms-auto"
href="{% url 'admin:activity_event_changelist' %}?submission__id={{ object.id }}"
>
{% trans "View message log" %}
</a>
{% endif %}
Expand All @@ -58,7 +61,9 @@
<div class="wrapper--sidebar--inner">
<h4>{% trans "Congratulations!" %}</h4>
<h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} application has been accepted.{% endblocktrans %}</h5>
<a class="button button--primary" href="{% url 'funds:submissions:edit' object.id %}">{% blocktrans with stage=object.stage %}Start your {{ stage }} application.{% endblocktrans %}</a>
<a class="button button--primary" href="{% url 'funds:submissions:edit' object.id %}">
{% blocktrans with stage=object.stage %}Start your {{ stage }} application.{% endblocktrans %}
</a>
</div>
{% else %}
<article class="wrapper--sidebar--inner">
Expand All @@ -83,14 +88,20 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
{% else %}
{% trans "Submitted " %}
{% endif %}
<strong><relative-time datetime={{ object.submit_time|date:"c" }}>{{ object.submit_time|date:"SHORT_DATETIME_FORMAT" }}</relative-time></strong>
{% trans "by" %}
<strong>
{% display_submission_author %}
<relative-time datetime={{ object.submit_time|date:"c" }}>
{{ object.submit_time|date:"SHORT_DATETIME_FORMAT" }}
</relative-time>
</strong>
{% trans "by" %}
<strong>{% display_submission_author %}</strong>
</span>
<span>{% trans "Updated" %} <strong>
<relative-time datetime={{ object.live_revision.timestamp|date:"c" }}>{{ object.live_revision.timestamp|date:"SHORT_DATETIME_FORMAT" }}</relative-time></strong>
<span>{% trans "Updated" %}
<strong>
<relative-time datetime={{ object.live_revision.timestamp|date:"c" }}>
{{ object.live_revision.timestamp|date:"SHORT_DATETIME_FORMAT" }}
</relative-time>
</strong>
{% trans "by" %}
<strong>
{% display_submission_author True %}
Expand Down Expand Up @@ -122,7 +133,13 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
</div>
</header>
{% if request.user|can_translate_submission %}
<div class="wrapper" hx-get="{% url 'funds:submissions:partial-translate-answers' object.id %}" hx-trigger="translateSubmission from:body" hx-indicator="#translate-card-loading" hx-vals='js:{fl: event.detail.from_lang, tl: event.detail.to_lang}'>
<div
class="wrapper"
hx-get="{% url 'funds:submissions:partial-translate-answers' object.id %}"
hx-trigger="translateSubmission from:body"
hx-indicator="#translate-card-loading"
hx-vals='js:{fl: event.detail.from_lang, tl: event.detail.to_lang}'
>
{% include "funds/includes/rendered_answers.html" %}
</div>
{% else %}
Expand Down Expand Up @@ -166,11 +183,25 @@ <h5>{% blocktrans with stage=object.previous.stage %}Your {{ stage }} applicatio
<h5>{% trans "Related submissions" %}</h5>

{% if object.previous %}
<p class="mb-4"><a class="font-bold underline" href="{% url 'funds:submissions:detail' object.previous.id %}">{% trans "View linked" %} {{ object.previous.stage }}</a></p>
<p class="mb-4">
<a
class="font-bold underline"
href="{% url 'funds:submissions:detail' object.previous.id %}"
>
{% trans "View linked" %} {{ object.previous.stage }}
</a>
</p>
{% endif %}

{% if object.next %}
<p class="mb-4"><a class="font-bold underline" href="{% url 'funds:submissions:detail' object.next.id %}">{% trans "View linked" %} {{ object.next.stage }}</a></p>
<p class="mb-4">
<a
class="font-bold underline"
href="{% url 'funds:submissions:detail' object.next.id %}"
>
{% trans "View linked" %} {{ object.next.stage }}
</a>
</p>
{% endif %}

<section class="flex flex-col gap-2" data-js-collapse>
Expand All @@ -181,12 +212,17 @@ <h6 class="pb-2 mb-0 font-semibold uppercase border-b text-fg-muted">
</h6>
{% endif %}
<div>
<a class="font-bold hover:underline line-clamp-2" href="{% url 'funds:submissions:detail' submission.id %}">
<a
class="font-bold hover:underline line-clamp-2"
href="{% url 'funds:submissions:detail' submission.id %}"
>
{{ submission.title }}
</a>
<div class="text-sm text-fg-muted">
<span>#{{ submission.application_id }}</span>
<relative-time datetime='{{ submission.submit_time|date:"c" }}'>{{ submission.submit_time|date:"SHORT_DATETIME_FORMAT" }}</relative-time>
<relative-time datetime='{{ submission.submit_time|date:"c" }}'>
{{ submission.submit_time|date:"SHORT_DATETIME_FORMAT" }}
</relative-time>
in {{ submission.round|default_if_none:submission.page }}
&middot;
<span>{{ submission.phase }}</span>
Expand Down
18 changes: 14 additions & 4 deletions hypha/apply/funds/templates/funds/applicationsubmission_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

{% block content %}
{% adminbar %}
{% slot header %}{% trans "Editing" %}: {{ object.title }} <span class="text-gray-400">#{{ object.application_id }}</span>{% endslot %}
{% slot header %}
{% trans "Editing" %}: {{ object.title }} <span class="text-gray-400">#{{ object.application_id }}</span>
{% endslot %}
{% endadminbar %}

{% include "forms/includes/form_errors.html" with form=form %}
Expand Down Expand Up @@ -34,14 +36,22 @@
<div class="form__group">
{% trans "Save draft" as save_draft %}
{% for button_name, button_type, button_value in buttons %}
<button class="button button--submit button--{{ button_type }}" type="submit" name="{{ button_name }}" {% if button_value == save_draft %}formnovalidate{% endif %}>{{ button_value }}</button>
<button
class="button button--submit button--{{ button_type }}"
type="submit"
name="{{ button_name }}"
{% if button_value == save_draft %}formnovalidate{% endif %}
>
{{ button_value }}
</button>
{% endfor %}
</div>
</form>
<p class="wrapper--error message-no-js js-hidden">{% trans "You must have Javascript enabled to use this form." %}</p>
<p class="wrapper--error message-no-js js-hidden">
{% trans "You must have Javascript enabled to use this form." %}
</p>
</div>
</div>

{% endblock %}

{% block extra_js %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ <h5>{% trans "Flags" %}</h5>
<div class="sidebar__inner">
<h5>{% trans "Reviews & assignees" %}</h5>

<div hx-trigger="revealed" hx-get="{% url "funds:submissions:partial-reviews-card" object.id %}" hx-target="this">
<div
hx-trigger="revealed"
hx-get="{% url 'funds:submissions:partial-reviews-card' object.id %}"
hx-target="this"
>
<div class="animate-pulse min-h-30">
<div class="mb-3 w-full h-9 bg-gray-200"></div>
<div class="mb-1 w-full h-6 bg-gray-200"></div>
Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/funds/templates/funds/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{# is_staff is only used for Django Admin. #}
{% if request.user.is_staff %}
<a
class="tab__item tab__item--right"
class="hidden md:block tab__item ms-auto"
href="{% url 'admin:activity_event_changelist' %}?submission__id={{ object.id }}"
>
{% trans "View message log" %}
Expand Down
22 changes: 0 additions & 22 deletions hypha/apply/funds/templates/funds/grouped_application_list.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ <h5>{% trans "Actions to take" %}</h5>
{% if object.is_finished %}
{% with determination=object.determinations.last %}
{% if determination %}
<a class="button button--primary button--full-width button--bottom-space" href="{% url 'apply:submissions:determinations:detail' submission_pk=object.id pk=determination.id %}">{% trans "View determination" %}</a>
<a
class="button button--primary button--full-width button--bottom-space"
href="{% url 'apply:submissions:determinations:detail' submission_pk=object.id pk=determination.id %}"
>{% trans "View determination" %}</a>
{% endif %}
{% endwith %}
{% endif %}
Expand Down Expand Up @@ -80,12 +83,22 @@ <h5>{% trans "Actions to take" %}</h5>
>{% trans "Lead" %}</button>
</div>

<details class="mt-4" x-data="{closeArchiveOutside(e){if (e.currentTarget == e.target){$refs.dialogArchive.close()}}, closeReminderOutside(e){if (e.currentTarget == e.target){$refs.dialogReminder.close()}}, closeMetaTermsOutside(e){if (e.currentTarget == e.target){$refs.dialogMetaTerms.close()}} }">
<summary class="sidebar__separator sidebar__separator--medium">{% trans "More actions" %}</summary>
<a class="button button--white button--full-width button--bottom-space" href="{% url 'funds:submissions:revisions:list' submission_pk=object.id %}">{% trans "Revisions" %}</a>
<details class="mt-4">
<summary class="sidebar__separator sidebar__separator--medium">
{% trans "More actions" %}
</summary>

<a
class="button button--white button--full-width button--bottom-space"
href="{% url 'funds:submissions:revisions:list' submission_pk=object.id %}"
>{% trans "Revisions" %}</a>

{% if request.user|can_translate_submission %}
<button class="button button--white button--full-width button--bottom-space" hx-get="{% url 'funds:submissions:translate' pk=object.pk %}" hx-target="#htmx-modal">
<button
class="button button--white button--full-width button--bottom-space"
hx-get="{% url 'funds:submissions:translate' pk=object.pk %}"
hx-target="#htmx-modal"
>
{% heroicon_outline "language" aria_hidden="true" size=15 stroke_width=2 class="inline align-baseline me-1" %}
{% trans "Translate" %}
</button>
Expand All @@ -103,14 +116,19 @@ <h5>{% trans "Actions to take" %}</h5>
hx-target="#htmx-modal"
>{% trans "Create Reminder" %}</button>

<a class="button button--white button--full-width button--bottom-space"
href="{% url "apply:submissions:download" pk=object.pk %}"
<a
class="button button--white button--full-width button--bottom-space"
href="{% url "apply:submissions:download" pk=object.pk %}"
>
{% trans "Download PDF" %}
</a>

{% if can_archive %}
<button class="button button--white button--full-width button--bottom-space" hx-get="{% url 'funds:submissions:archive' pk=object.pk %}" hx-target="#htmx-modal">
<button
class="button button--white button--full-width button--bottom-space"
hx-get="{% url 'funds:submissions:archive' pk=object.pk %}"
hx-target="#htmx-modal"
>
{% heroicon_outline "lock-closed" aria_hidden="true" size=15 stroke_width=2 class="inline align-baseline me-1" %}
{% trans "Archive Submission" %}
</button>
Expand Down
Loading
Loading