Completely remove/cleanup deleted devices (bug 1083)
[mygpo.git] / mygpo / web / templates / devicelist.html
blob75bb69dc8359bad69b43198b528ccf368907f5f9
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load humanize %}
4 {% load devices %}
6 {% load menu %}
7 {% block mainmenu %}{{ "/devices/"|main_menu }}{% endblock %}
8 {% block sectionmenu %}{{ "/devices/"|section_menu }}{% endblock %}
10 {% block title %}{% trans "My Devices" %}{% endblock %}
12 {% block content %}
13 <h1>{% trans "My Devices" %}</h1>
15 <table class="list">
16 <tr>
17 <th>{% trans "Name" %}</th>
18 <th>{% trans "Type" %}</th>
19 <th>{% trans "Device ID" %}</th>
20 <th class="buttons">{% trans "Configure" %}</th>
21 </tr>
22 {% for d in devices %}
23 {% ifchanged d.sync_group %}
24 {% if d.sync_group %}
25 </table>
26 <h2>{% trans "Synchronized" %}</h2>
27 <table class="list">
28 <tr>
29 <th>{% trans "Name" %}</th>
30 <th>{% trans "Type" %}</th>
31 <th>{% trans "Device ID" %}</th>
32 <th class="buttons">{% trans "Configure" %}</th>
33 </tr>
34 {% endif %}
35 {% endifchanged %}
36 <tr>
37 <td><a href="/device/{{ d.id }}">{{ d|device_icon }}{{ d.name|striptags }}</a></td>
38 <td>{{ d|device_type }}</td>
39 <td>{{ d.uid|striptags }}</td>
40 <td class="buttons">
41 <a href="/device/{{ d.id }}/edit">
42 <img src="/media/preferences-system.png" />
43 </a>
44 </td>
45 </tr>
46 {% endfor %}
47 </table>
49 {% if deleted_devices %}
50 <h2>{% trans "Deleted Devices" %}</h2>
51 <table class="list">
52 <tr>
53 <th>{% trans "Name" %}</th>
54 <th>{% trans "Type" %}</th>
55 <th>{% trans "ID" %}</th>
56 <th>{% trans "Actions" %}</th>
57 </th>
58 {% for d in deleted_devices %}
59 <tr>
60 <td><a href="/device/{{ d.id }}">{{ d|device_icon }}{{ d.name|striptags }}</a></td>
61 <td>{{ d|device_type }}</td>
62 <td>{{ d.uid|striptags }}</td>
63 <td>
64 <div>
65 <a href="/device/{{ d.id }}/undelete">
66 <img src="/media/edit-undo.png" class="action-button" /> {% trans "Reactivate" %}
67 </a>
68 </div>
70 <div>
71 <a href="/device/{{ d.id }}/remove">
72 <img src="/media/unsubscribe.png" class="action-button" /> {% trans "Delete Permanently" %}
73 </a>
74 </div>
75 </td>
77 </tr>
78 {% endfor %}
79 </table>
82 {% endif %}
83 <div class="info"><strong>{% trans "How do I add a new device?" %}</strong> {% trans "Just upload your subscriptions with a new device using gPodder, and it will automatically show up in this list." %}</div>
84 {% endblock %}