diff options
author | 2019-04-20 14:32:53 +0100 | |
---|---|---|
committer | 2019-04-20 14:32:53 +0100 | |
commit | bbeb451ac6750c526166db12080b1b6bc040c860 (patch) | |
tree | c74468da0b3059045e1e294bf17b062943b79079 /pydis_site/templates/wiki/plugins | |
parent | Update Pipfile.lock and move home app tests (diff) |
Address reviews
Diffstat (limited to 'pydis_site/templates/wiki/plugins')
6 files changed, 35 insertions, 15 deletions
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 %} |