diff options
author | 2019-04-20 14:32:53 +0100 | |
---|---|---|
committer | 2019-04-20 14:32:53 +0100 | |
commit | bbeb451ac6750c526166db12080b1b6bc040c860 (patch) | |
tree | c74468da0b3059045e1e294bf17b062943b79079 | |
parent | Update Pipfile.lock and move home app tests (diff) |
Address reviews
36 files changed, 325 insertions, 498 deletions
diff --git a/pydis_site/apps/home/templatetags/wiki_extra.py b/pydis_site/apps/home/templatetags/wiki_extra.py index 9847ef5a..289b0279 100644 --- a/pydis_site/apps/home/templatetags/wiki_extra.py +++ b/pydis_site/apps/home/templatetags/wiki_extra.py @@ -26,7 +26,7 @@ TEMPLATES: Dict[Type, str] = { register = template.Library() -def get_unbound_field(field: BoundField) -> Field: +def get_unbound_field(field: Union[BoundField, Field]) -> Field: while isinstance(field, BoundField): field = field.field @@ -39,10 +39,7 @@ def render(template_path: str, context: Dict[str, Any]): @register.simple_tag def render_field(field: Field, render_labels: bool = True): - if isinstance(field, BoundField): - unbound_field = get_unbound_field(field) - else: - unbound_field = field + unbound_field = get_unbound_field(field) if not isinstance(render_labels, bool): render_labels = True diff --git a/pydis_site/settings.py b/pydis_site/settings.py index c4c8a535..a9fef6b7 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -277,12 +277,11 @@ CRISPY_TEMPLATE_PACK = "bulma" # Custom settings for django-simple-bulma BULMA_SETTINGS = { "variables": { + "green": "#21c65c", # Accessibility: Better contrast with the light text "primary": "#7289DA", "link": "$primary", - "green": "#21c65c", # Better contrast with the light text - - "dimensions": "16 24 32 48 64 96 128 256 512" # Image dimensions + "dimensions": "16 24 32 48 64 96 128 256 512" # Possible image dimensions } } diff --git a/pydis_site/static/js/wiki/dropdown.js b/pydis_site/static/js/wiki/dropdown.js index 55b2e9fc..a914a4ab 100644 --- a/pydis_site/static/js/wiki/dropdown.js +++ b/pydis_site/static/js/wiki/dropdown.js @@ -1,5 +1,3 @@ -// TODO: Move to django-simple-bulma - (function() { window.dropdowns = {}; diff --git a/pydis_site/templates/wiki/article.html b/pydis_site/templates/wiki/article.html index 39e1728d..890e4300 100644 --- a/pydis_site/templates/wiki/article.html +++ b/pydis_site/templates/wiki/article.html @@ -1,6 +1,5 @@ {% extends "wiki/base.html" %} -{% load wiki_tags i18n sekizai_tags %} - +{% load wiki_tags %} {% block wiki_pagetitle %}{{ article.current_revision.title }}{% endblock %} diff --git a/pydis_site/templates/wiki/base.html b/pydis_site/templates/wiki/base.html index 112523cd..c47f6bfb 100644 --- a/pydis_site/templates/wiki/base.html +++ b/pydis_site/templates/wiki/base.html @@ -1,5 +1,6 @@ {% extends "base/base.html" %} -{% load sekizai_tags i18n wiki_tags static %} +{% load static %} +{% load wiki_tags %} {% block title %} Wiki | {% block wiki_pagetitle %}{% endblock %}{% block wiki_site_title %}{% endblock %} @@ -41,7 +42,9 @@ {% endblock %} {% block site_footer %} - {% include "base/footer.html" %} + {% block wiki_footer_prepend %}{% endblock %} + + {{ block.super }} {% endblock %} <script src="{% static "js/wiki/dropdown.js" %}" type="text/javascript"></script> diff --git a/pydis_site/templates/wiki/base_site.html b/pydis_site/templates/wiki/base_site.html deleted file mode 100644 index afa2b41d..00000000 --- a/pydis_site/templates/wiki/base_site.html +++ /dev/null @@ -1,170 +0,0 @@ -{% extends "base/base.html" %} -{% load sekizai_tags i18n wiki_tags static %} - -{# This template is no longer used - we can remove it later when the rest are done #} - -{% block title %} - {% block wiki_pagetitle %}{% endblock %}{% block wiki_site_title %} - django-\/\/ i K |{% endblock %} -{% endblock %} - -<html lang="en"> - <head> - <meta charset="utf-8"> - <title>Wiki | {% block wiki_pagetitle %}{% endblock %}{% block wiki_site_title %}{% endblock %}</title> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="description" content=""> - <meta name="author" content="www.django-wiki.org"> - - <!-- Le styles --> - <link href="{% static "wiki/bootstrap/css/wiki-bootstrap.min.css" %}" rel="stylesheet"> - - {% render_block "css" %} - - <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> - <!--[if lt IE 9]> - <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> - <![endif]--> - - </head> - - <body> - - {% block wiki_body %} - - {% block wiki_navbar %} - <div class="navbar navbar-fixed-top navbar-inverse"> - <div class="container"> - <div class="navbar-header"> - <!-- .navbar-toggle is used as the toggle for collapsed navbar content --> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - {% block wiki_header_branding %} - <a class="navbar-brand" href="{% url 'wiki:root' %}">django-\/\/ i K |</a> - {% endblock %} - </div> - <div class="navbar-collapse collapse"> - <form class="navbar-form navbar-right" id="wiki-search-form" method="GET" action="{% spaceless %} - {% if article or urlpath %} - {% url 'wiki:search' article_id=article.id path=urlpath.path %} - {% else %} - {% url 'wiki:search' %} - {% endif %} - {% endspaceless %}" - > - <div class="input-group"> - <input type="search" class="form-control search-query" name="q" placeholder="{% spaceless %} - {% if article or urlpath %} - {% trans "Search from current article..." %} - {% else %} - {% trans "Search whole wiki..." %} - {% endif %} - {% endspaceless %}" /> - <span class="input-group-btn"> - <button class="btn btn-default" type="submit"> - <span class="fa fa-search"></span> - </button> - </span> - </div><!-- /input-group --> - </form> - <div class="navbar-right"> - {% if user.is_authenticated %} - <ul class="nav navbar-nav"> - <li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown"> - <span class="badge notification-cnt">0</span> - {{ user }} - <b class="caret"></b> - </a> - <ul class="dropdown-menu"> - {% if "ACCOUNT_HANDLING"|wiki_settings %} - <li> - <a href="{% url 'wiki:profile_update' %}"> - <i class="fa fa-gear"></i> - {% trans "Account Settings" %} - </a> - </li> - {% endif %} - <li> - <a href="{{ "LOGOUT_URL"|wiki_settings }}"> - <i class="fa fa-power-off"></i> - {% trans "Log out" %} - </a> - </li> - {% if user.is_superuser %} - <li> - <a href="{% url 'wiki:deleted_list' %}"> - <i class="fa fa-trash-o"></i> - {% trans "Deleted articles" %} - </a> - </li> - {% endif %} - {% if "wiki.plugins.notifications"|plugin_enabled %} - {% include "wiki/plugins/notifications/menubaritem.html" %} - {% endif %} - {% if "wiki.plugins.globalhistory"|plugin_enabled %} - {% include "wiki/plugins/globalhistory/menubaritem.html" %} - {% endif %} - </ul> - </li> - </ul> - {% else %} - <ul class="nav navbar-nav"> - <li> - <a href="{% login_url as wiki_login_url %}{{ wiki_login_url }}">{% trans "Log in" %}</a> - </li> - {% if "ACCOUNT_HANDLING"|wiki_settings %} - <li> - <a href="{% url 'wiki:signup' %}">{% trans "Sign up" %}</a> - </li> - {% endif %} - </ul> - {% endif %} - </div> - {% block wiki_header_navlinks %} - <ul class="nav navbar-nav"> - <li class="active"><a href="/">{% trans "Home" %}</a></li> - <li><a href="https://github.com/django-wiki/django-wiki" target="_blank">{% trans "About" %}</a></li> - </ul> - {% endblock %} - </div> - </div> - </div> - {% endblock %} - - <div class="container" style="margin-top: 60px;"> - - {% wiki_messages %} - - <!-- Reserved for breadcrumbs --> - {% block wiki_breadcrumbs %}{% endblock %} - - <!-- Main page contents go here --> - {% block wiki_contents %}{% endblock %} - - <footer id="wiki-footer"> - <hr /> - {% block wiki_footer_logo %} - <a href="https://github.com/django-wiki/django-wiki" class="pull-right"><img src="{% static "wiki/img/github_icon.png" %}" /></a> - {% endblock %} - {% block wiki_footer_prepend %} - {% endblock %} - <p>{% blocktrans %}Powered by <a href="http://www.django-wiki.org">django-wiki</a>, an open source application under the <a href="http://www.gnu.org/licenses/quick-guide-gplv3.html">GPLv3</a> license. Let knowledge be the cure.{% endblocktrans %}</p> - <div style="clear: both"></div> - </footer> - </div> - - {% endblock %} - - <script src="{% static "wiki/js/jquery-3.3.1.min.js" %}"></script> - <script src="{% static "wiki/js/core.js" %}"></script> - <script src="{% static "wiki/bootstrap/js/bootstrap.min.js" %}"></script> - <!-- Optionally enable responsive features in IE8 --> - <script src="{% static "wiki/js/respond.min.js" %}"></script> - {% render_block "js" %} - - </body> -</html> diff --git a/pydis_site/templates/wiki/create.html b/pydis_site/templates/wiki/create.html index 5aaa017c..3fbba969 100644 --- a/pydis_site/templates/wiki/create.html +++ b/pydis_site/templates/wiki/create.html @@ -1,11 +1,11 @@ {% extends "wiki/base.html" %} -{% load wiki_tags i18n sekizai_tags static %} +{% load sekizai_tags %} +{% load static %} +{% load wiki_tags %} - -{% block wiki_pagetitle %}{% trans "Add new article" %}{% endblock %} +{% block wiki_pagetitle %}Add new article{% endblock %} {% block wiki_contents %} - {% addtoblock "js" %} <script type="text/javascript" src="{% static "admin/js/urlify.js" %}"></script> @@ -15,7 +15,7 @@ {% endaddtoblock %} {% include "wiki/includes/editormedia.html" %} - <h1 class="page-header">{% trans "Add new article" %}</h1> + <h1 class="page-header">Add new article</h1> <form method="POST" class="form-horizontal"> {% wiki_form create_form %} @@ -39,5 +39,4 @@ </div> </div> </form> - {% endblock %} diff --git a/pydis_site/templates/wiki/create_root.html b/pydis_site/templates/wiki/create_root.html index 376321c6..330fea33 100644 --- a/pydis_site/templates/wiki/create_root.html +++ b/pydis_site/templates/wiki/create_root.html @@ -1,7 +1,8 @@ {% extends "wiki/base.html" %} -{% load wiki_tags crispy_forms_tags i18n sekizai_tags static %} +{% load static %} +{% load wiki_tags %} -{% block wiki_pagetitle %}{% trans "Create root article" %}{% endblock %} +{% block wiki_pagetitle %}{Create root article{% endblock %} {% block head %} {{ block.super }} @@ -17,7 +18,6 @@ {% endfor %} {% endblock %} - {% block wiki_contents %} <h2 class="title is-2">Create First Article</h2> @@ -49,5 +49,4 @@ </div> </div> </form> - {% endblock %} diff --git a/pydis_site/templates/wiki/delete.html b/pydis_site/templates/wiki/delete.html index 755e8d7a..bb7a7966 100644 --- a/pydis_site/templates/wiki/delete.html +++ b/pydis_site/templates/wiki/delete.html @@ -1,6 +1,6 @@ {% extends "wiki/base.html" %} -{% load wiki_tags sekizai_tags static %} - +{% load static %} +{% load wiki_tags %} {% block wiki_pagetitle %}Delete Article{% endblock %} diff --git a/pydis_site/templates/wiki/deleted.html b/pydis_site/templates/wiki/deleted.html index 75705cbb..cdde2c47 100644 --- a/pydis_site/templates/wiki/deleted.html +++ b/pydis_site/templates/wiki/deleted.html @@ -1,6 +1,5 @@ {% extends "wiki/base.html" %} -{% load wiki_tags i18n sekizai_tags %} - +{% load wiki_tags %} {% block wiki_pagetitle %}Article deleted{% endblock %} @@ -17,7 +16,6 @@ </article> {% if not article.current_revision.locked or article|can_delete:user %} - <h2 class="title is-2"> Restore Article </h2> diff --git a/pydis_site/templates/wiki/deleted_list.html b/pydis_site/templates/wiki/deleted_list.html index 6ec2a8df..1a8d203c 100644 --- a/pydis_site/templates/wiki/deleted_list.html +++ b/pydis_site/templates/wiki/deleted_list.html @@ -1,5 +1,5 @@ {% extends "wiki/base.html" %} -{% load wiki_tags sekizai_tags %} +{% load wiki_tags %} {% block wiki_pagetitle %}Deleted Articles{% endblock %} @@ -15,6 +15,7 @@ <th>Restore Article</th> </tr> </thead> + <tbody> {% for article in deleted_articles %} <tr> diff --git a/pydis_site/templates/wiki/dir.html b/pydis_site/templates/wiki/dir.html index 163a9d29..5a30de7b 100644 --- a/pydis_site/templates/wiki/dir.html +++ b/pydis_site/templates/wiki/dir.html @@ -1,8 +1,10 @@ {% extends "wiki/article.html" %} -{% load wiki_tags wiki_extra i18n humanize %} +{% load humanize %} +{% load i18n %} +{% load wiki_extra %} +{% load wiki_tags %} - -{% block wiki_pagetitle %}{% trans "Listing articles in" %} {{ article.current_revision.title }}{% endblock %} +{% block wiki_pagetitle %}Listing articles in {{ article.current_revision.title }}{% endblock %} {% block wiki_contents_tab %} {% url 'wiki:dir' urlpath.path as self_url %} @@ -11,6 +13,7 @@ <div class="is-pulled-right"> {% render_field filter_form.query render_labels=False %} </div> + <div class="field is-grouped"> <div class="field-body"> <div class="control"> @@ -53,6 +56,7 @@ <th>Slug</th> <th>Last modified</th> </tr> + {% for urlpath in directory %} <tr> <td> @@ -76,14 +80,17 @@ </span> {% endif %} </td> + <td> {{ urlpath.slug }} </td> + <td> {{ urlpath.article.current_revision.created|naturaltime }} </td> </tr> - {% empty%} + + {% empty %} <tr> <td colspan="3"> <em>There are no articles at this level</em> diff --git a/pydis_site/templates/wiki/edit.html b/pydis_site/templates/wiki/edit.html index 622e98eb..c378362a 100644 --- a/pydis_site/templates/wiki/edit.html +++ b/pydis_site/templates/wiki/edit.html @@ -1,22 +1,13 @@ {% extends "wiki/article.html" %} -{% load wiki_tags i18n sekizai_tags static %} - +{% load static %} +{% load wiki_tags %} {% block wiki_pagetitle %} Edit: {{ article.current_revision.title }} {% endblock %} {% block wiki_contents_tab %} - - {% if not user.is_authenticated %} - <p class="alert alert-warning"> - {% trans "<strong>Warning:</strong> You are not logged in. Your IP address will be logged." %} - <a href="{% url 'wiki:login' %}?next={% url 'wiki:edit' article_id=article.id path=urlpath.path %}">{% trans "Click here to log in" %} »</a> - </p> - {% endif %} - <div class="columns"> - <div class="column is-two-thirds"> <form method="POST" class="form-horizontal" id="article_edit_form"> {% with edit_form as form %} @@ -60,18 +51,14 @@ <br /> <br /> - </form> </div> <div class="column is-one-third" id="wiki-edit-sidebar"> {% include "wiki/includes/editor_sidebar.html" %} </div> - </div> - <div style="clear: both"></div> - <div class="modal" id="previewModal"> <div class="modal-background"></div> <div class="modal-card" style="height: 80%; width: 80%;"> diff --git a/pydis_site/templates/wiki/error.html b/pydis_site/templates/wiki/error.html index c6778b7e..d7ee70fd 100644 --- a/pydis_site/templates/wiki/error.html +++ b/pydis_site/templates/wiki/error.html @@ -1,11 +1,10 @@ {% extends "wiki/base.html" %} -{% load wiki_tags i18n %} +{% load wiki_tags %} - -{% block wiki_pagetitle %}{% if article %}{{ article.current_revision.title }}{% else %}{% trans "Error" %}{% endif %}{% endblock %} +{% block wiki_pagetitle %}{% if article %}{{ article.current_revision.title }}{% else %}Error{% endif %}{% endblock %} {% block wiki_breadcrumbs %} -{% include "wiki/includes/breadcrumbs.html" %} + {% include "wiki/includes/breadcrumbs.html" %} {% endblock %} {% block wiki_contents %} diff --git a/pydis_site/templates/wiki/history.html b/pydis_site/templates/wiki/history.html index 6d609516..3788385f 100644 --- a/pydis_site/templates/wiki/history.html +++ b/pydis_site/templates/wiki/history.html @@ -1,8 +1,9 @@ {% extends "wiki/article.html" %} -{% load wiki_tags i18n sekizai_tags static %} +{% load sekizai_tags %} +{% load static %} +{% load wiki_tags %} - -{% block wiki_pagetitle %}{% trans "History" %}: {{ article.current_revision.title }}{% endblock %} +{% block wiki_pagetitle %}History: {{ article.current_revision.title }}{% endblock %} {% block wiki_contents_tab %} {% include "wiki/includes/modals.html" %} @@ -11,145 +12,117 @@ <script type="text/javascript" src="{% static "wiki/js/diffview.js" %}"></script> <script type="text/javascript" src="{% static "wiki/js/diff.js" %}"></script> {% endaddtoblock %} - {% addtoblock "css" %} - <style type="text/css"> - td.linenumber { - width: 20px; - } - tr.insert td { - background-color: #DFC; - } - tr.delete td { - background-color: #FDC; - } - tr.equal td { - background-color: #F2F2F2; - } - - .diff-container td { - white-space: pre; font-family: monospace; - } - .diff-container td, - .diff-container th { - padding: 2px 7px; - border-right: 1px solid #DDD; - } - .diff-container td:last-child, - .diff-container th:last-child { - border-right: none; - } - .diff-container table { - border-top: 1px solid #DDD; - } - </style> - {% endaddtoblock %} - <p class="lead"> - {% trans "Click each revision to see a list of edited lines. Click the Preview button to see how the article looked at this stage. At the bottom of this page, you can change to a particular revision or merge an old revision with the current one." %} + <p> + Click each revision to see a list of edited lines. Click the Preview + button to see how the article looked at this stage. At the bottom of + this page, you can change to a particular revision or merge an old + revision with the current one. </p> {% include "wiki/includes/pagination.html" %} -<form method="GET" id="historyForm"> - <table class="table is-striped"> - <thead> - <tr> - <th>Updated</th> - <th>Summary</th> - <th class="has-text-right">Actions</th> - </tr> - </thead> - <tbody> - {% for revision in revisions %} - <tr {% if revision == article.current_revision %}class="is-selected"{% endif %}> - <td> - {% include "wiki/includes/revision_info.html" with current_revision=article.current_revision %} - </td> - <td> - {% if revision.user_message %} - {{ revision.user_message }} - {% elif revision.automatic_log %} - {{ revision.automatic_log }} - {% else %} - <em>No summary</em> - {% endif %} - </td> - <td class="has-text-right"> - {% if revision == article.current_revision %} - <a class="button is-static has-text-grey"> - <span class="icon"> - <i class="fas fa-eye"></i> - </span> - <span>Preview</span> - </a> - <a class="button is-static has-text-grey"> - <span class="icon"> - <i class="fas fa-sync"></i> - </span> - <span>Switch</span> - </a> - {% else %} - <button type="submit" class="button" onclick="showPreviewModal('{{ revision.id }}', '{% url 'wiki:preview_revision' article.id %}', '{% url 'wiki:change_revision' path=urlpath.path article_id=article.id revision_id=revision.id %}'); event.preventDefault();"> - <span class="icon"> - <i class="fas fa-eye"></i> - </span> - <span>Preview</span> - </button> - <a class="button is-primary" href="{% url 'wiki:change_revision' path=urlpath.path article_id=article.id revision_id=revision.id %}"> - <span class="icon"> - <i class="fas fa-sync"></i> - </span> - <span>Switch</span> - </a> - {% endif %} - </td> + <form method="GET" id="historyForm"> + <table class="table is-striped"> + <thead> + <tr> + <th>Updated</th> + <th>Summary</th> + <th class="has-text-right">Actions</th> </tr> - {% endfor %} - </tbody> - </table> + </thead> + <tbody> + {% for revision in revisions %} + <tr {% if revision == article.current_revision %}class="is-selected"{% endif %}> + <td> + {% include "wiki/includes/revision_info.html" with current_revision=article.current_revision %} + </td> + <td> + {% if revision.user_message %} + {{ revision.user_message }} + {% elif revision.automatic_log %} + {{ revision.automatic_log }} + {% else %} + <em>No summary</em> + {% endif %} + </td> + <td class="has-text-right"> + {% if revision == article.current_revision %} + <a class="button is-static has-text-grey"> + <span class="icon"> + <i class="fas fa-eye"></i> + </span> + <span>Preview</span> + </a> + <a class="button is-static has-text-grey"> + <span class="icon"> + <i class="fas fa-sync"></i> + </span> + <span>Switch</span> + </a> + {% else %} + <button type="submit" class="button" onclick="showPreviewModal('{{ revision.id }}', '{% url 'wiki:preview_revision' article.id %}', '{% url 'wiki:change_revision' path=urlpath.path article_id=article.id revision_id=revision.id %}'); event.preventDefault();"> + <span class="icon"> + <i class="fas fa-eye"></i> + </span> + <span>Preview</span> + </button> + <a class="button is-primary" href="{% url 'wiki:change_revision' path=urlpath.path article_id=article.id revision_id=revision.id %}"> + <span class="icon"> + <i class="fas fa-sync"></i> + </span> + <span>Switch</span> + </a> + {% endif %} + </td> + </tr> + {% endfor %} + </tbody> + </table> - {% include "wiki/includes/pagination.html" %} + {% include "wiki/includes/pagination.html" %} - <input type="hidden" name="r" value="" id="r" /> + <input type="hidden" name="r" value="" id="r" /> - <div class="modal" id="previewModal"> - <div class="modal-background"></div> - <div class="modal-card" style="height: 80%; width: 80%;"> - <div class="modal-card-head"> - <p class="modal-card-title">Revision Preview</p> - </div> - <div class="modal-card-body" style="padding: 0; overflow: hidden;"> - <iframe name="previewWindow" id="previewWindow" frameborder="0" style="width: 100%; height: 100%;"></iframe> - </div> - <div class="modal-card-foot"> - <button class="button is-light" aria-label="close"> - <span class="icon"> - <i class="fas fa-arrow-left"></i> - </span> - <span>Back</span> - </button> - {% if article|can_write:user %} - <a href="#" class="button is-primary switch-to-revision"> + <div class="modal" id="previewModal"> + <div class="modal-background"></div> + <div class="modal-card" style="height: 80%; width: 80%;"> + <div class="modal-card-head"> + <p class="modal-card-title">Revision Preview</p> + </div> + <div class="modal-card-body" style="padding: 0; overflow: hidden;"> + <iframe name="previewWindow" id="previewWindow" frameborder="0" style="width: 100%; height: 100%;"></iframe> + </div> + <div class="modal-card-foot"> + <button class="button is-light" aria-label="close"> <span class="icon"> - <i class="fas fa-sync"></i> + <i class="fas fa-arrow-left"></i> </span> - <span>Switch to this version</span> - </a> - {% else %} - <a class="button is-static"> - <span class="icon"> - <i class="fas fa-check"></i> - </span> - <span>Switch to this version</span> - </a> - {% endif %} + <span>Back</span> + </button> + + {% if article|can_write:user %} + <a href="#" class="button is-primary switch-to-revision"> + <span class="icon"> + <i class="fas fa-sync"></i> + </span> + <span>Switch to this version</span> + </a> + {% else %} + <a class="button is-static"> + <span class="icon"> + <i class="fas fa-check"></i> + </span> + <span>Switch to this version</span> + </a> + {% endif %} + </div> </div> </div> - </div> -</form> + </form> + <script src="{% static "js/wiki/modal.js" %}" type="text/javascript"></script> <script src="{% static "js/wiki/history.js" %}" type="text/javascript"></script> - {% endblock %} 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 %} <section class="accordions"> -{% for plugin, plugin_form in sidebar %} + {% for plugin, plugin_form in sidebar %} + <article class="accordion is-primary"> + <div class="accordion-header toggle"> + <p> + {% if plugin.sidebar.icon_class %} + <span class="icon"> + {% if plugin.sidebar.icon_class == "fa-picture-o" %} + <i class="fas fa-images"></i> + {% else %} + <i class="fas {{ plugin.sidebar.icon_class }}"></i> + {% endif %} + </span> + {% endif %} - <article class="accordion is-primary"> - <div class="accordion-header toggle"> - <p> - {% if plugin.sidebar.icon_class %} - <span class="icon"> - {% if plugin.sidebar.icon_class == "fa-picture-o" %} - <i class="fas fa-images"></i> - {% else %} - <i class="fas {{ plugin.sidebar.icon_class }}"></i> - {% endif %} - </span> - {% endif %} - {{ plugin.sidebar.headline }} - </p> + {{ plugin.sidebar.headline }} + </p> - </div> - <div class="accordion-body"> - <div class="accordion-content"> - {% if plugin.sidebar.template %} - {% with plugin_form as form %} - <form method="POST" class="form-horizontal sidebar-form" action="?f={{ plugin_form.form_id }}" enctype="multipart/form-data"> - {% csrf_token %} - {% include plugin.sidebar.template %} - </form> - {% endwith %} - {% endif %} </div> - </div> - </article> -{% endfor %} + <div class="accordion-body"> + <div class="accordion-content"> + {% if plugin.sidebar.template %} + {% with plugin_form as form %} + <form method="POST" class="form-horizontal sidebar-form" action="?f={{ plugin_form.form_id }}" enctype="multipart/form-data"> + {% csrf_token %} + {% include plugin.sidebar.template %} + </form> + {% endwith %} + {% endif %} + </div> + </div> + </article> + {% endfor %} </section> <script type="application/javascript" src="{% static "js/wiki/editor_sidebar.js" %}"></script> 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" %} -<script type="text/javascript" src="{% static "wiki/js/editor.js" %}"></script> -{% for js in editor.Media.js %} -<script type="text/javascript" src="{% static js %}"></script> -{% endfor %} + <script type="text/javascript" src="{% static "wiki/js/editor.js" %}"></script> + {% for js in editor.Media.js %} + <script type="text/javascript" src="{% static js %}"></script> + {% endfor %} {% endaddtoblock %} {% addtoblock "css" %} -{% for media, srcs in editor.Media.css.items %} - {% for src in srcs %} - <link rel="stylesheet" media="{{ media }}" href="{% static src %}" /> + {% for media, srcs in editor.Media.css.items %} + {% for src in srcs %} + <link rel="stylesheet" media="{{ media }}" href="{% static src %}" /> + {% 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 %} <nav class="pagination" role="navigation" aria-label="pagination"> {% if page_obj.has_previous %} diff --git a/pydis_site/templates/wiki/includes/render.html b/pydis_site/templates/wiki/includes/render.html index 28ab76c9..c0334d98 100644 --- a/pydis_site/templates/wiki/includes/render.html +++ b/pydis_site/templates/wiki/includes/render.html @@ -1,4 +1,5 @@ -{% load wiki_tags i18n cache sekizai_tags static %} +{% load sekizai_tags %} +{% load static %} {% addtoblock "js" %} <script type="text/javascript" src="{% static "wiki/js/article.js" %}"></script> @@ -16,6 +17,7 @@ {% endfor %} {% endaddtoblock %} {% endif %} + {% if plugin.RenderMedia.js %} {% addtoblock "js" %} {% for url in plugin.RenderMedia.js %} diff --git a/pydis_site/templates/wiki/includes/revision_info.html b/pydis_site/templates/wiki/includes/revision_info.html index 724f7296..f2964034 100644 --- a/pydis_site/templates/wiki/includes/revision_info.html +++ b/pydis_site/templates/wiki/includes/revision_info.html @@ -1,22 +1,24 @@ {% comment %} - This reusable code is shared between different templates and different inheritors of BaseRevision. - {% endcomment %} +{% load wiki_tags %} + +{% if not hidedate %}{{ revision.created }}{% endif %} {% if not hidenumber %}(#{{ revision.revision_number }}) by{% endif %} {% if revision.user %}{{ revision.user }}{% else %}{% if article|can_moderate:user %}{{ revision.ip_address|default:"anonymous (IP not logged)" }}{% else %}anonymous (IP logged){% endif %}{% endif %} -{% load wiki_tags i18n %} -{% if not hidedate %}{{ revision.created }}{% endif %} {% if not hidenumber %}(#{{ revision.revision_number }}) {% trans "by" %}{% endif %} {% if revision.user %}{{ revision.user }}{% else %}{% if article|can_moderate:user %}{{ revision.ip_address|default:"anonymous (IP not logged)" }}{% else %}{% trans "anonymous (IP logged)" %}{% endif %}{% endif %} {% if revision.deleted %} -<span class="badge badge-important">{% trans "deleted" %}</span> + <span class="tag is-danger">deleted</span> {% endif %} + {% if revision.previous_revision.deleted and not revision.deleted %} -<span class="badge badge-success">{% trans "restored" %}</span> + <span class="tag is-success">restored</span> {% endif %} + {% if revision.locked %} -<span class="badge">{% trans "locked" %}</span> + <span class="tag is-danger">locked</span> {% endif %} + {% if revision.previous_revision.locked and not revision.locked %} -<span class="badge">{% trans "unlocked" %}</span> + <span class="tag is-success">unlocked</span> {% endif %} diff --git a/pydis_site/templates/wiki/includes/searchresult.html b/pydis_site/templates/wiki/includes/searchresult.html index 350280a0..897ee4a6 100644 --- a/pydis_site/templates/wiki/includes/searchresult.html +++ b/pydis_site/templates/wiki/includes/searchresult.html @@ -1,22 +1,32 @@ -{% load wiki_tags i18n humanize %} - +{% load humanize %} <tr> <td> {% for urlpath in article.urlpath_set.all %} - <a href="{% url 'wiki:get' path=urlpath.path %}">{{ article.current_revision.title }}<br /><small class="has-text-grey">Slug: /{{ urlpath.path }}</small></a> + <a href="{% url 'wiki:get' path=urlpath.path %}"> + {{ article.current_revision.title }} + <br /> + <small class="has-text-grey">Slug: /{{ urlpath.path }}</small> + </a> {% empty %} - <a href="{% url 'wiki:get' article_id=article.id %}">{{ article.current_revision.title }}</a> + <a href="{% url 'wiki:get' article_id=article.id %}"> + {{ article.current_revision.title }} + </a> {% endfor %} {% if article.current_revision.deleted %} - <span class="fa fa-trash"></span> + <span class="icon"> + <i class="fas fa-trash"></i> + </span> {% endif %} {% if article.current_revision.locked %} - <span class="fa fa-lock"></span> + <span class="icon"> + <i class="fas fa-lock"></i> + </span> {% endif %} </td> + <td class="has-text-right"> {{ article.current_revision.created|naturaltime }} </td> diff --git a/pydis_site/templates/wiki/move.html b/pydis_site/templates/wiki/move.html index 6452ffa2..a3f7a5d8 100644 --- a/pydis_site/templates/wiki/move.html +++ b/pydis_site/templates/wiki/move.html @@ -1,10 +1,12 @@ {% extends "wiki/article.html" %} -{% load wiki_tags i18n sekizai_tags static %} +{% load i18n %} +{% load sekizai_tags %} +{% load static %} +{% load wiki_tags %} -{% block wiki_pagetitle %}{% trans "Move" %}: {{ article.current_revision.title }}{% endblock %} +{% block wiki_pagetitle %}Move: {{ article.current_revision.title }}{% endblock %} {% block wiki_contents_tab %} - <article class="message is-warning"> <div class="message-body"> {% if urlpath.get_descendants %} @@ -30,40 +32,41 @@ </div> </article> -<form method="POST" class="form-horizontal" id="article_move_form"> - {% wiki_form form %} + <form method="POST" class="form-horizontal" id="article_move_form"> + {% wiki_form form %} - {# Not gonna lie, I have no idea what this is or what it's for #} - <div class="btn-group" id="dest_selector"> - <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"> - <span class="dest_selector_title"></span> - <span class="caret"></span> - </a> - <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> - {% with current_path=root_path %}{% include "wiki/includes/move_tree.html" %}{% endwith %} - </ul> - </div> + {# Not gonna lie, I have no idea what this is or what it's for #} + <div class="btn-group" id="dest_selector"> + <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"> + <span class="dest_selector_title"></span> + <span class="caret"></span> + </a> - <a href="{% url 'wiki:get' path=urlpath.path article_id=article.id %}" class="button is-white"> - <span class="icon"> - <i class="fas fa-arrow-left"></i> - </span> - <span>Go back</span> - </a> - <button class="button is-warning" type="submit" name="move" id="id_move"> - <span class="icon"> - <i class="fas fa-random"></i> - </span> - <span>Move article</span> - </button> -</form> + <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> + {% with current_path=root_path %}{% include "wiki/includes/move_tree.html" %}{% endwith %} + </ul> + </div> + + <a href="{% url 'wiki:get' path=urlpath.path article_id=article.id %}" class="button is-white"> + <span class="icon"> + <i class="fas fa-arrow-left"></i> + </span> + <span>Go back</span> + </a> -{% addtoblock "js" %} - <script type="text/javascript" src="{% static "js/wiki/move.js" %}"></script> - <script type="text/javascript"> - $('#id_slug').val('{{ urlpath.slug }}'); - select_path('{{urlpath.parent.pk}}', '{{urlpath.parent}}'); - </script> -{% endaddtoblock %} + <button class="button is-warning" type="submit" name="move" id="id_move"> + <span class="icon"> + <i class="fas fa-random"></i> + </span> + <span>Move article</span> + </button> + </form> + {% addtoblock "js" %} + <script type="text/javascript" src="{% static "js/wiki/move.js" %}"></script> + <script type="text/javascript"> + $('#id_slug').val('{{ urlpath.slug }}'); + select_path('{{urlpath.parent.pk}}', '{{urlpath.parent}}'); + </script> + {% endaddtoblock %} {% endblock %} diff --git a/pydis_site/templates/wiki/plugins/images/index.html b/pydis_site/templates/wiki/plugins/images/index.html index 2b4d9800..a76703aa 100644 --- a/pydis_site/templates/wiki/plugins/images/index.html +++ b/pydis_site/templates/wiki/plugins/images/index.html @@ -1,16 +1,21 @@ {% extends "wiki/article.html" %} -{% load wiki_tags i18n humanize wiki_thumbnails %} +{% load humanize %} +{% load wiki_tags %} +{% load wiki_thumbnails %} {# TODO: This page needs re-styling, but it's functional for now so we're not touching it until after wiki completion #} -{% block wiki_pagetitle %}{% trans "Images" %}: {{ article.current_revision.title }}{% endblock %} +{% block wiki_pagetitle %}Images: {{ article.current_revision.title }}{% endblock %} {% block wiki_contents_tab %} - <p class="lead">{% trans "The following images are available for this article. Copy the markdown tag to directly refer to an image from the article text." %}</p> + <p>The following images are available for this article. Copy the markdown tag to directly refer to an image from the article text.</p> + <p> - <a href="{% url 'wiki:edit' path=urlpath.path article_id=article.id %}"> - <span class="fa fa-arrow-left"></span> - {% trans "Back to edit page" %} + <a href="{% url 'wiki:edit' path=urlpath.path article_id=article.id %}" class="button is-white"> + <span class="icon"> + <i class="fas fa-arrow-left"></i> + </span> + <span>Back to edit page</span> </a> </p> @@ -27,6 +32,7 @@ <th>Size</th> </tr> </thead> + <tbody> <tr> <td rowspan="3"> @@ -76,21 +82,26 @@ {% endif %} {% endif %} </td> + <td> <code>[image:{{ image.id }}]</code> </td> + <td colspan="3"> {% include "wiki/includes/revision_info.html" %} </td> + <td> {{ revision.get_size|filesizeformat }}<br />{{ revision.width }}x{{ revision.height }} pixels </td> </tr> + <tr> <th colspan="5"> History </th> </tr> + <tr> <td class="is-paddingless" colspan="5"> <table class="table is-striped"> @@ -115,15 +126,19 @@ {% endthumbnail %} </figure> </td> + <td> {% include "wiki/includes/revision_info.html" with current_revision=image.current_revision revision=old_revision %} </td> + <td> {{ old_revision.imagerevision.get_size|filesizeformat }} </td> + <td> {{ old_revision.imagerevision.width }}x{{ old_revision.imagerevision.height }} pixels </td> + <td> {% if image|can_write:user and old_revision != image.current_revision %} <a class="button is-primary" href="{% url 'wiki:images_set_revision' path=urlpath.path article_id=article.id image_id=image.id rev_id=old_revision.id %}"> @@ -153,5 +168,4 @@ </table> {% include "wiki/includes/pagination.html" %} - {% endblock %} diff --git a/pydis_site/templates/wiki/plugins/images/purge.html b/pydis_site/templates/wiki/plugins/images/purge.html index 2789f536..3b514e4c 100644 --- a/pydis_site/templates/wiki/plugins/images/purge.html +++ b/pydis_site/templates/wiki/plugins/images/purge.html @@ -1,8 +1,8 @@ {% extends "wiki/article.html" %} -{% load wiki_tags i18n humanize wiki_thumbnails %} +{% load wiki_tags %} +{% load wiki_thumbnails %} - -{% block wiki_pagetitle %}{% trans "Purge deletion" %}: {{ image }}{% endblock %} +{% block wiki_pagetitle %}Purge image: {{ image }}{% endblock %} {% block wiki_contents_tab %} <div class="columns"> diff --git a/pydis_site/templates/wiki/plugins/images/render.html b/pydis_site/templates/wiki/plugins/images/render.html index c34616cb..d14b3de4 100644 --- a/pydis_site/templates/wiki/plugins/images/render.html +++ b/pydis_site/templates/wiki/plugins/images/render.html @@ -1,4 +1,4 @@ -{% load wiki_thumbnails i18n %}{% comment %} +{% load wiki_thumbnails %}{% comment %} This template is used for the markdown extension that renders images and captions. NB! Watch out for line breaks, markdown might add <br />s and <p>s. diff --git a/pydis_site/templates/wiki/plugins/images/revision_add.html b/pydis_site/templates/wiki/plugins/images/revision_add.html index 6b17587a..eb872eab 100644 --- a/pydis_site/templates/wiki/plugins/images/revision_add.html +++ b/pydis_site/templates/wiki/plugins/images/revision_add.html @@ -1,5 +1,6 @@ {% extends "wiki/article.html" %} -{% load wiki_tags wiki_thumbnails %} +{% load wiki_tags %} +{% load wiki_thumbnails %} {% block wiki_pagetitle %}Replace Image: {{ image }}{% endblock %} @@ -9,6 +10,7 @@ <p> Upload an image to replace the current one. </p> + <form method="POST" class="form-horizontal" enctype="multipart/form-data"> {% wiki_form form %} @@ -27,6 +29,7 @@ </button> </form> </div> + <div class="column is-one-third"> {% thumbnail image.current_revision.imagerevision.image "250x250" as thumb %} <figure class="image"> diff --git a/pydis_site/templates/wiki/plugins/images/sidebar.html b/pydis_site/templates/wiki/plugins/images/sidebar.html index 2aa77c9e..b29ef240 100644 --- a/pydis_site/templates/wiki/plugins/images/sidebar.html +++ b/pydis_site/templates/wiki/plugins/images/sidebar.html @@ -1,4 +1,7 @@ -{% load i18n wiki_tags wiki_images_tags humanize wiki_thumbnails sekizai_tags static %} +{% load static %} +{% load wiki_images_tags %} +{% load wiki_tags %} +{% load wiki_thumbnails %} {% with article|images_for_article as images %} {% if article|images_can_add:user %} diff --git a/pydis_site/templates/wiki/plugins/links/sidebar.html b/pydis_site/templates/wiki/plugins/links/sidebar.html index d44e27fb..4fdbac72 100644 --- a/pydis_site/templates/wiki/plugins/links/sidebar.html +++ b/pydis_site/templates/wiki/plugins/links/sidebar.html @@ -1,4 +1,5 @@ -{% load sekizai_tags static %} +{% load sekizai_tags %} +{% load static %} <h4 class="title is-4">Link to another wiki page</h4> @@ -50,7 +51,6 @@ <script src="{% static "js/wiki/links_sidebar.js" %}"></script> <script type="text/javascript"> - {# If you figure out a way to do this without putting some JS directly in the page... let me know #} setFetchURL("{% url 'wiki:links_query_urlpath' path=urlpath.path article_id=article.id %}"); </script> {% endaddtoblock %} diff --git a/pydis_site/templates/wiki/preview_inline.html b/pydis_site/templates/wiki/preview_inline.html index a130df05..a01c963a 100644 --- a/pydis_site/templates/wiki/preview_inline.html +++ b/pydis_site/templates/wiki/preview_inline.html @@ -1,6 +1,9 @@ {% extends "wiki/base.html" %} -{% load wiki_tags i18n sekizai_tags static %} +{% load sekizai_tags %} +{% load static %} +{% load wiki_tags %} +{# We make these empty so they don't appear in the preview #} {% block site_navbar %}{% endblock %} {% block site_footer %}{% endblock %} {% block wiki_breadcrumbs %}{% endblock %} @@ -21,31 +24,29 @@ {% if merge %} <div class="alert alert-info"> - <strong>{% trans "Previewing merge between" %}:</strong> + <strong>Previewing merge between:</strong> {% include "wiki/includes/revision_info.html" with revision=merge1 %} - <strong>{% trans "and" %}</strong> + <strong>and</strong> {% include "wiki/includes/revision_info.html" with revision=merge2 %} </div> {% if merge1.deleted %} <div class="alert alert-danger"> - <strong>{% trans "You cannot merge with a deleted revision" %}</strong> + <strong>You cannot merge with a deleted revision</strong> </div> {% endif %} {% endif %} {% if revision and revision.deleted %} <div class="warning"> - <strong>{% trans "This revision has been deleted." %}</strong> - <p>{% trans "Restoring to this revision will mark the article as deleted." %}</p> + <strong>This revision has been deleted.</strong> + <p>Restoring to this revision will mark the article as deleted.</p> </div> {% else %} - <section class="section"> <div class="container"> <div class="content"> - - <h1 class="title">{{ article.current_revision.title }}</h1> + <h1 class="title">{{ article.current_revision.title }}</h1> {% wiki_render article content %} </div> @@ -69,5 +70,4 @@ {% endif %} {% endfor %} {% endif %} - {% endblock %} diff --git a/pydis_site/templates/wiki/root_missing.html b/pydis_site/templates/wiki/root_missing.html index c3b89c45..31ef2eab 100644 --- a/pydis_site/templates/wiki/root_missing.html +++ b/pydis_site/templates/wiki/root_missing.html @@ -1,5 +1,5 @@ {% extends "wiki/create_root.html" %} -{% load i18n wiki_tags %} +{% load wiki_tags %} {% block wiki_contents %} <div class="columns"> @@ -38,5 +38,4 @@ </article> </div> </div> - {% endblock %} diff --git a/pydis_site/templates/wiki/search.html b/pydis_site/templates/wiki/search.html index 296b21b3..154b6934 100644 --- a/pydis_site/templates/wiki/search.html +++ b/pydis_site/templates/wiki/search.html @@ -1,5 +1,6 @@ {% extends "wiki/base.html" %} -{% load wiki_tags i18n humanize %} +{% load i18n %} +{% load wiki_tags %} {% block wiki_pagetitle %}Search results for: "{{ search_query }}"{% endblock %} @@ -44,10 +45,12 @@ <th>Title</th> <th class="has-text-right">Last modified</th> </tr> + {% for article in articles %} {% block wiki_search_loop %} {% include "wiki/includes/searchresult.html" %} {% endblock %} + {% empty %} <tr> <td colspan="2"> diff --git a/pydis_site/templates/wiki/settings.html b/pydis_site/templates/wiki/settings.html index c26e4ccd..e291621d 100644 --- a/pydis_site/templates/wiki/settings.html +++ b/pydis_site/templates/wiki/settings.html @@ -1,32 +1,30 @@ {% extends "wiki/article.html" %} -{% load wiki_tags i18n %} +{% load wiki_tags %} - -{% block wiki_pagetitle %}{% trans "Settings" %}: {{ article.current_revision.title }}{% endblock %} +{% block wiki_pagetitle %}Settings: {{ article.current_revision.title }}{% endblock %} {% block wiki_contents_tab %} - {% for form in forms %} - <form method="POST" class="form-horizontal" action="?f={{form.action}}"> - <h3 class="page-header">{{ form.settings_form_headline }}</h3> - {% wiki_form form %} + <form method="POST" class="form-horizontal" action="?f={{form.action}}"> + <h3 class="page-header">{{ form.settings_form_headline }}</h3> - <div class="field is-horizontal"> - <div class="field-label"> - {# Empty for spacing #} - </div> - <div class="field-body"> - <div class="control"> - <button type="submit" class="button is-primary" name="save"> - <span class="icon"> - <i class="fas fa-save"></i> - </span> - <span>Save Changes</span> - </button> + {% wiki_form form %} + + <div class="field is-horizontal"> + <div class="field-label"> + {# Empty for spacing #} + </div> + <div class="field-body"> + <div class="control"> + <button type="submit" class="button is-primary" name="save"> + <span class="icon"> + <i class="fas fa-save"></i> + </span> + <span>Save Changes</span> + </button> + </div> </div> </div> - </div> - </form> + </form> {% endfor %} - {% endblock %} diff --git a/pydis_site/templates/wiki/source.html b/pydis_site/templates/wiki/source.html index caae077e..a6611233 100644 --- a/pydis_site/templates/wiki/source.html +++ b/pydis_site/templates/wiki/source.html @@ -1,6 +1,5 @@ {% extends "wiki/article.html" %} -{% load wiki_tags humanize %} - +{% load wiki_tags %} {% block wiki_pagetitle %}Source of "{{ article.current_revision.title }}"{% endblock %} |