From bef0f2409324ce847e07b4f7024df61542080ced Mon Sep 17 00:00:00 2001 From: Norbert Kwizera Date: Fri, 26 Jan 2024 14:23:47 +0200 Subject: [PATCH] Format templates --- templates/404.html | 68 ++++----- templates/500.html | 116 ++++++++-------- templates/dashblocks/dashblock_form.html | 73 +++++----- templates/dashblocks/dashblock_list.html | 5 +- templates/jobs/jobsource_create.html | 38 +++-- .../landingpages/landingpage_update.html | 64 ++++----- templates/orgs/org_edit.html | 1 + templates/orgs/org_manage_accounts.html | 130 +++++++++--------- templates/polls/poll_images.html | 2 +- templates/polls/poll_list.html | 101 +++++++------- templates/polls/poll_update.html | 64 ++++----- templates/public/all_polls.html | 8 +- templates/public/archived_stories.html | 11 +- templates/public/bots.html | 13 +- templates/public/custom_page.html | 1 + templates/public/edit_content.html | 5 +- templates/public/icons.html | 6 +- templates/public/index.html | 74 ++++------ templates/public/jobs.html | 12 +- templates/public/join_engage.html | 8 +- templates/public/landing_page.html | 23 ++-- templates/public/org_chooser.html | 10 +- templates/public/org_flags.html | 37 +++-- templates/rest_framework/base.html | 8 +- templates/smartmin/form.html | 2 +- templates/smartmin/update.html | 1 + templates/smartmin/users/login.html | 1 + 27 files changed, 423 insertions(+), 459 deletions(-) diff --git a/templates/404.html b/templates/404.html index 2e0a3f14f..ffb0276a6 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,40 +1,40 @@ - - - - - U-Report - Not Found. - - - - -
- Sorry, that page wasn't found. - We've been notified of the error. -
-
- + .message { + margin-top: 18px; + color: #333; + font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; + font-size: 14px; + text-align: center; + } + + + + +
+ Sorry, that page wasn't found. + We've been notified of the error. +
+
+ diff --git a/templates/500.html b/templates/500.html index fec276a49..51d3caff7 100644 --- a/templates/500.html +++ b/templates/500.html @@ -1,66 +1,66 @@ - - - - - U-Report Problem - Uh oh! - - - - -
-

Sometimes bad things happen to good people.

-
-
- While we do our best to write bug-free code, every now and again things do go wrong. Good news though! - We've already been notified of the problem. -
-
-
- {% if request.sentry.id %} -
- If you'd like to contact us about this error, please be sure to include your reference number - {{ request.sentry.id }} -
- {% endif %} - + .reference { + padding: 20px; + background: #f3f3f3; + font-size: 14px; + text-align: center; + width: 460px; + margin: 30px auto 0; + } + + + + +
+

Sometimes bad things happen to good people.

+
+
+ While we do our best to write bug-free code, every now and again things do go wrong. Good news though! + We've already been notified of the problem. +
+
+
+ {% if request.sentry.id %} +
+ If you'd like to contact us about this error, please be sure to include your reference number + {{ request.sentry.id }} +
+ {% endif %} + diff --git a/templates/dashblocks/dashblock_form.html b/templates/dashblocks/dashblock_form.html index 1ce97387f..641aa5325 100644 --- a/templates/dashblocks/dashblock_form.html +++ b/templates/dashblocks/dashblock_form.html @@ -1,64 +1,59 @@ {% extends "smartmin/form.html" %} {% load thumbnail i18n %} + {% block extra-fields %} - {% if object and type.has_gallery %} -
- -
- {% for img in object.sorted_images %} - {% thumbnail img.image "100x100" crop="center" as im %} - - - - {% endthumbnail %} - {% trans "Add Image" %} - {% endfor %} -
-
- {% endif %} + {% if object and type.has_gallery %} +
+ +
+ {% for img in object.sorted_images %} + {% thumbnail img.image "100x100" crop="center" as im %} + + + + {% endthumbnail %} + {% trans "Add Image" %} + {% endfor %} +
+
+ {% endif %} {% endblock extra-fields %} {% block extra-style %} - - - {% if type.has_rich_text %} - - {% endif %} - + {% endif %} + + {% endblock extra-style %} {% block extra-script %} - - - {% if type.has_rich_text %} - + + {% if type.has_rich_text %} + - {% endif %} + + {% endif %} {% endblock extra-script %} diff --git a/templates/dashblocks/dashblock_list.html b/templates/dashblocks/dashblock_list.html index 17039e507..722f0a04b 100644 --- a/templates/dashblocks/dashblock_list.html +++ b/templates/dashblocks/dashblock_list.html @@ -1,5 +1,6 @@ {% extends "smartmin/list.html" %} {% load i18n %} + {% block content-title %}

{% if filtered_type %} @@ -28,9 +29,7 @@

{% else %} - {% trans "+ New Page" %} - + class="{% if is_rtl_org %}is-pulled-left{% else %}is-pulled-right{% endif %} button is-primary">{% trans "+ New Page" %} {% endif %} {% endif %} {% endblock table-buttons %} diff --git a/templates/jobs/jobsource_create.html b/templates/jobs/jobsource_create.html index 47c96e9ed..378cc02d2 100644 --- a/templates/jobs/jobsource_create.html +++ b/templates/jobs/jobsource_create.html @@ -1,21 +1,17 @@ {% extends "smartmin/create.html" %} {% load i18n %} + {% block pre-form %} {% if 'widget_id' in fields %}

{% blocktrans %} To add a Twitter job source you are required to get a widget id from twitter. {% endblocktrans %} - - {% trans "Follow this step by step guide" %} - + {% trans "Follow this step by step guide" %} {% blocktrans %}

After you create the widget copy the widget id from the url as shown on
{% endblocktrans %} - +

{% endif %} {% endblock pre-form %} @@ -35,24 +31,24 @@ {% block extra-script %} {{ block.super }} {% endblock extra-script %} {% block extra-style %} {% endblock extra-style %} diff --git a/templates/landingpages/landingpage_update.html b/templates/landingpages/landingpage_update.html index dbd800f84..0a03b7a7b 100644 --- a/templates/landingpages/landingpage_update.html +++ b/templates/landingpages/landingpage_update.html @@ -1,57 +1,57 @@ {% extends "smartmin/form.html" %} {% load thumbnail i18n %} + {% block post-form %} - {% if object.is_active %} - {% trans "View public page" %} - {% endif %} + {% if object.is_active %} + {% trans "View public page" %} + {% endif %} {% endblock post-form %} {% block extra-style %} - - - + {% endblock extra-style %} {% block extra-script %} - - - + + + {% endblock extra-script %} diff --git a/templates/orgs/org_edit.html b/templates/orgs/org_edit.html index 7dcbdac20..edd8a7268 100644 --- a/templates/orgs/org_edit.html +++ b/templates/orgs/org_edit.html @@ -1,5 +1,6 @@ {% extends "smartmin/update.html" %} {% load thumbnail i18n %} + {% block pre-content %}

diff --git a/templates/orgs/org_manage_accounts.html b/templates/orgs/org_manage_accounts.html index 592b5828c..3a017ee15 100644 --- a/templates/orgs/org_manage_accounts.html +++ b/templates/orgs/org_manage_accounts.html @@ -1,5 +1,6 @@ {% extends "smartmin/form.html" %} {% load smartmin i18n %} + {% block pre-content %} {% endblock pre-content %} {% block post-form-errors %} @@ -37,9 +38,9 @@

{% block form-help %}
- {% trans "You must have at least one administator" %} -
- - {% trans "You can resend an invite using the field above" %} -
+
+ - {% trans "You can resend an invite using the field above" %} + {% endblock form-help %} {% block fields %} @@ -68,7 +69,9 @@

{% endfor %} {% for invite in invites %}

- +
{{ invite.email }} (Invite Sent on {{ invite.modified_on }}) + {{ invite.email }} (Invite Sent on {{ invite.modified_on }}) + {% if invite.user_group == 'A' %} @@ -116,70 +119,73 @@

{% endblock pre-fields %} {% block extra-style %} {% endblock extra-style %} {% block extra-script %} {{ block.super }} {% endblock extra-script %} diff --git a/templates/polls/poll_images.html b/templates/polls/poll_images.html index a42c91b27..72c24c14e 100644 --- a/templates/polls/poll_images.html +++ b/templates/polls/poll_images.html @@ -1,4 +1,4 @@ -{% extends 'smartmin/form.html' %} +{% extends "smartmin/form.html" %} {% block extra-style %} {% endblock extra-style %} diff --git a/templates/polls/poll_update.html b/templates/polls/poll_update.html index 91602b636..798621d30 100644 --- a/templates/polls/poll_update.html +++ b/templates/polls/poll_update.html @@ -1,58 +1,60 @@ {% extends "smartmin/update.html" %} {% block extra-style %} - + {% endblock extra-style %} {% block extra-script %} - + {% endblock extra-script %} diff --git a/templates/public/all_polls.html b/templates/public/all_polls.html index 4a868ff9a..4c598a1dd 100644 --- a/templates/public/all_polls.html +++ b/templates/public/all_polls.html @@ -1,4 +1,5 @@ {% load i18n %} +

{% trans "MORE POLLS" %}

@@ -9,12 +10,7 @@

{% trans "MORE POLLS" %}


  • - +
  • {% for category in categories %} diff --git a/templates/public/archived_stories.html b/templates/public/archived_stories.html index 0609cbcc4..205c58ae3 100644 --- a/templates/public/archived_stories.html +++ b/templates/public/archived_stories.html @@ -1,4 +1,5 @@ {% load i18n %} +

    {% trans "ARCHIVED STORIES" %}

    @@ -9,12 +10,7 @@

    {% trans "ARCHIVED STORIES" %}


    • - +
    • {% for category in categories %} @@ -34,8 +30,7 @@

      {% trans "ARCHIVED STORIES" %}


        {% for archived_story in other_stories %} -
      • +
      • diff --git a/templates/public/bots.html b/templates/public/bots.html index b17c89fab..a8ef85c7d 100644 --- a/templates/public/bots.html +++ b/templates/public/bots.html @@ -1,5 +1,6 @@ {% extends "public_base.html" %} {% load thumbnail compress i18n ureport %} + {% block content %}
        @@ -23,26 +24,22 @@
        {% if bot.facebook_deeplink %} - + {% endif %} {% if bot.telegram_deeplink %} - + {% endif %} {% if bot.viber_deeplink %} - + {% endif %} {% if bot.whatsapp_deeplink %} - + {% endif %} diff --git a/templates/public/custom_page.html b/templates/public/custom_page.html index 6bc355d3e..d82b80007 100644 --- a/templates/public/custom_page.html +++ b/templates/public/custom_page.html @@ -1,5 +1,6 @@ {% extends "public_base.html" %} {% load dashblocks thumbnail i18n ureport %} + {% block content %}
        diff --git a/templates/public/edit_content.html b/templates/public/edit_content.html index 2b3ecac3a..f3e7379a1 100644 --- a/templates/public/edit_content.html +++ b/templates/public/edit_content.html @@ -1,10 +1,7 @@ {% if request.user.is_authenticated and request.org in request.user.get_user_orgs or request.user.is_superuser %}