diff --git a/mayan/apps/common/templates/403.html b/mayan/apps/common/templates/403.html index 86ceb04dcf..c32b705f74 100644 --- a/mayan/apps/common/templates/403.html +++ b/mayan/apps/common/templates/403.html @@ -1,5 +1,7 @@ -{% extends "base.html" %} +{% extends 'base.html' %} + {% load i18n %} + {% block title %} :: {% blocktrans %}Insufficient permissions{% endblocktrans %}{% endblock %} {% block content %} diff --git a/mayan/apps/common/templates/404.html b/mayan/apps/common/templates/404.html index 0c76c0560c..42d4f0c33e 100644 --- a/mayan/apps/common/templates/404.html +++ b/mayan/apps/common/templates/404.html @@ -1,5 +1,7 @@ -{% extends "base.html" %} +{% extends 'base.html' %} + {% load i18n %} + {% block title %} :: {% blocktrans %}Page not found{% endblocktrans %}{% endblock %} {% block content %} diff --git a/mayan/apps/common/templates/500.html b/mayan/apps/common/templates/500.html index 950815f80b..9980134ec4 100644 --- a/mayan/apps/common/templates/500.html +++ b/mayan/apps/common/templates/500.html @@ -7,12 +7,11 @@

Page unavailable

-

Sorry, but the requested page is unavailable due to a - server problem.

+

Sorry, but the requested page is unavailable due to a server problem.

Administrators have been notified, so check back later.

{% if request.sentry.id %} -

If you need assistance, you may reference this error as +

If you need assistance, you may reference this error as {{ request.sentry.id }}.

{% endif %} diff --git a/mayan/apps/common/templates/calculate_form_title.html b/mayan/apps/common/templates/calculate_form_title.html index adaec981d3..c92de4f10c 100644 --- a/mayan/apps/common/templates/calculate_form_title.html +++ b/mayan/apps/common/templates/calculate_form_title.html @@ -1,4 +1,5 @@ {% load i18n %} + {% if title %} {{ title|capfirst }} {% else %} diff --git a/mayan/apps/common/templates/generic_assign_remove.html b/mayan/apps/common/templates/generic_assign_remove.html index 6a75dfe917..d26a74347d 100644 --- a/mayan/apps/common/templates/generic_assign_remove.html +++ b/mayan/apps/common/templates/generic_assign_remove.html @@ -1,15 +1,16 @@ -{% extends "base.html" %} -{% load i18n %} -{% block title %} :: {% blocktrans %}Assign {{ title }} {{ object }}{% endblocktrans %}{% endblock %} +{% extends 'base.html' %} +{% load i18n %} + +{% block title %} :: {% blocktrans %}Assign {{ title }} {{ object }}{% endblocktrans %}{% endblock %} {% block content %} -
+

{{ title|safe }}

- +
{% csrf_token %} @@ -30,12 +31,12 @@ - +
{{ form.right_list }}{{ form.right_list.errors }} - {{ form.media|safe }} + {{ form.media|safe }}
diff --git a/mayan/apps/common/templates/generic_confirm.html b/mayan/apps/common/templates/generic_confirm.html index b020583e2e..4ed23a39f7 100644 --- a/mayan/apps/common/templates/generic_confirm.html +++ b/mayan/apps/common/templates/generic_confirm.html @@ -1,6 +1,8 @@ -{% extends "base.html" %} +{% extends 'base.html' %} + {% load i18n %} -{% block title %} :: {% trans "Confirm" %} {{ title }}{% endblock %} + +{% block title %} :: {% trans 'Confirm' %} {{ title }}{% endblock %} {% block sidebar %} {% for subtemplate in subtemplates %} @@ -9,28 +11,27 @@ {% endblock %} {% block content %} - -
+

- {% if delete_view %} - {% trans "Confirm delete" %} + {% if delete_view %} + {% trans 'Confirm delete' %} {% else %} - {% trans "Confirm" %} + {% trans 'Confirm' %} {% endif %}

{% if title %}

{{ title }}

@@ -45,20 +46,19 @@ {% endif %}

{{ message }}

- -
- +
+
diff --git a/mayan/apps/common/templates/generic_detail.html b/mayan/apps/common/templates/generic_detail.html index e7f0dac78a..8b2f8c9b08 100644 --- a/mayan/apps/common/templates/generic_detail.html +++ b/mayan/apps/common/templates/generic_detail.html @@ -1,8 +1,10 @@ -{% extends "base.html" %} +{% extends 'base.html' %} + {% load i18n %} + {% load subtemplates_tags %} -{% block title %} :: {% with "true" as read_only %}{% include "calculate_form_title.html" %}{% endwith %}{% endblock %} +{% block title %} :: {% with 'true' as read_only %}{% include 'calculate_form_title.html' %}{% endwith %}{% endblock %} {% block sidebar %} {% for subtemplate in sidebar_subtemplates %} @@ -12,7 +14,7 @@ {% endfor %} {% for subtemplate in sidebar_subtemplates_list %} - {% with "true" as side_bar %} + {% with 'true' as side_bar %} {% if subtemplate.form %} {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} {% with "true" as read_only %} @@ -44,10 +46,10 @@ {% block content %} {% if form %} - {% with "true" as read_only %} + {% with 'true' as read_only %}
- {% include "generic_form_subtemplate.html" %} + {% include 'generic_form_subtemplate.html' %}
{% if grid_clear or not grid %} @@ -71,6 +73,5 @@ {% endif %} {% endfor %}
- {% endblock %} diff --git a/mayan/apps/common/templates/generic_detail_subtemplate.html b/mayan/apps/common/templates/generic_detail_subtemplate.html index 7d8129f0bc..f8dfd58fe7 100644 --- a/mayan/apps/common/templates/generic_detail_subtemplate.html +++ b/mayan/apps/common/templates/generic_detail_subtemplate.html @@ -2,21 +2,20 @@ {% block stylesheets %} {% endblock %} {% block content %} - {% if form %} - {% with "true" as read_only %} + {% with 'true' as read_only %}
{% include "generic_form_subtemplate.html" %} -
+
{% endwith %} {% endif %} {% endblock %} diff --git a/mayan/apps/common/templates/generic_form.html b/mayan/apps/common/templates/generic_form.html index 5fedec5527..faf745b14b 100644 --- a/mayan/apps/common/templates/generic_form.html +++ b/mayan/apps/common/templates/generic_form.html @@ -1,7 +1,8 @@ -{% extends "base.html" %} +{% extends 'base.html' %} + {% load subtemplates_tags %} -{% block title %} :: {% include "calculate_form_title.html" %}{% endblock %} +{% block title %} :: {% include 'calculate_form_title.html' %}{% endblock %} {% block sidebar %} {% for subtemplate in sidebar_subtemplates_list %} @@ -26,22 +27,22 @@ {% endif %} -
- {% for subtemplate in subtemplates_list %} -
- {% if subtemplate.form %} - {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} -
- {{ rendered_subtemplate }} -
- {% else %} - {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} - {{ rendered_subtemplate }} +
+ {% for subtemplate in subtemplates_list %} +
+ {% if subtemplate.form %} + {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} +
+ {{ rendered_subtemplate }} +
+ {% else %} + {% render_subtemplate subtemplate.name subtemplate.context as rendered_subtemplate %} + {{ rendered_subtemplate }} + {% endif %} +
+ {% if subtemplate.grid_clear or not subtemplate.grid %} +
{% endif %} -
- {% if subtemplate.grid_clear or not subtemplate.grid %} -
- {% endif %} - {% endfor %} -
+ {% endfor %} +
{% endblock %} diff --git a/mayan/apps/common/templates/generic_form_instance.html b/mayan/apps/common/templates/generic_form_instance.html index ae51ac8af9..1e48abe0af 100644 --- a/mayan/apps/common/templates/generic_form_instance.html +++ b/mayan/apps/common/templates/generic_form_instance.html @@ -1,6 +1,9 @@ {% load i18n %} + {% load styling %} -{{ form.media|safe }} + +{{ form.media|safe }} + {% add_classes_to_form form %} {% if form.non_field_errors %} @@ -9,7 +12,7 @@

{{ value }}

- {% endfor %} + {% endfor %} {% endif %} @@ -24,20 +27,20 @@ {{ field }} {% if field.errors %}{% endif %} - {% endfor %} + {% endfor %} {% else %} {% for field in form.hidden_fields %} {{ field }} {% endfor %} - + {% for field in form.visible_fields %}
{% if field.errors %}
{% endif %} - - {% if field.errors %}{% for error in field.errors %}{{ error }}{% if not forloop.last %} | {% endif %}{% endfor %}
{% endif %} + + {% if field.errors %}{% for error in field.errors %}{{ error }}{% if not forloop.last %} | {% endif %}{% endfor %}
{% endif %} {{ field }} {% if field.help_text %}{{ field.help_text }}{% endif %} - {% endfor %} + {% endfor %} {% endif %} diff --git a/mayan/apps/common/templates/generic_form_subtemplate.html b/mayan/apps/common/templates/generic_form_subtemplate.html index 37eeee5db4..86a90773e0 100644 --- a/mayan/apps/common/templates/generic_form_subtemplate.html +++ b/mayan/apps/common/templates/generic_form_subtemplate.html @@ -1,14 +1,14 @@ {% load i18n %} - + {% if side_bar %}

{% else %} -
+

{% endif %} -{% include "calculate_form_title.html" %} +{% include 'calculate_form_title.html' %} {% if side_bar %}

@@ -26,14 +26,14 @@ {% if step_field %} {% endif %} - - {% if submit_method != "GET" and submit_method != "get" %} + + {% if submit_method != 'GET' and submit_method != 'get' %} {% csrf_token %} {% endif %} - + {% if next %} - {% endif %} + {% endif %} {% if previous %} @@ -42,7 +42,7 @@ {% for hidden_field in hidden_fields %} {{ hidden_field.as_hidden }} {% endfor %} - + {% if form.management_form %} {% with form as formset %} {{ formset.management_form }} @@ -53,15 +53,15 @@ {% for field in formset.forms.0.visible_fields %} - {{ field.label_tag }}{% if field.field.required and not read_only %} ({% trans "required" %}){% endif %} + {{ field.label_tag }}{% if field.field.required and not read_only %} ({% trans 'required' %}){% endif %} {#{% if field.help_text %}{{ field.help_text }}{% endif %}#} - {% endfor %} + {% endfor %} {% endif %} - + {% for form in formset.forms %} - {% include "generic_form_instance.html" %} + {% include 'generic_form_instance.html' %} {% endfor %} {% if form_display_mode_table %} @@ -69,7 +69,7 @@ {% endif %} {% endwith %} {% else %} - {% include "generic_form_instance.html" %} + {% include 'generic_form_instance.html' %} {% endif %} {% if not read_only %}
+

{% else %} {% endif %} diff --git a/mayan/apps/common/templates/generic_list.html b/mayan/apps/common/templates/generic_list.html index d1fb13ac25..30042f376b 100644 --- a/mayan/apps/common/templates/generic_list.html +++ b/mayan/apps/common/templates/generic_list.html @@ -1,10 +1,11 @@ -{% extends "base.html" %} +{% extends 'base.html' %} + {% load i18n %} + {% load navigation_tags %} {% load subtemplates_tags %} {% block title %} :: {% blocktrans with title as title %}List of {{ title }}{% endblocktrans %}{% endblock %} -{#{% block secondary_links %}{{ secondary_links|safe }}{% endblock %}#} {% block sidebar %} {% for subtemplate in sidebar_subtemplates_list %} @@ -22,7 +23,6 @@ {% endblock %} {% block content %} - {% include "generic_list_subtemplate.html" %} - + {% include 'generic_list_subtemplate.html' %} {% endblock %} diff --git a/mayan/apps/common/templates/generic_list_horizontal.html b/mayan/apps/common/templates/generic_list_horizontal.html index 39915c8ef5..20deef929d 100644 --- a/mayan/apps/common/templates/generic_list_horizontal.html +++ b/mayan/apps/common/templates/generic_list_horizontal.html @@ -1,10 +1,11 @@ -{% extends "base.html" %} +{% extends 'base.html' %} + {% load i18n %} + {% load navigation_tags %} {% load subtemplates_tags %} {% block title %} :: {% blocktrans with title as title %}List of {{ title }}{% endblocktrans %}{% endblock %} -{#{% block secondary_links %}{{ secondary_links|safe }}{% endblock %}#} {% block sidebar %} {% for subtemplate in sidebar_subtemplates_list %} @@ -22,7 +23,6 @@ {% endblock %} {% block content %} - {% include "generic_list_horizontal_subtemplate.html" %} - + {% include 'generic_list_horizontal_subtemplate.html' %} {% endblock %} diff --git a/mayan/apps/common/templates/generic_list_horizontal_subtemplate.html b/mayan/apps/common/templates/generic_list_horizontal_subtemplate.html index 625209595b..0badea4a53 100644 --- a/mayan/apps/common/templates/generic_list_horizontal_subtemplate.html +++ b/mayan/apps/common/templates/generic_list_horizontal_subtemplate.html @@ -1,4 +1,5 @@ {% load i18n %} + {% load attribute_tags %} {% load pagination_tags %} {% load navigation_tags %} @@ -6,7 +7,7 @@ {% load variable_tags %} {% load main_settings_tags %} -{% get_main_setting "DISABLE_ICONS" as disable_icons %} +{% get_main_setting 'DISABLE_ICONS' as disable_icons %} {% if side_bar %}
@@ -15,8 +16,8 @@

-{% else %} - {% autopaginate object_list %} +{% else %} + {% autopaginate object_list %}

{% ifnotequal page_obj.paginator.num_pages 1 %} @@ -29,75 +30,72 @@
{% endif %} - {#
#} - - {% if object_list %} - {% if multi_select or multi_select_as_buttons %} - {% if multi_select_as_buttons %} - {% get_multi_item_links as multi_item_links %} - - {% else %} - {% with "true" as form_hide_required_text %} - {% get_multi_item_links_form %} - {% endwith %} - - {% endif %} - {% endif %} - {% endif %} - - {% if scrollable_content %} -
+ {% if object_list %} + {% if multi_select or multi_select_as_buttons %} + {% if multi_select_as_buttons %} + {% get_multi_item_links as multi_item_links %} + + {% else %} + {% with 'true' as form_hide_required_text %} + {% get_multi_item_links_form %} + {% endwith %} + + {% endif %} {% endif %} - + {% endif %} - - {% endif %} - - {% if object_list %} - {% if multi_select or multi_select_as_buttons %} - {% if multi_select_as_buttons %} - {% get_multi_item_links as multi_item_links %} - - {% else %} - {% with "true" as form_hide_required_text %} - {% get_multi_item_links_form %} - {% endwith %} - - {% endif %} - {% endif %} - {% endif %} - {##} + {% endif %} + + {% if object_list %} + {% if multi_select or multi_select_as_buttons %} + {% if multi_select_as_buttons %} + {% get_multi_item_links as multi_item_links %} + + {% else %} + {% with 'true' as form_hide_required_text %} + {% get_multi_item_links_form %} + {% endwith %} + + {% endif %} + {% endif %} + {% endif %} + {% paginate %} - + {% if side_bar %}

- {% endif %} + {% endif %}
diff --git a/mayan/apps/common/templates/generic_list_subtemplate.html b/mayan/apps/common/templates/generic_list_subtemplate.html index 5ee8cc0ccf..aec3865f5e 100644 --- a/mayan/apps/common/templates/generic_list_subtemplate.html +++ b/mayan/apps/common/templates/generic_list_subtemplate.html @@ -1,4 +1,5 @@ {% load i18n %} + {% load attribute_tags %} {% load pagination_tags %} {% load navigation_tags %} @@ -7,7 +8,7 @@ {% load main_settings_tags %} {% load multiselect_tags %} -{% get_main_setting "DISABLE_ICONS" as disable_icons %} +{% get_main_setting 'DISABLE_ICONS' as disable_icons %} {% if side_bar %}
@@ -44,12 +45,12 @@ {% endfor %}
{% else %} - {% with "true" as form_hide_required_text %} + {% with 'true' as form_hide_required_text %} {% get_multi_item_links_form %} {% endwith %} {% endif %} @@ -69,7 +70,7 @@ {% endif %} {% if not hide_object %} - {% trans "Identifier" %} + {% trans 'Identifier' %} {% endif %} {% for column in extra_columns_preffixed %} @@ -170,7 +171,7 @@ {% endfor %}

{% else %} - {% with "true" as form_hide_required_text %} + {% with 'true' as form_hide_required_text %} {% get_multi_item_links_form %} {% endwith %}