Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.

Commit 7a6e7fc

Browse files
committed
WIP
1 parent 99b3113 commit 7a6e7fc

File tree

3 files changed

+203
-0
lines changed

3 files changed

+203
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{#
2+
forum/post_delete.html
3+
~~~~~~~~~~~~~~~~~~~~~~
4+
5+
This template is flashed to ensure that the user wants to delete the selected post.
6+
7+
:copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details.
8+
:license: BSD, see LICENSE for more details.
9+
#}
10+
11+
{% import macros.html as macros %}
12+
13+
{% call macros.outer_form(csrf_token(), action=post|url(action)|e) %}
14+
{% if action == 'delete' %}
15+
{% trans link=post|url('show')|e, author=post.author.username|e %}
16+
Do you want to delete the <a href="{{ link }}">post from {{ author }}</a>?
17+
{% endtrans %}
18+
{% else %}
19+
{% trans link=post|url('show')|e, author=post.author.username|e %}
20+
Do you want to hide the <a href="{{ link }}">post from {{ author }}</a>?
21+
{% endtrans %}
22+
{% endif %}
23+
{% endcall %}
24+
25+
26+
<input type="submit" value="{% if action=='delete' %}{% trans %}Delete{% endtrans %}{% else %}{% trans %}Hide{% endtrans %}{% endif %}" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{#
2+
forum/revisions.html
3+
~~~~~~~~~~~~~~~~~~~~
4+
5+
This page shows all old revisions of a post and gives the moderator the
6+
possibility to restore it.
7+
8+
:copyright: (c) 2013-2016 by the Inyoka Team, see AUTHORS for more details.
9+
:license: BSD, see LICENSE for more details.
10+
#}
11+
{% extends 'forum/base.html' %}
12+
13+
{% block title %}
14+
{{ post.topic.title }} – {% trans %}Old revisions{% endtrans %}
15+
– {{ super() }}
16+
{% endblock %}
17+
18+
{% block breadcrumb %}
19+
{{ super() }}
20+
21+
{{ macros.breadcrumb_item(post.topic.title, post.topic|url) }}
22+
{{ macros.breadcrumb_item(_('Old revisions'), post|url('revisions')) }}
23+
{% endblock %}
24+
25+
26+
{% block content %}
27+
{% for rev in revisions %}
28+
<div class="forum-post {% if rev.post.hidden %}forum-post-muted{% endif %}">
29+
<div class="forum-post-heading">
30+
<a href="{{ post|url }}">
31+
<time datetime="{{ rev.store_date|datetime('c') }}">
32+
{{ rev.store_date|datetime }}
33+
</time>
34+
35+
{% if loop.first %}
36+
{% trans %}(Current revision){% endtrans %}
37+
{% endif %}
38+
</a>
39+
</div>
40+
41+
<div class="forum-post-body">
42+
{{ rev.text_rendered }}
43+
</div>
44+
45+
<div class="forum-post-footer">
46+
<div class="button-group">
47+
<a href="{{ rev|url('restore') }}" class="btn btn-default">
48+
{% trans %}Restore{% endtrans %}
49+
</a>
50+
</div>
51+
</div>
52+
</div>
53+
{% endfor %}
54+
55+
{% endblock %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
{#
2+
forum/splittopic.html
3+
~~~~~~~~~~~~~~~~
4+
5+
This page shows the "splittopic" form.
6+
7+
:copyright: (c) 2007-2016 by the Inyoka Team, see AUTHORS for more details.
8+
:license: BSD, see LICENSE for more details.
9+
#}
10+
{%- extends 'forum/base.html' %}
11+
12+
{% do BREADCRUMB.append(_('Split topic'), topic|url('split'), True) %}
13+
{% do BREADCRUMB.append(topic.title, topic|url, True) %}
14+
{% do BREADCRUMB.append(topic.forum.name, topic.forum|url) %}
15+
16+
{% block forum_content %}
17+
<form action="" method="post" class="new_topic">
18+
{{ csrf_token() }}
19+
<h2>{% trans topic=topic.title|e %}Split topic “{{ topic }}”{% endtrans %}</h2>
20+
<p>
21+
{% trans %}The chosen posts can form a new topic or be attached to an existing topic.{% endtrans %}
22+
</p>
23+
<dl>
24+
<dt>
25+
<input type="radio" name="action" value="new" id="id_new"{% if form.data.action == 'new' %} checked="checked"{% endif %} />
26+
<label for="id_new">{% trans %}Create new topic{% endtrans %}</label>
27+
</dt>
28+
<dd>
29+
{% trans %}Forum of the new topic:{% endtrans %} {{ form.forum }}{{ form.errors.forum }}
30+
</dd>
31+
<dd>
32+
{% trans %}Title of the new topic:{% endtrans %} {{ form.title }}{{ form.errors.title }}
33+
</dd>
34+
<dd>
35+
Version des neuen Topics:
36+
{{ form.ubuntu_distro }}{{ form.errors.ubuntu_distro }}
37+
{{ form.ubuntu_version }}{{ form.errors.ubuntu_version }}
38+
</dd>
39+
<dt>
40+
<input type="radio" name="action" value="add" id="id_add"{% if form.data.action == 'add' %} checked="checked" {% endif %} />
41+
<label for="id_add">{% trans %}Attach to old topic{% endtrans %}</label>
42+
</dt>
43+
<dd>
44+
{% trans %}Slug of the topic:{% endtrans %} {{ form.topic }}{{ form.errors.topic }}
45+
</dd>
46+
</dl>
47+
48+
<h3>{% trans %}Preview{% endtrans %}</h3>
49+
<p>{% trans %}The following posts will be split off:{% endtrans %}</p>
50+
51+
<table class="topic admin_link_hover">
52+
<tbody>
53+
{%- for post in posts %}
54+
<tr id="post-{{ post.id }}"{% if post.hidden %} class="hidden"{% endif %}>
55+
<td class="author"{%- if post.author_id == USER.id %} style="background-color: #F6F4EF"{%- endif %}>
56+
<p class="username{% if not post.author.is_active %} inactive{% endif %}">
57+
<a href="{{ post.author|url }}">{{ post.author.username|e }}</a>
58+
{%- if post.author.primary_group and post.author.primary_group.icon %}
59+
<img class="teamicon" src="{{ post.author.primary_group.icon_url }}" alt="Teamicon" />
60+
{%- endif %}
61+
</p>
62+
{%- if post.author.member_title %}
63+
<div class="member_title">{{ post.author.member_title|e }}</div>
64+
{%- endif %}
65+
{%- if post.author == topic.author and not loop.first %}
66+
<div class="member_title">{% trans %}(Topic starter){% endtrans %}</div>
67+
{%- endif %}
68+
{%- if post.author.has_avatar and not USER.settings['hide_avatars'] %}
69+
{{ macros.add_user_avatar(post.author) }}
70+
{%- endif %}
71+
<p>{% trans %}Member since:{% endtrans %}<br />{{ post.author.date_joined|naturalday }}</p>
72+
<p>{% trans %}Posts:{% endtrans %} {{ post.author.post_count }}</p>
73+
</td>
74+
<td class="post"{%- if post.author_id == USER.id %} style="background-color: #F8F6F1"{% endif %}>
75+
<div class="postinfo">
76+
<div class="linklist">
77+
</div>
78+
<a href="{{ post|url }}" title="{% trans %}Link to this post{% endtrans %}">{#
79+
#}<img src="{{ href('static', 'img', 'icon_minipost.gif') }}" alt="{% trans %}Post{% endtrans %}" />{#
80+
#}</a>
81+
{{ post.pub_date|datetime }}
82+
</div>
83+
<div class="text">
84+
{{ post.get_text() }}
85+
</div>
86+
{%- set attachments = post.grouped_attachments %}
87+
{%- if attachments %}
88+
<hr />
89+
<dl class="attachments">
90+
{%- for group, list, class in attachments %}
91+
{%- if group %}
92+
<dt>{{ group }}</dt>
93+
<ul class="attr_list{% if class %} {{ class }}{% endif %}">
94+
{%- for att in list %}
95+
<li>{{ att.html_representation }}</li>
96+
{%- endfor %}
97+
</ul>
98+
{%- else %}
99+
{%- for att in list %}
100+
<dt>{{ att.name|e }} ({{ att.size|filesizeformat(true) }})</dt>
101+
{%- if att.comment %}
102+
<dd class="comment">{{ att.comment|e }}</dd>
103+
{%- endif %}
104+
<dd>{{ att.html_representation }}</dd>
105+
{%- endfor %}
106+
{%- endif %}
107+
{%- endfor %}
108+
</dl>
109+
{%- endif %}
110+
{%- if post.author.signature and not USER.settings['hide_signatures'] %}
111+
<div class="signature">
112+
{{ post.author.signature_rendered }}
113+
</div>
114+
{%- endif %}
115+
</td>
116+
</tr>
117+
{%- endfor %}
118+
</tbody>
119+
</table>
120+
<input type="submit" name="split" value="{% trans %}Split posts{% endtrans %}" />
121+
</form>
122+
{% endblock %}

0 commit comments

Comments
 (0)