diff --git a/inyoka_theme_default/static/style/inyoka/forum.less b/inyoka_theme_default/static/style/inyoka/forum.less index 1d200e2..a581f0f 100644 --- a/inyoka_theme_default/static/style/inyoka/forum.less +++ b/inyoka_theme_default/static/style/inyoka/forum.less @@ -17,11 +17,15 @@ &:extend(.panel-heading); &:extend(.panel-default > .panel-heading); - & > h3 { + & > h1 { &:extend(.panel-title all); font-size: @font-size-h3; } + + &-category { + padding-right: @font-size-h3; + } } & > ul { &:extend(.list-group all); @@ -31,13 +35,18 @@ &: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); } } + &-edit-category { + &:extend(.pull-right); + } } &-topic-list { @@ -48,14 +57,49 @@ &:extend(.panel-heading); &:extend(.panel-default > .panel-heading); - & > h3 { + & > h1 { &:extend(.panel-title); + font-size: @font-size-h3; } } & > ul { &: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); + } + + &-post { + .make-sm-column(4); + .make-xs-column(12); + } + &-topic { + .make-sm-column(4); + .make-xs-column(12); + + &-all-posts a { + &:extend(.text-muted); + } + } + &-forum { + .make-sm-column(4); + .make-xs-column(12); + + &-all-posts a { + &:extend(.text-muted); + } + } + &-item { &:extend(.list-group-item); &:extend(.panel > .list-group .list-group-item); @@ -67,6 +111,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); + } + } + } } } @@ -85,8 +148,18 @@ &:extend(.panel-heading); &:extend(.panel-default > .panel-heading); } - & > &-body { + &:target > &-heading { + background-color: @active-target-bg; + } + &-body { &:extend(.panel-body); + + &-signature { + border-top: 1px solid lighten(@post-signature, 30%); + color: @post-signature; + padding-top: 1em; + margin-top: 2em; + } } & > &-footer { &:extend(.panel-footer); @@ -97,4 +170,25 @@ &:extend(.bg-warning all); padding: 1em; } + + &-reportlist { + .table-responsive(); + + > table { + 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; + } + } } diff --git a/inyoka_theme_default/static/style/inyoka/variables.less b/inyoka_theme_default/static/style/inyoka/variables.less index 8fcb7d4..324f984 100644 --- a/inyoka_theme_default/static/style/inyoka/variables.less +++ b/inyoka_theme_default/static/style/inyoka/variables.less @@ -20,9 +20,8 @@ @diff-removed-line: #fcc; @diff-removed: #e99; @diff-ellipsis: @table-bg-accent; - +@post-signature: @gray-light; @team-member: #008A00; - //** Custom border-radius @border-radius-base: 0; diff --git a/inyoka_theme_default/templates/forum/base.html b/inyoka_theme_default/templates/forum/base.html index 4152264..8303eec 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 %} 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%} diff --git a/inyoka_theme_default/templates/forum/forum.html b/inyoka_theme_default/templates/forum/forum.html index 845852a..2024d14 100644 --- a/inyoka_theme_default/templates/forum/forum.html +++ b/inyoka_theme_default/templates/forum/forum.html @@ -20,32 +20,59 @@ {{ forum }} - {{ super() }} {% endblock title %} -{% import 'macros.html' as macros %} -{% set rendered_pagination = macros.render_pagination(pagination) %} - {% 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 %} - {% call macros.sidebar() %} - {% if is_subscribed %} - {{ macros.sidebar_item(_('Unsubscribe'), forum|url('unsubscribe')) }} - {% else %} - {{ macros.sidebar_item(_('Subscribe'), forum|url('subscribe')) }} + {% 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 %} + {% endif %} + + {% call macros.sidebar(_('Filter (just this forum)')) %} + {% if USER.is_authenticated() %} + {{ macros.sidebar_item(_('Involved topics'), href('forum', 'egosearch', forum.slug|e)) }} + {{ macros.sidebar_item(_('My posts'), href('forum', 'author', USER.username|e, 'forum', forum.slug|e)) }} + {{ macros.sidebar_item(_('Created topics'), href('forum', 'topic_author', USER.username)|e, forum.slug|e) }} {% endif %} - {{ macros.sidebar_item(_('New topic'), forum|url('newtopic')) }} - {{ macros.sidebar_item(_('Mark as read'), forum|url('markread')) }} + + {{ macros.sidebar_item(_('New posts'), href('forum', 'newposts', forum.slug|e)) }} + {{ macros.sidebar_item(_('Unanswered topics'), href('forum', 'unanswered', forum.slug|e)) }} + {{ macros.sidebar_item(_('Unsolved topics'), href('forum', 'unsolved', forum.slug|e)) }} + {{ macros.sidebar_item(_('24 hours'), href('forum', 'last24', forum.slug|e)) }} + {{ macros.sidebar_item(_('12 hours'), href('forum', 'last12', forum.slug|e)) }} + {{ macros.sidebar_item(_('6 hours'), href('forum', 'last6', forum.slug|e)) }} {% endcall %} + + {% if USER.has_perm('forum.change_forum') %} + {% call macros.sidebar_admin() %} + {{ macros.sidebar_item(_('Edit forum'), forum|url('edit')) }} + {% endcall %} + {% endif %} {% endblock %} {% block content %} + {% set rendered_pagination = macros.render_pagination(pagination) %} {{ rendered_pagination }} + {% if subforums %}{{ forum.description }}
{% endfor %}+ {% trans %}Topic: {% endtrans %}{{ post.topic.title|e }} +
++ {% trans author=username|e, + userlink=href('portal', 'user', username|e), + link=href('forum', 'author', username|e, 'topic', post.topic.slug) %} + Posts by {{ author }} in this topic + {% endtrans %} +
++ {% trans %}Forum: {% endtrans %}{{ post.topic.forum.name|e }} +
++ {% trans author=username|e, + userlink=href('portal', 'user', username|e), + link=href('forum', 'author', username|e, 'forum', post.topic.forum.slug) %} + Posts by {{ author }} in this forum + {% 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 %} 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) %} +| {% 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 %} + | |||
| + {% if poll.can_vote and can_vote and not show_vote_results %} + + + {% else %} + {{ option.name|e }} + {% endif %} + | + {% if not (poll.can_vote and can_vote) or show_vote_results %} +
+ |
+ {% set bc, ac = (option.percentage|string).split('.') %}
+ + {{ bc }}{% if ac|int %}.{{ ac[:2] }}{% endif %}% + | ++ [ {{ option.votes }} ] + | + {% endif %} +
+ {% if show_vote_results %} + {% trans %}Hide results{% endtrans %} + {% else %} + + {% trans %}Show results{% endtrans %} + {% endif %} +
+ {% endif %} +{% endcall %} 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..cc4eedc --- /dev/null +++ b/inyoka_theme_default/templates/forum/topiclist-ul-body.html @@ -0,0 +1,59 @@ +