Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions inyoka_theme_default/static/style/inyoka/portal.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@
}
}

&-static_files {
&:extend(.table-responsive all);

& > table {
&:extend(.table all);
&:extend(.table-striped all);
}
}

&-whoisonline.team {
color: @team-member;
}
Expand Down
54 changes: 54 additions & 0 deletions inyoka_theme_default/templates/portal/file_edit.html
Original file line number Diff line number Diff line change
@@ -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 %}
<h1>
{% if file %}
{{ file.identifier|e }}
{% else %}
{% trans %}Create new static file{% endtrans %}
{% endif %}
</h1>

{% if file %}
<h2>{% trans %}Usage:{% endtrans %}</h2>
<pre>
[[Bild("{{ file.identifier|e }}")]]
[[Vorlage(Ikhayabild, "{{ file.identifier|e }}", Link oder Größe, "{% trans %}Description{% endtrans %}", left|right)]]
</pre>

<div class="message-warning">
{% trans %}CAUTION: A change of the file destroys all links from articles to this file!{% endtrans %}
</div>
{% endif %}

{{ macros.outer_form(csrf_token(), form) }}
{% endblock %}
70 changes: 70 additions & 0 deletions inyoka_theme_default/templates/portal/files.html
Original file line number Diff line number Diff line change
@@ -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 %}
<h1>{% trans %}Static files{% endtrans %}</h1>

<div class="portal-static_files">
<table>
<thead>
<tr>
<th>{{ table.get_html('identifier', _('Identifier')) }}</th>
<th>{{ table.get_html('is_ikhaya_icon', _('Is Ikhaya-Icon')) }}</th>
<th>{% trans %}Actions{% endtrans %}</th>
</tr>
</thead>

<tbody>
{% for file in object_list %}
<tr>
<td>
<a href="{{ file|url('edit') }}">{{ file.identifier|e }}</a>
</td>
<td>{{ file.is_ikhaya_icon and _('yes') or _('no') }}</td>
<td class="actions">
<a href="{{ file|url('edit') }}">
<span class="fa_icon-pencil" aria-hidden="true"></span>
{% trans %}Edit{% endtrans %}
</a>
<br>
<a href="{{ file|url('delete') }}">
<span class="fa_icon-trash" aria-hidden="true"></span>
{% trans %}Delete{% endtrans %}
</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">
{% trans %}There are no static files, create the first one now!{% endtrans %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
18 changes: 18 additions & 0 deletions inyoka_theme_default/templates/portal/files_delete.html
Original file line number Diff line number Diff line change
@@ -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')) %}
<p>{% trans file=object.identifier|e %}
Do you really want to delete the file “{{ file }}”?
{% endtrans %}</p>

<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
{% endcall %}