##// END OF EJS Templates
Added star for tag subscribe link. Show the link on the tag view.
neko259 -
r179:434bf3b1 default
parent child Browse files
Show More
@@ -292,3 +292,12 b' li {'
292 input[type="submit"]:hover {
292 input[type="submit"]:hover {
293 background: #555;
293 background: #555;
294 }
294 }
295
296
297 .fav {
298 color: yellow;
299 }
300
301 .not_fav {
302 color: #ccc;
303 } No newline at end of file
@@ -273,3 +273,11 b' li {'
273 padding: 0.5em;
273 padding: 0.5em;
274 display: table;
274 display: table;
275 }
275 }
276
277 .fav {
278 color: blue;
279 }
280
281 .not_fav {
282 color: #ccc;
283 } No newline at end of file
@@ -5,7 +5,7 b''
5
5
6 {% block head %}
6 {% block head %}
7 {% if tag %}
7 {% if tag %}
8 <title>Neboard - {{ tag }}</title>
8 <title>Neboard - {{ tag.name }}</title>
9 {% else %}
9 {% else %}
10 <title>Neboard</title>
10 <title>Neboard</title>
11 {% endif %}
11 {% endif %}
@@ -15,7 +15,15 b''
15
15
16 {% if tag %}
16 {% if tag %}
17 <div class="tag_info">
17 <div class="tag_info">
18 <h2>{% trans 'Tag: ' %}{{ tag }}</h2>
18 <h2>{% trans 'Tag: ' %}{{ tag.name }}
19 {% if tag in user.fav_tags.all %}
20 <a href="{% url 'tag_unsubscribe' tag.name %}?next={{ request.path }}"
21 class="fav"></a>
22 {% else %}
23 <a href="{% url 'tag_subscribe' tag.name %}?next={{ request.path }}"
24 class="not_fav"></a>
25 {% endif %}
26 </h2>
19 </div>
27 </div>
20 {% endif %}
28 {% endif %}
21
29
@@ -16,11 +16,11 b''
16 {{ tag.name }}</a>
16 {{ tag.name }}</a>
17 ({{ tag.get_post_count }} {% trans 'threads' %})
17 ({{ tag.get_post_count }} {% trans 'threads' %})
18 {% if tag in user.fav_tags.all %}
18 {% if tag in user.fav_tags.all %}
19 [<a href="{% url 'tag_unsubscribe' tag.name %}"
19 <a href="{% url 'tag_unsubscribe' tag.name %}?next={{ request.path }}"
20 >{% trans 'Remove' %}</a>]
20 class="fav"></a>
21 {% else %}
21 {% else %}
22 [<a href="{% url 'tag_subscribe' tag.name %}"
22 <a href="{% url 'tag_subscribe' tag.name %}?next={{ request.path }}"
23 >{% trans 'Add' %}</a>]
23 class="not_fav"></a>
24 {% endif %}
24 {% endif %}
25 <br />
25 <br />
26 {% endfor %}
26 {% endfor %}
@@ -120,7 +120,7 b' def tag(request, tag_name, page=0):'
120
120
121 context = _init_default_context(request)
121 context = _init_default_context(request)
122 context['threads'] = None if len(threads) == 0 else threads
122 context['threads'] = None if len(threads) == 0 else threads
123 context['tag'] = tag_name
123 context['tag'] = tag
124 context['pages'] = range(Post.objects.get_thread_page_count(tag=tag))
124 context['pages'] = range(Post.objects.get_thread_page_count(tag=tag))
125
125
126 context['form'] = form
126 context['form'] = form
@@ -273,7 +273,7 b' def tag_subscribe(request, tag_name):'
273 if not tag in user.fav_tags.all():
273 if not tag in user.fav_tags.all():
274 user.fav_tags.add(tag)
274 user.fav_tags.add(tag)
275
275
276 return redirect(all_tags)
276 return _redirect_to_next(request)
277
277
278
278
279 def tag_unsubscribe(request, tag_name):
279 def tag_unsubscribe(request, tag_name):
@@ -283,7 +283,7 b' def tag_unsubscribe(request, tag_name):'
283 if tag in user.fav_tags.all():
283 if tag in user.fav_tags.all():
284 user.fav_tags.remove(tag)
284 user.fav_tags.remove(tag)
285
285
286 return redirect(all_tags)
286 return _redirect_to_next(request)
287
287
288
288
289 def static_page(request, name):
289 def static_page(request, name):
General Comments 0
You need to be logged in to leave comments. Login now