2af82eba490b56edc3063db7fa41d6553ceaa040
[mygpo.git] / mygpo / web / templates / devicelist.html
blob2af82eba490b56edc3063db7fa41d6553ceaa040
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 <button class="btn btn-small" type="submit">
70 <i class="icon-repeat"></i> {% trans "Reactivate" %}
71 </button>
72 </form>
73 </td>
74 <td>
75 <form method="post" action="{% url "device-delete-permanently" d.uid %}">
76 {% csrf_token %}
77 <button class="btn btn-danger btn-small" type="submit">
78 <i class="icon-trash"></i> {% trans "Delete Permanently" %}
79 </button>
80 </form>
81 </td>
83 </tr>
84 {% endfor %}
85 </table>
86 {% endif %}
88 {% endblock %}
91 {% block sidebar %}
93 <div class="well">
95 <h4>{% trans "Adding New Devices" %}</h4>
96 <p>
97 {% trans "Just upload your subscriptions from a client, and it will automatically show up here." %}
98 </p>
101 {% trans "You can also manually create a new device." %}
102 </p>
104 <a class="btn btn-success" href="{% url "device-edit-new" %}">
105 <i class="icon-plus"></i> {% trans "Create Device" %}
106 </a>
108 </div>
110 {% endblock %}