From 3698b97c143c773639dd0e75617cd8d8fb034131 Mon Sep 17 00:00:00 2001 From: krmax44 Date: Mon, 13 Nov 2023 15:02:19 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20reformat=20all=20html=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/accesstoken/token_widget.html | 60 ++- .../templates/account/admin_send_mail.html | 65 +-- froide/account/templates/account/base.html | 25 +- .../account/templates/account/confirmed.html | 71 ++- .../account/emails/confirmation_mail.html | 10 +- froide/account/templates/account/go.html | 25 +- froide/account/templates/account/header.html | 2 - .../account/includes/breadcrumbs.html | 33 +- .../includes/change_password_form.html | 51 +- .../templates/account/includes/impostor.html | 34 +- .../includes/recent_auth_required.html | 8 +- .../account/includes/set_password_now.html | 6 +- froide/account/templates/account/login.html | 92 ++-- froide/account/templates/account/menu.html | 41 +- froide/account/templates/account/new.html | 87 ++- .../account/templates/account/new_terms.html | 27 +- .../account/password_reset_confirm.html | 56 +- froide/account/templates/account/profile.html | 304 +++++------ froide/account/templates/account/reauth.html | 141 +++-- .../account/templates/account/settings.html | 382 ++++++-------- .../templates/account/settings_base.html | 77 +-- froide/account/templates/account/show.html | 139 ++--- froide/account/templates/account/signup.html | 47 +- .../account/widgets/confirmation.html | 8 +- .../templates/account/widgets/pininput.html | 15 +- .../admin/account/user/change_form.html | 34 +- .../oauth2_provider/application_list.html | 15 +- .../templates/oauth2_provider/authorize.html | 70 ++- .../templates/oauth2_provider/base.html | 14 +- .../templates/campaign/request_banner.html | 39 +- .../templates/froide_comments/comment.html | 100 ++-- .../templates/froide_comments/comments.html | 42 +- .../templates/froide_comments/form.html | 48 +- .../templates/froide_comments/list.html | 38 +- .../admin/document/document/change_form.html | 34 +- .../documentcollection/change_form.html | 16 +- .../templates/document/result_item.html | 22 +- .../document/templates/document/search.html | 61 +-- .../document/templates/document/upload.html | 46 +- .../filingcabinet/_base_set_form.html | 25 +- .../filingcabinet/_set_description_form.html | 9 +- .../filingcabinet/_set_title_form.html | 14 +- .../filingcabinet/document_detail.html | 82 ++- .../documentcollection_detail.html | 14 +- .../deferredmessage/change_form.html | 9 +- .../foirequest/foimessage/change_form.html | 30 +- .../foirequest/foirequest/change_form.html | 14 +- .../foirequest/foirequest/change_list.html | 11 +- .../foirequest/_assign_project_form.html | 36 +- .../templates/foirequest/_request_search.html | 141 +++-- .../foirequest/account/list_drafts.html | 127 +++-- .../foirequest/account/list_following.html | 74 ++- .../foirequest/account/list_projects.html | 69 +-- .../foirequest/account/list_requests.html | 154 +++--- .../account/list_subscriptions.html | 50 +- .../foirequest/admin/add_to_project.html | 53 +- .../foirequest/admin/mark_same_as.html | 54 +- .../templates/foirequest/admin_redeliver.html | 54 +- .../foirequest/attachment/manage.html | 153 +++--- .../templates/foirequest/attachment/show.html | 160 +++--- .../foirequest/templates/foirequest/base.html | 3 +- .../foirequest/body/actions/escalate.html | 59 +-- .../foirequest/body/actions/send_message.html | 107 ++-- .../templates/foirequest/body/body.html | 265 +++++----- .../foirequest/body/correspondence.html | 61 +-- .../templates/foirequest/body/documents.html | 21 +- .../body/message/attachments/attachments.html | 120 ++--- .../body/message/attachments/item.html | 189 ++++--- .../body/message/attachments/list.html | 47 +- .../foirequest/body/message/guidance.html | 95 ++-- .../foirequest/body/message/message.html | 459 ++++++++-------- .../body/message/meta_container.html | 498 +++++++++--------- .../foirequest/body/message/sender.html | 81 ++- .../body/message/toolbar/resend.html | 59 ++- .../templates/foirequest/body/settings.html | 122 ++--- .../templates/foirequest/body/timeline.html | 65 +-- .../foirequest/foiproject_action.html | 57 +- .../foirequest/foiproject_detail.html | 314 +++++------ .../templates/foirequest/header.html | 10 +- .../foirequest/header/_set_status.html | 5 +- .../foirequest/header/breadcrumb.html | 37 +- .../templates/foirequest/header/header.html | 491 ++++++++--------- .../templates/foirequest/header/info-box.html | 456 ++++++++-------- .../templates/foirequest/header/tabs.html | 107 ++-- .../templates/foirequest/header/tour.html | 81 ++- .../foirequest/templates/foirequest/list.html | 129 +++-- .../templates/foirequest/pdf/foirequest.html | 114 ++-- .../foirequest/pdf/message_letter.html | 123 +++-- .../foirequest/publicbody_upload.html | 135 +++-- .../templates/foirequest/redact.html | 215 ++++---- .../templates/foirequest/request.html | 229 ++++---- .../templates/foirequest/search/facet.html | 30 +- .../foirequest/templates/foirequest/sent.html | 131 +++-- .../foirequest/templates/foirequest/show.html | 169 +++--- .../snippets/make_same_request.html | 124 +++-- .../foirequest/snippets/message_edit.html | 69 +-- .../foirequest/snippets/message_redact.html | 105 ++-- .../foirequest/snippets/message_timeline.html | 77 ++- .../snippets/moderation_triggers.html | 33 +- .../foirequest/snippets/request_item.html | 12 +- .../snippets/request_item_inner.html | 65 ++- .../snippets/request_item_mini.html | 36 +- .../foirequest/snippets/withdrawal_popup.html | 44 +- .../foirequest/upload_postal_message.html | 91 ++-- .../foirequest/widgets/attachment_file.html | 19 +- .../foirequest/widgets/dropdown_filter.html | 48 +- froide/foisite/templates/foisite/banner.html | 12 +- .../templates/follow/_email_follow_form.html | 47 +- .../follow/templates/follow/_follow_form.html | 125 +++-- .../follow/templates/follow/embed_form.html | 3 +- .../templates/follow/follow_count_badge.html | 3 +- .../follow/templates/follow/follow_form.html | 1 - .../follow/templates/follow/show_follow.html | 17 +- .../georegion/georegion/change_form.html | 52 +- .../admin/guide/guidance/change_form.html | 6 +- froide/guide/templates/guide/guidance.html | 116 ++-- .../templates/helper/admin/apply_action.html | 45 +- .../templates/helper/admin/fk_filter.html | 16 +- .../templates/helper/admin/multi_filter.html | 51 +- .../templates/helper/admin/tree_filter.html | 12 +- .../templates/helper/admin_base_action.html | 36 +- .../helper/forms/bootstrap_field.html | 87 ++- .../helper/forms/bootstrap_field_inline.html | 67 +-- .../helper/forms/bootstrap_field_stacked.html | 54 +- .../helper/forms/bootstrap_form.html | 18 +- .../helper/templates/helper/forms/errors.html | 10 +- .../helper/forms/widgets/daterange.html | 16 +- .../templates/helper/forms/widgets/image.html | 7 +- .../helper/forms/widgets/input_option.html | 10 +- .../helper/forms/widgets/price_input.html | 4 +- .../templates/helper/forms/widgets/radio.html | 25 +- .../helper/forms/widgets/radio_option.html | 5 +- .../forms/widgets/radio_option_inline.html | 5 +- .../helper/forms/widgets/range_filter.html | 29 +- .../forms/widgets/tag_autocomplete.html | 32 +- .../templates/helper/search/multi_search.html | 41 +- .../templates/helper/search/search_base.html | 173 +++--- .../templates/helper/search/search_list.html | 28 +- froide/letter/templates/letter/default.html | 99 ++-- .../letter/templates/letter/pdf/default.html | 72 +-- froide/letter/templates/letter/sent.html | 46 +- .../organization/organization_detail.html | 143 +++-- .../organization/organization_join.html | 44 +- .../organization/organization_list.html | 59 +-- .../organization/organization_list_own.html | 10 +- .../organization_update_form.html | 295 +++++------ .../problem/message_toolbar_item.html | 276 +++++----- .../problem/templates/problem/moderation.html | 36 +- .../templates/problem/user_moderation.html | 123 ++--- .../proof/templates/proof/proof_message.html | 43 +- .../proof/templates/proof/proof_settings.html | 107 ++-- froide/proof/templates/proof/widget.html | 6 +- .../proposedpublicbody/change_form.html | 16 +- .../publicbody/publicbody/change_form.html | 61 +-- .../publicbody/publicbody/change_list.html | 45 +- .../templates/publicbody/_chooser.html | 20 +- .../publicbody/accept_proposals.html | 95 ++-- .../templates/publicbody/add_proposal.html | 41 +- .../publicbody/admin/match_georegions.html | 36 +- .../publicbody/admin/show_georegions.html | 50 +- .../publicbody/templates/publicbody/base.html | 5 +- .../templates/publicbody/jurisdiction.html | 238 ++++----- .../publicbody/templates/publicbody/list.html | 77 ++- .../templates/publicbody/propose.html | 61 +-- .../publicbody/templates/publicbody/show.html | 408 +++++++------- .../templates/publicbody/show_foilaw.html | 142 +++-- .../publicbody/snippets/publicbody_item.html | 27 +- .../snippets/publicbody_proposals.html | 164 +++--- .../publicbody/widget/_add_js_vars.html | 2 - .../templates/team/_assign_team_form.html | 39 +- froide/team/templates/team/team_detail.html | 444 ++++++++-------- froide/team/templates/team/team_join.html | 44 +- froide/team/templates/team/team_list.html | 116 ++-- froide/templates/400.html | 8 +- froide/templates/403.html | 6 +- froide/templates/404.html | 8 +- froide/templates/500.html | 8 +- froide/templates/_frontend.html | 1 - froide/templates/admin/base_site.html | 19 +- .../templates/admin_utils/admin_tag_all.html | 60 +-- froide/templates/base.html | 65 +-- froide/templates/emails/footer.html | 9 +- froide/templates/error_base.html | 56 +- froide/templates/footer.html | 131 +++-- froide/templates/header.html | 276 +++++----- froide/templates/header_minimal.html | 26 +- froide/templates/header_reduced.html | 5 +- froide/templates/help/base.html | 50 +- froide/templates/help/full_page.html | 6 +- froide/templates/help/page.html | 8 +- froide/templates/index.html | 120 ++--- froide/templates/mfa/auth_FIDO2.html | 75 +-- froide/templates/mfa/auth_TOTP.html | 85 ++- froide/templates/mfa/auth_recovery.html | 68 +-- froide/templates/mfa/base.html | 19 +- froide/templates/mfa/base_create.html | 41 +- froide/templates/mfa/create_FIDO2.html | 48 +- froide/templates/mfa/create_TOTP.html | 62 +-- froide/templates/mfa/create_recovery.html | 105 ++-- .../templates/mfa/mfakey_confirm_delete.html | 16 +- froide/templates/mfa/mfakey_list.html | 241 ++++----- froide/templates/pagination/pagination.html | 192 ++++--- froide/templates/scaffold.html | 73 +-- froide/templates/simple_base.html | 34 +- froide/templates/snippets/homepage_hero.html | 162 +++--- froide/templates/snippets/messages.html | 21 +- froide/templates/snippets/meta.html | 30 +- .../upload/widgets/file_uploader.html | 16 +- 208 files changed, 7642 insertions(+), 8676 deletions(-) diff --git a/froide/accesstoken/templates/accesstoken/token_widget.html b/froide/accesstoken/templates/accesstoken/token_widget.html index 73cab4f88..cad1573cf 100644 --- a/froide/accesstoken/templates/accesstoken/token_widget.html +++ b/froide/accesstoken/templates/accesstoken/token_widget.html @@ -1,29 +1,37 @@ {% load i18n %}
-
- -
-
- {% if widget.token %} - - - {% else %} - - {% endif %} -
+
+ +
+
+ {% if widget.token %} + + + {% else %} + + {% endif %} +
diff --git a/froide/account/templates/account/admin_send_mail.html b/froide/account/templates/account/admin_send_mail.html index 2dc48c433..7d2274e71 100644 --- a/froide/account/templates/account/admin_send_mail.html +++ b/froide/account/templates/account/admin_send_mail.html @@ -1,35 +1,40 @@ {% extends "helper/admin_base_action.html" %} - {% load i18n l10n %} - -{% block action_title %}{% trans 'Send mail to users' %}{% endblock %} - +{% block action_title %} + {% trans 'Send mail to users' %} +{% endblock %} {% block breadcrumbs_action_label %} - {% trans 'Send mail to users' %} + {% trans 'Send mail to users' %} {% endblock %} - {% block action_content %} -
{% csrf_token %} -
-

-

-
- {% trans "You can use the following placeholders:" %} {name}, {first_name}, {last_name}, {url} - -

- -

-
- - {% if select_across %} - - {# set invalid selected, so confirmation action path is chosen in admin #} - - {% else %} - {% for obj in queryset %} - - {% endfor %} - {% endif %} -
-{% endblock %} +
+ {% csrf_token %} +
+

+

+ +
+ {% trans "You can use the following placeholders:" %} {name}, {first_name}, {last_name}, {url} + +

+ +

+
+ + {% if select_across %} + + {# set invalid selected, so confirmation action path is chosen in admin #} + + {% else %} + {% for obj in queryset %} + + {% endfor %} + {% endif %} +
+ {% endblock %} diff --git a/froide/account/templates/account/base.html b/froide/account/templates/account/base.html index c0f16b5ee..27a89934a 100644 --- a/froide/account/templates/account/base.html +++ b/froide/account/templates/account/base.html @@ -1,20 +1,17 @@ {% extends "base.html" %} - {% load i18n %} - {% block navbar %} - {% include "account/header.html" %} + {% include "account/header.html" %} {% endblock %} - {% block body %} -
- {% block breadcrumbs %}{% include "account/includes/breadcrumbs.html" %}{% endblock %} -
- -{% block app_body %} -
- {% block app_container %}{% endblock %} -
-{% endblock %} - +
+ {% block breadcrumbs %} + {% include "account/includes/breadcrumbs.html" %} + {% endblock %} +
+ {% block app_body %} +
+ {% block app_container %}{% endblock %} +
+ {% endblock %} {% endblock %} diff --git a/froide/account/templates/account/confirmed.html b/froide/account/templates/account/confirmed.html index 577e52eaf..fb43e521e 100644 --- a/froide/account/templates/account/confirmed.html +++ b/froide/account/templates/account/confirmed.html @@ -1,49 +1,40 @@ {% extends 'account/base.html' %} - {% load i18n %} {% load static %} - -{% block title %}{% trans "Your account is now confirmed" %}{% endblock %} - +{% block title %} + {% trans "Your account is now confirmed" %} +{% endblock %} {% block navbar %}{% endblock %} - - {% block body %} -
-
-
- {% trans 'You got mail' %} -
-
-
-
- -

- {% trans "Your email address is now confirmed!" %} -

- - {% if foirequest %} -

- {% blocktrans with title=foirequest.title url=foirequest.get_absolute_url %} +

+
+
+ {% trans 'You got mail' %} +
+
+
+
+

{% trans "Your email address is now confirmed!" %}

+ {% if foirequest %} +

+ {% blocktrans with title=foirequest.title url=foirequest.get_absolute_url %} Your request “{{ title }}” has been sent. {% endblocktrans %} -

-

- {% trans "We will send you an email when you receive a reply from the public body." %} -

- {% endif %} -
-
- {% block password_form %} -
-
- {% trans "Please set a password for your account now" as form_title %} - {% trans "Set password" as form_button %} - {% include "account/includes/change_password_form.html" with form_title=form_title form_button=form_button %} +

+

{% trans "We will send you an email when you receive a reply from the public body." %}

+ {% endif %} +
-
- {% endblock %} -
- {% block below_password %}{% endblock %} - + {% block password_form %} +
+
+ {% trans "Please set a password for your account now" as form_title %} + {% trans "Set password" as form_button %} + {% include "account/includes/change_password_form.html" with form_title=form_title form_button=form_button %} +
+
+ {% endblock %} +
+ {% block below_password %}{% endblock %} {% endblock %} diff --git a/froide/account/templates/account/emails/confirmation_mail.html b/froide/account/templates/account/emails/confirmation_mail.html index 3fbd55656..9cbde6cc3 100644 --- a/froide/account/templates/account/emails/confirmation_mail.html +++ b/froide/account/templates/account/emails/confirmation_mail.html @@ -1,13 +1,13 @@ {% load i18n %}

{% blocktrans %}Hello {{ name }},

-

This is an email from {{ site_name }} to confirm your email address.
+

This is an email from {{ site_name }} to confirm your email address.
Please visit the link below:

Click here to confirm your email address

{% endblocktrans %} -

{% blocktrans %}Cheers,
+

+ {% blocktrans %}Cheers,
{{ site_name }}{% endblocktrans %} -

- -{% include "emails/footer.html" %} +

+ {% include "emails/footer.html" %} diff --git a/froide/account/templates/account/go.html b/froide/account/templates/account/go.html index 3e9c7ddcc..b8ed033ef 100644 --- a/froide/account/templates/account/go.html +++ b/froide/account/templates/account/go.html @@ -1,22 +1,19 @@ {% extends "base.html" %} - {% load static %} {% load i18n %} - {% block body_tag %} -
-
- {% csrf_token %} -
- {% translate "Loading..." %} +
+ + {% csrf_token %} +
+ {% translate "Loading..." %} +
+

+ +

+
-

- -

- -
{% endblock body_tag %} - {% block scripts %} - + {% endblock %} diff --git a/froide/account/templates/account/header.html b/froide/account/templates/account/header.html index 9c38a8af8..c35fb957e 100644 --- a/froide/account/templates/account/header.html +++ b/froide/account/templates/account/header.html @@ -1,5 +1,3 @@ {% extends "header.html" %} - {% block nav_login %}active{% endblock %} - {% block nav_account %}active{% endblock %} diff --git a/froide/account/templates/account/includes/breadcrumbs.html b/froide/account/templates/account/includes/breadcrumbs.html index 0bea3ba9c..81884c6ec 100644 --- a/froide/account/templates/account/includes/breadcrumbs.html +++ b/froide/account/templates/account/includes/breadcrumbs.html @@ -1,19 +1,18 @@ {% load i18n %} - \ No newline at end of file + + diff --git a/froide/account/templates/account/includes/change_password_form.html b/froide/account/templates/account/includes/change_password_form.html index c619ff31b..d746049ec 100644 --- a/froide/account/templates/account/includes/change_password_form.html +++ b/froide/account/templates/account/includes/change_password_form.html @@ -1,31 +1,34 @@ {% load i18n %} {% load form_helper %} {% load account_tags %} -
-
- {% if form_title %} - {{ form_title }} - {% else %} - {% trans "Change password" %} - {% endif %} -
-
- {% recentauthrequired %} -
- {% csrf_token %} - {% if password_change_form %} - {% render_form password_change_form %} +
+ {% if form_title %} + {{ form_title }} {% else %} - {% render_form request.user.get_password_change_form %} + {% trans "Change password" %} {% endif %} - - {% if next %} - - {% endif %} - +
+
+ {% recentauthrequired %} +
+ {% csrf_token %} + {% if password_change_form %} + {% render_form password_change_form %} + {% else %} + {% render_form request.user.get_password_change_form %} + {% endif %} + + {% if next %}{% endif %} +
{% endrecentauthrequired %} -
-
\ No newline at end of file +
+
diff --git a/froide/account/templates/account/includes/impostor.html b/froide/account/templates/account/includes/impostor.html index ee9a1281f..1a9b5b85e 100644 --- a/froide/account/templates/account/includes/impostor.html +++ b/froide/account/templates/account/includes/impostor.html @@ -1,15 +1,29 @@ {% load i18n %} {# style inline so it works everywhere #} -
- {% blocktrans with user=request.user.get_full_name impostor=request.session.impostor %} +
+ {% blocktrans with user=request.user.get_full_name impostor=request.session.impostor %} WARNING! {{ impostor}}, you are an impostor! You pretend to be {{ user }}! {% endblocktrans %} -
- {% csrf_token %} - -
- +
+ {% csrf_token %} + +
-
+
diff --git a/froide/account/templates/account/includes/recent_auth_required.html b/froide/account/templates/account/includes/recent_auth_required.html index 24926ab85..35e315b77 100644 --- a/froide/account/templates/account/includes/recent_auth_required.html +++ b/froide/account/templates/account/includes/recent_auth_required.html @@ -1,8 +1,6 @@ {% load i18n %} -
-
{% translate "This section requires you to re-authenticate" %}
- - {% translate "Re-authenticate now" %} - +
{% translate "This section requires you to re-authenticate" %}
+ {% translate "Re-authenticate now" %}
diff --git a/froide/account/templates/account/includes/set_password_now.html b/froide/account/templates/account/includes/set_password_now.html index fc5a2bc17..4c93de57b 100644 --- a/froide/account/templates/account/includes/set_password_now.html +++ b/froide/account/templates/account/includes/set_password_now.html @@ -1,6 +1,6 @@ {% load i18n %} {% if request.user.is_authenticated and not request.user.password %} - {% trans "Please set a password for your account now" as form_title %} - {% trans "Set password" as form_button %} - {% include "account/includes/change_password_form.html" with form_title=form_title form_button=form_button %} + {% trans "Please set a password for your account now" as form_title %} + {% trans "Set password" as form_button %} + {% include "account/includes/change_password_form.html" with form_title=form_title form_button=form_button %} {% endif %} diff --git a/froide/account/templates/account/login.html b/froide/account/templates/account/login.html index 3059e75f7..b3946826d 100644 --- a/froide/account/templates/account/login.html +++ b/froide/account/templates/account/login.html @@ -1,59 +1,49 @@ {% extends "account/base.html" %} - {% load i18n %} {% load static %} {% load form_helper %} {% load block_helper %} - {% block app_container %} -
-
-
-
- {% blocktrans %}Log in{% endblocktrans %} -
-
-

- - {% block signup_hint %} - {% blocktrans %}Don't have an account? Click here to sign up!{% endblocktrans %} - {% endblock %} - -

-
- {% csrf_token %} - {% if next %}{% endif %} - {% render_form form %} -
- -
-
-
+
+
+
+
{% blocktrans %}Log in{% endblocktrans %}
+
+

+ + {% block signup_hint %} + {% blocktrans %}Don't have an account? Click here to sign up!{% endblocktrans %} + {% endblock %} + +

+
+ {% csrf_token %} + {% if next %}{% endif %} + {% render_form form %} +
+ +
+
+
+
+
+
{% blocktrans %}In case you forgot your password...{% endblocktrans %}
+
+

{% blocktrans %}... we can send you a reset link to your email address.{% endblocktrans %}

+
+ {% csrf_token %} + {% if next %}{% endif %} + {% render_form reset_form %} +
+ +
+
+
+
+
-
-
- {% blocktrans %}In case you forgot your password...{% endblocktrans %} -
-
-

- {% blocktrans %}... we can send you a reset link to your email address.{% endblocktrans %} -

-
- {% csrf_token %} - {% if next %} - - {% endif %} - {% render_form reset_form %} -
- -
-
-
-
-
-
{% endblock %} diff --git a/froide/account/templates/account/menu.html b/froide/account/templates/account/menu.html index 8c5b54865..69a12506a 100644 --- a/froide/account/templates/account/menu.html +++ b/froide/account/templates/account/menu.html @@ -1,29 +1,18 @@ {% load i18n %} - {% block menu_block %} - -{% block before_requests %} - {% for menu_item in menu_items.before_request %} - - {{ menu_item.label }} - - {% endfor %} -{% endblock %} - -{% block before_settings %} - {% for menu_item in menu_items.before_settings %} - - {{ menu_item.label }} - - {% endfor %} -{% endblock %} - -{% block after_settings %} - {% for menu_item in menu_items.after_settings %} - - {{ menu_item.label }} - - {% endfor %} -{% endblock %} - + {% block before_requests %} + {% for menu_item in menu_items.before_request %} + {{ menu_item.label }} + {% endfor %} + {% endblock %} + {% block before_settings %} + {% for menu_item in menu_items.before_settings %} + {{ menu_item.label }} + {% endfor %} + {% endblock %} + {% block after_settings %} + {% for menu_item in menu_items.after_settings %} + {{ menu_item.label }} + {% endfor %} + {% endblock %} {% endblock %} diff --git a/froide/account/templates/account/new.html b/froide/account/templates/account/new.html index 862bb3543..86225e598 100644 --- a/froide/account/templates/account/new.html +++ b/froide/account/templates/account/new.html @@ -1,57 +1,52 @@ {% extends 'account/base.html' %} - {% load i18n %} {% load static %} - -{% block title %}{% trans "New account" %}{% endblock %} - +{% block title %} + {% trans "New account" %} +{% endblock %} {% block navbar %}{% endblock %} - {% block app_container %} -
-
- {% trans 'You got mail' %} +
+
+ {% trans 'You got mail' %} +
-
-
-
-

- {% trans "Please confirm your email address!" %} -

- - {% if title %} -

- {% blocktrans with title=title %} +

+
+

{% trans "Please confirm your email address!" %}

+ {% if title %} +

+ {% blocktrans with title=title %} Your request “{{ title }}” will only be sent to the public body, when you confirm your email address. {% endblocktrans %} -

- {% endif %} -
-
-
-
- {% if email %} -
    -
  1. - {% blocktrans%}Check your emails for your account{% endblocktrans %}
    - {{ email }} -
  2. -
  3. - {% blocktrans %} +

    + {% endif %} +
+
+
+
+ {% if email %} +
    +
  1. + {% blocktrans%}Check your emails for your account{% endblocktrans %} +
    + {{ email }} +
  2. +
  3. + {% blocktrans %} Click the confirmation link in the email from {{ SITE_NAME }}. {% endblocktrans %} -
  4. -
- {% else %} -

- {% trans "Please go to your email account and click the confirmation link." %} -

- {% endif %} - {% if title %} -

- {% trans "If you do not confirm your email address, we cannot send your request." %} -

- {% endif %} -
-
+ + + {% else %} +

+ {% trans "Please go to your email account and click the confirmation link." %} +

+ {% endif %} + {% if title %} +

{% trans "If you do not confirm your email address, we cannot send your request." %}

+ {% endif %} +
+
{% endblock %} diff --git a/froide/account/templates/account/new_terms.html b/froide/account/templates/account/new_terms.html index 8d2a124fd..c39bdaf32 100644 --- a/froide/account/templates/account/new_terms.html +++ b/froide/account/templates/account/new_terms.html @@ -1,20 +1,17 @@ {% extends 'simple_base.html' %} - {% load i18n %} {% load form_helper %} - - {% block body %} -
-
-

{% trans "Our Terms of Use have changed" %}

- {% block terms_details %}{% endblock %} -
- {% csrf_token %} - {% if next %}{% endif %} - {% render_form terms_form %} - -
-
-
+
+
+

{% trans "Our Terms of Use have changed" %}

+ {% block terms_details %}{% endblock %} +
+ {% csrf_token %} + {% if next %}{% endif %} + {% render_form terms_form %} + +
+
+
{% endblock %} diff --git a/froide/account/templates/account/password_reset_confirm.html b/froide/account/templates/account/password_reset_confirm.html index 48d892561..c2890bfaf 100644 --- a/froide/account/templates/account/password_reset_confirm.html +++ b/froide/account/templates/account/password_reset_confirm.html @@ -1,39 +1,29 @@ {% extends "base.html" %} {% load i18n %} {% load form_helper %} - -{% block title %}{% trans 'Password reset' %}{% endblock %} - -{% block navbar %} +{% block title %} + {% trans 'Password reset' %} {% endblock %} - +{% block navbar %}{% endblock %} {% block app_body %} - -{% if validlink %} -
-
-

{% trans 'Enter new password' %}

- -

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

- -
- {% csrf_token %} - {% render_form form %} -

- -

-
-
-
- -{% else %} - -

{% trans 'Password reset unsuccessful' %}

- -

{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}

- -{% endif %} - + {% if validlink %} +
+
+

{% trans 'Enter new password' %}

+

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

+
+ {% csrf_token %} + {% render_form form %} +

+ +

+
+
+
+ {% else %} +

{% trans 'Password reset unsuccessful' %}

+

+ {% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %} +

+ {% endif %} {% endblock %} diff --git a/froide/account/templates/account/profile.html b/froide/account/templates/account/profile.html index 656975677..88d867774 100644 --- a/froide/account/templates/account/profile.html +++ b/froide/account/templates/account/profile.html @@ -2,177 +2,151 @@ {% load i18n %} {% load markup %} {% load humanize %} - {% block title %}{{ object.get_full_name }} - {{ SITE_NAME }}{% endblock %} - -{% block metadescription %}{% blocktrans with name=object.get_full_name site_name=SITE_NAME %}Profil and requests of {{ name }} on {{ site_name }}{% endblocktrans %}{% endblock %} - +{% block metadescription %} + {% blocktrans with name=object.get_full_name site_name=SITE_NAME %}Profil and requests of {{ name }} on {{ site_name }}{% endblocktrans %} +{% endblock %} {% block extra_head %} - {{ block.super }} - {% if no_index %} - - {% endif %} + {{ block.super }} + {% if no_index %}{% endif %} {% endblock %} - {% block app_container %} -
-
-
- {% if object.profile_photo %} -
- {{ object.get_full_name }} -
- {% endif %} -
-

- {{ object.get_full_name }} -

- {% if object.organization_url and object.organization_name %} -

- - {{ object.organization_name }} - -

- {% elif object.organization_name %} -

- {{ object.organization_name }} -

- {% endif %} -
- {% if aggregates.first_date %} -
{% translate "First request:" %}
-
{{ aggregates.first_date|date }}
- {% endif %} -
-
-
- - {% if object.profile_text %} - {% if object.is_staff %} - {{ object.profile_text|markdown }} - {% else %} -

{{ object.profile_text|linebreaksbr }}

- {% endif %} - {% endif %} - - {% block profile_details %}{% endblock %} - - {% if object == request.user %} - - {% translate "Edit profile" %} - - - {% translate "Make private" %} - - {% endif %} - -
- -
-
-
-
-
{{ aggregates.count|intcomma }}
-

{% translate "Number of public requests" %}

-
-
-
-
-
{{ aggregates.successful|intcomma }}
-

{% translate "Number of successful requests" %}

-
-
-
-
-
{{ aggregates.refused|intcomma }}
-

{% translate "Number of refused requests" %}

-
-
- {% if top_followers %} -
-
-
-

- {% translate "Most followed requests" %} -

-
    - {% for foirequest in top_followers %} -
  • - {% include "foirequest/snippets/request_item.html" with object=foirequest %} -
  • - {% endfor %} -
-
+
+
+
+ {% if object.profile_photo %} +
+ {{ object.get_full_name }} +
+ {% endif %} +
+

{{ object.get_full_name }}

+ {% if object.organization_url and object.organization_name %} +

+ + {{ object.organization_name }} + +

+ {% elif object.organization_name %} +

{{ object.organization_name }}

+ {% endif %} +
+ {% if aggregates.first_date %} +
{% translate "First request:" %}
+
+ {{ aggregates.first_date|date }} +
+ {% endif %} +
+
+
+ {% if object.profile_text %} + {% if object.is_staff %} + {{ object.profile_text|markdown }} + {% else %} +

{{ object.profile_text|linebreaksbr }}

+ {% endif %} + {% endif %} + {% block profile_details %}{% endblock %} + {% if object == request.user %} + {% translate "Edit profile" %} + {% translate "Make private" %} + {% endif %}
-
- {% endif %} - {% if top_publicbodies %} -
-
-

- {% translate "Top requested public bodies" %} -

-
    - {% for pb in top_publicbodies %} -
  1. - - {{ pb.name }} - - - {% blocktranslate count count=pb.user_request_count %}one request{% plural %}{{ count }} requests{% endblocktranslate %} - -
  2. - {% endfor %} -
-
-
- {% endif %} -
- - {% if foirequests %} -
-
-

{% translate "Last requests" %}

-
-
-
    - {% for foirequest in foirequests %} -
  • - {% include "foirequest/snippets/request_item.html" with object=foirequest %} -
  • - {% endfor %} -
- - {% blocktrans with name=object.get_full_name %}See all requests of {{ name }}{% endblocktrans %} - -
-
- {% endif %} - - {% if campaigns %} -
-
-
-
- {% blocktrans with name=object.first_name %} +
+
+
+
+
{{ aggregates.count|intcomma }}
+

{% translate "Number of public requests" %}

+
+
+
+
+
{{ aggregates.successful|intcomma }}
+

{% translate "Number of successful requests" %}

+
+
+
+
+
{{ aggregates.refused|intcomma }}
+

{% translate "Number of refused requests" %}

+
+
+ {% if top_followers %} +
+
+
+

{% translate "Most followed requests" %}

+
    + {% for foirequest in top_followers %} +
  • {% include "foirequest/snippets/request_item.html" with object=foirequest %}
  • + {% endfor %} +
+
+
+
+ {% endif %} + {% if top_publicbodies %} +
+
+

{% translate "Top requested public bodies" %}

+
    + {% for pb in top_publicbodies %} +
  1. + {{ pb.name }} + + {% blocktranslate count count=pb.user_request_count %}one request{% plural %}{{ count }} requests{% endblocktranslate %} + +
  2. + {% endfor %} +
+
+
+ {% endif %} +
+ {% if foirequests %} +
+
+

{% translate "Last requests" %}

+
+
+
    + {% for foirequest in foirequests %} +
  • {% include "foirequest/snippets/request_item.html" with object=foirequest %}
  • + {% endfor %} +
+ + {% blocktrans with name=object.get_full_name %}See all requests of {{ name }}{% endblocktrans %} + +
+
+ {% endif %} + {% if campaigns %} +
+
+
+
+ {% blocktrans with name=object.first_name %} {{ name }} has taken part in these campaigns {% endblocktrans %} -
+
+
+
+ +
+
+ {% endif %}
-
- -
-
- {% endif %} - -
-
+
{% endblock %} diff --git a/froide/account/templates/account/reauth.html b/froide/account/templates/account/reauth.html index 77e92cfd7..12e6edf8b 100644 --- a/froide/account/templates/account/reauth.html +++ b/froide/account/templates/account/reauth.html @@ -1,88 +1,71 @@ {% extends "base.html" %} - {% load static %} {% load i18n %} {% load form_helper %} {% load account_tags %} - -{% block title %}{% translate "Authenticate again" %}{% endblock %} - +{% block title %} + {% translate "Authenticate again" %} +{% endblock %} {% block navbar %} - {% include "header_minimal.html" %} + {% include "header_minimal.html" %} {% endblock %} - {% block body %} -
-
-
- - {% if form.non_field_errors %} -
- {% for error in form.non_field_errors %} -

{{ error }}

- {% endfor %} -
- {% endif %} - -
-
- {% translate "Please authenticate again with any of the methods below" %} +
+
+
+ {% if form.non_field_errors %} +
+ {% for error in form.non_field_errors %}

{{ error }}

{% endfor %} +
+ {% endif %} +
+
{% translate "Please authenticate again with any of the methods below" %}
+
    + {% if "FIDO2" in mfa_methods %} +
  • +
    {% translate "Use hardware security key" %}
    +
    + {% csrf_token %} + {{ form.code.as_hidden }} + {% if next %}{% endif %} + + +
    +
  • + {% endif %} + {% if "TOTP" in mfa_methods %} +
  • +
    {% translate "Use your authenticator app" %}
    +
    + {% csrf_token %} + {% render_field form.code %} + {% if next %}{% endif %} + + +
    +
  • + {% endif %} + {% if request.user.has_usable_password %} +
  • +
    {% translate "Use your password" %}
    +
    + {% csrf_token %} + {% render_field form.password %} + {{ form.hidden_email }} + {% if next %}{% endif %} + + +
    +
  • + {% endif %} +
+
+
-
    - {% if "FIDO2" in mfa_methods %} -
  • -
    {% translate "Use hardware security key" %}
    -
    - {% csrf_token %} - {{ form.code.as_hidden }} - {% if next %}{% endif %} - - -
    -
  • - {% endif %} - - {% if "TOTP" in mfa_methods %} -
  • -
    {% translate "Use your authenticator app" %}
    -
    - {% csrf_token %} - {% render_field form.code %} - {% if next %}{% endif %} - - -
    -
  • - {% endif %} - - {% if request.user.has_usable_password %} -
  • -
    {% translate "Use your password" %}
    -
    - {% csrf_token %} - {% render_field form.password %} - {{ form.hidden_email }} - {% if next %}{% endif %} - - -
    -
  • - {% endif %} -
-
-
-
-{% endblock body %} - -{% block scripts %} - {{ block.super }} - - - -{% endblock %} + {% endblock body %} + {% block scripts %} + {{ block.super }} + + + + {% endblock %} diff --git a/froide/account/templates/account/settings.html b/froide/account/templates/account/settings.html index af24c8202..1aa54d341 100644 --- a/froide/account/templates/account/settings.html +++ b/froide/account/templates/account/settings.html @@ -1,238 +1,194 @@ {% extends 'account/settings_base.html' %} - {% load i18n %} {% load form_helper %} {% load account_tags %} - -{% block title %}{% trans "Account Settings" %}{% endblock %} - +{% block title %} + {% trans "Account Settings" %} +{% endblock %} {% block settings_body %} -

{% trans "Account Settings" %}

- -
-
- {% blocktrans %}Your name:{% endblocktrans %} -
-
- {{ request.user.get_full_name }} - {% block settings_name %}{% endblock %} -
-
- {% trans "Account Privacy:" %} -
-
- {% if request.user.private %} - - {% blocktrans %}Your name is hidden on the web.{% endblocktrans %} - {% else %} - {% blocktrans %}Your name is visible.{% endblocktrans %} - {% block settings_privacy %}{% endblock %} - {% trans "Make my account private" %} -
-
-
- {% csrf_token %} -

{% blocktrans %} +

{% trans "Account Settings" %}

+
+
{% blocktrans %}Your name:{% endblocktrans %}
+
+ {{ request.user.get_full_name }} + {% block settings_name %}{% endblock %} +
+
{% trans "Account Privacy:" %}
+
+ {% if request.user.private %} + + {% blocktrans %}Your name is hidden on the web.{% endblocktrans %} + {% else %} + {% blocktrans %}Your name is visible.{% endblocktrans %} + {% block settings_privacy %}{% endblock %} + {% trans "Make my account private" %} +
+
+ + {% csrf_token %} +

+ {% blocktrans %} If you changed your mind about the public visibility of your account name, we can change your account to private. This will automatically remove your name where it is currently publicly visible. - {% endblocktrans %}

-
- {% blocktrans %}This account-wide setting cannot be undone.
Your account will stay private once you set it to private.{% endblocktrans %} - {% blocktrans %}Any public profile information will be removed.{% endblocktrans %} -
-

- {% trans "You are still responsible for redacting attachments when they contain your personal information." %} -

- - -
+ {% endblocktrans %} +

+
+ {% blocktrans %}This account-wide setting cannot be undone.
Your account will stay private once you set it to private.{% endblocktrans %} + {% blocktrans %}Any public profile information will be removed.{% endblocktrans %} +
+

+ {% trans "You are still responsible for redacting attachments when they contain your personal information." %} +

+ + +
+
+ {% endif %} +
+
+
+
{% trans "Change details" %}
+
+
+ {% csrf_token %} + {% if change_form %} + {% render_form change_form %} + {% else %} + {% render_form request.user.get_change_form %} + {% endif %} + +
+
- {% endif %} - - - -
-
- {% trans "Change details" %} -
-
-
- {% csrf_token %} - {% if change_form %} - {% render_form change_form %} - {% else %} - {% render_form request.user.get_change_form %} - {% endif %} - -
-
-
- - -
-
- {% trans "Account settings" %} -
-
-
- {% csrf_token %} - {% if account_settings_form %} - {% render_form account_settings_form %} - {% else %} - {% render_form request.user.get_account_settings_form %} - {% endif %} - -
-
-
- -{% if not request.user.private %} -
-
- {% trans "Public profile" %} -
-
-

- - {% translate "Your public profile" %} - -

-
- {% csrf_token %} - {% if profile_form %} - {% render_form profile_form %} - {% else %} - {% render_form request.user.get_profile_form %} - {% endif %} - -
+
+
{% trans "Account settings" %}
+
+
+ {% csrf_token %} + {% if account_settings_form %} + {% render_form account_settings_form %} + {% else %} + {% render_form request.user.get_account_settings_form %} + {% endif %} + +
+
-
-{% endif %} - -{% include "account/includes/change_password_form.html" %} - -
-
- {% translate "Setup two-factor login" %} -
-
- {% recentauthrequired "mfa" %} - {% if not request.user.has_usable_password %} -

{% translate "You need to set a password first." %}

- {% else %} - {% get_mfa_keys as mfa_keys %} - {% if mfa_keys.all %} -

{% translate "You have the following two-factor login methods active:" %}

-
    - {% for mfa_key in mfa_keys.all %} -
  • - {{ mfa_key.name }} - - {% if mfa_key.method == "FIDO2" %} - {% translate "hardware security key" %} - {% elif mfa_key.method == "TOTP" %} - {% translate "authenticator app" %} + {% if not request.user.private %} +
    +
    {% trans "Public profile" %}
    +
    +

    + {% translate "Your public profile" %} +

    +
    + {% csrf_token %} + {% if profile_form %} + {% render_form profile_form %} + {% else %} + {% render_form request.user.get_profile_form %} + {% endif %} + +
    +
    +
    + {% endif %} + {% include "account/includes/change_password_form.html" %} +
    +
    {% translate "Setup two-factor login" %}
    +
    + {% recentauthrequired "mfa" %} + {% if not request.user.has_usable_password %} +

    {% translate "You need to set a password first." %}

    + {% else %} + {% get_mfa_keys as mfa_keys %} + {% if mfa_keys.all %} +

    {% translate "You have the following two-factor login methods active:" %}

    +
      + {% for mfa_key in mfa_keys.all %} +
    • + {{ mfa_key.name }} + + {% if mfa_key.method == "FIDO2" %} + {% translate "hardware security key" %} + {% elif mfa_key.method == "TOTP" %} + {% translate "authenticator app" %} + {% else %} + {% translate "recovery code" %} + {% endif %} + +
    • + {% endfor %} +
    {% else %} - {% translate "recovery code" %} +

    {% translate "You have not setup any two-factor login methods." %}

    {% endif %} - -
  • - {% endfor %} -
- {% else %} -

{% translate "You have not setup any two-factor login methods." %}

- {% endif %} - {% translate "Manage two-factor login methods" %} - {% endif %} - {% endrecentauthrequired %} -
+ {% translate "Manage two-factor login methods" %} + {% endif %} + {% endrecentauthrequired %} +
- {% block post_password %}{% endblock %} -
-
- {% translate "Proofs" %} -
-
- {% recentauthrequired "proofs" %} - {% include "proof/proof_settings.html" %} +
{% translate "Proofs" %}
+
+ {% recentauthrequired "proofs" %} + {% include "proof/proof_settings.html" %} {% endrecentauthrequired %} -
- -
- +
+
-
- {% trans "Export your data" %} -
-
- {% recentauthrequired "export" %} -
- {% csrf_token %} -

- {% trans "We will generate a data export and notify you by email when it is ready." %} -

- -
+
{% trans "Export your data" %}
+
+ {% recentauthrequired "export" %} +
+ {% csrf_token %} +

{% trans "We will generate a data export and notify you by email when it is ready." %}

+ +
{% endrecentauthrequired %} -
- -
- +
+
-
- {% blocktrans %}Delete your account{% endblocktrans %} -
-
- {% recentauthrequired "delete-account-section" %} -
-

- - {% trans "Danger: deleting your account cannot be undone." %} - -

-
- {% csrf_token %} - {% render_form user_delete_form %} -

- {% blocktrans %}Your FOI requests will not be removed. Only your personal information connected with your account will be removed.{% endblocktrans %} -

- -
-
+
{% blocktrans %}Delete your account{% endblocktrans %}
+
+ {% recentauthrequired "delete-account-section" %} +
+

+ + {% trans "Danger: deleting your account cannot be undone." %} + +

+
+ {% csrf_token %} + {% render_form user_delete_form %} +

+ {% blocktrans %}Your FOI requests will not be removed. Only your personal information connected with your account will be removed.{% endblocktrans %} +

+ +
+
{% endrecentauthrequired %} -
- +
-
- {% blocktrans %}Developer{% endblocktrans %} -
-
- {% if froide.api_activated %} - {% recentauthrequired "developer" %} - - {% trans "Your OAuth Applications" %} - - {% endrecentauthrequired %} +
{% blocktrans %}Developer{% endblocktrans %}
+
+ {% if froide.api_activated %} + {% recentauthrequired "developer" %} + {% trans "Your OAuth Applications" %} + {% endrecentauthrequired %} {% endif %} -
- +
{% endblock %} diff --git a/froide/account/templates/account/settings_base.html b/froide/account/templates/account/settings_base.html index 1a620c581..c18fdcd15 100644 --- a/froide/account/templates/account/settings_base.html +++ b/froide/account/templates/account/settings_base.html @@ -1,57 +1,34 @@ {% extends 'account/base.html' %} - {% load i18n %} - {% block breadcrumbs %} -{% url "account-settings" as settings_url %} -{% translate "Settings" as settings_name %} -{% include "account/includes/breadcrumbs.html" with section_name=settings_name section_url=settings_url last_item=last_item %} + {% url "account-settings" as settings_url %} + {% translate "Settings" as settings_name %} + {% include "account/includes/breadcrumbs.html" with section_name=settings_name section_url=settings_url last_item=last_item %} {% endblock %} - {% block app_container %} - -
- - {% endblock %} diff --git a/froide/account/templates/account/show.html b/froide/account/templates/account/show.html index fe7617ea5..8713ea973 100644 --- a/froide/account/templates/account/show.html +++ b/froide/account/templates/account/show.html @@ -1,76 +1,77 @@ {% extends 'account/base.html' %} {% load i18n %} {% load markup %} - {% block app_body %} -
-
- - -
-
- {% block tab_content %} - {% block pre_table %}{% endblock %} -
- - - - {% block table_head %} - - - {% endblock table_head %} - - - - {% for object in object_list %} - {% block table_row %}{% endblock %} - {% endfor %} - -
{% blocktrans %}Status{% endblocktrans %}{% blocktrans %}Title{% endblocktrans %}
+
+
+ +
+
+ {% block tab_content %} + {% block pre_table %}{% endblock %} +
+ + + + {% block table_head %} + + + {% endblock table_head %} + + + + {% for object in object_list %} + {% block table_row %}{% endblock %} + {% endfor %} + +
{% blocktrans %}Status{% endblocktrans %}{% blocktrans %}Title{% endblocktrans %}
+
+ {% if page_obj.has_other_pages %} + {% include "pagination/pagination.html" with getvars="&"|add:getvars %} + {% endif %} + {% block post_table %}{% endblock %} + {% endblock %} +
+
- {% if page_obj.has_other_pages %} - {% include "pagination/pagination.html" with getvars="&"|add:getvars %} - {% endif %} - {% block post_table %}{% endblock %} - {% endblock %} -
-
-
{% endblock %} diff --git a/froide/account/templates/account/signup.html b/froide/account/templates/account/signup.html index bf9f6b353..b438840ba 100644 --- a/froide/account/templates/account/signup.html +++ b/froide/account/templates/account/signup.html @@ -1,34 +1,29 @@ {% extends "account/base.html" %} - {% load i18n %} {% load static %} {% load form_helper %} {% load block_helper %} - -{% block title %}{% blocktrans %}Create an account{% endblocktrans %}{% endblock %} - +{% block title %} + {% blocktrans %}Create an account{% endblocktrans %} +{% endblock %} {% block app_container %} -
-
-
-
- {% blocktrans %}Create an account{% endblocktrans %} -
-
-
- {% csrf_token %} - {% if next %} - - {% endif %} - {% render_form form %} -
- -
-
-
+
+
+
+
{% blocktrans %}Create an account{% endblocktrans %}
+
+
+ {% csrf_token %} + {% if next %}{% endif %} + {% render_form form %} +
+ +
+
+
+
+
-
-
{% endblock %} diff --git a/froide/account/templates/account/widgets/confirmation.html b/froide/account/templates/account/widgets/confirmation.html index 5c044c564..525a89a7e 100644 --- a/froide/account/templates/account/widgets/confirmation.html +++ b/froide/account/templates/account/widgets/confirmation.html @@ -1,6 +1,8 @@ {% load i18n %} {% include "django/forms/widgets/input.html" %} - -

- {% blocktrans with phrase=widget.phrase %}Please type this phrase to confirm: {{ phrase }}{% endblocktrans %} +

+ {% blocktrans with phrase=widget.phrase %}Please type this phrase to confirm: {{ phrase }}{% endblocktrans %}

diff --git a/froide/account/templates/account/widgets/pininput.html b/froide/account/templates/account/widgets/pininput.html index f343a1177..1b721ffef 100644 --- a/froide/account/templates/account/widgets/pininput.html +++ b/froide/account/templates/account/widgets/pininput.html @@ -1,3 +1,16 @@
- +
diff --git a/froide/account/templates/admin/account/user/change_form.html b/froide/account/templates/admin/account/user/change_form.html index a46f64912..0cc8ebaa7 100644 --- a/froide/account/templates/admin/account/user/change_form.html +++ b/froide/account/templates/admin/account/user/change_form.html @@ -1,25 +1,21 @@ {% extends "admin/change_form.html" %} {% load i18n %} {% block object-tools-items %} - {% url 'admin:foirequest_foirequest_changelist' as req_urls %} - {% if req_urls %} -
  • - - {% trans "This users requests" %} - -
  • - {% endif %} - {{ block.super }} + {% url 'admin:foirequest_foirequest_changelist' as req_urls %} + {% if req_urls %} +
  • + {% trans "This users requests" %} +
  • + {% endif %} + {{ block.super }} {% endblock %} - {% block content %} - {{ block.super }} - {% if original.pk and not original.is_superuser and perms.account.change_user %} -
    - {% csrf_token %} - -
    - {% endif %} + {{ block.super }} + {% if original.pk and not original.is_superuser and perms.account.change_user %} +
    + {% csrf_token %} + +
    + {% endif %} {% endblock %} diff --git a/froide/account/templates/oauth2_provider/application_list.html b/froide/account/templates/oauth2_provider/application_list.html index 0946476d6..5eaa132e0 100644 --- a/froide/account/templates/oauth2_provider/application_list.html +++ b/froide/account/templates/oauth2_provider/application_list.html @@ -1,14 +1,11 @@ {% extends "oauth2_provider/application_list.html" %} - {% load i18n %} - {% block content %} -
    - - {{ block.super }} + {{ block.super }} {% endblock %} diff --git a/froide/account/templates/oauth2_provider/authorize.html b/froide/account/templates/oauth2_provider/authorize.html index 4727278b5..727872a19 100644 --- a/froide/account/templates/oauth2_provider/authorize.html +++ b/froide/account/templates/oauth2_provider/authorize.html @@ -1,43 +1,37 @@ {% extends "oauth2_provider/base.html" %} - {% load i18n %} - {% block content %} -
    -
    - {% if not error %} -
    -

    {% blocktrans with name=application.name %}Authorize the application '{{ name }}'?{% endblocktrans %}

    - {% csrf_token %} - - {% for field in form %} - {% if field.is_hidden %} - {{ field }} - {% endif %} - {% endfor %} - -

    {% trans "Application requires following permissions" %}

    -
      - {% for scope in scopes_descriptions %} -
    • {{ scope }}
    • - {% endfor %} -
    - - {{ form.errors }} - {{ form.non_field_errors }} - -
    -
    - - -
    -
    -
    - - {% else %} -

    Error: {{ error.error }}

    -

    {{ error.description }}

    - {% endif %} +
    +
    + {% if not error %} +
    +

    + {% blocktrans with name=application.name %}Authorize the application '{{ name }}'?{% endblocktrans %} +

    + {% csrf_token %} + {% for field in form %} + {% if field.is_hidden %}{{ field }}{% endif %} + {% endfor %} +

    {% trans "Application requires following permissions" %}

    +
      + {% for scope in scopes_descriptions %}
    • {{ scope }}
    • {% endfor %} +
    + {{ form.errors }} + {{ form.non_field_errors }} +
    +
    + + +
    +
    +
    + {% else %} +

    Error: {{ error.error }}

    +

    {{ error.description }}

    + {% endif %} +
    -
    {% endblock %} diff --git a/froide/account/templates/oauth2_provider/base.html b/froide/account/templates/oauth2_provider/base.html index dfd9c1f3a..a655fa555 100644 --- a/froide/account/templates/oauth2_provider/base.html +++ b/froide/account/templates/oauth2_provider/base.html @@ -1,16 +1,12 @@ {% extends "account/settings_base.html" %} - {% load i18n %} - {% block title %}Applications{% endblock %} - {% block breadcrumbs %} -{% url "account-settings" as settings_url %} -{% translate "Settings" as settings_name %} -{% translate "OAuth applications" as last_item %} -{% include "account/includes/breadcrumbs.html" with section_name=settings_name section_url=settings_url last_item=last_item %} + {% url "account-settings" as settings_url %} + {% translate "Settings" as settings_name %} + {% translate "OAuth applications" as last_item %} + {% include "account/includes/breadcrumbs.html" with section_name=settings_name section_url=settings_url last_item=last_item %} {% endblock %} - {% block app_container %} -{% block content %}{% endblock %} + {% block content %}{% endblock %} {% endblock %} diff --git a/froide/campaign/templates/campaign/request_banner.html b/froide/campaign/templates/campaign/request_banner.html index a5f554b02..d80d3e435 100644 --- a/froide/campaign/templates/campaign/request_banner.html +++ b/froide/campaign/templates/campaign/request_banner.html @@ -1,28 +1,25 @@ {% load i18n %} {% load markup %} - {% with campaign=object.campaign %} - {% if campaign.url or campaign.description %} -
    -
    - {% if campaign.description %} - {{ campaign.description|markdown }} - {% endif %} - {% if campaign.url %} -

    - {% blocktrans with name=campaign.name url=campaign.url %} + {% if campaign.url or campaign.description %} +

    +
    + {% if campaign.description %}{{ campaign.description|markdown }}{% endif %} + {% if campaign.url %} +

    + {% blocktrans with name=campaign.name url=campaign.url %} This request was made as part of the campaign “{{ name }}”. {% endblocktrans %} -

    - {% endif %} - {% if campaign.active %} -
    - {% if not request.user.is_authenticated or campaign.ident not in request.user.tags %} - {% trans "Make a request yourself" %} - {% endif %} +

    + {% endif %} + {% if campaign.active %} +
    + {% if not request.user.is_authenticated or campaign.ident not in request.user.tags %} + {% trans "Make a request yourself" %} + {% endif %} +
    + {% endif %} +
    - {% endif %} -
    -
    - {% endif %} + {% endif %} {% endwith %} diff --git a/froide/comments/templates/froide_comments/comment.html b/froide/comments/templates/froide_comments/comment.html index 6cf0259f1..07bbc420a 100644 --- a/froide/comments/templates/froide_comments/comment.html +++ b/froide/comments/templates/froide_comments/comment.html @@ -1,57 +1,51 @@ {% load i18n %} -
    - - {# head #} -
    - - {% if request.user.is_authenticated %} - {# name #} - {% if comment.is_requester and comment.user.private %} - - {% trans "Commentator" %} - - {% elif not comment.user_name %} - {% trans "Commentator" %} - {% else %} - {{ comment.user_name }} - {% endif %} - - {# requester-/moderator-badges #} - {% if comment.is_requester %} - {% trans "Requester" %} - {% elif comment.is_moderation %} - {% trans "Moderation" %} - {% endif %} - - {% else %} - {% trans "Only visible if logged in" %} - {% endif %} - - - {# timestamp #} - - {{ comment.submit_date }} - -
    - - {# body #} - {% if comment.is_removed %} -
    {% trans "Comment was removed." %}
    - {% else %} -
    - {% if comment.is_moderation %} - {{ comment.comment|urlizetrunc:40|linebreaksbr }} - {% else %} - {% if comment.comment != comment.comment|truncatewords:20 %} - {{ comment.comment|truncatewords:20|urlizetrunc:40|linebreaksbr }} - - {% trans "Read all" %} - {{ comment.comment|urlizetrunc:40|linebreaksbr }} - {% else %} - {{ comment.comment|urlizetrunc:40|linebreaksbr }} + {# head #} +
    + + {% if request.user.is_authenticated %} + {# name #} + {% if comment.is_requester and comment.user.private %} + {% trans "Commentator" %} + {% elif not comment.user_name %} + {% trans "Commentator" %} + {% else %} + {{ comment.user_name }} + {% endif %} + {# requester-/moderator-badges #} + {% if comment.is_requester %} + {% trans "Requester" %} + {% elif comment.is_moderation %} + {% trans "Moderation" %} + {% endif %} + {% else %} + {% trans "Only visible if logged in" %} + {% endif %} + + {# timestamp #} + + {{ comment.submit_date }} +
    + {# body #} + {% if comment.is_removed %} +
    {% trans "Comment was removed." %}
    + {% else %} +
    + {% if comment.is_moderation %} + {{ comment.comment|urlizetrunc:40|linebreaksbr }} + {% else %} + {% if comment.comment != comment.comment|truncatewords:20 %} + {{ comment.comment|truncatewords:20|urlizetrunc:40|linebreaksbr }} + {% trans "Read all" %} + {{ comment.comment|urlizetrunc:40|linebreaksbr }} + {% else %} + {{ comment.comment|urlizetrunc:40|linebreaksbr }} + {% endif %} + {% endif %} +
    {% endif %} - {% endif %}
    - {% endif %} -
    diff --git a/froide/comments/templates/froide_comments/comments.html b/froide/comments/templates/froide_comments/comments.html index 45e3e5dd4..4c7ea1ec3 100644 --- a/froide/comments/templates/froide_comments/comments.html +++ b/froide/comments/templates/froide_comments/comments.html @@ -1,30 +1,30 @@ {% load i18n %} {% load content_helper %} - {% if not comment_list|length %} - {% translate "No comments yet." %} + {% translate "No comments yet." %} {% else %} - {% include "froide_comments/list.html" with object=object comment_list=comment_list %} + {% include "froide_comments/list.html" with object=object comment_list=comment_list %} {% endif %} - {% if request.user.is_authenticated %} - {# comment reply button and form #} -
    - {% else %} - - {% blocktranslate with link=object.get_absolute_url|make_login_redirect_url %}Please login to write a comment.{% endblocktranslate %} - + + {% blocktranslate with link=object.get_absolute_url|make_login_redirect_url %}Please login to write a comment.{% endblocktranslate %} + {% endif %} diff --git a/froide/comments/templates/froide_comments/form.html b/froide/comments/templates/froide_comments/form.html index cb113cde9..123c9dc09 100644 --- a/froide/comments/templates/froide_comments/form.html +++ b/froide/comments/templates/froide_comments/form.html @@ -2,35 +2,27 @@ {% load form_helper %} {% load foirequest_tags %} {% load froide_comment_tags %} - {% get_froide_comment_form object as form %} - -
    {% csrf_token %} - - {% for field in form %} - {% if field.is_hidden %} - {{ field }} + + {% csrf_token %} + + {% for field in form %} + {% if field.is_hidden %}{{ field }}{% endif %} + {% endfor %} + {% if request.user.private and request.user == object.request.user %} +
    + {% trans "You have a private account. Your comment will show “requester” as the author." %} +
    + {% else %} + {% render_field form.name %} {% endif %} - {% endfor %} - - {% if request.user.private and request.user == object.request.user %} -
    - {% trans "You have a private account. Your comment will show “requester” as the author." %} + {% render_field form.comment %} + {% if object.request|can_moderate_foirequest:request and not request.user == object.request.user %} + {% render_field form.is_moderation %} + {% endif %} +
    +
    - {% else %} - {% render_field form.name %} - {% endif %} - - {% render_field form.comment %} - - {% if object.request|can_moderate_foirequest:request and not request.user == object.request.user %} - {% render_field form.is_moderation %} - {% endif %} - -
    - -
    - diff --git a/froide/comments/templates/froide_comments/list.html b/froide/comments/templates/froide_comments/list.html index 22355fd8a..dd72173b1 100644 --- a/froide/comments/templates/froide_comments/list.html +++ b/froide/comments/templates/froide_comments/list.html @@ -1,27 +1,25 @@ {% load i18n %} {% load content_helper %} - {% if comment_list %} -
    - - {% for comment in comment_list|slice:":3" %} - {% include "froide_comments/comment.html" %} - {% endfor %} - - {% if comment_list|length > 3 %} -
    - {% for comment in comment_list|slice:"3:" %} - {% include "froide_comments/comment.html" %} +
    + {% for comment in comment_list|slice:":3" %} + {% include "froide_comments/comment.html" %} {% endfor %} -
    - + +
    + {% endif %} +
    {% endif %} diff --git a/froide/document/templates/admin/document/document/change_form.html b/froide/document/templates/admin/document/document/change_form.html index eae5e7c71..c59eb4a71 100644 --- a/froide/document/templates/admin/document/document/change_form.html +++ b/froide/document/templates/admin/document/document/change_form.html @@ -1,22 +1,20 @@ {% extends "admin/change_form.html" %} {% load i18n %} {% block object-tools-items %} -{% if original.pk %} -
  • - - {% trans "Pages" %} - -
  • -
  • - - {% trans "Annotations" %} - -
  • -
  • - - {% trans "Collections" %} - -
  • -{% endif %} -{{ block.super }} + {% if original.pk %} +
  • + {% trans "Pages" %} +
  • +
  • + + {% trans "Annotations" %} + +
  • +
  • + + {% trans "Collections" %} + +
  • + {% endif %} + {{ block.super }} {% endblock %} diff --git a/froide/document/templates/admin/document/documentcollection/change_form.html b/froide/document/templates/admin/document/documentcollection/change_form.html index 49c07ffd0..fff73e39f 100644 --- a/froide/document/templates/admin/document/documentcollection/change_form.html +++ b/froide/document/templates/admin/document/documentcollection/change_form.html @@ -1,12 +1,12 @@ {% extends "admin/change_form.html" %} {% load i18n %} {% block object-tools-items %} -{% if original.pk %} -
  • - - {% trans "Documents" %} - -
  • -{% endif %} -{{ block.super }} + {% if original.pk %} +
  • + + {% trans "Documents" %} + +
  • + {% endif %} + {{ block.super }} {% endblock %} diff --git a/froide/document/templates/document/result_item.html b/froide/document/templates/document/result_item.html index 7338425b1..78a592c6c 100644 --- a/froide/document/templates/document/result_item.html +++ b/froide/document/templates/document/result_item.html @@ -1,17 +1,11 @@ {% load i18n %} -{% trans 'Page' %} {{ object.number }} – {{ object.document.title }} +{% trans 'Page' %} {{ object.number }} – {{ object.document.title }}
    -
    - - {% trans "Page" %} {{ object.number }} – {{ object.document.title }} - -
    - {% if object.document.description %} - {{ object.document.description|truncatewords:20 }} - {% endif %} - {% if object.query_highlight %} -
    - {{ object.query_highlight }} -
    - {% endif %} +
    + {% trans "Page" %} {{ object.number }} – {{ object.document.title }} +
    + {% if object.document.description %}{{ object.document.description|truncatewords:20 }}{% endif %} + {% if object.query_highlight %}
    {{ object.query_highlight }}
    {% endif %}
    diff --git a/froide/document/templates/document/search.html b/froide/document/templates/document/search.html index 17d16123c..085211b69 100644 --- a/froide/document/templates/document/search.html +++ b/froide/document/templates/document/search.html @@ -1,44 +1,31 @@ {% extends 'helper/search/search_base.html' %} - {% load i18n %} - {% block search_title %} - {% trans "Documents" %} + {% trans "Documents" %} {% endblock %} - - {% block search_form_filters %} -
    - {% if "jurisdiction" in show_filters and form.jurisdiction.field.choices|length > 1 %} -
    - {{ form.jurisdiction }} -
    - {% else %} - {{ form.jurisdiction }} - {% endif %} - - {% if "campaign" in show_filters %} -
    - {{ form.campaign }} -
    - {% else %} - {{ form.campaign }} - {% endif %} - - {{ form.publicbody }} - {{ form.tag }} -
    +
    + {% if "jurisdiction" in show_filters and form.jurisdiction.field.choices|length > 1 %} +
    {{ form.jurisdiction }}
    + {% else %} + {{ form.jurisdiction }} + {% endif %} + {% if "campaign" in show_filters %} +
    {{ form.campaign }}
    + {% else %} + {{ form.campaign }} + {% endif %} + {{ form.publicbody }} + {{ form.tag }} +
    {% endblock %} - {% block sidebar_bottom %} - -{% endblock %} \ No newline at end of file + +{% endblock %} diff --git a/froide/document/templates/document/upload.html b/froide/document/templates/document/upload.html index 77b60c2cc..ac9f8bc9a 100644 --- a/froide/document/templates/document/upload.html +++ b/froide/document/templates/document/upload.html @@ -1,44 +1,24 @@ {% extends "base.html" %} - {% load i18n %} {% load static %} {% load frontendbuild %} {% load form_helper %} - {% block navbar %} - {% include "header_reduced.html" %} + {% include "header_reduced.html" %} {% endblock %} - - {% block app_body %} -

    -{% blocktrans %}Upload documents{% endblocktrans %} -

    - -

    - {% trans "You can upload large PDF documents or ZIP files of PDF documents here." %} -

    - -
    - {% csrf_token %} - {% render_form form %} - -
    - -
    -
    - +

    {% blocktrans %}Upload documents{% endblocktrans %}

    +

    {% trans "You can upload large PDF documents or ZIP files of PDF documents here." %}

    +
    + {% csrf_token %} + {% render_form form %} + +
    + +
    +
    {% endblock %} - - {% block scripts %} - {{ block.super }} - {% addfrontendbuild "document.js" %} + {{ block.super }} + {% addfrontendbuild "document.js" %} {% endblock %} diff --git a/froide/document/templates/filingcabinet/_base_set_form.html b/froide/document/templates/filingcabinet/_base_set_form.html index cfd7ff1e7..00e10fe66 100644 --- a/froide/document/templates/filingcabinet/_base_set_form.html +++ b/froide/document/templates/filingcabinet/_base_set_form.html @@ -1,14 +1,15 @@ {% load i18n %} - -
    -
    - {% csrf_token %} - {% block inputs %}{% endblock %} - - -
    +
    +
    + {% csrf_token %} + {% block inputs %}{% endblock %} + + +
    diff --git a/froide/document/templates/filingcabinet/_set_description_form.html b/froide/document/templates/filingcabinet/_set_description_form.html index ca46c9402..87dc8ee72 100644 --- a/froide/document/templates/filingcabinet/_set_description_form.html +++ b/froide/document/templates/filingcabinet/_set_description_form.html @@ -1,8 +1,7 @@ {% extends 'filingcabinet/_base_set_form.html' %} - {% block inputs %} - + {% endblock %} - -{% block saveurl %}{% url 'document-set_description' pk=object.pk %}{% endblock%} -{% block autofocus %}[name='description']{%endblock%} +{% block saveurl %} + {% url 'document-set_description' pk=object.pk %}{% endblock %} + {% block autofocus %}[name='description']{% endblock %} diff --git a/froide/document/templates/filingcabinet/_set_title_form.html b/froide/document/templates/filingcabinet/_set_title_form.html index bf3f051e1..3a44539f5 100644 --- a/froide/document/templates/filingcabinet/_set_title_form.html +++ b/froide/document/templates/filingcabinet/_set_title_form.html @@ -1,9 +1,11 @@ {% extends 'filingcabinet/_base_set_form.html' %} - {% block inputs %} - + {% endblock %} - -{% block fromclasses %}{{block.super}} d-flex{% endblock%} -{% block saveurl %}{% url 'document-set_title' pk=object.pk %}{% endblock%} -{% block autofocus %}[name='title']{%endblock%} +{% block fromclasses %}{{ block.super }} d-flex{% endblock %} + {% block saveurl %} + {% url 'document-set_title' pk=object.pk %}{% endblock %} + {% block autofocus %}[name='title']{% endblock %} diff --git a/froide/document/templates/filingcabinet/document_detail.html b/froide/document/templates/filingcabinet/document_detail.html index 99f59a432..0f052fbb2 100644 --- a/froide/document/templates/filingcabinet/document_detail.html +++ b/froide/document/templates/filingcabinet/document_detail.html @@ -1,54 +1,46 @@ {% extends "filingcabinet/document_detail.html" %} - {% load i18n %} {% load markup %} {% load frontendbuild %} {% load document_tags %} - {% block document_top %} -
    -

    - {{ object.title }} - {% if object|can_write_document:request %} - - - {% trans "Edit title" %} - - {% endif %} -

    - - - {% if object|can_write_document:request %} - {% include 'filingcabinet/_set_title_form.html' with form_id='document-title-form' %} - {% include 'filingcabinet/_set_description_form.html' with form_id='document-description-form' %} - {% endif %} - - {% if not object.public %} - {% trans "private" %} - {% endif %} - {% if object.description %} -
    - {{ object.description|markdown }} -
    - {% endif %} - {% if object|can_write_document:request %} - - - {% trans "Edit description" %} - - {% endif %} - - {% if object.foirequest %} -

    - {% blocktrans with title=object.foirequest.title request_url=object.foirequest.get_absolute_url %} +

    +

    + {{ object.title }} + {% if object|can_write_document:request %} + + + {% trans "Edit title" %} + + {% endif %} +

    + {% if object|can_write_document:request %} + {% include 'filingcabinet/_set_title_form.html' with form_id='document-title-form' %} + {% include 'filingcabinet/_set_description_form.html' with form_id='document-description-form' %} + {% endif %} + {% if not object.public %} + {% trans "private" %} + {% endif %} + {% if object.description %}
    {{ object.description|markdown }}
    {% endif %} + {% if object|can_write_document:request %} + + + {% trans "Edit description" %} + + {% endif %} + {% if object.foirequest %} +

    + {% blocktrans with title=object.foirequest.title request_url=object.foirequest.get_absolute_url %} This document is part of the request ”{{ title }}”. {% endblocktrans %} -

    - {% if object.foirequest.campaign %} -
    - {% include object.foirequest.campaign.banner_templates with object=object.foirequest %} -
    - {% endif %} - {% endif %} -
    +

    + {% if object.foirequest.campaign %} +
    {% include object.foirequest.campaign.banner_templates with object=object.foirequest %}
    + {% endif %} + {% endif %} +
    {% endblock document_top %} diff --git a/froide/document/templates/filingcabinet/documentcollection_detail.html b/froide/document/templates/filingcabinet/documentcollection_detail.html index f3bcecc0c..c64a226f1 100644 --- a/froide/document/templates/filingcabinet/documentcollection_detail.html +++ b/froide/document/templates/filingcabinet/documentcollection_detail.html @@ -1,15 +1,9 @@ {% extends "filingcabinet/documentcollection_detail.html" %} - {% load markup %} {% load frontendbuild %} - {% block documentcollection_top %} -
    -

    {{ object.title }}

    - {% if object.description %} -

    - {{ object.description|markdown }} -

    - {% endif %} -
    +
    +

    {{ object.title }}

    + {% if object.description %}

    {{ object.description|markdown }}

    {% endif %} +
    {% endblock documentcollection_top %} diff --git a/froide/foirequest/templates/admin/foirequest/deferredmessage/change_form.html b/froide/foirequest/templates/admin/foirequest/deferredmessage/change_form.html index 043b35904..3de87d2bb 100644 --- a/froide/foirequest/templates/admin/foirequest/deferredmessage/change_form.html +++ b/froide/foirequest/templates/admin/foirequest/deferredmessage/change_form.html @@ -1,7 +1,6 @@ {% extends "admin/change_form.html" %} - {% block after_field_sets %} - -
    {{ original.decoded_mail }}
    -
    -{% endblock %} \ No newline at end of file + +
    {{ original.decoded_mail }}
    +
    +{% endblock %} diff --git a/froide/foirequest/templates/admin/foirequest/foimessage/change_form.html b/froide/foirequest/templates/admin/foirequest/foimessage/change_form.html index 5b971f764..b8181059c 100644 --- a/froide/foirequest/templates/admin/foirequest/foimessage/change_form.html +++ b/froide/foirequest/templates/admin/foirequest/foimessage/change_form.html @@ -1,19 +1,19 @@ {% extends "admin/change_form.html" %} {% load i18n %} {% block object-tools-items %} - {% if original.pk and not original.sent %} -
  • -
    {% csrf_token %} - -
  • - {% endif %} - {% if original and original.is_email %} -
  • - - {% translate "Download as .eml" %} - -
  • - {% endif %} - {{ block.super }} + {% if original.pk and not original.sent %} +
  • +
    + {% csrf_token %} + +
    +
  • + {% endif %} + {% if original and original.is_email %} +
  • + {% translate "Download as .eml" %} +
  • + {% endif %} + {{ block.super }} {% endblock %} - diff --git a/froide/foirequest/templates/admin/foirequest/foirequest/change_form.html b/froide/foirequest/templates/admin/foirequest/foirequest/change_form.html index c45948bcf..2f8702b59 100644 --- a/froide/foirequest/templates/admin/foirequest/foirequest/change_form.html +++ b/froide/foirequest/templates/admin/foirequest/foirequest/change_form.html @@ -1,12 +1,10 @@ {% extends "admin/change_form.html" %} {% load i18n %} {% block object-tools-items %} - {% if original.pk %} -
  • - - {% trans "Events" %} - -
  • - {% endif %} - {{ block.super }} + {% if original.pk %} +
  • + {% trans "Events" %} +
  • + {% endif %} + {{ block.super }} {% endblock %} diff --git a/froide/foirequest/templates/admin/foirequest/foirequest/change_list.html b/froide/foirequest/templates/admin/foirequest/foirequest/change_list.html index d9e236409..7a54665b5 100644 --- a/froide/foirequest/templates/admin/foirequest/foirequest/change_list.html +++ b/froide/foirequest/templates/admin/foirequest/foirequest/change_list.html @@ -1,11 +1,6 @@ - {% extends "admin/change_list.html" %} - {% load i18n %} - {% block result_list %} -

    - {% trans "Distinct users:" %} {{ cl.user_count }} -

    -{{ block.super }} -{% endblock %} \ No newline at end of file +

    {% trans "Distinct users:" %} {{ cl.user_count }}

    + {{ block.super }} +{% endblock %} diff --git a/froide/foirequest/templates/foirequest/_assign_project_form.html b/froide/foirequest/templates/foirequest/_assign_project_form.html index b2f3c62c6..6f7b4a635 100644 --- a/froide/foirequest/templates/foirequest/_assign_project_form.html +++ b/froide/foirequest/templates/foirequest/_assign_project_form.html @@ -1,25 +1,21 @@ {% load i18n %} {% load form_helper %} - -
    -
    {{ legend }}
    - {% csrf_token %}{# needs to be below
    for `tight-margin` class to work #} - -

    - {% if object.project %} - {% blocktrans with title=object.project.title url=object.project.get_absolute_url %} + +

    {{ legend }}
    + {% csrf_token %}{# needs to be below
    for `tight-margin` class to work #} +

    + {% if object.project %} + {% blocktrans with title=object.project.title url=object.project.get_absolute_url %} Currently, the project {{ title }} is assigned. {% endblocktrans %} - {% else %} - {% trans "Currently no project assigned." %} - {% endif %} -

    - - {% render_form form %} - -
    - -
    + {% else %} + {% trans "Currently no project assigned." %} + {% endif %} +

    + {% render_form form %} +
    + +
    diff --git a/froide/foirequest/templates/foirequest/_request_search.html b/froide/foirequest/templates/foirequest/_request_search.html index 90f2954f5..0e0e3be96 100644 --- a/froide/foirequest/templates/foirequest/_request_search.html +++ b/froide/foirequest/templates/foirequest/_request_search.html @@ -1,83 +1,70 @@ {% load i18n %} {% load humanize %} - -
    -
    -
    -
    - {{ form.q }} - -
    -
    - {% if "status" in show_filters %} -
    - {{ form.status }} -
    - {% else %} - {{ form.status }} - {% endif %} -
    - {% if filtered_objects %} - - - {% trans "Show all FoI requests" %} - - {% endif %} -
    -
    -
    - {% if "jurisdiction" in show_filters or form.jurisdiction.field.choices|length > 1 %} -
    - {{ form.jurisdiction }} -
    - {% else %} - {{ form.jurisdiction }} - {% endif %} - - {% if "campaign" in show_filters %} -
    - {{ form.campaign }} -
    - {% else %} - {{ form.campaign }} - {% endif %} - - {% if "category" in show_filters %} -
    - {{ form.category }} -
    - {% else %} - {{ form.category }} - {% endif %} - - {{ form.publicbody }} - {{ form.tag }} - {{ form.user }} -
    - {% if 'first' in show_filters or 'sort' in show_filters %} - - {% translate "More search options" %} -
    -
    - + +
    +
    +
    + {{ form.q }} + +
    - {% if "sort" in show_filters %} -
    - -
    + {% if "status" in show_filters %} +
    {{ form.status }}
    {% else %} - {{ form.sort }} + {{ form.status }} {% endif %} -
    - - {% endif %} - +
    + {% if filtered_objects %} + + + {% trans "Show all FoI requests" %} + + {% endif %} +
    +
    +
    + {% if "jurisdiction" in show_filters or form.jurisdiction.field.choices|length > 1 %} +
    {{ form.jurisdiction }}
    + {% else %} + {{ form.jurisdiction }} + {% endif %} + {% if "campaign" in show_filters %} +
    {{ form.campaign }}
    + {% else %} + {{ form.campaign }} + {% endif %} + {% if "category" in show_filters %} +
    {{ form.category }}
    + {% else %} + {{ form.category }} + {% endif %} + {{ form.publicbody }} + {{ form.tag }} + {{ form.user }} +
    + {% if 'first' in show_filters or 'sort' in show_filters %} +
    + {% translate "More search options" %} +
    +
    + +
    + {% if "sort" in show_filters %} +
    + +
    + {% else %} + {{ form.sort }} + {% endif %} +
    +
    + {% endif %} diff --git a/froide/foirequest/templates/foirequest/account/list_drafts.html b/froide/foirequest/templates/foirequest/account/list_drafts.html index 6ad15a876..4fceaebf6 100644 --- a/froide/foirequest/templates/foirequest/account/list_drafts.html +++ b/froide/foirequest/templates/foirequest/account/list_drafts.html @@ -1,91 +1,82 @@ {% extends "account/show.html" %} - {% load i18n %} - -{% block title %}{% translate "Your draft requests" %}{% endblock %} - +{% block title %} + {% translate "Your draft requests" %} +{% endblock %} {% block breadcrumbs %} -{% url "account-drafts" as section_url %} -{% translate "Your draft requests" as section_name %} -{% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} + {% url "account-drafts" as section_url %} + {% translate "Your draft requests" as section_name %} + {% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} {% endblock %} - {% block pre_table %} -
    -
    - -

    {% translate "Your draft requests" %}

    - - {% trans "Search your draft requests" as search_title %} -

    - {% if view.query %} - {% blocktrans with query=view.query count request_count=page_obj.paginator.count %} +

    +
    +

    {% translate "Your draft requests" %}

    + {% trans "Search your draft requests" as search_title %} +

    + {% if view.query %} + {% blocktrans with query=view.query count request_count=page_obj.paginator.count %} Your search for “{{ query }}” produced one search result. {% plural %} Your search for “{{ query }}” produced {{ request_count }} search results. {% endblocktrans %} - {% else %} - {% blocktrans count request_count=page_obj.paginator.count %} + {% else %} + {% blocktrans count request_count=page_obj.paginator.count %} You have one request draft. {% plural %} You have {{ request_count }} request drafts. {% endblocktrans %} - {% endif %} -

    + {% endif %} +

    +
    -
    {% endblock %} - {% block table_head %} - {% blocktrans %}Date{% endblocktrans %} - {% blocktrans %}Title{% endblocktrans %} - - + {% blocktrans %}Date{% endblocktrans %} + {% blocktrans %}Title{% endblocktrans %} + + {% endblock table_head %} - - {% block table_row %} - - - {{ object.save_date|date:"DATETIME_FORMAT" }} - - - {% with pbcount=object.publicbodies.count %} - {% if pbcount == 1 %} - {% blocktrans with subject=object.subject name=object.publicbodies.all.0.name %}“{{ subject }}” to {{ name }}{% endblocktrans %} - {% else %} - {% blocktrans with subject=object.subject count count=pbcount %}“{{ subject }}” to one public body{% plural %}“{{ subject }}” to {{ count }} public bodies{% endblocktrans %} - {% endif %} - {% endwith %} - {% if object.request_or_project %} -
    - {% blocktrans with title=object.request_or_project.title url=object.request_or_project.get_absolute_url %} + + {{ object.save_date|date:"DATETIME_FORMAT" }} + + {% with pbcount=object.publicbodies.count %} + {% if pbcount == 1 %} + {% blocktrans with subject=object.subject name=object.publicbodies.all.0.name %}“{{ subject }}” to {{ name }}{% endblocktrans %} + {% else %} + {% blocktrans with subject=object.subject count count=pbcount %}“{{ subject }}” to one public body{% plural %}“{{ subject }}” to {{ count }} public bodies{% endblocktrans %} + {% endif %} + {% endwith %} + {% if object.request_or_project %} +
    + + {% blocktrans with title=object.request_or_project.title url=object.request_or_project.get_absolute_url %} last used for {{ title }} {% endblocktrans %} - - {% else %} -
    - {% trans "no request made yet" %} - - {% endif %} - - - - - {% blocktrans %}Edit{% endblocktrans %} - - - -
    - {% csrf_token %} - - -
    - - +
    + {% else %} +
    + {% trans "no request made yet" %} + {% endif %} + + + + + {% blocktrans %}Edit{% endblocktrans %} + + + +
    + {% csrf_token %} + + +
    + + {% endblock %} diff --git a/froide/foirequest/templates/foirequest/account/list_following.html b/froide/foirequest/templates/foirequest/account/list_following.html index ae8b3a0c1..9924b2279 100644 --- a/froide/foirequest/templates/foirequest/account/list_following.html +++ b/froide/foirequest/templates/foirequest/account/list_following.html @@ -1,58 +1,50 @@ {% extends "account/show.html" %} - {% load i18n %} - -{% block title %}{% translate "Followed requests" %}{% endblock %} - +{% block title %} + {% translate "Followed requests" %} +{% endblock %} {% block breadcrumbs %} -{% url "account-following" as section_url %} -{% translate "Followed requests" as section_name %} -{% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} + {% url "account-following" as section_url %} + {% translate "Followed requests" as section_name %} + {% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} {% endblock %} - {% block pre_table %} -
    -
    - -

    {% translate "Requests you follow" %}

    - - {% trans "Search the requests you follow" as search_title %} -

    - {% if view.query %} - {% blocktrans with query=view.query count request_count=page_obj.paginator.count %} +

    +
    +

    {% translate "Requests you follow" %}

    + {% trans "Search the requests you follow" as search_title %} +

    + {% if view.query %} + {% blocktrans with query=view.query count request_count=page_obj.paginator.count %} You follow one request matching your search for “{{ query }}”. {% plural %} You follow {{ request_count }} requests matching your search for “{{ query }}”. {% endblocktrans %} - {% else %} - {% blocktrans count request_count=page_obj.paginator.count %} + {% else %} + {% blocktrans count request_count=page_obj.paginator.count %} You follow one request so far. {% plural %} You follow {{ request_count }} requests. {% endblocktrans %} - {% endif %} -

    + {% endif %} +

    +
    -
    {% endblock %} - - {% block table_row %} - - - - - - {% include "foirequest/snippets/request_item_inner.html" %} - - {% if object.status == "awaiting_response" %} - {% if object.due_date %} - - {% blocktrans with date=object.due_date|date:"DATE_FORMAT" %}Deadline: {{ date }}{% endblocktrans %} - - {% endif %} - {% endif %} - - - + + + + + + {% include "foirequest/snippets/request_item_inner.html" %} + {% if object.status == "awaiting_response" %} + {% if object.due_date %} + {% blocktrans with date=object.due_date|date:"DATE_FORMAT" %}Deadline: {{ date }}{% endblocktrans %} + {% endif %} + {% endif %} + + {% endblock %} diff --git a/froide/foirequest/templates/foirequest/account/list_projects.html b/froide/foirequest/templates/foirequest/account/list_projects.html index b58bbeb70..8a4c76b9e 100644 --- a/froide/foirequest/templates/foirequest/account/list_projects.html +++ b/froide/foirequest/templates/foirequest/account/list_projects.html @@ -1,60 +1,47 @@ {% extends "account/show.html" %} - {% load i18n %} - -{% block title %}{% translate "Your projects" %}{% endblock %} - +{% block title %} + {% translate "Your projects" %} +{% endblock %} {% block breadcrumbs %} -{% url "account-projects" as section_url %} -{% translate "Your projects" as section_name %} -{% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} + {% url "account-projects" as section_url %} + {% translate "Your projects" as section_name %} + {% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} {% endblock %} - {% block pre_table %} -
    -
    - -

    {% translate "Your projects" %}

    - - {% trans "Search your projects" as search_title %} -

    - {% if view.query %} - {% blocktrans with query=view.query count request_count=page_obj.paginator.count %} +

    +
    +

    {% translate "Your projects" %}

    + {% trans "Search your projects" as search_title %} +

    + {% if view.query %} + {% blocktrans with query=view.query count request_count=page_obj.paginator.count %} Your search for “{{ query }}” produced one search result. {% plural %} Your search for “{{ query }}” produced {{ request_count }} search results. {% endblocktrans %} - {% else %} - {% blocktrans count request_count=page_obj.paginator.count %} + {% else %} + {% blocktrans count request_count=page_obj.paginator.count %} You have one project. {% plural %} You have {{ request_count }} projects. {% endblocktrans %} - {% endif %} -

    + {% endif %} +

    +
    -
    {% endblock %} - {% block table_head %} - {% blocktrans %}Title{% endblocktrans %} - {% blocktrans %}Requests{% endblocktrans %} - {% blocktrans %}Date{% endblocktrans %} + {% blocktrans %}Title{% endblocktrans %} + {% blocktrans %}Requests{% endblocktrans %} + {% blocktrans %}Date{% endblocktrans %} {% endblock table_head %} - - {% block table_row %} - - - - {{ object.title }} - - - - {{ object.request_count }} - - - {{ object.last_update|date:"DATETIME_FORMAT" }} - - + + + {{ object.title }} + + {{ object.request_count }} + {{ object.last_update|date:"DATETIME_FORMAT" }} + {% endblock %} diff --git a/froide/foirequest/templates/foirequest/account/list_requests.html b/froide/foirequest/templates/foirequest/account/list_requests.html index 98f11d3ce..058069248 100644 --- a/froide/foirequest/templates/foirequest/account/list_requests.html +++ b/froide/foirequest/templates/foirequest/account/list_requests.html @@ -4,99 +4,89 @@ {% load humanize %} {% load form_helper %} {% load token_tags %} - -{% block title %}{% translate "Your requests" %}{% endblock %} - +{% block title %} + {% translate "Your requests" %} +{% endblock %} {% block breadcrumbs %} -{% url "account-requests" as section_url %} -{% translate "Your requests" as section_name %} -{% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} + {% url "account-requests" as section_url %} + {% translate "Your requests" as section_name %} + {% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} {% endblock %} - - {% block pre_table %} -
    -
    - -

    {% translate "Your requests" %}

    - - {% url "account-requests" as search_url %} - {% include "foirequest/_request_search.html" with search_url=search_url %} - -

    - {% if is_filtered %} - {% blocktrans with request_count=page_obj.paginator.count|intcomma count counter=page_obj.paginator.count %} +

    +
    +

    {% translate "Your requests" %}

    + {% url "account-requests" as search_url %} + {% include "foirequest/_request_search.html" with search_url=search_url %} +

    + {% if is_filtered %} + {% blocktrans with request_count=page_obj.paginator.count|intcomma count counter=page_obj.paginator.count %} Your search produced one search result. {% plural %} Your search produced {{ request_count }} search results. {% endblocktrans %} - {% else %} - {% blocktrans with request_count=page_obj.paginator.count|intcomma count counter=page_obj.paginator.count %} + {% else %} + {% blocktrans with request_count=page_obj.paginator.count|intcomma count counter=page_obj.paginator.count %} You have one request so far. {% plural %} You have {{ request_count }} requests. {% endblocktrans %} - {% endif %} -

    + {% endif %} +

    +
    -
    -
    -
    -
    - {% for key, _ in facet_config.items %} - {% show_facet key facets facet_config %} - {% endfor %} -
    +
    +
    +
    + {% for key, _ in facet_config.items %} + {% show_facet key facets facet_config %} + {% endfor %} +
    +
    +
    + {% endblock %} + {% block table_row %} + + + + + + {% include "foirequest/snippets/request_item_inner.html" %} + {% if object.status == "awaiting_user_confirmation" %} +
    + {% csrf_token %} + +
    +
    + {% csrf_token %} + +
    + {% endif %} + {% if object.status == "awaiting_response" %} + {% if object.due_date %} + {% blocktrans with date=object.due_date|date:"DATE_FORMAT" %}Deadline: {{ date }}{% endblocktrans %} + {% endif %} + {% endif %} + {% if not object.public and object.user == request.user %} +
    + {% csrf_token %} + +
    + {% endif %} + + + {% endblock %} + {% block post_table %} +
    -
    -{% endblock %} - -{% block table_row %} - - - - - - {% include "foirequest/snippets/request_item_inner.html" %} - - {% if object.status == "awaiting_user_confirmation" %} -
    - {% csrf_token %} - -
    -
    - {% csrf_token %} - -
    - {% endif %} - - {% if object.status == "awaiting_response" %} - {% if object.due_date %} - - {% blocktrans with date=object.due_date|date:"DATE_FORMAT" %}Deadline: {{ date }}{% endblocktrans %} - - {% endif %} - {% endif %} - - {% if not object.public and object.user == request.user %} -
    - {% csrf_token %} - -
    - {% endif %} - - - {% endblock %} - - -{% block post_table %} -
    -
    {% endblock %} diff --git a/froide/foirequest/templates/foirequest/account/list_subscriptions.html b/froide/foirequest/templates/foirequest/account/list_subscriptions.html index 62153343e..a5564b96c 100644 --- a/froide/foirequest/templates/foirequest/account/list_subscriptions.html +++ b/froide/foirequest/templates/foirequest/account/list_subscriptions.html @@ -2,36 +2,28 @@ {% load i18n %} {% load form_helper %} {% load token_tags %} - -{% block title %}{% translate "Subscriptions" %}{% endblock %} - +{% block title %} + {% translate "Subscriptions" %} +{% endblock %} {% block breadcrumbs %} -{% url "account-subscriptions" as section_url %} -{% translate "Subscriptions" as section_name %} -{% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} + {% url "account-subscriptions" as section_url %} + {% translate "Subscriptions" as section_name %} + {% include "account/includes/breadcrumbs.html" with section_name=section_name section_url=section_url %} {% endblock %} - {% block tab_content %} -
    -

    - {% trans "Private Subscription URLs" %} -

    -

    - {% trans "You can generate private URLs to subscribe to your requests in other applications." %} -

    - -
    - {% csrf_token %} - - - {% trans "Private RSS feed URL" as url_label %} - {% get_token_url_form purpose='user-request-feed' label=url_label url_name='foirequest-user_list_feed' as url_form %} - {% render_form url_form %} - - {% trans "Private iCal subscription URL (beta)" as url_label %} - {% get_token_url_form purpose='user-request-calendar' label=url_label url_name='foirequest-user_ical_calendar' as url_form %} - {% render_form url_form %} - -
    -
    +
    +

    {% trans "Private Subscription URLs" %}

    +

    {% trans "You can generate private URLs to subscribe to your requests in other applications." %}

    +
    + {% csrf_token %} + + {% trans "Private RSS feed URL" as url_label %} + {% get_token_url_form purpose='user-request-feed' label=url_label url_name='foirequest-user_list_feed' as url_form %} + {% render_form url_form %} + {% trans "Private iCal subscription URL (beta)" as url_label %} + {% get_token_url_form purpose='user-request-calendar' label=url_label url_name='foirequest-user_ical_calendar' as url_form %} + {% render_form url_form %} +
    +
    {% endblock %} diff --git a/froide/foirequest/templates/foirequest/admin/add_to_project.html b/froide/foirequest/templates/foirequest/admin/add_to_project.html index 56a12b9b9..9d7d27ef5 100644 --- a/froide/foirequest/templates/foirequest/admin/add_to_project.html +++ b/froide/foirequest/templates/foirequest/admin/add_to_project.html @@ -1,31 +1,34 @@ {% extends "helper/admin_base_action.html" %} - {% load i18n l10n %} - -{% block action_title %}{% trans 'Add requests to existing project' %}{% endblock %} - +{% block action_title %} + {% trans 'Add requests to existing project' %} +{% endblock %} {% block breadcrumbs_action_label %} - {% trans 'Add requests to existing project' %} + {% trans 'Add requests to existing project' %} {% endblock %} - {% block action_content %} -
    {% csrf_token %} -
    -

    {% blocktrans %}These FoI request...{% endblocktrans %}
    -

      -{% for obj in queryset %} -
    • - {{ obj }} - -
    • -{% endfor %} -
    -
    {% blocktrans %}are added to this project:{% endblocktrans %}

    - -{{ form.as_p }} - - - -
    -
    +
    + {% csrf_token %} +
    +

    + {% blocktrans %}These FoI request...{% endblocktrans %} +
    +

      + {% for obj in queryset %} +
    • + {{ obj }} + +
    • + {% endfor %} +
    +
    + {% blocktrans %}are added to this project:{% endblocktrans %} +

    + {{ form.as_p }} + + +
    +
    {% endblock %} diff --git a/froide/foirequest/templates/foirequest/admin/mark_same_as.html b/froide/foirequest/templates/foirequest/admin/mark_same_as.html index 8cfdc72e2..b63069624 100644 --- a/froide/foirequest/templates/foirequest/admin/mark_same_as.html +++ b/froide/foirequest/templates/foirequest/admin/mark_same_as.html @@ -1,31 +1,35 @@ {% extends "helper/admin_base_action.html" %} - {% load i18n l10n %} - -{% block action_title %}{% trans 'Mark multiple requests identical' %}{% endblock %} - +{% block action_title %} + {% trans 'Mark multiple requests identical' %} +{% endblock %} {% block breadcrumbs_action_label %} - {% trans 'Mark multiple requests identical' %} + {% trans 'Mark multiple requests identical' %} {% endblock %} - {% block action_content %} -
    {% csrf_token %} -
    -

    {% blocktrans %}These FoI request...{% endblocktrans %}
    -

      -{% for obj in queryset %} -
    • - {{ obj }} - -
    • -{% endfor %} -
    -
    {% blocktrans %}...are identical to this one:{% endblocktrans %}

    - -{{ form.as_p }} - - - -
    -
    +
    + {% csrf_token %} +
    +

    + {% blocktrans %}These FoI request...{% endblocktrans %} +
    +

      + {% for obj in queryset %} +
    • + {{ obj }} + +
    • + {% endfor %} +
    +
    + {% blocktrans %}...are identical to this one:{% endblocktrans %} +

    + {{ form.as_p }} + + +
    +
    {% endblock %} diff --git a/froide/foirequest/templates/foirequest/admin_redeliver.html b/froide/foirequest/templates/foirequest/admin_redeliver.html index 87224d860..9ffefddbb 100644 --- a/froide/foirequest/templates/foirequest/admin_redeliver.html +++ b/froide/foirequest/templates/foirequest/admin_redeliver.html @@ -1,36 +1,30 @@ {% extends "helper/admin_base_action.html" %} - {% load i18n l10n %} - -{% block action_title %}{% trans 'Redeliver deferred messages' %}{% endblock %} - +{% block action_title %} + {% trans 'Redeliver deferred messages' %} +{% endblock %} {% block breadcrumbs_action_label %} - {% trans 'Redeliver deferred messages' %} + {% trans 'Redeliver deferred messages' %} {% endblock %} - {% block action_content %} -
    - {% csrf_token %} -
    -

    - {% blocktrans %}Redeliver these messages...{% endblocktrans %} -

    -
      - {% for obj in queryset %} -
    • - {{ obj }} - -
    • - {% endfor %} -
    -

    - {% blocktrans %}...to this FOI request:{% endblocktrans %} -

    - - {{ form.as_p }} - - - -
    -
    +
    + {% csrf_token %} +
    +

    {% blocktrans %}Redeliver these messages...{% endblocktrans %}

    +
      + {% for obj in queryset %} +
    • + {{ obj }} + +
    • + {% endfor %} +
    +

    {% blocktrans %}...to this FOI request:{% endblocktrans %}

    + {{ form.as_p }} + + +
    +
    {% endblock %} diff --git a/froide/foirequest/templates/foirequest/attachment/manage.html b/froide/foirequest/templates/foirequest/attachment/manage.html index 54380475d..67a83966e 100644 --- a/froide/foirequest/templates/foirequest/attachment/manage.html +++ b/froide/foirequest/templates/foirequest/attachment/manage.html @@ -1,101 +1,78 @@ {% extends 'foirequest/base.html' %} - {% load i18n %} {% load static %} {% load frontendbuild %} - -{% block title %}{% blocktrans with title=object.title %}Manage attachments for “{{ title }}”{% endblocktrans %}{% endblock %} - +{% block title %} + {% blocktrans with title=object.title %}Manage attachments for “{{ title }}”{% endblocktrans %} +{% endblock %} {% block navbar %} - {% include "header_reduced.html" %} + {% include "header_reduced.html" %} {% endblock %} - {% block body %} - -
    - {% blocktrans with date=message.timestamp|date:"SHORT_DATE_FORMAT" asvar breadcrumb_label %}Attachments of message from {{ date }}{% endblocktrans %} - {% include "foirequest/header/breadcrumb.html" with last_item=breadcrumb_label %} -
    - -
    -
    - {% trans "Back" %} +
    + {% blocktrans with date=message.timestamp|date:"SHORT_DATE_FORMAT" asvar breadcrumb_label %}Attachments of message from {{ date }}{% endblocktrans %} + {% include "foirequest/header/breadcrumb.html" with last_item=breadcrumb_label %}
    - -

    {% trans "Manage attachments" %}

    -

    - {% blocktrans with date=message.timestamp|date:"SHORT_DATE_FORMAT" sender=message.sender title=foirequest.title url=message.get_absolute_url %} +

    + +

    {% trans "Manage attachments" %}

    +

    + {% blocktrans with date=message.timestamp|date:"SHORT_DATE_FORMAT" sender=message.sender title=foirequest.title url=message.get_absolute_url %} Attachments for message dated {{ date }} from {{ sender }} in request “{{ title }}”. {% endblocktrans %} -
    - {% translate "Here you can:" %} -

    -
      -
    • - {% translate "Approve or redact attachments." %} -
    • -
    • - {% translate "Convert multiple pictures to pages in a PDF document." %} -
    • - {% if message.can_edit %} -
    • - {% translate "Upload more pictures or PDFs." %} -
    • - {% endif %} -
    - - {% csrf_token %} - - -
    -

    - {% trans "Attachments are loading..." %} -

    -
    - {% trans "Loading..." %} +
    + {% translate "Here you can:" %} +

    +
      +
    • {% translate "Approve or redact attachments." %}
    • +
    • {% translate "Convert multiple pictures to pages in a PDF document." %}
    • + {% if message.can_edit %} +
    • {% translate "Upload more pictures or PDFs." %}
    • + {% endif %} +
    + {% csrf_token %} + +
    +

    {% trans "Attachments are loading..." %}

    +
    + {% trans "Loading..." %} +
    -
    - - - - - - -

    - {% trans "Return to message" %} -

    -
    - - {% addfrontendbuild "docupload.js" %} - +
    + {% addfrontendbuild "docupload.js" %} {% endblock %} diff --git a/froide/foirequest/templates/foirequest/attachment/show.html b/froide/foirequest/templates/foirequest/attachment/show.html index e19bf4be3..95a83eb1d 100644 --- a/froide/foirequest/templates/foirequest/attachment/show.html +++ b/froide/foirequest/templates/foirequest/attachment/show.html @@ -1,97 +1,89 @@ {% extends "foirequest/base.html" %} - {% load i18n %} {% load static %} {% load foirequest_tags %} - -{% block title %}{% blocktrans with name=attachment.name title=foirequest.title %}{{ name }} in request „{{ title }}“{% endblocktrans %}{% endblock %} - +{% block title %} + {% blocktrans with name=attachment.name title=foirequest.title %}{{ name }} in request „{{ title }}“{% endblocktrans %} +{% endblock %} {% block body %} -
    - {% blocktrans with date=message.timestamp|date:"SHORT_DATE_FORMAT" asvar breadcrumb_label %}Attachment of message from {{ date }}{% endblocktrans %} - {% include "foirequest/header/breadcrumb.html" with object=foirequest last_item=breadcrumb_label %} -
    - -
    - {% block attachment_top %} -

    {% blocktrans with name=attachment.name %}Attachment “{{ name }}”{% endblocktrans %}

    -

    - {% blocktrans with title=foirequest.title message_url=message.get_absolute_url %} +

    + {% blocktrans with date=message.timestamp|date:"SHORT_DATE_FORMAT" asvar breadcrumb_label %}Attachment of message from {{ date }}{% endblocktrans %} + {% include "foirequest/header/breadcrumb.html" with object=foirequest last_item=breadcrumb_label %} +
    +
    + {% block attachment_top %} +

    {% blocktrans with name=attachment.name %}Attachment “{{ name }}”{% endblocktrans %}

    +

    + {% blocktrans with title=foirequest.title message_url=message.get_absolute_url %} This attachment is part of the request ”{{ title }}”. {% endblocktrans %} -

    - {% endblock %} - - {% if foirequest.campaign %} -
    - {% include foirequest.campaign.banner_templates with object=foirequest %} +

    + {% endblock %} + {% if foirequest.campaign %} +
    {% include foirequest.campaign.banner_templates with object=foirequest %}
    + {% endif %} + {% if foirequest|can_write_foirequest:request or foirequest|can_moderate_pii_foirequest:request %} + {% if foirequest.awaits_classification %} + + {% endif %} + {% if attachment.can_redact %} + + + {% trans "Redact" %} + + {% endif %} + {% if not attachment.approved and attachment.can_approve %} +
    + {% csrf_token %} + +
    + {% endif %} + {% endif %}
    - {% endif %} - - {% if foirequest|can_write_foirequest:request or foirequest|can_moderate_pii_foirequest:request %} - - {% if foirequest.awaits_classification %} - + {% if attachment.can_embed %} + {% if attachment.is_pdf %} +
    + +
    + + {% else %} +
    + + +
    {% endif %} - - {% if attachment.can_redact %} - - - {% trans "Redact" %} - - {% endif %} - {% if not attachment.approved and attachment.can_approve %} -
    - {% csrf_token %} - -
    - {% endif %} - - {% endif %} -
    - - -{% if attachment.can_embed %} - {% if attachment.is_pdf %} -
    - -
    - - {% else %} -
    - -
    - {% endif %} {% endif %} -
    - {% if attachment.can_embed %} -
    - - {# expose direct links through redirects in case they get copied #} - - {% trans "Download original" %} - - -
    - {% else %} -

    - {% trans "This file cannot be previewed." %} - - {% trans "Download the file here." %} - -

    - {% endif %} + {% if attachment.can_embed %} +
    + + {# expose direct links through redirects in case they get copied #} + {% trans "Download original" %} + +
    + {% else %} +

    + {% trans "This file cannot be previewed." %} + {% trans "Download the file here." %} +

    + {% endif %}
    {% endblock %} diff --git a/froide/foirequest/templates/foirequest/base.html b/froide/foirequest/templates/foirequest/base.html index 289e263f4..8fbb05c54 100644 --- a/froide/foirequest/templates/foirequest/base.html +++ b/froide/foirequest/templates/foirequest/base.html @@ -1,5 +1,4 @@ {% extends 'base.html' %} - {% block navbar %} - {% include "foirequest/header.html" %} + {% include "foirequest/header.html" %} {% endblock %} diff --git a/froide/foirequest/templates/foirequest/body/actions/escalate.html b/froide/foirequest/templates/foirequest/body/actions/escalate.html index f4a387fce..f2c65ad46 100644 --- a/froide/foirequest/templates/foirequest/body/actions/escalate.html +++ b/froide/foirequest/templates/foirequest/body/actions/escalate.html @@ -1,40 +1,35 @@ {% load i18n %} {% load form_helper %} - -
    - {% csrf_token %} -

    {% blocktrans %}Ask for mediation for this request{% endblocktrans %}

    -

    - {% blocktrans %} + + {% csrf_token %} +

    {% blocktrans %}Ask for mediation for this request{% endblocktrans %}

    +

    + {% blocktrans %} If you think your request was not properly handled or it is delayed, you can ask for assistance. Here you can explain your case to the authority that is responsible for your request. {% endblocktrans %} -

    -
    - - {% translate "Mediating authority" %} - -
    - {{ object.law.mediator.name }} +

    +
    + {% translate "Mediating authority" %} +
    {{ object.law.mediator.name }}
    -
    - {% if escalation_form %} - {% render_form escalation_form horizontal=False %} - {% else %} - {% with escalation_form=object.get_escalation_message_form %} - {% render_form escalation_form horizontal=False %} - {% endwith %} - {% endif %} -
    -
    - {% if not object.public %} - - {% blocktrans %}Your request is currently not public, but will be made accessible to the mediator via the special link in the message.{% endblocktrans %} - - {% endif %} - + {% if escalation_form %} + {% render_form escalation_form horizontal=False %} + {% else %} + {% with escalation_form=object.get_escalation_message_form %} + {% render_form escalation_form horizontal=False %} + {% endwith %} + {% endif %} +
    +
    + {% if not object.public %} + + {% blocktrans %}Your request is currently not public, but will be made accessible to the mediator via the special link in the message.{% endblocktrans %} + + {% endif %} + +
    -
    diff --git a/froide/foirequest/templates/foirequest/body/actions/send_message.html b/froide/foirequest/templates/foirequest/body/actions/send_message.html index ba2b4bcd7..71333983c 100644 --- a/froide/foirequest/templates/foirequest/body/actions/send_message.html +++ b/froide/foirequest/templates/foirequest/body/actions/send_message.html @@ -1,65 +1,64 @@ {% load i18n %} {% load foirequest_tags %} {% load form_helper %} - -
    - {% csrf_token %} -

    {% blocktrans %}Send message to public body{% endblocktrans %}

    - {% if object.is_overdue %} -

    {% blocktrans %}Your request is overdue. You should send a reminder to the Public Body!{% endblocktrans %}

    - {% else %} - {% if object.reply_received %} -

    - {% blocktrans %} + + {% csrf_token %} +

    {% blocktrans %}Send message to public body{% endblocktrans %}

    + {% if object.is_overdue %} +

    + {% blocktrans %}Your request is overdue. You should send a reminder to the Public Body!{% endblocktrans %} +

    + {% else %} + {% if object.reply_received %} +

    + {% blocktrans %} You can reply to the public body here. {% endblocktrans %} -

    - {% else %} -

    - {% blocktrans %} +

    + {% else %} +

    + {% blocktrans %} Here you can send another message to this public body. {% endblocktrans %} -

    +

    + {% endif %} {% endif %} - {% endif %} - {% block send_message_form_pre %}{% endblock %} - - {% with form=send_message_form|default:object.get_send_message_form %} - {% include "helper/forms/errors.html" with errors=form.non_field_errors %} - {% render_field form.to horizontal=False %} - {% render_field form.subject horizontal=False %} - {% render_field form.message horizontal=False %} - {% render_field form.send_address horizontal=False %} - {% render_field form.address horizontal=False %} - - {% if request.user.is_staff %} -
    - {% translate "Include proofs and other attachments" %} - - {% if request.user != object.user %} -
    - {% blocktranslate with name=object.user.get_full_name %} + {% block send_message_form_pre %}{% endblock %} + {% with form=send_message_form|default:object.get_send_message_form %} + {% include "helper/forms/errors.html" with errors=form.non_field_errors %} + {% render_field form.to horizontal=False %} + {% render_field form.subject horizontal=False %} + {% render_field form.message horizontal=False %} + {% render_field form.send_address horizontal=False %} + {% render_field form.address horizontal=False %} + {% if request.user.is_staff %} +
    + {% translate "Include proofs and other attachments" %} + {% if request.user != object.user %} +
    + {% blocktranslate with name=object.user.get_full_name %} The proof will be sent in the name of {{ name }}. Storing them will store them in your account. {% endblocktranslate %} -
    - {% endif %} - {% include "proof/proof_message.html" %} - - {% render_field form.files horizontal=False %} -
    - {% else %} - {% render_field form.files horizontal=False %} - {% endif %} - - {% endwith %} - - -

    - - {% trans "If you need to provide an alternative email address, use this one:" %}
    - {% alternative_address object %} -
    - {% trans "It will still go to your request here." %} -
    -

    +
    + {% endif %} + {% include "proof/proof_message.html" %} + {% render_field form.files horizontal=False %} +
    + {% else %} + {% render_field form.files horizontal=False %} + {% endif %} + {% endwith %} + +

    + + {% trans "If you need to provide an alternative email address, use this one:" %} +
    + {% alternative_address object %} +
    + {% trans "It will still go to your request here." %} +
    +

    diff --git a/froide/foirequest/templates/foirequest/body/body.html b/froide/foirequest/templates/foirequest/body/body.html index 62f38b786..a88be3fbd 100644 --- a/froide/foirequest/templates/foirequest/body/body.html +++ b/froide/foirequest/templates/foirequest/body/body.html @@ -2,78 +2,67 @@ {% load humanize %} {% load form_helper %} {% load foirequest_tags %} - -
    -
    - - -
    - - {# Correspondence, Action buttons and Timeline #} -
    -
    -
    - - {% if object|can_write_foirequest:request and object.public_body %} - - - {% trans 'Send message' %} - - - - {% trans 'Upload Mail' %} - - {% endif %} - - {% with hide_label=object|can_write_foirequest:request %} - - - - {% trans "Collapse all" %} - {% trans "Expand all" %} - - - - {% trans 'Scroll to end' %} - - {% endwith %} -
    -
    - -
    -
    - {% include "foirequest/body/correspondence.html" %} - - - {% if object|can_write_foirequest:request and object.public_body %} - {# Reply action buttons #} -
    - - {% trans 'Send message' %} - - - - {% trans 'Upload Mail' %} - - {% comment %} +
    +
    +
    +
    + {# Correspondence, Action buttons and Timeline #} +
    +
    +
    + {% if object|can_write_foirequest:request and object.public_body %} + + + {% trans 'Send message' %} + + + + {% trans 'Upload Mail' %} + + {% endif %} + {% with hide_label=object|can_write_foirequest:request %} + + + + {% trans "Collapse all" %} + {% trans "Expand all" %} + + + + {% trans 'Scroll to end' %} + + {% endwith %} +
    +
    +
    +
    + {% include "foirequest/body/correspondence.html" %} + {% if object|can_write_foirequest:request and object.public_body %} + {# Reply action buttons #} + - {% endcomment %} -
    - {% endif %} - -
    - -
    - {% include "foirequest/body/timeline.html" %} + {% endcomment %} +
    + {% endif %} +
    +
    {% include "foirequest/body/timeline.html" %}
    +
    -
    - -
    - - {# Reply form #} - {% if object|can_write_foirequest:request and object.public_body %} -
    -
    - - - {% trans "Sticky" %} - -
    -
    -
    -
    - - -
    - -
    - {% include "foirequest/body/actions/send_message.html" %} -
    - - {% if object.can_be_escalated %} -
    - {% include "foirequest/body/actions/escalate.html" %} + {# Reply form #} + {% if object|can_write_foirequest:request and object.public_body %} +
    +
    + + + {% trans "Sticky" %} + +
    +
    +
    +
    + +
    +
    + {% include "foirequest/body/actions/send_message.html" %} +
    + {% if object.can_be_escalated %} +
    + {% include "foirequest/body/actions/escalate.html" %} +
    + {% endif %} + {% block request_action_pane_footer %}{% endblock %} +
    +
    +
    - {% endif %} - - {% block request_action_pane_footer %}{% endblock %} -
    -
    -
    -
    -
    + {% endif %} +
    + {% if has_documents %} + {% include "foirequest/body/documents.html" %} + {% endif %} + {% block request_top_pane %}{% endblock %} + {% if object|can_manage_foirequest:request %} + {% include "foirequest/body/settings.html" %} {% endif %} - -
    - - {% if has_documents %} - {% include "foirequest/body/documents.html" %} - {% endif %} - - {% block request_top_pane %}{% endblock %} - - {% if object|can_manage_foirequest:request %} - {% include "foirequest/body/settings.html" %} - {% endif %} -
    diff --git a/froide/foirequest/templates/foirequest/body/correspondence.html b/froide/foirequest/templates/foirequest/body/correspondence.html index 192bd018e..edb4cf24e 100644 --- a/froide/foirequest/templates/foirequest/body/correspondence.html +++ b/froide/foirequest/templates/foirequest/body/correspondence.html @@ -1,42 +1,31 @@ {% load i18n %} {% load foirequest_tags %} -
    - - - {% block foirequest_messages %} - {% for message in object.messages %} - {% if forloop.last and object.messages|length > 1 %} - {% block foirequest_message_before_last %}{% endblock %} - {% endif %} - - {% include "foirequest/body/message/message.html" %} - - {% if forloop.last and object.messages|length == 1 %} - {% block foirequest_message_after_single %}{% endblock %} - {% endif %} - - {% empty %} -

    {% blocktrans %}No messages yet{% endblocktrans %}

    - {% endfor %} - {% endblock foirequest_messages %} - - {% block after_foirequest_messages %} - {% if object|can_write_foirequest:request and object.awaits_classification %} -
    -
    - - {% translate "Please set the status of this request!" %} - + {% block foirequest_messages %} + {% for message in object.messages %} + {% if forloop.last and object.messages|length > 1 %} + {% block foirequest_message_before_last %}{% endblock %} + {% endif %} + {% include "foirequest/body/message/message.html" %} + {% if forloop.last and object.messages|length == 1 %} + {% block foirequest_message_after_single %}{% endblock %} + {% endif %} + {% empty %} +

    {% blocktrans %}No messages yet{% endblocktrans %}

    + {% endfor %} + {% endblock foirequest_messages %} + {% block after_foirequest_messages %} + {% if object|can_write_foirequest:request and object.awaits_classification %} + + {% endif %} + {% endblock %} + {% if object.closed %} +
    + {% blocktrans %}This request has been closed and cannot receive further messages.{% endblocktrans %}
    -
    {% endif %} - {% endblock %} - - {% if object.closed %} -
    - {% blocktrans %}This request has been closed and cannot receive further messages.{% endblocktrans %} -
    - {% endif %} -
    diff --git a/froide/foirequest/templates/foirequest/body/documents.html b/froide/foirequest/templates/foirequest/body/documents.html index 4bd69b6a5..93ad765f4 100644 --- a/froide/foirequest/templates/foirequest/body/documents.html +++ b/froide/foirequest/templates/foirequest/body/documents.html @@ -1,17 +1,12 @@ {% load i18n %} {% load filingcabinet %} - -
    -
    -

    {% translate "Documents" %}

    - - {% get_document_list_viewer documentcollection_data %} -
    +
    +
    +

    {% translate "Documents" %}

    + {% get_document_list_viewer documentcollection_data %} +
    - {% include "_frontend.html" with entry_point="filingcabinet.js" %} diff --git a/froide/foirequest/templates/foirequest/body/message/attachments/attachments.html b/froide/foirequest/templates/foirequest/body/message/attachments/attachments.html index 9c52f347b..c4aae22c3 100644 --- a/froide/foirequest/templates/foirequest/body/message/attachments/attachments.html +++ b/froide/foirequest/templates/foirequest/body/message/attachments/attachments.html @@ -1,79 +1,61 @@ {% load i18n %} {% load foirequest_tags %} - {% block before_attachments %}{% endblock %} - {% if message.all_attachments %} -
    - - {# approved attachments #} - {% if message.approved_attachments %} - {% if object|can_read_foirequest_authenticated:request %} -
    {% trans 'Approved attachments:' %}
    - {% endif %} - {% include "foirequest/body/message/attachments/list.html" with attachment_list=message.approved_attachments %} - {% endif %} - - {# unapproved attachments #} - {% if message.unapproved_attachments %} -
    {% trans 'Unapproved attachments:' %}
    - {% include "foirequest/body/message/attachments/list.html" with attachment_list=message.unapproved_attachments %} - {% endif %} - - {% if message.hidden_attachments %} - {# irrelevant attachments #} -
    - {% include "foirequest/body/message/attachments/list.html" with attachment_list=message.hidden_attachments %} -
    - {% endif %} - - {# attachments footer #} - {% if object|can_write_foirequest:request or message.hidden_attachments %} - -
    - -
    - {% if object|can_write_foirequest:request and message.can_edit_attachments %} - {# manage attachments link #} - - {% trans "Manage attachments" %} - +
    + {# approved attachments #} + {% if message.approved_attachments %} + {% if object|can_read_foirequest_authenticated:request %} +
    {% trans 'Approved attachments:' %}
    + {% endif %} + {% include "foirequest/body/message/attachments/list.html" with attachment_list=message.approved_attachments %} + {% endif %} + {# unapproved attachments #} + {% if message.unapproved_attachments %} +
    {% trans 'Unapproved attachments:' %}
    + {% include "foirequest/body/message/attachments/list.html" with attachment_list=message.unapproved_attachments %} {% endif %} - {% if message.hidden_attachments %} - {# irrelevant attachments #} - + {# irrelevant attachments #} +
    + {% include "foirequest/body/message/attachments/list.html" with attachment_list=message.hidden_attachments %} +
    {% endif %} -
    - -
    - - {% endif %} - -
    + {# attachments footer #} + {% if object|can_write_foirequest:request or message.hidden_attachments %} +
    +
    + {% if object|can_write_foirequest:request and message.can_edit_attachments %} + {# manage attachments link #} + + {% trans "Manage attachments" %} + + {% endif %} + {% if message.hidden_attachments %} + {# irrelevant attachments #} + + {% endif %} +
    +
    + {% endif %} +
    {% elif object|can_write_foirequest:request and message.can_edit_attachments %} -
    -
    - {# manage attachments link #} - - {% trans "Manage attachments" %} - -
    -
    +
    +
    + {# manage attachments link #} + + {% trans "Manage attachments" %} + +
    +
    {% endif %} - {% block after_attachments %}{% endblock %} diff --git a/froide/foirequest/templates/foirequest/body/message/attachments/item.html b/froide/foirequest/templates/foirequest/body/message/attachments/item.html index cb7371737..bfe965ee7 100644 --- a/froide/foirequest/templates/foirequest/body/message/attachments/item.html +++ b/froide/foirequest/templates/foirequest/body/message/attachments/item.html @@ -1,108 +1,101 @@ {% load i18n %} {% load foirequest_tags %} {% load content_helper %} -
    - {% if attachment.redacted %} - {% trans 'This attachment contains personally identifying information and cannot be published.' as tooltip %} - {% elif attachment.converted and not attachment.approved %} - {% trans 'This attachment has been converted to PDF and cannot be published.' as tooltip %} - {% elif attachment.approved %} - {% if object.public %} - {% trans 'This attachment is public.' as tooltip %} - {% else %} - {% trans 'This attachment is only visible for users with access to this request.' as tooltip %} - {% endif %} - {% else %} - {% if not attachment.can_approve %} - {% trans 'This attachment is not public yet.' as tooltip %} + {% if attachment.redacted %} + {% trans 'This attachment contains personally identifying information and cannot be published.' as tooltip %} + {% elif attachment.converted and not attachment.approved %} + {% trans 'This attachment has been converted to PDF and cannot be published.' as tooltip %} + {% elif attachment.approved %} + {% if object.public %} + {% trans 'This attachment is public.' as tooltip %} + {% else %} + {% trans 'This attachment is only visible for users with access to this request.' as tooltip %} + {% endif %} {% else %} - {% trans 'This attachment cannot be published.' as tooltip %} + {% if not attachment.can_approve %} + {% trans 'This attachment is not public yet.' as tooltip %} + {% else %} + {% trans 'This attachment cannot be published.' as tooltip %} + {% endif %} {% endif %} - {% endif %} - -
    - -
    - -
    - {# filename #} -
    - {% if attachment.approved or object|can_write_foirequest:request and attachment.can_link %} - - {{ attachment.name }} - - {% elif not attachment.approved and not object|can_write_foirequest:request and object|can_read_foirequest_authenticated:request %} - {# not approved, can read but cannot write, so allow read link #} - - {{ attachment.name }} - - {% else %} - {{ attachment.name }} - {% endif %} +
    +
    - - {# attachments badges #} -
    - {% if attachment.approved or attachment.redacted %} - - - {% if attachment.redacted or attachment.converted and not attachment.approved %} - - {% blocktrans %}protected original{% endblocktrans %} - +
    + {# filename #} +
    + {% if attachment.approved or object|can_write_foirequest:request and attachment.can_link %} + {{ attachment.name }} + {% elif not attachment.approved and not object|can_write_foirequest:request and object|can_read_foirequest_authenticated:request %} + {# not approved, can read but cannot write, so allow read link #} + {{ attachment.name }} + {% else %} + {{ attachment.name }} + {% endif %} +
    + {# attachments badges #} +
    + {% if attachment.approved or attachment.redacted %} + + {% if attachment.redacted or attachment.converted and not attachment.approved %} + + {% blocktrans %}protected original{% endblocktrans %} + + {% endif %} + {% if attachment.approved %} + {% if attachment.is_mail_decoration %} + + + + {% endif %} + {% endif %} + {% if attachment.is_redacted %} + {% blocktrans %}redacted{% endblocktrans %} + {% endif %} + {% else %} + + {% if attachment.pending %} + {% blocktrans %}PDF Pending{% endblocktrans %} + {% elif attachment.is_mail_decoration and object|can_read_foirequest_authenticated:request %} + + + + {% endif %} + {% endif %} +
    + {# attachment badges end #} + {# filesize #} +
    {{ attachment.size|filesizeformat }}
    + {% if object|can_write_foirequest:request and not attachment.approved and attachment.can_approve %} +
    + {% if attachment.can_redact %} + + {% translate "Review to approve" %} + + {% else %} + + {% translate "Review to approve" %} + + {% endif %} +
    {% endif %} - {% if attachment.approved %} - {% if attachment.is_mail_decoration %} - - - - {% endif %} - {% endif %} - {% if attachment.is_redacted %} - - {% blocktrans %}redacted{% endblocktrans %} - - {% endif %} - - {% else %} - - - {% if attachment.pending %} - - {% blocktrans %}PDF Pending{% endblocktrans %} - - {% elif attachment.is_mail_decoration and object|can_read_foirequest_authenticated:request %} - - - - {% endif %} - - {% endif %}
    - {# attachment badges end #} - - {# filesize #} -
    {{ attachment.size|filesizeformat }}
    - - {% if object|can_write_foirequest:request and not attachment.approved and attachment.can_approve %} -
    - {% if attachment.can_redact %} - - {% translate "Review to approve" %} - - {% else %} - - {% translate "Review to approve" %} - - {% endif %} -
    - {% endif %} - - -
    -
    diff --git a/froide/foirequest/templates/foirequest/body/message/attachments/list.html b/froide/foirequest/templates/foirequest/body/message/attachments/list.html index e8a8e0adf..916b08b30 100644 --- a/froide/foirequest/templates/foirequest/body/message/attachments/list.html +++ b/froide/foirequest/templates/foirequest/body/message/attachments/list.html @@ -1,33 +1,26 @@ {% load i18n %} - {% with shown_attachments=attachment_list|slice:":3" wrapped_attachments=attachment_list|slice:"3:" %} - -
    - - {% for attachment in shown_attachments %} - {% include "foirequest/body/message/attachments/item.html" %} - {% endfor %} - - {# If we only have 1 item left, we can show it as well #} - {% if wrapped_attachments|length == 1 %} - {% include "foirequest/body/message/attachments/item.html" with attachment=wrapped_attachments|first %} - - {# else wrap all remaining items#} - {% elif wrapped_attachments|length > 1 %} -
    - {% for attachment in wrapped_attachments %} - {% include "foirequest/body/message/attachments/item.html" %} +
    + {% for attachment in shown_attachments %} + {% include "foirequest/body/message/attachments/item.html" %} {% endfor %} -
    - - + +
    + {% endif %} +
    {% endwith %} - diff --git a/froide/foirequest/templates/foirequest/body/message/guidance.html b/froide/foirequest/templates/foirequest/body/message/guidance.html index 5a3f19c22..cbfa6e538 100644 --- a/froide/foirequest/templates/foirequest/body/message/guidance.html +++ b/froide/foirequest/templates/foirequest/body/message/guidance.html @@ -1,59 +1,48 @@ {% load i18n %} {% load markup %} {% load foirequest_tags %} - {% for guidance in message.guidances %} -
    - {% with guidance.get_label as label %} - {% if label %} -

    - {{ label }} -

    - {% endif %} - {% endwith %} - - {% with guidance.get_description as description %} - {% if description %} -
    - {{ description | markdown }} -
    - {% endif %} - {% endwith %} - - {% if guidance.has_snippet and foirequest|can_write_foirequest:request %} - {% with snippet=guidance.get_snippet %} - {% if snippet|length < 250 %} -
    {% trans "Suggested reply" %}
    -
    -

    - {{ snippet|linebreaksbr }} -

    -
    +
    + {% with guidance.get_label as label %} + {% if label %} +

    {{ label }}

    + {% endif %} + {% endwith %} + {% with guidance.get_description as description %} + {% if description %}
    {{ description | markdown }}
    {% endif %} + {% endwith %} + {% if guidance.has_snippet and foirequest|can_write_foirequest:request %} + {% with snippet=guidance.get_snippet %} + {% if snippet|length < 250 %} +
    {% trans "Suggested reply" %}
    +
    +

    {{ snippet|linebreaksbr }}

    +
    + {% endif %} + + + {% if snippet|length < 250 %} + {% trans "Add to reply" %} + {% else %} + {% trans "Prepare message" %} + {% endif %} + + {% endwith %} {% endif %} - - - - {% if snippet|length < 250 %} - {% trans "Add to reply" %} - {% else %} - {% trans "Prepare message" %} - {% endif %} - - - {% endwith %} - {% endif %} - - {% if guidance.has_letter and foirequest|can_write_foirequest:request %} - - - {% trans "Generate letter" %} - - {% endif %} - - -
    + {% if guidance.has_letter and foirequest|can_write_foirequest:request %} + + + {% trans "Generate letter" %} + + {% endif %} +
    {% endfor %} diff --git a/froide/foirequest/templates/foirequest/body/message/message.html b/froide/foirequest/templates/foirequest/body/message/message.html index 82f6994ff..c28c09850 100644 --- a/froide/foirequest/templates/foirequest/body/message/message.html +++ b/froide/foirequest/templates/foirequest/body/message/message.html @@ -5,254 +5,233 @@ {% load guidance_tags %} {% load content_helper %} {% load thumbnail %} - {% get_comment_list message as comment_list %} - {% block before_message_container %}{% endblock %} - -
    - - {% block before_message %}{% endblock %} - - {# head #} -
    - - {# avatar #} -
    - {% if not message.is_response and not message.sender_user.private and message.sender_user.profile_photo %} - {{ message.sender_user.get_full_name }} - {% else %} - - {% endif %} -
    - - {# sender, recipient, message preview, meta infos #} -
    - {# first row #} -
    - {# sender #} - {% include "foirequest/body/message/sender.html" %} - - {# icons & timestamp #} -
    - {% if message.all_attachments %} - - - - {% endif %} - {% if comment_list %} - - - - {% endif %} - - {% if message.is_not_email %} - {% if message.is_response %} - {% blocktrans with kind=message.get_kind_display asvar kind_display %}received via {{ kind }}{% endblocktrans %} +
    + {% block before_message %}{% endblock %} + {# head #} +
    + {# avatar #} +
    + {% if not message.is_response and not message.sender_user.private and message.sender_user.profile_photo %} + {{ message.sender_user.get_full_name }} {% else %} - {% blocktrans with kind=message.get_kind_display asvar kind_display %}sent via {{ kind }}{% endblocktrans %} + {% endif %} - - - - {% endif %} - - {% if message.request|can_read_foirequest_authenticated:request and message.is_response and message.is_email and message.fails_authenticity %} - - - - {% endif %} - - {% if message.is_escalation_message %} - - - - {% endif %} - - {% if message.content_hidden %} - - - - {% endif %} - - {% get_delivery_status message as delivery_status %} - {% if delivery_status.is_failed %} - - - - {% endif %} - - - {# relative time #} - - {{ message.timestamp|relativetime }} -
    -
    - - {# second row #} - - {# message preview (collapsed state) #} -
    - {% if message.content_hidden and not object|can_read_foirequest_authenticated:request %} - {% blocktrans %}This message is not yet public.{% endblocktrans %} - {% else %} - {% if not message.plaintext %} - {% if message.subject %} - {% redact_subject message request %} - {% else %} - {% trans 'No message text' %} - {% endif %} - {% else %} - {% redact_message_short message request %} - {% endif %} - {% endif %} -
    - - {# recipient and delivery details link (expanded state) #} -
    - {# recipient #} - {% if message.recipient_public_body.name %} - - {% blocktrans %}To{% endblocktrans %} - {{ message.recipient_public_body.name }} - - {% endif %} - - - - {% trans "Details" %} - - - -
    -
    -
    - - {# meta details container #} - {% include "foirequest/body/message/meta_container.html" %} - - {# body #} -
    -
    - - {# guidance #} - {% if not message.content_hidden or object|can_read_foirequest_authenticated:request %} - {% render_guidance_alpha message %} - {% endif %} - - {# attachments #} - {% include "foirequest/body/message/attachments/attachments.html" %} - - {# text #} - {% if message == object.first_outgoing_message %} - {# First outgoing message should (🤞) contain the request-message, render with highlight, cannot be hidden #} -
    {% highlight_request message request %}
    - {% else %} - - {% if message.content_hidden and object|can_write_foirequest:request %} -
    -

    {% blocktrans %}This message may contain information that you may wish to not publish until after the whole request finished. The following message is therefore currently only visible to you.{% endblocktrans %}

    -
    - {% csrf_token %} - -
    -
    - {% endif %} - - {% if not message.content_hidden or object|can_read_foirequest_authenticated:request %} -
    {% redact_message message request %}
    - {% else %} -
    -

    {% blocktrans %}This message is not yet public.{% endblocktrans %}

    -
    - {% endif %} - - {% endif %} -
    - - {% block after_message %}{% endblock %} - -
    - - {# footer buttons #} -
    - - {# Comments button #} - - - - {% block message_toolbar_item %}{% endblock %} - - {% if not message.original %} - {% if object|can_write_foirequest:request %} - {% if message.is_response %} -
    - - - {% trans "Reply" %} + {# sender, recipient, message preview, meta infos #} +
    + {# first row #} + + {# second row #} + {# message preview (collapsed state) #} +
    + {% if message.content_hidden and not object|can_read_foirequest_authenticated:request %} + {% blocktrans %}This message is not yet public.{% endblocktrans %} + {% else %} + {% if not message.plaintext %} + {% if message.subject %} + {% redact_subject message request %} + {% else %} + {% trans 'No message text' %} + {% endif %} + {% else %} + {% redact_message_short message request %} + {% endif %} + {% endif %} +
    + {# recipient and delivery details link (expanded state) #} +
    + {# recipient #} + {% if message.recipient_public_body.name %} + + {% blocktrans %}To{% endblocktrans %} + {{ message.recipient_public_body.name }} + + {% endif %} + + + {% trans "Details" %} + -
    - {% endif %} - {% endif %} - - {% if object|can_write_foirequest:request or object|can_moderate_pii_foirequest:request %} - {% render_message_redact_button message %} - {% endif %} - - {% if object|can_write_foirequest:request %} - {% render_message_edit_button message %} - {% endif %} - {% endif %} - - - {% render_problem_button message %} - - {% if object|can_moderate_foirequest:request and message.can_resend_bounce %} - {% include "foirequest/body/message/toolbar/resend.html" %} - {% endif %} - -
    +
    +
    - - - {% block after_message_container %}{% endblock %} diff --git a/froide/foirequest/templates/foirequest/body/message/meta_container.html b/froide/foirequest/templates/foirequest/body/message/meta_container.html index b9cdd62d5..96a2ab2bb 100644 --- a/froide/foirequest/templates/foirequest/body/message/meta_container.html +++ b/froide/foirequest/templates/foirequest/body/message/meta_container.html @@ -1,254 +1,260 @@ {% load i18n %} {% load foirequest_tags %} {% load permission_helper %} -
    - - {% block before_meta %}{% endblock %} -
    -
    - {% blocktrans %}From{% endblocktrans %} -
    -
    - {% if object|can_read_foirequest_authenticated:request %} - {% if message.is_response %} - - {% if message.user_real_sender != message.sender_public_body.name %} - - {{ message.user_real_sender }} - - – + {% block before_meta %}{% endblock %} +
    +
    {% blocktrans %}From{% endblocktrans %}
    +
    + {% if object|can_read_foirequest_authenticated:request %} + {% if message.is_response %} + + {% if message.user_real_sender != message.sender_public_body.name %} + {{ message.user_real_sender }} + – + {% endif %} + {{ message.sender_public_body.name }} + + {% if not message.is_default_sender and object|can_write_foirequest:request or object|can_moderate_foirequest:request %} + + + +
    + {% with message_pb_form=message.get_public_body_sender_form %} +
    + {% csrf_token %} + + {{ message_pb_form.sender }} +

    + +

    +
    + {% endwith %} +
    + {% endif %} + {% else %} + {% if object.user.private %} + + {% else %} + + {% endif %} + {{ message.user_real_sender }} + + {% endif %} + {% else %} + {% if message.is_response %} + {% if froide.public_body_officials_public %} + {% if message.sender != message.sender_public_body.name %}{{ message.sender }}{% endif %} + {% if message.sender_public_body %} + – {{ message.sender_public_body.name }} + {% endif %} + {% else %} + {% if message.sender_public_body %} + {{ message.sender_public_body.name }} + {% else %} + {% trans "Public Body" %} + {% endif %} + {% endif %} + {% else %} + {{ message.sender }} + {% endif %} + {% endif %} +
    + {% if object|can_read_foirequest_authenticated:request %} + {% with additional_recipients=message.list_additional_recipients %} + {% if additional_recipients %} +
    {% translate "Additional recipients" %}
    +
    +
      + {% for recipient_type, name, email in additional_recipients %} +
    • + {{ recipient_type|title }}: + + {{ name }} <{{ email }}> + +
    • + {% endfor %} +
    +
    + {% endif %} + {% endwith %} {% endif %} - {{ message.sender_public_body.name }} - - {% if not message.is_default_sender and object|can_write_foirequest:request or object|can_moderate_foirequest:request %} - - - -
    - {% with message_pb_form=message.get_public_body_sender_form %} -
    - {% csrf_token %} - - {{ message_pb_form.sender }} -

    - -

    -
    - {% endwith %} -
    - {% endif %} - {% else %} - {% if object.user.private %} - - {% else %} - - {% endif %} - {{ message.user_real_sender }} - - {% endif %} - {% else %} - {% if message.is_response %} - {% if froide.public_body_officials_public %} - {% if message.sender != message.sender_public_body.name %} - {{ message.sender }} + {% if message.is_not_email %} +
    {% translate "Via" %}
    +
    + {{ message.get_kind_display }} +
    {% endif %} - {% if message.sender_public_body %} - – {{ message.sender_public_body.name }} +
    {% blocktrans %}Subject{% endblocktrans %}
    +
    + {% if message.content_hidden %} + {% if object|can_read_foirequest_authenticated:request %}{{ message.subject }}{% endif %} + {% trans "Subject hidden" %} + {% else %} + {% redact_subject message request %} + {% endif %} +
    +
    {% blocktrans %}Date{% endblocktrans %}
    +
    + + {% if message.is_postal %} + {{ message.timestamp|date:"DATE_FORMAT" }} + {% else %} + {{ message.timestamp|date:"DATETIME_FORMAT" }} + {% endif %} + +
    + {% if not message.is_response %} +
    {% blocktrans %}To{% endblocktrans %}
    +
    + {% if message.recipient_public_body %} + {{ message.recipient_public_body.name }} + {% else %} + {% if object|can_read_foirequest_authenticated:request %} + {{ message.recipient }} + {% else %} + {% translate "Recipient name" %} + {% endif %} + {% endif %} + {% if not message.is_default_recipient and object|can_write_foirequest:request or object|can_moderate_foirequest:request %} + + + +
    + {% with message_pb_form=message.get_public_body_recipient_form %} +
    + {% csrf_token %} + + {{ message_pb_form.recipient }} +

    + +

    +
    + {% endwith %} +
    + {% endif %} +
    {% endif %} - {% else %} - {% if message.sender_public_body %} - {{ message.sender_public_body.name }} - {% else %} - {% trans "Public Body" %} + {% get_delivery_status message as delivery_status %} +
    {% blocktrans %}Status{% endblocktrans %}
    +
    + {% if message.status %}{{ message.readable_status }}{% endif %} + {% if not message.sent %} + {% trans "Message was not sent" %} + {% endif %} + {% if delivery_status %} + {% if message.status %}—{% endif %} + {% if delivery_status.is_sent %} + + {% blocktrans with kind=message.get_kind_display %}{{ kind }} was sent successfully.{% endblocktrans %} + {% elif delivery_status.is_pending %} + + {% blocktrans with kind=message.get_kind_display %}{{ kind }} delivery is ongoing...{% endblocktrans %} + {% elif delivery_status.is_failed %} + + {% blocktrans with kind=message.get_kind_display %}{{ kind }} delivery has failed.{% endblocktrans %} + {% else %} + + {% blocktrans with kind=message.get_kind_display %}{{ kind }} delivery status is unknown.{% endblocktrans %} + {% endif %} + {% if object|can_read_foirequest_authenticated:request %} +
    {{ delivery_status.log }}
    + {% endif %} + {% endif %} + {% if message.object|can_read_foirequest_authenticated:request and message.is_response and message.is_email and message.has_authenticity_info %} + +
    + {% for check in message.email_headers.authenticity %} +
    {{ check.check }}
    +
    +
    {{ check.details }}
    +
    + {% endfor %} +
    + {% endif %} + {% if message.can_get_original_from_imap and message.request|can_read_foirequest_authenticated:request %} + + + {% translate "Download original" %} + + {% endif %} +
    + {% if request.user.is_staff and request.user|has_perm:"foirequest.view_foimessage" %} +
    {% blocktrans %}Admin{% endblocktrans %}
    +
    + {% trans "View message in admin" %} + {% for tag_name in message.tag_set %}{{ tag_name }}{% endfor %} +
    {% endif %} - {% endif %} - {% else %} - {{ message.sender }} - {% endif %} - {% endif %} -
    - {% if object|can_read_foirequest_authenticated:request %} - {% with additional_recipients=message.list_additional_recipients %} - {% if additional_recipients %} -
    {% translate "Additional recipients" %}
    -
    -
      - {% for recipient_type, name, email in additional_recipients %} -
    • - {{ recipient_type|title }}: - - {{ name }} <{{ email }}> - -
    • - {% endfor %} -
    -
    - {% endif %} - {% endwith %} - {% endif %} - {% if message.is_not_email %} -
    - {% translate "Via" %} -
    -
    - {{ message.get_kind_display }} -
    - {% endif %} -
    - {% blocktrans %}Subject{% endblocktrans %} -
    -
    - {% if message.content_hidden %} - {% if object|can_read_foirequest_authenticated:request %} - {{ message.subject }} - {% endif %} - {% trans "Subject hidden" %} - {% else %} - {% redact_subject message request %} - {% endif %} -
    -
    - {% blocktrans %}Date{% endblocktrans %} -
    -
    - - {% if message.is_postal %} - {{ message.timestamp|date:"DATE_FORMAT" }} - {% else %} - {{ message.timestamp|date:"DATETIME_FORMAT" }} - {% endif %} - -
    - {% if not message.is_response %} -
    - {% blocktrans %}To{% endblocktrans %} -
    -
    - {% if message.recipient_public_body %} - - {{ message.recipient_public_body.name }} - - {% else %} - {% if object|can_read_foirequest_authenticated:request %} - - {{ message.recipient }} - - {% else %} - - {% translate "Recipient name" %} - - {% endif %} - {% endif %} - {% if not message.is_default_recipient and object|can_write_foirequest:request or object|can_moderate_foirequest:request %} - - - -
    - {% with message_pb_form=message.get_public_body_recipient_form %} -
    - {% csrf_token %} - - {{ message_pb_form.recipient }} -

    - -

    -
    - {% endwith %} -
    - {% endif %} -
    - {% endif %} - {% get_delivery_status message as delivery_status %} -
    - {% blocktrans %}Status{% endblocktrans %} -
    -
    - {% if message.status %} - {{ message.readable_status }} - {% endif %} - {% if not message.sent %} - {% trans "Message was not sent" %} - {% endif %} - {% if delivery_status %} - {% if message.status %} - — - {% endif %} - {% if delivery_status.is_sent %} - - {% blocktrans with kind=message.get_kind_display %}{{ kind }} was sent successfully.{% endblocktrans %} - {% elif delivery_status.is_pending %} - - {% blocktrans with kind=message.get_kind_display %}{{ kind }} delivery is ongoing...{% endblocktrans %} - {% elif delivery_status.is_failed %} - - {% blocktrans with kind=message.get_kind_display %}{{ kind }} delivery has failed.{% endblocktrans %} - {% else %} - - {% blocktrans with kind=message.get_kind_display %}{{ kind }} delivery status is unknown.{% endblocktrans %} - {% endif %} - {% if object|can_read_foirequest_authenticated:request %} -
    {{ delivery_status.log }}
    - {% endif %} - {% endif %} - {% if message.object|can_read_foirequest_authenticated:request and message.is_response and message.is_email and message.has_authenticity_info %} - -
    - {% for check in message.email_headers.authenticity %} -
    {{ check.check }}
    -
    {{ check.details }}
    - {% endfor %} -
    - {% endif %} - {% if message.can_get_original_from_imap and message.request|can_read_foirequest_authenticated:request %} - - - {% translate "Download original" %} - - {% endif %} -
    - {% if request.user.is_staff and request.user|has_perm:"foirequest.view_foimessage" %} -
    - {% blocktrans %}Admin{% endblocktrans %} -
    -
    - {% trans "View message in admin" %} - {% for tag_name in message.tag_set %} - {{ tag_name }} - {% endfor %} -
    - {% endif %} - {% if request.user.is_staff and request.user|has_perm:"guide.view_guidance" %} -
    - {% trans "Guidance" %} -
    -
    - - {% trans "In admin" %} - - - - {% trans "Add custom" %} - -
    - {% csrf_token %} - - -
    -
    - {% endif %} -
    - - {% block after_meta %}{% endblock %} -
    + {% if request.user.is_staff and request.user|has_perm:"guide.view_guidance" %} +
    {% trans "Guidance" %}
    +
    + {% trans "In admin" %} - + {% trans "Add custom" %} +
    + {% csrf_token %} + + +
    +
    + {% endif %} + + {% block after_meta %}{% endblock %} +
    diff --git a/froide/foirequest/templates/foirequest/body/message/sender.html b/froide/foirequest/templates/foirequest/body/message/sender.html index f530939f6..f0779c729 100644 --- a/froide/foirequest/templates/foirequest/body/message/sender.html +++ b/froide/foirequest/templates/foirequest/body/message/sender.html @@ -1,51 +1,50 @@ {% load i18n %} {% load foirequest_tags %} -
    - {% if object|can_read_foirequest_authenticated:request %} - {% if message.is_response %} - - {% if message.user_real_sender and message.user_real_sender != message.sender_public_body.name %} - {% if message.sender_public_body %} - - {{ message.user_real_sender }} + {% if object|can_read_foirequest_authenticated:request %} + {% if message.is_response %} + + {% if message.user_real_sender and message.user_real_sender != message.sender_public_body.name %} + {% if message.sender_public_body %} + {{ message.user_real_sender }} + – {{ message.sender_public_body.name }} + {% else %} + {{ message.sender_name }} + {% endif %} + {% else %} + {{ message.sender_public_body.name }} + {% endif %} - – {{ message.sender_public_body.name }} - {% else %} - {{ message.sender_name }} - {% endif %} {% else %} - {{ message.sender_public_body.name }} - {% endif %} - + {% if object.user.private %} + + {% else %} + + {% endif %} + {{ message.user_real_sender }} + + {% endif %} + {% else %} - {% if object.user.private %} - - {% else %} - - {% endif %} - {{ message.user_real_sender }} - - {% endif %} - - {% else %} - {% if message.is_response %} - {% if froide.public_body_officials_public %} - {% if message.sender != message.sender_public_body.name %} - {{ message.sender }} - {% endif %} - {% if message.sender_public_body %} - – {{ message.sender_public_body.name }} - {% endif %} - {% else %} - {% if message.sender_public_body %} - {{ message.sender_public_body.name }} + {% if message.is_response %} + {% if froide.public_body_officials_public %} + {% if message.sender != message.sender_public_body.name %} + {{ message.sender }} + {% endif %} + {% if message.sender_public_body %}– {{ message.sender_public_body.name }}{% endif %} + {% else %} + {% if message.sender_public_body %} + {{ message.sender_public_body.name }} + {% else %} + {{ message.sender_name }} + {% endif %} + {% endif %} {% else %} - {{ message.sender_name }} + {{ message.sender }} {% endif %} - {% endif %} - {% else %} - {{ message.sender }} {% endif %} - {% endif %}
    diff --git a/froide/foirequest/templates/foirequest/body/message/toolbar/resend.html b/froide/foirequest/templates/foirequest/body/message/toolbar/resend.html index 52a333f8c..0f5f5d991 100644 --- a/froide/foirequest/templates/foirequest/body/message/toolbar/resend.html +++ b/froide/foirequest/templates/foirequest/body/message/toolbar/resend.html @@ -1,31 +1,34 @@ {% load i18n %} - - - -
    + {% if not authenticated %} +
    + {% csrf_token %} +

    + {% blocktranslate %}Please enter the email address of the requester to use the upload form.{% endblocktranslate %} +

    +
    +
    +
    + +
    + + @{{ email_domain }} +
    +
    + +
    +
    +
    + {% else %} +
    +
    {% trans "Request" %}
    +
    + “{{ foirequest.title }}” [#{{ foirequest.id }}] ({{ foirequest.created_at|date:"SHORT_DATE_FORMAT" }}) +
    +
    {% trans "Requester" %}
    +
    + {{ foirequest.user.get_full_name }} <{{ foirequest.secret_address }}> +
    +
    {% trans "File transfer" %}
    +
    + {% trans "The file transfer is transferred securely encrypted." %} +
    +
    +

    {% trans "Please upload files as a response to this request below." %}

    +
      +
    1. {% trans 'Drag files on the framed area or click "Search" to select files.' %}
    2. +
    3. {% trans 'Wait for all files to be uploaded.' %}
    4. +
    5. + {% trans 'Click on "Create response now" to finish the process.' %} +
    6. +
    +
    + {% csrf_token %} + +
    + Loading... +
    +
    +
    + {% endif %} {% endblock %} - - {% block scripts %} - {{ block.super }} - {% addfrontendbuild "publicbodyupload.js" %} + {{ block.super }} + {% addfrontendbuild "publicbodyupload.js" %} {% endblock %} diff --git a/froide/foirequest/templates/foirequest/redact.html b/froide/foirequest/templates/foirequest/redact.html index 1c45ca844..bc21b8ca7 100644 --- a/froide/foirequest/templates/foirequest/redact.html +++ b/froide/foirequest/templates/foirequest/redact.html @@ -1,131 +1,110 @@ {% extends 'foirequest/base.html' %} {% load i18n %} {% load static %} - {% load frontendbuild %} {% load block_helper %} - -{% block title %}{% blocktrans with name=attachment.name %}Redacting attachment {{ name }}{% endblocktrans %}{% endblock %} - - -{% block app_body %} -
    -
    -

    - {% blocktrans with name=attachment.name %}Redact "{{ name }}"{% endblocktrans %} -

    -
    -
    - -
    - -{% block redaction_removal_explanation %} -
    -
    -
    - {% trans "What you need to redact" %} -
    -
    -

    - {% trans "If this document is not a letter to you from a public body, but any other kind of document, it very likely does not need a redaction." %} -

    -
      -
    • - {% if foirequest.user == request.user %} - {% if foirequest.user.private %} - {% trans "Please remove all your personally identifying information." %} - {% else %} - {% trans "Please remove all your personally identifying information except your name." %} - {% endif %} - {% else %} - {% if foirequest.user.private %} - {% blocktrans with name=foirequest.user.get_full_name %}Please remove all personally identifying information of {{ name }}.{% endblocktrans %} - {% else %} - {% blocktrans with name=foirequest.user.get_full_name %}Please remove all personally identifying information of {{ name }} except the name itself.{% endblocktrans %} - {% endif %} - {% endif %} -
    • -
    • {% trans "Please remove email addresses of this site." %}
    • -
    • {% trans "Please remove all names of public body employees." %}
    • - {% block redaction_removal_explanation_addition %} -
    • {% trans "Please remove hand-written signatures." %}
    • - {% endblock %} -
    -

    - {% blocktrans %}The original version of the document will still be available to you (but not to the public).{% endblocktrans %} -

    -
    -
    -
    +{% block title %} + {% blocktrans with name=attachment.name %}Redacting attachment {{ name }}{% endblocktrans %} {% endblock %} - -{% block redaction_removal_intro %} -
    -
    -
    {% trans "How to redact" %}
    -
    -

    - {% trans "If this document is a letter to you:" %} -

    -

    {% blocktrans with name=SITE_NAME %}Go to each page of the PDF and locate the parts that need to be blacked out. On desktop redact text by selecting it. You can also draw rectangles by clicking the mouse or double tapping and dragging. {% endblocktrans %}

    -

    - {% trans "Check the text only view to see if the underlying text is also gone. If the document does not load correctly, cancel and inform a site moderator." %} -

    -
    +{% block app_body %} +
    +
    +

    {% blocktrans with name=attachment.name %}Redact "{{ name }}"{% endblocktrans %}

    +
    -
    -{% endblock %} - -
    -{% if attachment.file %} -
    -
    - -
    -
    - -
    -

    - {% trans "Redaction tool is loading..." %} -

    -
    - {% trans "Loading..." %} +
    + {% block redaction_removal_explanation %} +
    +
    +
    {% trans "What you need to redact" %}
    +
    +

    + {% trans "If this document is not a letter to you from a public body, but any other kind of document, it very likely does not need a redaction." %} +

    +
      +
    • + {% if foirequest.user == request.user %} + {% if foirequest.user.private %} + {% trans "Please remove all your personally identifying information." %} + {% else %} + {% trans "Please remove all your personally identifying information except your name." %} + {% endif %} + {% else %} + {% if foirequest.user.private %} + {% blocktrans with name=foirequest.user.get_full_name %}Please remove all personally identifying information of {{ name }}.{% endblocktrans %} + {% else %} + {% blocktrans with name=foirequest.user.get_full_name %}Please remove all personally identifying information of {{ name }} except the name itself.{% endblocktrans %} + {% endif %} + {% endif %} +
    • +
    • {% trans "Please remove email addresses of this site." %}
    • +
    • {% trans "Please remove all names of public body employees." %}
    • + {% block redaction_removal_explanation_addition %} +
    • {% trans "Please remove hand-written signatures." %}
    • + {% endblock %} +
    +

    + {% blocktrans %}The original version of the document will still be available to you (but not to the public).{% endblocktrans %} +

    +
    +
    -
    - -
    -
    -
    -
    -{% else %} -
    -
    -
    - {% trans "This file is probably still being processed and is not available yet. Please wait, this page will automatically refresh." %} + {% endblock %} + {% block redaction_removal_intro %} +
    +
    +
    {% trans "How to redact" %}
    +
    +

    {% trans "If this document is a letter to you:" %}

    +

    + {% blocktrans with name=SITE_NAME %}Go to each page of the PDF and locate the parts that need to be blacked out. On desktop redact text by selecting it. You can also draw rectangles by clicking the mouse or double tapping and dragging. {% endblocktrans %} +

    +

    + {% trans "Check the text only view to see if the underlying text is also gone. If the document does not load correctly, cancel and inform a site moderator." %} +

    +
    +
    +
    + {% endblock %}
    -
    -
    -{% endif %} + {% if attachment.file %} +
    +
    + +
    +
    + +
    +

    {% trans "Redaction tool is loading..." %}

    +
    + {% trans "Loading..." %} +
    +
    +
    +
    +
    +
    +
    + {% else %} +
    +
    +
    + {% trans "This file is probably still being processed and is not available yet. Please wait, this page will automatically refresh." %} +
    +
    +
    + {% endif %} {% endblock %} - {% block scripts %} - {{ block.super }} - - {% addfrontendbuild "redact.js" %} - - {% if not attachment.file %} - {% addtoblock "css" %} - + {{ block.super }} + {% addfrontendbuild "redact.js" %} + {% if not attachment.file %} + {% addtoblock "css" %} + {% endaddtoblock %} - {% endif %} - +{% endif %} {% endblock %} diff --git a/froide/foirequest/templates/foirequest/request.html b/froide/foirequest/templates/foirequest/request.html index 2bad469d8..98e0eef9c 100644 --- a/froide/foirequest/templates/foirequest/request.html +++ b/froide/foirequest/templates/foirequest/request.html @@ -6,64 +6,49 @@ {% load block_helper %} {% load form_helper %} {% load frontendbuild %} - -{% block title %}{% trans "Make a Freedom of Information request" %} - {{ SITE_NAME }}{% endblock %} - +{% block title %} + {% trans "Make a Freedom of Information request" %} - {{ SITE_NAME }} +{% endblock %} {% block foisite_advice %} - {% include "foisite/banner.html" %} + {% include "foisite/banner.html" %} {% endblock %} - {% block navbar %} - {% include "header_reduced.html" %} + {% include "header_reduced.html" %} {% endblock %} - {% block messages %} {% endblock messages %} - {% block body %} - - {% block before_form %} - {% if campaigns %} -
    -
    -

    {% trans "Join our current FOI campaigns" %}

    -
    - {% for campaign in campaigns %} -
    -

    {{ campaign.name }}

    - - {% trans "Make a request" %} - -
    - {% endfor %} -
    -
    -
    - {% endif %} - {% endblock %} - -
    - - {% csrf_token %} - {{ request_form.reference }} - {{ request_form.tags }} - {{ request_form.draft }} - {{ request_form.language }} - {{ request_form.redirect_url }} - - {% for k, v in config.items %} - {% if v %} - - {% endif %} - {% endfor %} - - +
    +

    {% trans "Join our current FOI campaigns" %}

    +
    + {% for campaign in campaigns %} +
    +

    {{ campaign.name }}

    + {% trans "Make a request" %} +
    + {% endfor %} +
    +
    +
    + {% endif %} + {% endblock %} + + {% csrf_token %} + {{ request_form.reference }} + {{ request_form.tags }} + {{ request_form.draft }} + {{ request_form.language }} + {{ request_form.redirect_url }} + {% for k, v in config.items %} + {% if v %}{% endif %} + {% endfor %} + {{ campaign.name }} {% if config.hide_public %}:hide-public="true"{% endif %} {% if multi_request %}:multi-request="true"{% endif %} {% if beta_ui %}:beta-ui="true"{% endif %} - :config="{{ js_config }}" - > - + :config="{{ js_config }}"> - - - - - - - + -