Merge pull request #793 from gpodder/remove-advertise
[mygpo.git] / mygpo / web / templates / device.html
bloba0fc219dd0384e8525b54eb86a00021d745a1354
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load humanize %}
4 {% load devices %}
5 {% load podcasts %}
7 {% load menu %}
8 {% block mainmenu %}{{ "/device/"|main_menu }}{% endblock %}
9 {% block sectionmenu %}{{ "/device/"|section_menu:device.name }}{% endblock %}
11 {% block title %}{% blocktrans with device.name|striptags as devicename %}Device {{ devicename }}{% endblocktrans %}{% endblock %}
13 {% block header %}
14 <h1>{{ device.name|striptags }}</h1>
15 {% endblock %}
17 {% block content %}
18 {% if device.deleted %}<div class="alert alert-info">{% trans "This device was deleted." %}</div>{% endif %}
19 <h2>{% trans "Subscriptions" %}</h2>
20 <table class="list">
21 {% if subscriptions %}
23 {% for podcast in subscriptions %}
24 <tr>
25 <td class="logo">{{ podcast|podcast_logo }}</td>
26 <td>{% podcast_group_link podcast %}</td>
27 <td>
28 <form class="form-inline" method="post" action="{% podcast_link_target podcast "unsubscribe" device.uid %}?return_to=/device/{{ device.uid }}" >
29 {% csrf_token %}
30 <button class="btn btn-danger btn-sm" type="submit">
31 <i class="icon-remove"></i> {% trans "Unsubscribe" %}
32 </button>
33 </form>
34 </td>
35 </tr>
36 {% endfor %}
37 {% else %}
38 <tr>
39 <td colspan="2">
40 {% trans "You don't have any podcasts subscribed on this device." %}
41 </td>
42 </tr>
43 {% endif %}
44 </table>
46 <div class="btn-group">
48 {% if subscriptions %}
50 <div class="btn-group">
51 <a href="{% url "device-opml" device.uid %}" type="button" class="btn btn-default">
52 <i class="icon-download"></i>
53 {% trans "Download OPML" %}
54 </a>
55 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
56 <span class="caret"></span>
57 <span class="sr-only">Toggle Dropdown</span>
58 </button>
59 <ul class="dropdown-menu" role="menu">
60 <li>
61 <a href="{% url "device-symbian-opml" device.uid %}">
62 <i class="icon-download"></i>
63 {% trans "OPML for Nokia Podcasting on Symbian " %}
64 </a>
65 </li>
66 </ul>
67 </div>
69 {% endif %}
71 <a class="btn btn-default" href="{% url "device-history" device.uid %}">
72 <i class="icon-calendar"></i>
73 {% trans "History" %}
74 </a>
76 {% if device.sync_group %}
77 <a href="{% url "trigger-sync" device.uid %}" class="btn btn-default">
78 <i class="icon-refresh"></i>
79 {% trans "Trigger Sync" %}
80 </a>
81 {% endif %}
83 {% if not device.deleted %}
85 <a class="btn btn-default" href="{% url "device-edit" device.uid %}">
86 <i class="icon-edit"></i>
87 {% trans "Configure" %}
88 </a>
89 {% endif %}
91 </div>
93 {% endblock %}
96 {% block sidebar %}
98 {% if not device.deleted %}
100 <div class="well">
102 <h4>{% trans "Synchronize" %}</h4>
103 <p>{% blocktrans %}If you synchronize devices, they will always have the same subscriptions. A podcast that is subscribed on one device, will automatically be added to all synchronized devices.{% endblocktrans %}</p>
105 {% if synced_with|length_is:"0" %}
107 <p>{% blocktrans with device.name|striptags as devicename %}{{ devicename }} is currently not synchronized with other devices.{% endblocktrans %}</p>
109 {% else %}
111 <p>{% blocktrans with device.name|striptags as devicename and synced_with|device_list as synclist %}{{ devicename }} is currently synchronized with {{ synclist }}.{% endblocktrans %}</p>
112 <a href="{% url "device-unsync" device.uid %}">{% blocktrans with device.name|striptags as devicename %}Stop synchronisation for {{ devicename }} {% endblocktrans %}</a>
114 {% endif %}
116 {% if has_sync_targets %}
117 <form action="{% url "device-sync" device.uid %}" method="POST">
118 {% csrf_token %}
119 {{ sync_form.as_p }}
120 <button class="btn btn-default" type="submit">{% trans "Synchronize" %}</button>
121 </form>
122 {% endif %}
124 </div>
125 {% endif %}
127 {% endblock %}