From 4afbaef66f80c561cc0e6fca7f4742d86919ea88 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Mon, 4 Jan 2016 00:23:34 +0100 Subject: [PATCH 01/39] Added forum_edit.html --- .../templates/forum/forum_edit.html | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 inyoka_theme_default/templates/forum/forum_edit.html diff --git a/inyoka_theme_default/templates/forum/forum_edit.html b/inyoka_theme_default/templates/forum/forum_edit.html new file mode 100644 index 0000000..cf2e05f --- /dev/null +++ b/inyoka_theme_default/templates/forum/forum_edit.html @@ -0,0 +1,38 @@ +{# + templates.admin.forum_edit + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Admin template for editing forums. + + :copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% extends 'forum/base.html' %} + +{% block title %} + {% if not forum %} + {% trans %}Create forum{% endtrans %} + {% else %} + {% trans forum=forum.name|e %}Edit “{{ forum }}”{% endtrans %} + {% endif %} + – {{ super() }} +{% endblock %} + +{% block breadcrumb %} + {{ super() }} + + {% if not forum %} + {{ macros.breadcrumb_item(_('Create forum'), href('forum', 'forum', 'new')) }} + {% else %} + {{ macros.breadcrumb_item(forum.name|e, forum|url()) }} + {{ macros.breadcrumb_item(_('Edit'), forum|url('edit')) }} + {% endif %} +{% endblock %} + +{% block content %} + {% call macros.outer_form(csrf_token(), form, manually_rendered=True) %} + {{ macros.inner_form(form, ['name', 'slug','description', 'parent', 'position', 'newtopic_default_text', 'force_version', 'count_posts']) }} +

{% trans %}Welcome message{% endtrans %}

+ {{ macros.inner_form(form, ['welcome_msg_subject', 'welcome_msg_text']) }} + {% endcall %} +{% endblock %} From 5d6cb286d498aec1df3f284dba6355514a410c36 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Mon, 4 Jan 2016 00:27:38 +0100 Subject: [PATCH 02/39] forum.html: Added edit-link for forum --- inyoka_theme_default/templates/forum/forum.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inyoka_theme_default/templates/forum/forum.html b/inyoka_theme_default/templates/forum/forum.html index ed82a7c..596ebf1 100644 --- a/inyoka_theme_default/templates/forum/forum.html +++ b/inyoka_theme_default/templates/forum/forum.html @@ -42,6 +42,10 @@ {{ macros.sidebar_item(_('New topic'), forum|url('newtopic')) }} {{ macros.sidebar_item(_('Mark as read'), forum|url('markread')) }} {% endcall %} + + {% call macros.sidebar_admin() %} + {{ macros.sidebar_item(_('Edit forum'), forum|url('edit')) }} + {% endcall %} {% endblock %} {% block content %} From 2ac4240e186a955e96974b7c7a4ead8f81dd2c97 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Mon, 4 Jan 2016 00:48:01 +0100 Subject: [PATCH 03/39] forum/index.html: Added category edit and new links --- inyoka_theme_default/static/style/inyoka/forum.less | 3 +++ inyoka_theme_default/templates/forum/index.html | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/inyoka_theme_default/static/style/inyoka/forum.less b/inyoka_theme_default/static/style/inyoka/forum.less index b056123..1af9155 100644 --- a/inyoka_theme_default/static/style/inyoka/forum.less +++ b/inyoka_theme_default/static/style/inyoka/forum.less @@ -38,6 +38,9 @@ &:extend(list-group-item-text all); } } + &-edit-category { + &:extend(.pull-right); + } } &-topic-list { diff --git a/inyoka_theme_default/templates/forum/index.html b/inyoka_theme_default/templates/forum/index.html index a301c95..36d3751 100644 --- a/inyoka_theme_default/templates/forum/index.html +++ b/inyoka_theme_default/templates/forum/index.html @@ -17,6 +17,12 @@ (_('Forum - Full post'), href('forum', 'feeds/full/20')) ] %} +{% block sidebar %} + {% call macros.sidebar_admin() %} + {{ macros.sidebar_item(_('New Category'), href('forum', 'forum', 'new')) }} + {% endcall %} +{% endblock %} + {% block content %} {% for category, forums in forum_hierarchy %}
@@ -24,6 +30,9 @@

{{ category }} + + +

From ffa5052e63ea482d770af5c81efa62053fcaf0c3 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Mon, 4 Jan 2016 01:41:48 +0100 Subject: [PATCH 04/39] Added reportlist.html --- .../static/style/inyoka/forum.less | 12 +++ .../templates/forum/reportlist.html | 93 +++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 inyoka_theme_default/templates/forum/reportlist.html diff --git a/inyoka_theme_default/static/style/inyoka/forum.less b/inyoka_theme_default/static/style/inyoka/forum.less index 1af9155..671b012 100644 --- a/inyoka_theme_default/static/style/inyoka/forum.less +++ b/inyoka_theme_default/static/style/inyoka/forum.less @@ -100,4 +100,16 @@ &:extend(.bg-warning all); padding: 1em; } + + &-reportlist { + .table-responsive(); + + > table { + .table(); + .table-striped(); + } + &-content { + white-space: pre-wrap; + } + } } diff --git a/inyoka_theme_default/templates/forum/reportlist.html b/inyoka_theme_default/templates/forum/reportlist.html new file mode 100644 index 0000000..b1385f7 --- /dev/null +++ b/inyoka_theme_default/templates/forum/reportlist.html @@ -0,0 +1,93 @@ +{# + forum/reportlist.html + ~~~~~~~~~~~~~~~~~~~~~ + + The moderators can see all reported topics on this page. + + :copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} + +{% extends 'forum/base.html' %} + +{% block title %} + {% trans %}Reported topics{% endtrans %} – {{ super() }} +{% endblock %} + +{% block breadcrumb %} + {{ super() }} + + {{ macros.breadcrumb_item(_('Reported topics'), href('forum', 'reported_topics')) }} +{% endblock %} + +{% block sidebar %} + {{ super() }} + + {% call macros.sidebar() %} + {% if subscribed %} + {{ macros.sidebar_item(_('Unsubscribe from topic reports'), href('forum', 'reported_topics', 'unsubscribe'), 'fa_icon-bell-slash') }} + {% else %} + {{ macros.sidebar_item(_('Subscribe to topic reports'), href('forum', 'reported_topics', 'subscribe'), 'fa_icon-bell') }} + {% endif %} + {% endcall %} +{% endblock %} + +{% block content %} + {% call macros.outer_form(csrf_token(), form, submit_label=_('Close selected tickets'), manually_rendered=True) %} +
+ + + + + + + + + + + + {% for topic in topics %} + + + + + + + + + + + {% else %} + + {% endfor %} + +
{% trans %}#{% endtrans %}{% trans %}Topic{% endtrans %}{% trans %}Reported by{% endtrans %}{% trans %}Assigned to{% endtrans %}
+ + + {{ topic.title|e }} ({{ topic.forum.name|e}}) + + {{ topic.reporter.username }} + + {% if topic.report_claimed_by %} + {% if topic.report_claimed_by.username == USER.username %} + + {% trans %}Unassign me{% endtrans %} + + {% else %} + + {{ topic.report_claimed_by.username }} + + {% endif %} + {% else %} + + {% trans %}Assign to me{% endtrans %} + + {% endif %} +
+ {{ topic.reported_rendered }} +
+ {% trans %}Currently there are no reported topics.{% endtrans %} +
+
+ {% endcall %} +{% endblock %} From a3c585a2d7c2b2181a7c01a33054b732858c1738 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Wed, 6 Jan 2016 15:49:36 +0100 Subject: [PATCH 05/39] forum_edit: Changes from theme-ubuntuusers/#131 --- inyoka_theme_default/templates/forum/forum_edit.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inyoka_theme_default/templates/forum/forum_edit.html b/inyoka_theme_default/templates/forum/forum_edit.html index cf2e05f..8bf1630 100644 --- a/inyoka_theme_default/templates/forum/forum_edit.html +++ b/inyoka_theme_default/templates/forum/forum_edit.html @@ -31,8 +31,9 @@ {% block content %} {% call macros.outer_form(csrf_token(), form, manually_rendered=True) %} - {{ macros.inner_form(form, ['name', 'slug','description', 'parent', 'position', 'newtopic_default_text', 'force_version', 'count_posts']) }} + {{ macros.inner_form(form, ['name', 'slug','description', 'parent', 'position', + 'newtopic_default_text', 'force_version', 'user_count_posts', 'support_group']) }}

{% trans %}Welcome message{% endtrans %}

- {{ macros.inner_form(form, ['welcome_msg_subject', 'welcome_msg_text']) }} + {{ macros.inner_form(form, ['welcome_title', 'welcome_text']) }} {% endcall %} {% endblock %} From 2f78b59da1550a1b63a3747a896e1a596e0c3faa Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Tue, 9 Aug 2016 15:07:23 +0200 Subject: [PATCH 06/39] Removed explicit link for forum.js --- inyoka_theme_default/templates/forum/base.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/inyoka_theme_default/templates/forum/base.html b/inyoka_theme_default/templates/forum/base.html index 2d1f424..57ecb80 100644 --- a/inyoka_theme_default/templates/forum/base.html +++ b/inyoka_theme_default/templates/forum/base.html @@ -16,10 +16,6 @@ {{ _('Forum') }} - {{ super() }} {% endblock %} -{% block scripts %} - -{% endblock %} - {% block breadcrumb %} {{ macros.breadcrumb_item(_('Forum'), href('forum')) }} {% endblock %} From d06b96c9cda71d743addfb919bc5d5e8d5525aab Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Fri, 12 Aug 2016 14:16:10 +0200 Subject: [PATCH 07/39] forum/index, sidebar: filter & mark all as read --- .../templates/forum/index.html | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/inyoka_theme_default/templates/forum/index.html b/inyoka_theme_default/templates/forum/index.html index 36d3751..8232dc2 100644 --- a/inyoka_theme_default/templates/forum/index.html +++ b/inyoka_theme_default/templates/forum/index.html @@ -18,9 +18,30 @@ ] %} {% block sidebar %} - {% call macros.sidebar_admin() %} - {{ macros.sidebar_item(_('New Category'), href('forum', 'forum', 'new')) }} + {% call macros.sidebar() %} + {{ macros.sidebar_item(_('Mark all forums as read'), href('forum', 'markread')) }} {% endcall %} + + {% call macros.sidebar(_('Filter')) %} + {% if USER.is_authenticated() %} + {{ macros.sidebar_item(_('Involved topics'), href('forum', 'egosearch')) }} + {{ macros.sidebar_item(_('My posts'), href('forum', 'author', USER.username|e)) }} + {{ macros.sidebar_item(_('Created topics'), href('forum', 'topic_author', USER.username)|e) }} + {% endif %} + + {{ macros.sidebar_item(_('New posts'), href('forum', 'newposts')) }} + {{ macros.sidebar_item(_('Unanswered topics'), href('forum', 'unanswered')) }} + {{ macros.sidebar_item(_('Unsolved topics'), href('forum', 'unsolved')) }} + {{ macros.sidebar_item(_('24 hours'), href('forum', 'last24')) }} + {{ macros.sidebar_item(_('12 hours'), href('forum', 'last12')) }} + {{ macros.sidebar_item(_('6 hours'), href('forum', 'last6')) }} + {% endcall %} + + {% if USER.can('forum_edit') %} + {% call macros.sidebar_admin() %} + {{ macros.sidebar_item(_('New Category'), href('forum', 'forum', 'new')) }} + {% endcall %} + {% endif %} {% endblock %} {% block content %} From a46bfd6daf703946545f5137727f1581abc22b44 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Fri, 12 Aug 2016 14:16:30 +0200 Subject: [PATCH 08/39] forum/index: permission-check forum_edit --- inyoka_theme_default/templates/forum/index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/inyoka_theme_default/templates/forum/index.html b/inyoka_theme_default/templates/forum/index.html index 8232dc2..72aa0af 100644 --- a/inyoka_theme_default/templates/forum/index.html +++ b/inyoka_theme_default/templates/forum/index.html @@ -51,9 +51,12 @@

{{ category }} - - - + + {% if USER.can('forum_edit') %} + + + + {% endif %}

From dcf472275909491a9d7a724d9267c42a744ed02e Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Tue, 9 Aug 2016 15:15:36 +0200 Subject: [PATCH 09/39] forum/index.html: empty category --- inyoka_theme_default/templates/forum/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inyoka_theme_default/templates/forum/index.html b/inyoka_theme_default/templates/forum/index.html index 72aa0af..40edbe1 100644 --- a/inyoka_theme_default/templates/forum/index.html +++ b/inyoka_theme_default/templates/forum/index.html @@ -60,12 +60,15 @@

+ From fa64a8d2cf5bb48388087ba395542a9eb1a84be6 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Tue, 9 Aug 2016 15:36:46 +0200 Subject: [PATCH 10/39] Added welcome.html --- .../templates/forum/welcome.html | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 inyoka_theme_default/templates/forum/welcome.html diff --git a/inyoka_theme_default/templates/forum/welcome.html b/inyoka_theme_default/templates/forum/welcome.html new file mode 100644 index 0000000..5877455 --- /dev/null +++ b/inyoka_theme_default/templates/forum/welcome.html @@ -0,0 +1,20 @@ +{# + forum/welcome.html + ~~~~~~~~~~~~~~~~~~ + + Show the rules for the community area. + + :copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% extends 'forum/base.html' %} + +{% block content %} +

{{ forum.welcome_title|e }}

+ {{ forum.welcome_text_rendered }} + + {% call macros.outer_form(csrf_token(), action=forum|url('welcome'), button_visible=False) %} + + + {% endcall %} +{% endblock %} From e9edaa4fd8f0e3b5ad39fee572ebe57cd7118243 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Tue, 9 Aug 2016 15:44:25 +0200 Subject: [PATCH 11/39] Added delete_topic.html --- .../templates/forum/delete_topic.html | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 inyoka_theme_default/templates/forum/delete_topic.html diff --git a/inyoka_theme_default/templates/forum/delete_topic.html b/inyoka_theme_default/templates/forum/delete_topic.html new file mode 100644 index 0000000..c9019b7 --- /dev/null +++ b/inyoka_theme_default/templates/forum/delete_topic.html @@ -0,0 +1,35 @@ +{# + forum/delete_topic.html + ~~~~~~~~~~~~~~~~~~~~~~~ + + This template is flashed to ensure that the user wants to delete the + selected topic. + + :copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% import 'macros.html' as macros %} + +{% set submit_label = _('Delete') if action == 'delete' else _('Hide') %} + +{% call macros.outer_form(csrf_token(), action=topic|url(action)|e, submit_label=submit_label) %} +

+ {% if action == 'delete' %} + {% trans title=topic.title|e -%} + Do you really want to delete the topic “{{ title }}”? This action cannot be undone! + {% endtrans %} + {% else %} + {% trans title=topic.title|e -%} + Do you really want to hide the topic “{{ title }}”? + {% endtrans %} + {% endif %} +

+ {% if action == 'delete' %} +

+ + +

+ {% endif %} + + +{% endcall%} From c1174240c1628c3231897cad721c3e4ceb7a501c Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Tue, 9 Aug 2016 18:03:53 +0200 Subject: [PATCH 12/39] Added movetopic.html --- .../templates/forum/movetopic.html | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 inyoka_theme_default/templates/forum/movetopic.html diff --git a/inyoka_theme_default/templates/forum/movetopic.html b/inyoka_theme_default/templates/forum/movetopic.html new file mode 100644 index 0000000..1674042 --- /dev/null +++ b/inyoka_theme_default/templates/forum/movetopic.html @@ -0,0 +1,30 @@ +{# + forum/movetopic.html + ~~~~~~~~~~~~~~~~~~~~ + + This page gives the user the ability to move a topic into a new forum. + + :copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% extends 'forum/base.html' %} + +{% block title %} + {% trans %}Move{% endtrans %} – {{ topic.title }} – {{ super() }} +{% endblock %} + +{% block breadcrumb %} + {{ super() }} + + {% for parent in topic.forum.parents|reverse %} + {{ macros.breadcrumb_item(parent.name, parent|url) }} + {% endfor %} + {{ macros.breadcrumb_item(topic.forum.name, topic.forum|url) }} + {{ macros.breadcrumb_item(topic.title, topic|url) }} + {{ macros.breadcrumb_item(_('Move'), topic|url('move')) }} +{% endblock %} + +{% block content %} +

{% trans topic=topic.title|e %}Move “{{ topic }}”{% endtrans %}

+ {{ macros.outer_form(csrf_token(), form, submit_label=_('Move')) }} +{% endblock %} From a9e8fc49e6cd7f03af8a313a480652f2cb08ded3 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Thu, 11 Aug 2016 11:33:55 +0200 Subject: [PATCH 13/39] Added report.html --- .../templates/forum/report.html | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 inyoka_theme_default/templates/forum/report.html diff --git a/inyoka_theme_default/templates/forum/report.html b/inyoka_theme_default/templates/forum/report.html new file mode 100644 index 0000000..644efd3 --- /dev/null +++ b/inyoka_theme_default/templates/forum/report.html @@ -0,0 +1,35 @@ +{# + forum/report.html + ~~~~~~~~~~~~~~~~~ + + The user can report a topic to the moderators on this page. + It shows a text field where the user can describe the problem. + + :copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% extends 'forum/base.html' %} + +{% block title %} + {% trans %}Report{% endtrans %} – {{ super() }} +{% endblock %} + +{% block breadcrumb %} + {{ super() }} + + {{ macros.breadcrumb_item(_('Report'), topic|url('report')) }} + {{ macros.breadcrumb_item(topic.title, topic|url) }} + {{ macros.breadcrumb_item(topic.forum.name, topic.forum|url) }} +{% endblock %} + +{% block content %} +

{% trans topic=topic.title|e %}Report topic “{{ topic }}”{% endtrans %}

+

+ {% trans link=href('wiki', 'ubuntuusers/Moderatoren/Forenregeln') %} + Here you can report a topic to the moderators if it is against our + rules. + {% endtrans %} +

+ + {{ macros.outer_form(csrf_token(), form, submit_label=_('Report topic')) }} +{% endblock %} From 985213e3d07400eaad5f33d0c3eb1704dbf55103 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Thu, 11 Aug 2016 14:47:16 +0200 Subject: [PATCH 14/39] reportlist.html: use custom row-styling --- inyoka_theme_default/static/style/inyoka/forum.less | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/inyoka_theme_default/static/style/inyoka/forum.less b/inyoka_theme_default/static/style/inyoka/forum.less index 671b012..6d10572 100644 --- a/inyoka_theme_default/static/style/inyoka/forum.less +++ b/inyoka_theme_default/static/style/inyoka/forum.less @@ -105,8 +105,17 @@ .table-responsive(); > table { - .table(); - .table-striped(); + td { + padding: @table-cell-padding; + } + + tbody tr:nth-of-type(2n) { + border-bottom: 1px solid @table-border-color; + } + + thead { + border-bottom: 2px solid @table-border-color; + } } &-content { white-space: pre-wrap; From 3595db329bfa34dd73b4304da32ee2fd5663441b Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Thu, 11 Aug 2016 14:53:44 +0200 Subject: [PATCH 15/39] forum.html: Display all parents in breadcrumb --- inyoka_theme_default/templates/forum/forum.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/inyoka_theme_default/templates/forum/forum.html b/inyoka_theme_default/templates/forum/forum.html index 596ebf1..0040038 100644 --- a/inyoka_theme_default/templates/forum/forum.html +++ b/inyoka_theme_default/templates/forum/forum.html @@ -26,10 +26,11 @@ {% block breadcrumb %} {{ super() }} - {% if forum.parent.parent %} - {{ macros.breadcrumb_item(forum.parent, forum.parent|url) }} - {% endif %} - {{ macros.breadcrumb_item(forum) }} + {% for parent in forum.parents|reverse %} + {{ macros.breadcrumb_item(parent.name, parent|url) }} + {% endfor %} + + {{ macros.breadcrumb_item(forum, forum|url) }} {% endblock %} {% block sidebar %} From 4b787a1295cdff891943b006d4128290c81752cc Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Thu, 11 Aug 2016 14:55:00 +0200 Subject: [PATCH 16/39] forum.html: Permission-checks for actions in sidebar --- .../templates/forum/forum.html | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/inyoka_theme_default/templates/forum/forum.html b/inyoka_theme_default/templates/forum/forum.html index 0040038..d5e0da9 100644 --- a/inyoka_theme_default/templates/forum/forum.html +++ b/inyoka_theme_default/templates/forum/forum.html @@ -34,19 +34,27 @@ {% endblock %} {% block sidebar %} - {% call macros.sidebar() %} - {% if is_subscribed %} - {{ macros.sidebar_item(_('Unsubscribe'), forum|url('unsubscribe')) }} - {% else %} - {{ macros.sidebar_item(_('Subscribe'), forum|url('subscribe')) }} - {% endif %} - {{ macros.sidebar_item(_('New topic'), forum|url('newtopic')) }} - {{ macros.sidebar_item(_('Mark as read'), forum|url('markread')) }} - {% endcall %} + {% if USER.is_authenticated() %} + {% call macros.sidebar() %} + {% if is_subscribed %} + {{ macros.sidebar_item(_('Unsubscribe'), forum|url('unsubscribe')) }} + {% else %} + {{ macros.sidebar_item(_('Subscribe'), forum|url('subscribe')) }} + {% endif %} + + {% if can_create %} + {{ macros.sidebar_item(_('New topic'), forum|url('newtopic')) }} + {% endif %} + + {{ macros.sidebar_item(_('Mark as read'), forum|url('markread')) }} + {% endcall %} - {% call macros.sidebar_admin() %} - {{ macros.sidebar_item(_('Edit forum'), forum|url('edit')) }} - {% endcall %} + {% if USER.can('forum_edit') %} + {% call macros.sidebar_admin() %} + {{ macros.sidebar_item(_('Edit forum'), forum|url('edit')) }} + {% endcall %} + {% endif %} + {% endif %} {% endblock %} {% block content %} From 5902e4bc0b9f58c5fb31409354cfa100c50bb638 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Thu, 11 Aug 2016 14:56:10 +0200 Subject: [PATCH 17/39] forum.html: Info if forum has no posts --- inyoka_theme_default/templates/forum/forum.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inyoka_theme_default/templates/forum/forum.html b/inyoka_theme_default/templates/forum/forum.html index d5e0da9..dcc8255 100644 --- a/inyoka_theme_default/templates/forum/forum.html +++ b/inyoka_theme_default/templates/forum/forum.html @@ -125,6 +125,10 @@

+ {% else %} + {% trans link=forum|url('newtopic') %} + There are no topics. Create the first one now! + {% endtrans %} {% endfor %} From d5be76af784c9466dfb35b87f3efad6d11b1b9b0 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Thu, 11 Aug 2016 17:00:42 +0200 Subject: [PATCH 18/39] index.html: Semantic markup without inside --- inyoka_theme_default/templates/forum/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inyoka_theme_default/templates/forum/index.html b/inyoka_theme_default/templates/forum/index.html index 40edbe1..f72b69d 100644 --- a/inyoka_theme_default/templates/forum/index.html +++ b/inyoka_theme_default/templates/forum/index.html @@ -51,13 +51,13 @@

{{ category }} - - {% if USER.can('forum_edit') %} - - - - {% endif %} + + {% if USER.can('forum_edit') %} + + + + {% endif %}

From df35196e789e892ad7082adc05391e7639f414f9 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Fri, 12 Aug 2016 00:29:20 +0200 Subject: [PATCH 19/39] forum.html, index.html: semantic header-hierachie --- inyoka_theme_default/static/style/inyoka/forum.less | 9 ++++++--- inyoka_theme_default/templates/forum/forum.html | 10 +++++++--- inyoka_theme_default/templates/forum/index.html | 6 +++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/inyoka_theme_default/static/style/inyoka/forum.less b/inyoka_theme_default/static/style/inyoka/forum.less index 6d10572..4262b9b 100644 --- a/inyoka_theme_default/static/style/inyoka/forum.less +++ b/inyoka_theme_default/static/style/inyoka/forum.less @@ -17,7 +17,7 @@ &:extend(.panel-heading); &:extend(.panel-default > .panel-heading); - & > h3 { + & > h1 { &:extend(.panel-title all); font-size: @font-size-h3; @@ -31,8 +31,10 @@ &:extend(.list-group-item all); &:extend(.panel > .list-group .list-group-item all); - & > h4 { + & > h2 { &:extend(list-group-item-heading all); + + font-size: @font-size-h4; } & > p { &:extend(list-group-item-text all); @@ -51,8 +53,9 @@ &:extend(.panel-heading); &:extend(.panel-default > .panel-heading); - & > h3 { + & > h1 { &:extend(.panel-title); + font-size: @font-size-h3; } } & > ul { diff --git a/inyoka_theme_default/templates/forum/forum.html b/inyoka_theme_default/templates/forum/forum.html index dcc8255..f65870d 100644 --- a/inyoka_theme_default/templates/forum/forum.html +++ b/inyoka_theme_default/templates/forum/forum.html @@ -59,6 +59,7 @@ {% block content %} {{ rendered_pagination }} + {% if subforums %}
@@ -68,22 +69,25 @@

+
{% endif %} +
-

+

{% trans %}Topics{% endtrans %} -

+

+
    {% for topic in topics %}
  • -

    +

    {{ category }} @@ -58,13 +58,13 @@

    {% endif %} -

    +
      {% for forum, subforums in forums %} -

      {{ forum }}

      +

      {{ forum }}

      {{ forum.description }}

      {% else %} From 4d03f47001a2bf2028d211a6fe73359a8bf140db Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Fri, 12 Aug 2016 00:44:51 +0200 Subject: [PATCH 20/39] Missing closing nav for pagination --- inyoka_theme_default/templates/macros.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inyoka_theme_default/templates/macros.html b/inyoka_theme_default/templates/macros.html index 8bbc4e3..01e2a14 100644 --- a/inyoka_theme_default/templates/macros.html +++ b/inyoka_theme_default/templates/macros.html @@ -112,7 +112,7 @@

      {% trans %}Staff{% endtrans %}

      {% endif %} {% endif %}
    - {% endmacro %} From 924594e95e134604a9463b202acf8f147f50e6af Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Fri, 12 Aug 2016 00:46:39 +0200 Subject: [PATCH 21/39] forum.html: Removed duplicate last post-info --- .../static/style/inyoka/forum.less | 12 +++++ .../templates/forum/forum.html | 54 +++++++++---------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/inyoka_theme_default/static/style/inyoka/forum.less b/inyoka_theme_default/static/style/inyoka/forum.less index 4262b9b..2c708cc 100644 --- a/inyoka_theme_default/static/style/inyoka/forum.less +++ b/inyoka_theme_default/static/style/inyoka/forum.less @@ -62,6 +62,18 @@ &:extend(.list-group); &:extend(.panel > .list-group); } + &-created { + &:extend(.text-muted); + } + &-last-post { + &:extend(.text-muted); + .make-sm-column(4); + .make-xs-column(12); + } + &-link { + .make-sm-column(8); + .make-xs-column(12); + } &-item { &:extend(.list-group-item); &:extend(.panel > .list-group .list-group-item); diff --git a/inyoka_theme_default/templates/forum/forum.html b/inyoka_theme_default/templates/forum/forum.html index f65870d..6016bf7 100644 --- a/inyoka_theme_default/templates/forum/forum.html +++ b/inyoka_theme_default/templates/forum/forum.html @@ -90,42 +90,35 @@

    + {{ rendered_pagination }} {% endblock %} From 4c7f69ec7d993e7ba63d857330194d6cacaad47b Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Sat, 13 Aug 2016 14:36:16 +0200 Subject: [PATCH 22/39] Added topiclist Unified rendering with forum.html via new include --- .../static/style/inyoka/forum.less | 19 ++++++ .../templates/forum/forum.html | 45 +------------- .../templates/forum/topiclist-ul-body.html | 59 +++++++++++++++++++ .../templates/forum/topiclist.html | 39 ++++++++++++ 4 files changed, 119 insertions(+), 43 deletions(-) create mode 100644 inyoka_theme_default/templates/forum/topiclist-ul-body.html create mode 100644 inyoka_theme_default/templates/forum/topiclist.html diff --git a/inyoka_theme_default/static/style/inyoka/forum.less b/inyoka_theme_default/static/style/inyoka/forum.less index 2c708cc..43543a2 100644 --- a/inyoka_theme_default/static/style/inyoka/forum.less +++ b/inyoka_theme_default/static/style/inyoka/forum.less @@ -85,6 +85,25 @@ &:extend(.list-group-item:last-child); &:extend(.panel > .list-group:last-child .list-group-item:last-child); } + + &.with-forum { + .forum-topic-list { + &-last-post { + &:extend(.text-muted); + .make-sm-column(3); + .make-xs-column(12); + } + &-location { + &:extend(.text-muted); + .make-sm-column(3); + .make-xs-column(12); + } + &-link { + .make-sm-column(6); + .make-xs-column(12); + } + } + } } } diff --git a/inyoka_theme_default/templates/forum/forum.html b/inyoka_theme_default/templates/forum/forum.html index 6016bf7..941cd5c 100644 --- a/inyoka_theme_default/templates/forum/forum.html +++ b/inyoka_theme_default/templates/forum/forum.html @@ -20,9 +20,6 @@ {{ forum }} - {{ super() }} {% endblock title %} -{% import 'macros.html' as macros %} -{% set rendered_pagination = macros.render_pagination(pagination) %} - {% block breadcrumb %} {{ super() }} @@ -58,6 +55,7 @@ {% endblock %} {% block content %} + {% set rendered_pagination = macros.render_pagination(pagination) %} {{ rendered_pagination }} {% if subforums %} @@ -88,46 +86,7 @@

    - + {% include 'forum/topiclist-ul-body.html' %} {{ rendered_pagination }} diff --git a/inyoka_theme_default/templates/forum/topiclist-ul-body.html b/inyoka_theme_default/templates/forum/topiclist-ul-body.html new file mode 100644 index 0000000..973105e --- /dev/null +++ b/inyoka_theme_default/templates/forum/topiclist-ul-body.html @@ -0,0 +1,59 @@ + diff --git a/inyoka_theme_default/templates/forum/topiclist.html b/inyoka_theme_default/templates/forum/topiclist.html new file mode 100644 index 0000000..d49fc95 --- /dev/null +++ b/inyoka_theme_default/templates/forum/topiclist.html @@ -0,0 +1,39 @@ +{# + forum/topiclist.html + ~~~~~~~~~~~~~~~~~~~ + + Show a list of all recent posts. + + :copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details. + :license: BSD, see LICENSE for more details. +#} +{% extends 'forum/base.html' %} + +{% block title %} + {{ title }} – {{ super() }} +{% endblock %} + +{% block breadcrumb %} + {{ super() }} + + {{ macros.breadcrumb_item(title) }} + +{% endblock %} + +{% block content %} + {% set rendered_pagination = macros.render_pagination(pagination) %} + {{ rendered_pagination }} + +
    +
    +

    + {{ title }} +

    +
    + + {% set show_forum = True %} + {% include 'forum/topiclist-ul-body.html' %} +
    + + {{ rendered_pagination }} +{% endblock %} From 759f54a6a352421fa7248ebf10f6cdb2552451a4 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Sat, 13 Aug 2016 14:38:03 +0200 Subject: [PATCH 23/39] index.html: Use fa_icon-pencil-square-o instead of fa_icon-pencil --- inyoka_theme_default/templates/forum/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inyoka_theme_default/templates/forum/index.html b/inyoka_theme_default/templates/forum/index.html index 956ca81..2c8b2ed 100644 --- a/inyoka_theme_default/templates/forum/index.html +++ b/inyoka_theme_default/templates/forum/index.html @@ -55,7 +55,7 @@

    {% if USER.can('forum_edit') %} - + {% endif %}

    From 4fe11effba60e9836642ffc2a2e4a124a62136a0 Mon Sep 17 00:00:00 2001 From: Christoph Volkert Date: Sat, 13 Aug 2016 20:57:30 +0200 Subject: [PATCH 24/39] Added URLs to staff-dropdown --- inyoka_theme_default/templates/forum/topic.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inyoka_theme_default/templates/forum/topic.html b/inyoka_theme_default/templates/forum/topic.html index 194a8f2..8b51d84 100644 --- a/inyoka_theme_default/templates/forum/topic.html +++ b/inyoka_theme_default/templates/forum/topic.html @@ -64,12 +64,12 @@ {{ post.author }} - -
    +
    {{ post.get_text() }}
    +