##// END OF EJS Templates
Show tag admin link only to moderator
neko259 -
r924:f3218ffe default
parent child Browse files
Show More
@@ -1,200 +1,202 b''
1 1 {% extends "boards/base.html" %}
2 2
3 3 {% load i18n %}
4 4 {% load cache %}
5 5 {% load board %}
6 6 {% load static %}
7 7
8 8 {% block head %}
9 9 {% if tag %}
10 10 <title>{{ tag.name }} - {{ site_name }}</title>
11 11 {% else %}
12 12 <title>{{ site_name }}</title>
13 13 {% endif %}
14 14
15 15 {% if current_page.has_previous %}
16 16 <link rel="prev" href="
17 17 {% if tag %}
18 18 {% url "tag" tag_name=tag.name page=current_page.previous_page_number %}
19 19 {% elif archived %}
20 20 {% url "archive" page=current_page.previous_page_number %}
21 21 {% else %}
22 22 {% url "index" page=current_page.previous_page_number %}
23 23 {% endif %}
24 24 " />
25 25 {% endif %}
26 26 {% if current_page.has_next %}
27 27 <link rel="next" href="
28 28 {% if tag %}
29 29 {% url "tag" tag_name=tag.name page=current_page.next_page_number %}
30 30 {% elif archived %}
31 31 {% url "archive" page=current_page.next_page_number %}
32 32 {% else %}
33 33 {% url "index" page=current_page.next_page_number %}
34 34 {% endif %}
35 35 " />
36 36 {% endif %}
37 37
38 38 {% endblock %}
39 39
40 40 {% block content %}
41 41
42 42 {% get_current_language as LANGUAGE_CODE %}
43 43
44 44 {% if tag %}
45 45 <div class="tag_info">
46 46 <h2>
47 47 {% if tag in fav_tags %}
48 48 <a href="{% url 'tag' tag.name %}?method=unsubscribe&next={{ request.path }}"
49 49 class="fav" rel="nofollow">β˜…</a>
50 50 {% else %}
51 51 <a href="{% url 'tag' tag.name %}?method=subscribe&next={{ request.path }}"
52 52 class="not_fav" rel="nofollow">β˜…</a>
53 53 {% endif %}
54 54 {% if tag in hidden_tags %}
55 55 <a href="{% url 'tag' tag.name %}?method=unhide&next={{ request.path }}"
56 56 title="{% trans 'Show tag' %}"
57 57 class="fav" rel="nofollow">H</a>
58 58 {% else %}
59 59 <a href="{% url 'tag' tag.name %}?method=hide&next={{ request.path }}"
60 60 title="{% trans 'Hide tag' %}"
61 61 class="not_fav" rel="nofollow">H</a>
62 62 {% endif %}
63 63 {% autoescape off %}
64 64 {{ tag.get_view }}
65 65 {% endautoescape %}
66 [<a href="{% url 'admin:boards_tag_change' tag.id %}"$>{% trans 'Edit tag' %}</a>]
66 {% if moderator %}
67 [<a href="{% url 'admin:boards_tag_change' tag.id %}"$>{% trans 'Edit tag' %}</a>]
68 {% endif %}
67 69 </h2>
68 70 </div>
69 71 {% endif %}
70 72
71 73 {% if threads %}
72 74 {% if current_page.has_previous %}
73 75 <div class="page_link">
74 76 <a href="
75 77 {% if tag %}
76 78 {% url "tag" tag_name=tag.name page=current_page.previous_page_number %}
77 79 {% elif archived %}
78 80 {% url "archive" page=current_page.previous_page_number %}
79 81 {% else %}
80 82 {% url "index" page=current_page.previous_page_number %}
81 83 {% endif %}
82 84 ">{% trans "Previous page" %}</a>
83 85 </div>
84 86 {% endif %}
85 87
86 88 {% for thread in threads %}
87 89 {% cache 600 thread_short thread.id thread.last_edit_time moderator LANGUAGE_CODE %}
88 90 <div class="thread">
89 91 {% with can_bump=thread.can_bump %}
90 92 {% post_view thread.get_opening_post moderator is_opening=True thread=thread can_bump=can_bump truncated=True need_open_link=True %}
91 93 {% if not thread.archived %}
92 94 {% with last_replies=thread.get_last_replies %}
93 95 {% if last_replies %}
94 96 {% if thread.get_skipped_replies_count %}
95 97 <div class="skipped_replies">
96 98 <a href="{% url 'thread' thread.get_opening_post.id %}">
97 99 {% blocktrans with count=thread.get_skipped_replies_count %}Skipped {{ count }} replies. Open thread to see all replies.{% endblocktrans %}
98 100 </a>
99 101 </div>
100 102 {% endif %}
101 103 <div class="last-replies">
102 104 {% for post in last_replies %}
103 105 {% post_view post moderator=moderator is_opening=False thread=thread can_bump=can_bump truncated=True %}
104 106 {% endfor %}
105 107 </div>
106 108 {% endif %}
107 109 {% endwith %}
108 110 {% endif %}
109 111 {% endwith %}
110 112 </div>
111 113 {% endcache %}
112 114 {% endfor %}
113 115
114 116 {% if current_page.has_next %}
115 117 <div class="page_link">
116 118 <a href="
117 119 {% if tag %}
118 120 {% url "tag" tag_name=tag.name page=current_page.next_page_number %}
119 121 {% elif archived %}
120 122 {% url "archive" page=current_page.next_page_number %}
121 123 {% else %}
122 124 {% url "index" page=current_page.next_page_number %}
123 125 {% endif %}
124 126 ">{% trans "Next page" %}</a>
125 127 </div>
126 128 {% endif %}
127 129 {% else %}
128 130 <div class="post">
129 131 {% trans 'No threads exist. Create the first one!' %}</div>
130 132 {% endif %}
131 133
132 134 <div class="post-form-w">
133 135 <script src="{% static 'js/panel.js' %}"></script>
134 136 <div class="post-form">
135 137 <div class="form-title">{% trans "Create new thread" %}</div>
136 138 <div class="swappable-form-full">
137 139 <form enctype="multipart/form-data" method="post">{% csrf_token %}
138 140 {{ form.as_div }}
139 141 <div class="form-submit">
140 142 <input type="submit" value="{% trans "Post" %}"/>
141 143 </div>
142 144 </form>
143 145 </div>
144 146 <div>
145 147 {% trans 'Tags must be delimited by spaces. Text or image is required.' %}
146 148 </div>
147 149 <div><a href="{% url "staticpage" name="help" %}">
148 150 {% trans 'Text syntax' %}</a></div>
149 151 </div>
150 152 </div>
151 153
152 154 <script src="{% static 'js/form.js' %}"></script>
153 155
154 156 {% endblock %}
155 157
156 158 {% block metapanel %}
157 159
158 160 <span class="metapanel">
159 161 <b><a href="{% url "authors" %}">{{ site_name }}</a> {{ version }}</b>
160 162 {% trans "Pages:" %}
161 163 <a href="
162 164 {% if tag %}
163 165 {% url "tag" tag_name=tag.name page=paginator.page_range|first %}
164 166 {% elif archived %}
165 167 {% url "archive" page=paginator.page_range|first %}
166 168 {% else %}
167 169 {% url "index" page=paginator.page_range|first %}
168 170 {% endif %}
169 171 ">&lt;&lt;</a>
170 172 [
171 173 {% for page in paginator.center_range %}
172 174 <a
173 175 {% ifequal page current_page.number %}
174 176 class="current_page"
175 177 {% endifequal %}
176 178 href="
177 179 {% if tag %}
178 180 {% url "tag" tag_name=tag.name page=page %}
179 181 {% elif archived %}
180 182 {% url "archive" page=page %}
181 183 {% else %}
182 184 {% url "index" page=page %}
183 185 {% endif %}
184 186 ">{{ page }}</a>
185 187 {% if not forloop.last %},{% endif %}
186 188 {% endfor %}
187 189 ]
188 190 <a href="
189 191 {% if tag %}
190 192 {% url "tag" tag_name=tag.name page=paginator.page_range|last %}
191 193 {% elif archived %}
192 194 {% url "archive" page=paginator.page_range|last %}
193 195 {% else %}
194 196 {% url "index" page=paginator.page_range|last %}
195 197 {% endif %}
196 198 ">&gt;&gt;</a>
197 199 [<a href="rss/">RSS</a>]
198 200 </span>
199 201
200 202 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now