From 7992729e29a18f67c6b3324a64a8fc4e58f5acb8 Mon Sep 17 00:00:00 2001
From: Gareth Coles {% trans "The following images are available for this article. Copy the markdown tag to directly refer to an image from the article text." %}
+
+
+ {% trans "Back to edit page" %}
+
+
+ {% thumbnail revision.image "250x250" as thumb %}
+
+ {% if revision.deleted %}
+
+
+ {% trans "Upload and publish new image" %}
+ {% include "wiki/includes/revision_info.html" %} {% trans "There are no images for this article." %}
+
+ {% trans "Purge image: Completely remove image file and all revisions." %}
+ s.
+{% endcomment %}{% with image.current_revision.imagerevision as revision %}{% spaceless %}
+
+
+ {% trans "Choose an image file to replace current image." %}
+ {% trans "Image id" %}: {{ image.id }}
+ {% trans "Insert" %}
+
+ {% trans "Manage images" %} »
+
+
+ {% for field in form.visible_fields %}
+ {{ field.help_text|safe }}
+ {% for image in images %}
+ {% with image.current_revision.imagerevision as revision %}
+
+
+ {% 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
new file mode 100644
index 00000000..28b8b476
--- /dev/null
+++ b/pydis_site/templates/wiki/plugins/images/purge.html
@@ -0,0 +1,33 @@
+{% extends "wiki/article.html" %}
+{% load wiki_tags i18n humanize wiki_thumbnails %}
+
+
+{% block wiki_pagetitle %}{% trans "Purge deletion" %}: {{ image }}{% endblock %}
+
+{% block wiki_contents_tab %}
+ {% thumbnail image.current_revision.imagerevision.image "250x250" as thumb %}
+
+
+ {{ revision.get_filename|default:_("No file") }}
+ {% trans "Markdown tag" %}
+ {% trans "Uploaded by" %}
+ {% trans "Size" %}
+
+
+
+
+
+ {% endthumbnail %}
+
+
+
+ {% trans "Restore image" %}
+
+ {% else %}
+
+
+ {% trans "Upload replacement" %}
+
+
+
+ {% trans "Remove image" %}
+
+ {% endif %}
+ {% if article|can_moderate:user %}
+
+
+
+ {% trans "Completely delete" %}
+
+ {% endif %}
+
+ [image:{{ image.id }}]
+
+ {{ revision.get_size|filesizeformat }}
+
{{ revision.width }}x{{ revision.height }} pixels
+
+
+ {% trans "History" %}
+
+
+ {% endwith %}
+ {% empty %}
+
+
+
+ {% for old_revision in image.revision_set.all %}
+
+
+
+ {% endfor %}
+
+ {% thumbnail old_revision.imagerevision.image "50x50" crop="center" as thumb %}
+
+
+ {% endthumbnail %}
+
{% include "wiki/includes/revision_info.html" with current_revision=image.current_revision revision=old_revision %}
+ {{ old_revision.imagerevision.get_size|filesizeformat }}
+ {{ old_revision.imagerevision.width }}x{{ old_revision.imagerevision.height }}
+
+ {% if image|can_write:user and old_revision != image.current_revision %}
+
+
+ {% trans "Revert to this version" %}
+
+ {% endif %}
+
+
+
+
+ {% endfor %}
+
+
+
s and
+ {% empty %}
+
+{% endif %}
+
+
+
+ {% for image in images %}
+ {% with image.current_revision.imagerevision as revision %}
+ {% thumbnail revision.image "50x50" crop="center" as thumb %}
+
+
+
+ {% endthumbnail %}
+ {% endwith %}
+ {% empty %}
+
+
+
+ {% if image|can_write:user %}
+ {% trans "Replace" %}
+ {% endif %}
+
+
+
+
+
+ {% endfor %}
+ {% trans "No images found for this article" %}
+
+
+{% trans "Add new image" %}
+
+{% if article|images_can_add:user %}
+ {% if form.non_field_errors %}
+ {% if form_error_title %}{{ form_error_title }}
{% endif %}
+ {% for error_message in form.non_field_errors %}
+
+ +
+{% else %} + + {% if user.is_anonymous %} + {% include "wiki/includes/anonymous_blocked.html" %} + {% else %} +{% trans "You do not have permissions to add images." %}
+ {% endif %} +{% endif %} + +{% trans "After uploading an image, it is attached to this particular article and can be used only here. Other users may replace the image, but older versions are kept. To show the image press the Insert button and select the options you want to use. You can use Markdown in the caption. The Markdown code syntax for images looks like this" %}
+
[image:id align:right size:orig] + caption indented by 4 spaces+{% trans "Possible values for align are" %}
left | right+{% trans "Possible values for size are" %}
small | medium | large | orig | default+ +{% endwith %} + +
+ {% trans "Type in something from another wiki page's title and auto-complete will help you create a tag for your wiki link. Tags for links look like this:" %}
+
[Title of link](wiki:ArticleSlug)+ +
+ {% trans "You can link to another website simply by inserting an address example.com or http://example.com or by using the markdown syntax:" %}
+
[Clickable text](http://example.com)+ +{% addtoblock "js" %}{% endaddtoblock %} +{% addtoblock "js" %} + +{% endaddtoblock %} diff --git a/pydis_site/templates/wiki/plugins/macros/article_list.html b/pydis_site/templates/wiki/plugins/macros/article_list.html new file mode 100644 index 00000000..c9261f1e --- /dev/null +++ b/pydis_site/templates/wiki/plugins/macros/article_list.html @@ -0,0 +1,14 @@ +{% load i18n wiki_macro_tags %} + +{% if article_children %} +
{{ macro.example_code }}
+{% endif %}
+{% if macro.args %}
+| {{ arg }} | +{{ description }} | +
|---|
+ {% trans "Manage how often you receive notifications" %} +
+ + + +