consistant word use "Device ID" instead of "UID"
[mygpo.git] / mygpo / web / templates / device.html
blobd73f6274cb3a2d8a2d359518843551655c963cc8
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 content %}
14 <h1>{{ device.name|striptags }}</h1>
15 <hr/>
17 {% if device.deleted %}<div class="info">{% trans "This device was deleted." %}</div>{% endif %}
19 {% if not subscriptions|length_is:"0" %}
20 <table class="list">
21 <tr>
22 <th></th>
23 <th>{% trans "Podcast" %}</th>
24 <th>{% trans "Subscribed" %}</th>
25 <th>{% trans "Unsubscribe" %}</th>
26 </tr>
28 {% for subscription in subscriptions %}
29 <tr>
30 <td>{{ subscription.podcast|podcast_logo }}</td>
31 <td><a href="/podcast/{{subscription.podcast.id}}">{{ subscription.podcast|striptags }}</a></td>
32 <td><abbr title="{{subscription.subscribed_since}}">{{subscription.subscribed_since|naturalday}}</abbr></td>
33 <td style="text-align: center;"><a href="/podcast/{{subscription.podcast.id}}/unsubscribe/{{ device.id }}?return_to=/device/{{ device.id }}"><img src="/media/unsubscribe.png" /></a></td>
34 </tr>
35 {% endfor %}
36 </table>
37 {% else %}
38 <p>{% trans "You don't have any podcasts subscribed on this device. Go ahead and upload some." %}</p>
39 {% endif %}
41 <div>
42 <a href="/device/{{ device.id }}.opml">
43 <img src="/media/download.png" style="vertical-align: middle;" /> {% trans "Download Subscriptions as OPML" %}
44 </a>
45 </div>
47 <div>
48 <a href="/device/{{ device.id }}/history">
49 <img src="/media/office-calendar.png" style="vertical-align: middle;" />
50 {% blocktrans with device.name|striptags as devicename %} Show history for {{ devicename }} {% endblocktrans %}</a>
51 </a>
52 </div>
54 {% if not device.deleted %}
56 <h2>{% trans "Synchronize" %}</h2>
57 <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>
59 {% if synced_with|length_is:"0" %}
61 <p>{% blocktrans with device.name|striptags as devicename %}{{ devicename }} is currently not synchronized with other devices.{% endblocktrans %}</p>
63 {% else %}
65 <p>{% blocktrans with device.name|striptags as devicename and synced_with|device_list as synclist %}{{ devicename }} is currently synchronized with {{ synclist }}.{% endblocktrans %}</p>
66 <a href="/device/{{ device.id }}/unsync">{% blocktrans with device.name|striptags as devicename %}Stop synchronisation for {{ devicename }} {% endblocktrans %}</a>
68 {% endif %}
70 {% if has_sync_targets %}
71 <form action="/device/{{ device.id }}/sync" method="POST">
72 {% csrf_token %}
73 {{ sync_form.as_p }}
74 <input type="submit" value="{% trans "OK" %}" />
75 </form>
76 {% endif %}
78 <h2>{% trans "Edit" %}</h2>
79 {% if success %}
80 <div class="success">{% trans "Your settings have been saved." %}</div>
81 {% endif %}
83 <form action="" method="POST">
84 {% csrf_token %}
85 <table class="form">
86 {{ device_form.as_table }}
87 <tr>
88 <td></td>
89 <td>
90 <input type="submit" value="Save" />
91 </td>
92 </tr>
93 </table>
94 </form>
96 <h2>{% trans "Delete" %}</h2>
97 <form action="/device/{{ device.id }}/delete" method="POST">
98 {% csrf_token %}
99 <input type="submit" value="{% trans "Delete this device" %}" />
100 </form>
101 <br />
102 {% endif %}
103 <div class="info">The <strong>Device ID</strong> connects your physical device with this page, so you should enter the same text on your device and here.</div>
105 {% endblock %}