diff --git a/inyoka_theme_default/static/style/inyoka/portal.less b/inyoka_theme_default/static/style/inyoka/portal.less index 5c983ac..c04b72b 100644 --- a/inyoka_theme_default/static/style/inyoka/portal.less +++ b/inyoka_theme_default/static/style/inyoka/portal.less @@ -107,6 +107,15 @@ } } + &-static_pages { + &: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/page_delete.html b/inyoka_theme_default/templates/portal/page_delete.html new file mode 100644 index 0000000..c7765d1 --- /dev/null +++ b/inyoka_theme_default/templates/portal/page_delete.html @@ -0,0 +1,21 @@ +{# + portal/pages_delete.html + ~~~~~~~~~~~~~~~~~~~~~~~ + + This template is flashed to ensure that the user want to delete the selected page. + + :copyright: (c) 2013-2017 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +
+ {{ csrf_token() }} +

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

+

+ + +

+
diff --git a/inyoka_theme_default/templates/portal/page_edit.html b/inyoka_theme_default/templates/portal/page_edit.html new file mode 100644 index 0000000..5b3d870 --- /dev/null +++ b/inyoka_theme_default/templates/portal/page_edit.html @@ -0,0 +1,38 @@ +{# + portal/pages_edit.html + ~~~~~~~~~~~~~~~~~~~~~ + + Formular for editing or writing a new page. + + :copyright: (c) 2013-2017 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% extends 'portal/pages.html' %} + +{% block title %} + {% trans %}Edit{% endtrans %} – {{ page.title|e }} – {{ super() }} +{% endblock title %} + +{% block breadcrumb %} + {{ super() }} + + {% if page %} + {{ macros.breadcrumb_item(page.title|e, page|url()) }} + {{ macros.breadcrumb_item(_('Edit'), page|url('edit')) }} + {% else %} + {{ macros.breadcrumb_item(_('Create new page'), href('portal', 'page', 'new')) }} + {% endif %} +{% endblock %} + +{% block content %} +

{{ page.title|e }}

+ + {% call macros.outer_form(csrf_token(), form) %} + + {% endcall %} + + {% if preview %} +

{% trans %}Preview{% endtrans %}

+
{{ preview }}
+ {% endif %} +{% endblock %} diff --git a/inyoka_theme_default/templates/portal/pages.html b/inyoka_theme_default/templates/portal/pages.html new file mode 100644 index 0000000..932b838 --- /dev/null +++ b/inyoka_theme_default/templates/portal/pages.html @@ -0,0 +1,69 @@ +{# + portal/pages.html + ~~~~~~~~~~~~~~~~~ + + This is the overview of the static pages configuration. + + :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 pages{% endtrans %} – {{ super() }} +{% endblock title %} + +{% block breadcrumb %} + {{ super() }} + + {{ macros.breadcrumb_item(_('Static pages'), href('portal', 'pages')) }} +{% endblock %} + +{% block sidebar %} + {% call macros.sidebar_admin() %} + {{ macros.sidebar_item(_('Create new page'), href('portal', 'page', 'new')) }} + {% endcall %} +{% endblock %} + +{% block content %} +

{% trans %}Static pages{% endtrans %}

+ +
+ + + + + + + + + + {% for page in pages %} + + + + + + {% else %} + + + + {% endfor %} + +
{{ table.get_html('key', _('Key')) }}{{ table.get_html('title', _('Title')) }}{% trans %}Actions{% endtrans %}
+ {{ page.key }} + {{ page.title }} + + + {% trans %}Edit{% endtrans %} + +
+ + + {% trans %}Delete{% endtrans %} + +
+ {% trans %}There are no static pages, create the first one now!{% endtrans %} +
+
+{% endblock %} diff --git a/inyoka_theme_default/templates/portal/static_page.html b/inyoka_theme_default/templates/portal/static_page.html new file mode 100644 index 0000000..dd514a0 --- /dev/null +++ b/inyoka_theme_default/templates/portal/static_page.html @@ -0,0 +1,37 @@ +{# + portal/static_page.html + ~~~~~~~~~~~~~~~~~~~~~~~ + + Used for static pages (imprint, licence etc.) + + :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 %} + {{ title|e }} – {{ super() }} +{% endblock title %} + +{% block breadcrumb %} + {{ super() }} + + {% if USER.has_perm('portal.change_staticpage') %} + {{ macros.breadcrumb_item(_('Static pages'), href('portal', 'pages')) }} + {% endif %} + {{ macros.breadcrumb_item(title|e, href('portal', key)) }} +{% endblock %} + +{% block sidebar %} + {% if USER.has_perm('portal.change_staticpage') %} + {% call macros.sidebar_admin() %} + {{ macros.sidebar_item(_('Delete'), page|url('delete'), 'fa_icon-trash') }} + {{ macros.sidebar_item(_('Edit'), page|url('edit'), 'fa_icon-pencil') }} + {% endcall %} + {% endif %} +{% endblock %} + +{% block content %} +

{{ title|e }}

+ {{ content }} +{% endblock %}