update device states in podcast states only when necessary
[mygpo.git] / mygpo / web / templates / devicelist.html
blob85911c085a91f1e50e278cb738a792a858b82a19
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 "Managed Devices" %}{% endblock %}
12 {% block header %}
13 <h1>{% trans "Managed Devices" %}</h1>
14 {% endblock %}
16 {% block content %}
18 {% if device_groups %}
19 <table class="list">
20 <tr>
21 <th>{% trans "Name" %}</th>
22 <th>{% trans "Type" %}</th>
23 <th>{% trans "Device ID" %}</th>
24 <th class="buttons">{% trans "Configure" %}</th>
25 </tr>
26 {% for group in device_groups %}
27 <tr>
28 {% if group.is_synced %}
29 <th colspan="4">{% trans "Synchronized" %}</th>
30 {% else %}
31 <th colspan="4">{% trans "Not Synchronized" %}</th>
32 {% endif %}
33 </tr>
35 {% for device in group.devices %}
36 <tr>
37 <td><a href="{% url "device" device.uid %}">{{ device|device_icon }}{{ device.name|striptags }}</a></td>
38 <td>{{ device|device_type }}</td>
39 <td>{{ device.uid|striptags }}</td>
40 <td>
41 <a class="btn btn-small" href="{% url "device-edit" device.uid %}">
42 <i class="icon-edit"></i>
43 {% trans "Configure" %}
44 </a>
45 </td>
46 </tr>
47 {% endfor %}
48 {% endfor %}
49 </table>
51 {% else %}
53 <p>
54 {% blocktrans %}You don't have any devices yet. Go to the <a href="http://wiki.gpodder.org/wiki/Web_Services/Clients">clients</a> page to learn how to set up your client applications.{% endblocktrans %}
55 </p>
57 {% endif %}
59 {% if deleted_devices %}
60 <h2>{% trans "Deleted Devices" %}</h2>
61 <table class="list">
62 {% for d in deleted_devices %}
63 <tr>
64 <td><a href="{% url "device" d.uid %}">{{ d|device_icon }}{{ d.name|striptags }}</a></td>
65 <td>{{ d|device_type }}</td>
66 <td>{{ d.uid|striptags }}</td>
67 <td>
68 <form method="post" action="{% url "device-undelete" d.uid %}">
69 {% csrf_token %}
70 <button class="btn btn-small" type="submit">
71 <i class="icon-repeat"></i> {% trans "Reactivate" %}
72 </button>
73 </form>
74 </td>
75 <td>
76 <form method="post" action="{% url "device-delete-permanently" d.uid %}">
77 {% csrf_token %}
78 <button class="btn btn-danger btn-small" type="submit">
79 <i class="icon-trash"></i> {% trans "Delete Permanently" %}
80 </button>
81 </form>
82 </td>
84 </tr>
85 {% endfor %}
86 </table>
87 {% endif %}
89 {% endblock %}
92 {% block sidebar %}
94 <div class="well">
96 <h4>{% trans "Adding New Devices" %}</h4>
97 <p>
98 {% trans "Just upload your subscriptions from a client, and it will automatically show up here." %}
99 </p>
102 {% trans "You can also manually create a new device." %}
103 </p>
105 <a class="btn btn-success" href="{% url "device-edit-new" %}">
106 <i class="icon-plus"></i> {% trans "Create Device" %}
107 </a>
109 </div>
111 {% endblock %}