Skip to content
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
1 change: 1 addition & 0 deletions inyoka_theme_ubuntuusers/templates/forum/reportlist.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{% block forum_content %}
<form action="" method="post">
{{ csrf_token() }}

<table>
<colgroup>
<col width="1%"/>
Expand Down
32 changes: 32 additions & 0 deletions inyoka_theme_ubuntuusers/templates/forum/ticket.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{#
forum/ticket_post.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) 2007-2017 by the Inyoka Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
#}

{%- extends 'forum/page.html' %}
{% from 'macros.html' import render_form %}
{% set BREADCRUMBS = [(_('Ticket'), post|url('ticket')), (post.topic.forum.name, post.topic.forum|url),
(post.id, post|url)] + BREADCRUMBS|d([]) %}

{% block content %}
<form id="create_ticket" method="post" action="" class="new_topic">
{{ csrf_token() }}
<h2>{% trans post=post.id|e %}Report post “{{ post }}”{% endtrans %}</h2>
<p>
{%- trans link=href('wiki', 'ubuntuusers/Moderatoren/Forenregeln') -%}
Here you can report a post to the moderators if it is against our <a href="{{ link }}">rules</a>. Please add a short explanation:
{%- endtrans -%}
</p>
<dl>
{{ render_form(form, ['reason', 'reporter_comment'], inline=true) }}
</dl>
</p>
<p><input type="submit" value="{% trans %}Report post{% endtrans %}" /></p>
</form>
{% endblock %}
6 changes: 4 additions & 2 deletions inyoka_theme_ubuntuusers/templates/forum/topic.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
id="{{ topic.slug }}">{% trans %}Mark as solved{% endtrans %}</a>
{% endif %} |
{% endif %}
<a href="{{ topic|url('report') }}"
class="action action_report">{% trans %}Report{% endtrans %}</a>
{% endif %}
</span>
{%- if can_moderate %}
Expand Down Expand Up @@ -267,6 +265,10 @@ <h2>{{ topic.title|e }}</h2>
</span>
{% endif %}
{%- endif %}
{%- if not USER.is_authenticated() or can_reply and not topic.locked %}
<a href="{{ post|url('ticket') }}"
class="action action_report">{% trans %}Report{% endtrans %}</a> |
{%- endif %}
{%- if can_edit(post) %}
<a href="{{ post|url('edit') }}"
class="action action_edit">{% trans %}Edit{% endtrans %}</a> |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Der Benutzer {{ USER.username }} hat das den Beitrag {{ post.id }} ( {{ post|url }} ) des Themas „{{ post.topic.title }}“ im Forum „{{ post.topic.forum }}“ ( {{ topic|url }} ) mit dem Grund „{{ reason }}“ gemeldet.
{{ text|wordwrap(75, false)|indent(4) }}
Übersicht über alle gemeldeten Themen: {{ href('portal', 'tickets', 'list') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Hallo,

der Benutzer {{ USER.username }} hat das den Beitrag {{ post.id }} ( {{ post|url }} ) des Themas „{{ post.topic.title }}“ im Forum „{{ post.topic.forum }}“ ( {{ topic|url }} ) mit dem Grund „{{ reason }}“ gemeldet.

{{ text|wordwrap(75, false)|indent(4) }}

Übersicht über alle gemeldeten Themen: {{ href('portal', 'tickets', 'list') }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Der Benutzer {{ USER.username }} hat das Thema „{{ topic.title }}“ im Forum „{{ topic.forum }}“ ( {{ topic|url }} ) gemeldet.
Der Benutzer {{ USER.username }} hat das Thema „{{ topic.title }}“ im Forum „{{ topic.forum }}“ ( {{ topic|url }} ) mit dem Grund „{{ reason }}“ gemeldet.
{{ text|wordwrap(75, false)|indent(4) }}
Übersicht über alle gemeldeten Themen: {{ href('forum', 'reported_topics') }}
Übersicht über alle gemeldeten Themen: {{ href('portal', 'tickets', 'list') }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Hallo,

der Benutzer {{ USER.username }} hat das Thema „{{ topic.title }}“ im Forum „{{ topic.forum }}“ ( {{ topic|url }} ) gemeldet.
der Benutzer {{ USER.username }} hat das Thema „{{ topic.title }}“ im Forum „{{ topic.forum }}“ ( {{ topic|url }} ) mit dem Grund „{{ reason }}“ gemeldet.

{{ text|wordwrap(75, false)|indent(4) }}

Übersicht über alle gemeldeten Themen: {{ href('forum', 'reported_topics') }}
Übersicht über alle gemeldeten Themen: {{ href('portal', 'tickets', 'list') }}
6 changes: 3 additions & 3 deletions inyoka_theme_ubuntuusers/templates/overall.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ <h1><a href="/"><span>{{ SETTINGS.BASE_DOMAIN_NAME }}</span></a></h1>
{% endif %}
</ul>{# .navi_global #}
{% endif %}
{% if USER.has_perm('forum.manage_reported_topic') or USER.has_perm('ikhaya.change_article') or USER.has_perm('portal.change_event') %}
{% if USER.has_perm('forum.manage_tickets_forum') or USER.has_perm('ikhaya.change_article') or USER.has_perm('portal.change_event') %}
<div id="admin_menu">
<div class="bar">
{% if USER.has_perm('forum.manage_reported_topic') %}
{{ macros.render_modnavi_li(_('Reported topics'), href('forum', 'reported_topics'), href('static', 'img/admin/report.png'), report_count) }}
{% if USER.has_perm('forum.manage_tickets_forum') %}
{{ macros.render_modnavi_li(_('Tickets'), href('portal', 'tickets', 'list'), href('static', 'img/admin/report.png'), ticket_count) }}
{% endif %}
{% if USER.has_perm('ikhaya.change_article') %}
{% set label = _('Article suggestions') %}
Expand Down
121 changes: 121 additions & 0 deletions inyoka_theme_ubuntuusers/templates/portal/ticketlist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{#
forum/ticketlist.html
~~~~~~~~~~~~~~~~~~~~~

The moderators can see all reported topics on this page.

:copyright: (c) 2007-2017 by the Inyoka Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
#}

{%- extends 'portal/overall.html' %}
{% from 'macros.html' import render_form %}
{% set BREADCRUMBS = [(_('Tickets'), href('portal', 'tickets/list'))] + BREADCRUMBS|d([]) %}

{% block content %}
<form action="" method="post">
{{ csrf_token() }}

<table>
<colgroup>
<col width="1%"/>
<col width="30%"/>
<col width="70%"/>
</colgroup>
<thead>
<tr>
<th>{% trans %}#{% endtrans %}</th>
<th>{% trans %}Ticket Info{% endtrans %}</th>
<th>{% trans %}Comments{% endtrans %}</th>
</tr>
</thead>
<tbody>
{%- for element in elements %}
<tr>
<th rowspan="3">
{{ element.get_state_display() }}<br>
<input type="checkbox" name="selected" value="{{ element.id }}" />
</th>
<th>
{{ element.content_type }} {% trans %}reported due to{% endtrans %} {{ element.reason }}
</th>
<th class="topic">
<a href="{{ element.content_object|url }}">{{ element.content_object|e }}</a>
</th>
</tr>
<tr>
<td>
{% trans %}Reported by{% endtrans %} <a href="{{ element.reporting_user|url }}">{{ element.reporting_user.username }}</a><br>
{{ element.reporting_time|datetime }}
</td>
<td>
{{ element.reporter_comment_rendered }}
</td>
</tr>
<tr>
<td>
{% if element.owning_user %}
{% trans %}Owned by{% endtrans %} <a href="{{ element.owning_user|url }}">{{ element.owning_user.username }}</a>
{% if element.owning_user == USER %}
(<a href="../{{ element.id }}/disown">{% trans %}Release ownership{% endtrans %}</a>)
{% endif %}
<br>
{{ element.owned_time|datetime }}
{% else %}
<a href="../{{ element.id }}/own">{% trans %}Take ownership{% endtrans %}</a>
{% if element.owned_time %}
<br>
{% trans %}Previously already owned at {% endtrans %}{{ element.owned_time|datetime }}
{% endif %}
{% endif %}
</td>
<td>
{% if element.owning_user == USER %}
{% if owner_comment_form and edit_ticket_id==element.id %}
<owner_comment_form id="owner_comment" method="post" action="" class="new_topic">
{{ csrf_token() }}
{{ render_form(owner_comment_form, ['owner_comment'], inline=true) }}<br>
<input type="submit" value="{% trans %}Submit{% endtrans %}" />
</owner_comment_form>
{% else %}
{% if element.owner_comment %}
<a href="../{{ element.id }}/edit" class="action action_edit">{% trans %}Edit comment{% endtrans %}</a><br>
{{ element.owner_comment_rendered }}
{% else %}
<a href="../{{ element.id }}/edit" class="action action_edit">{% trans %}Add comment{% endtrans %}</a><br>
{% endif %}
{% endif %}
{% else %}
{{ element.owner_comment_rendered }}
{% endif %}
</td>
</tr>
{%- else %}
<tr>
<td colspan="5">
{% trans %}There are no open tickets at the moment.{% endtrans %}
</td>
</tr>
{%- endfor %}
</tbody>
</table>
<div class="linklist">
<input type="submit" value="{% trans %}Close selected tickets{% endtrans %}" /> |
{%- if subscribed %}
<a href="{{ href('forum', 'reported_topics', 'unsubscribe') }}">
{%- trans %}Unsubscribe from topic reports{% endtrans -%}
</a>
{%- else %}
<a href="{{ href('forum', 'reported_topics', 'subscribe') }}">
{%- trans %}Subscribe to topic reports{% endtrans -%}
</a>
{%- endif %}
{%- if USER.has_perm('portal.change_ticketreason') %}
|
<a href="{{ href('portal', 'ticketreason', 'list') }}">
{%- trans %}Manage ticket reasons{% endtrans -%}
</a>
{%- endif %}
</div>
</form>
{% endblock %}
26 changes: 26 additions & 0 deletions inyoka_theme_ubuntuusers/templates/portal/ticketreason_edit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{#
portal/user_edit_status.html
~~~~~~~~~~~~~~~~~~~~

Change the details of a ticket reason.

:copyright: (c) 2007-2017 by the Inyoka Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
#}
{% extends 'portal/overall.html' %}
{% from 'macros.html' import render_form %}

{% set BREADCRUMBS = [(_('Ticket Reason'), href('portal', 'ticketreason'))] + BREADCRUMBS|d([]) %}

{% block content %}
{{ super() }}
<form id="ticketreason_edit_form" method="post" action="">
{{ csrf_token() }}
{{ form.errors.__all__ }}
<dl>
{{ render_form(form, ['content_type', 'reason'], inline=true) }}
</dl>
</p>
<p><input type="submit" value="{% trans %}Submit{% endtrans %}" /></p>
</form>
{% endblock %}
80 changes: 80 additions & 0 deletions inyoka_theme_ubuntuusers/templates/portal/ticketreason_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{#
portal/ticket_config.html
~~~~~~~~~~~~~~~~~~~~~~

This page shows the configured ticket reaseons per component (forum, wiki etc.).

:copyright: (c) 2007-2017 by the Inyoka Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
#}

{%- extends 'portal/overall.html' %}

{% set BREADCRUMBS = [(_('Ticket Reasons'), href('portal', 'ticketreason', 'list'))] + BREADCRUMBS|d([]) %}

{% block content %}
<h3>{% trans %}Ticket Reasons{% endtrans %}</h3>

<table class="admin_link_hover">
<tr>
<th>{% trans %}ID{% endtrans %}</th>
<th>{% trans %}Component{% endtrans %}</th>
<th>{% trans %}Reason{% endtrans %}</th>
<th></th>
<th></th>
</tr>
{%- for reason in reasons %}
<tr>
<td>{{ reason.id }}</td>
<td>{{ reason.content_type }}</td>
<td>{{ reason.reason }}
{%- if USER.has_perm('portal.change_ticketreason') and not reason.system_defined -%}
<a href="{{ href('portal', 'ticketreason', reason.id, 'edit') }}" class="admin_link"><img src="{{ href('static', 'img/ikhaya/category_edit.png') }}" /></a>
{%- endif -%}
</td>
<td>
{%- if USER.has_perm('portal.change_ticketreason') and not reason.system_defined -%}
<a href="{{ href('portal', 'ticketreason', reason.id, 'delete') }}" class="admin_link"><img src="{{ href('static', 'img/forum/delete.png') }}" /></a>
{%- endif -%}
</td>
<td>
{%- if USER.has_perm('forum.manage_tickets_forum') -%}
{%- if reason.subscribed %}
<a href="{{ href('portal', 'ticketreason', reason.id, 'unsubscribe') }}">
{%- trans %}Unsubscribe from these tickets{% endtrans -%}
</a>
{%- else %}
<a href="{{ href('portal', 'ticketreason', reason.id, 'subscribe') }}">
{%- trans %}Subscribe to these tickets{% endtrans -%}
</a>
{%- endif %}
{%- endif -%}
</td>
</tr>
{% else %}
<tr>
<td colspan="3">{% trans %}No reasons were found.{% endtrans %}</td>
</tr>
{%- endfor %}
</table>

<div class="linklist">

{%- if USER.has_perm('portal.change_ticketreason') -%}
<a href="{{ href('portal', 'ticketreason', 'new') }}">{% trans %}Create new ticket reason{% endtrans %}</a>.
{%- endif -%} |
{%- if all_subscribed or some_subscribed %}
<a href="{{ href('portal', 'ticketreason', 'all', 'unsubscribe') }}">
{%- trans %}Unsubscribe from all ticket reasons{% endtrans -%}
</a>
{%- endif %}
{%- if some_subscribed and not all_subscribed %}
|
{%- endif %}
{%- if some_subscribed or not all_subscribed %}
<a href="{{ href('portal', 'ticketreason', 'all', 'subscribe') }}">
{%- trans %}Subscribe to all ticket reasons{% endtrans -%}
</a>
{%- endif %}
</div>
{% endblock %}
Loading