diff --git a/inyoka_theme_default/static/style/inyoka/portal.less b/inyoka_theme_default/static/style/inyoka/portal.less index 5c983ac..f9d8280 100644 --- a/inyoka_theme_default/static/style/inyoka/portal.less +++ b/inyoka_theme_default/static/style/inyoka/portal.less @@ -107,6 +107,15 @@ } } + &-static_files { + &:extend(.table-responsive all); + + & > table { + &:extend(.table all); + &:extend(.table-striped all); + } + } + &-whoisonline.team { color: @team-member; } diff --git a/inyoka_theme_default/templates/portal/file_edit.html b/inyoka_theme_default/templates/portal/file_edit.html new file mode 100644 index 0000000..c8b8663 --- /dev/null +++ b/inyoka_theme_default/templates/portal/file_edit.html @@ -0,0 +1,54 @@ +{# + portal/file_edit.html + ~~~~~~~~~~~~~~~~~~~~~ + + Template for editing or creating a static file. + + :copyright: (c) 2013-2017 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% extends 'portal/files.html' %} + +{% block title %} + {% if file %} + {{ file.identifier|e }} + {% else %} + {% trans %}Create{% endtrans %} + {% endif %} + + – {{ super() }} +{% endblock title %} + +{% block breadcrumb %} + {{ super() }} + + {% if file %} + {{ macros.breadcrumb_item(file.identifier|e, file|url('edit')) }} + {% else %} + {{ macros.breadcrumb_item(_('Create'), href('portal', 'files', 'new')) }} + {% endif %} +{% endblock %} + +{% block content %} +

+ {% if file %} + {{ file.identifier|e }} + {% else %} + {% trans %}Create new static file{% endtrans %} + {% endif %} +

+ + {% if file %} +

{% trans %}Usage:{% endtrans %}

+
+[[Bild("{{ file.identifier|e }}")]]
+[[Vorlage(Ikhayabild, "{{ file.identifier|e }}", Link oder Größe, "{% trans %}Description{% endtrans %}", left|right)]]
+
+ +
+ {% trans %}CAUTION: A change of the file destroys all links from articles to this file!{% endtrans %} +
+ {% endif %} + + {{ macros.outer_form(csrf_token(), form) }} +{% endblock %} diff --git a/inyoka_theme_default/templates/portal/files.html b/inyoka_theme_default/templates/portal/files.html new file mode 100644 index 0000000..c0effbb --- /dev/null +++ b/inyoka_theme_default/templates/portal/files.html @@ -0,0 +1,70 @@ +{# + portal/files.html + ~~~~~~~~~~~~~~~~~ + + This is the overview of the ikhaya files. + + :copyright: (c) 2013-2017 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% extends 'portal/base.html' %} + +{% block title %} + {% trans %}Static files{% endtrans %} – {{ super() }} +{% endblock title %} + +{% block breadcrumb %} + {{ super() }} + + {{ macros.breadcrumb_item(_('Static files'), href('portal', 'files')) }} +{% endblock %} + +{% block sidebar %} + {% call macros.sidebar_admin() %} + {{ macros.sidebar_item(_('Create new static file'), href('portal', 'files', 'new')) }} + {% endcall%} +{% endblock %} + +{% block content %} +

{% trans %}Static files{% endtrans %}

+ +
+ + + + + + + + + + + {% for file in object_list %} + + + + + + {% else %} + + + + {% endfor %} + +
{{ table.get_html('identifier', _('Identifier')) }}{{ table.get_html('is_ikhaya_icon', _('Is Ikhaya-Icon')) }}{% trans %}Actions{% endtrans %}
+ {{ file.identifier|e }} + {{ file.is_ikhaya_icon and _('yes') or _('no') }} + + + {% trans %}Edit{% endtrans %} + +
+ + + {% trans %}Delete{% endtrans %} + +
+ {% trans %}There are no static files, create the first one now!{% endtrans %} +
+
+{% endblock %} diff --git a/inyoka_theme_default/templates/portal/files_delete.html b/inyoka_theme_default/templates/portal/files_delete.html new file mode 100644 index 0000000..a9a0c12 --- /dev/null +++ b/inyoka_theme_default/templates/portal/files_delete.html @@ -0,0 +1,18 @@ +{# + portal/files_delete.html + ~~~~~~~~~~~~~~~~~~~~~~~~ + + This template is flashed to ensure that the user wants to delete the selected file. + + :copyright: (c) 2013-2017 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% import 'macros.html' as macros %} + +{% call macros.outer_form(csrf_token(), form, action=object|url('delete')|e, submit_label=_('Delete')) %} +

{% trans file=object.identifier|e %} + Do you really want to delete the file “{{ file }}”? + {% endtrans %}

+ + +{% endcall %}