add "My Tags" view at /tags/
[mygpo.git] / mygpo / web / templates / mytags.html
blobe12f1324a2b2d74234e682db0d072d76a43f6fb5
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load devices %}
4 {% load episodes %}
5 {% load podcasts %}
7 {% load menu %}
8 {% block mainmenu %}{{ "/subscriptions/"|main_menu }}{% endblock %}
9 {% block sectionmenu %}{{ "/tags/"|section_menu }}{% endblock %}
11 {% block title %}{% trans "My Tags" %}{% endblock %}
13 {% block content %}
15 {% if tags_podcast %}
17 <h1>{% trans "Tagged Podcasts" %}</h1>
18 <table class="list">
19 {% for podcast, taglist in tags_podcast.items %}
20 <tr>
21 <td>{{ podcast|podcast_logo }}</td>
22 <td><a href="/podcast/{{ podcast.id}}">{{ podcast.title|striptags}}</a></td>
23 <td class="tag-list">
24 {% for tag in taglist %}{% spaceless %}
25 {% if tag.is_own %}
26 <span class="own">{{ tag.tag }} <a class="remove" href="/podcast/{{ podcast.id }}/remove-tag?tag={{ tag.tag }}&next=mytags">X</a></span>
27 {% else %}
28 <span class="other">{{ tag.tag }}</span>
29 {% endif %}
30 {% if not forloop.last %}<span class="seperator">,</span>{% endif %}
31 {% endspaceless %}
32 {% endfor %}
33 {% if user.is_authenticated %}
34 <form action="/podcast/{{ podcast.id }}/add-tag">
35 <input type="text" name="tag" />
36 <input type="submit" value="Add" />
37 <input type="hidden" name="next" value="mytags" />
38 </form>
39 {% endif %}
40 </td>
41 </tr>
42 {% endfor %}
43 </table>
46 <h1>{% trans "All your Tags" %}</h1>
47 <table class="list">
48 {% for tag, podcast_list in tags_tag.items %}
49 <tr>
50 <td>{{ tag }}</td>
51 <td>
52 {% for podcast in podcast_list %}
53 <a href="/podcast/{{ podcast.podcast.id }}">{{ podcast.podcast|podcast_logo }}</a>
54 {% endfor %}
55 </td>
56 </tr>
57 {% endfor %}
59 </table>
62 {% else %}
64 <h1>{% trans "My Tags" %}</h1>
65 <div class="info">
66 {% blocktrans %}You didn't tag any photos yet. Go to your <a href="/subscriptions/">subscriptions</a> and tag some.{% endblocktrans %}
67 </div>
68 {% endif %}
70 {% endblock %}