From bbeb451ac6750c526166db12080b1b6bc040c860 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Sat, 20 Apr 2019 14:32:53 +0100 Subject: Address reviews --- .../templates/wiki/includes/article_menu.html | 2 +- pydis_site/templates/wiki/includes/editor.html | 2 +- .../templates/wiki/includes/editor_sidebar.html | 60 +++++++++++----------- .../templates/wiki/includes/editormedia.html | 20 ++++---- pydis_site/templates/wiki/includes/form.html | 9 ++-- pydis_site/templates/wiki/includes/pagination.html | 1 + pydis_site/templates/wiki/includes/render.html | 4 +- .../templates/wiki/includes/revision_info.html | 18 ++++--- .../templates/wiki/includes/searchresult.html | 22 +++++--- 9 files changed, 77 insertions(+), 61 deletions(-) (limited to 'pydis_site/templates/wiki/includes') diff --git a/pydis_site/templates/wiki/includes/article_menu.html b/pydis_site/templates/wiki/includes/article_menu.html index 5429f6a8..473df483 100644 --- a/pydis_site/templates/wiki/includes/article_menu.html +++ b/pydis_site/templates/wiki/includes/article_menu.html @@ -1,4 +1,4 @@ -{% load i18n wiki_tags %} +{% load wiki_tags %} {% if article|can_write:user %} {% with selected_tab as selected %} diff --git a/pydis_site/templates/wiki/includes/editor.html b/pydis_site/templates/wiki/includes/editor.html index bc1da1a0..6eb6cd45 100644 --- a/pydis_site/templates/wiki/includes/editor.html +++ b/pydis_site/templates/wiki/includes/editor.html @@ -1,4 +1,4 @@ -{% load wiki_tags i18n sekizai_tags %} +{% load wiki_tags %} {% include "wiki/includes/editormedia.html" %} {% wiki_form form %} diff --git a/pydis_site/templates/wiki/includes/editor_sidebar.html b/pydis_site/templates/wiki/includes/editor_sidebar.html index 5c24e74d..45ac87a1 100644 --- a/pydis_site/templates/wiki/includes/editor_sidebar.html +++ b/pydis_site/templates/wiki/includes/editor_sidebar.html @@ -1,38 +1,38 @@ -{% load i18n sekizai_tags static %} +{% load static %}
-{% for plugin, plugin_form in sidebar %} + {% for plugin, plugin_form in sidebar %} +
+
+

+ {% if plugin.sidebar.icon_class %} + + {% if plugin.sidebar.icon_class == "fa-picture-o" %} + + {% else %} + + {% endif %} + + {% endif %} -

-
-

- {% if plugin.sidebar.icon_class %} - - {% if plugin.sidebar.icon_class == "fa-picture-o" %} - - {% else %} - - {% endif %} - - {% endif %} - {{ plugin.sidebar.headline }} -

+ {{ plugin.sidebar.headline }} +

-
-
-
- {% if plugin.sidebar.template %} - {% with plugin_form as form %} - - {% endwith %} - {% endif %}
-
-
-{% endfor %} +
+
+ {% if plugin.sidebar.template %} + {% with plugin_form as form %} + + {% endwith %} + {% endif %} +
+
+
+ {% endfor %}
diff --git a/pydis_site/templates/wiki/includes/editormedia.html b/pydis_site/templates/wiki/includes/editormedia.html index 307a3078..c10fbef8 100644 --- a/pydis_site/templates/wiki/includes/editormedia.html +++ b/pydis_site/templates/wiki/includes/editormedia.html @@ -1,15 +1,17 @@ -{% load sekizai_tags static %} +{% load sekizai_tags %} +{% load static %} + {% addtoblock "js" %} - -{% for js in editor.Media.js %} - -{% endfor %} + + {% for js in editor.Media.js %} + + {% endfor %} {% endaddtoblock %} {% addtoblock "css" %} -{% for media, srcs in editor.Media.css.items %} - {% for src in srcs %} - + {% for media, srcs in editor.Media.css.items %} + {% for src in srcs %} + + {% endfor %} {% endfor %} -{% endfor %} {% endaddtoblock %} diff --git a/pydis_site/templates/wiki/includes/form.html b/pydis_site/templates/wiki/includes/form.html index 3e1abb67..4ea08de4 100644 --- a/pydis_site/templates/wiki/includes/form.html +++ b/pydis_site/templates/wiki/includes/form.html @@ -1,17 +1,16 @@ -{% csrf_token %}{% load sekizai_tags %} +{% load sekizai_tags %} +{% csrf_token %} {% include "wiki/includes/formerrors.html" %} {% addtoblock "js" %} -{{ form.media.js }} + {{ form.media.js }} {% endaddtoblock %} {% addtoblock "css" %} -{{ form.media.css }} + {{ form.media.css }} {% endaddtoblock %} {% for field in form %} - {% include "wiki/includes/formfield.html" %} - {% endfor %} diff --git a/pydis_site/templates/wiki/includes/pagination.html b/pydis_site/templates/wiki/includes/pagination.html index 0bdcbdc2..35dac538 100644 --- a/pydis_site/templates/wiki/includes/pagination.html +++ b/pydis_site/templates/wiki/includes/pagination.html @@ -1,4 +1,5 @@ {% load i18n %} + {% if is_paginated %}