remove now unused {% load url from future %}
[mygpo.git] / mygpo / web / templates / device-edit.html
blobc4b2de07d89d8773a62d9d2ab98515cc4932c82c
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load humanize %}
4 {% load devices %}
5 {% load podcasts %}
7 {% load menu %}
8 {% block mainmenu %}{{ "/subscriptions/"|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>
16 <a href="{% url "device" device.uid %}">{% trans "Back to" %} {{ device|device_icon }} {{device|striptags}}</a>
17 {% endblock %}
20 {% block content %}
22 {% if device.deleted %}<div class="alert alert-info">{% trans "This device was deleted." %}</div>{% endif %}
24 {% if not device.deleted %}
26 <div class="well">
27 <h2>{% trans "Edit" %}</h2>
28 <form class="form-horizontal" action="{% url "device-update" device.uid %}" method="POST">
30 {{ device_form.non_field_errors }}
31 {% csrf_token %}
33 <fieldset>
35 <div class="control-group">
36 <label class="control-label">Name</label>
37 <div class="controls">
38 {{ device_form.name }}
39 </div>
40 </div>
42 <div class="control-group">
43 <label class="control-label">Type</label>
44 <div class="controls">
45 {{ device_form.type }}
46 </div>
47 </div>
49 <div class="control-group">
50 <label class="control-label">Device-ID
51 </label>
52 <div class="controls">
53 {{ device_form.uid }}
54 <p class="help-block">use the same in your client</p>
55 </div>
56 </div>
58 <div class="control-group">
59 <div class="controls">
60 <button class="btn" type="submit">{% trans "Save" %}</button>
61 </div>
62 </div>
63 </fieldset>
64 </form>
65 </div>
67 <div class="well">
68 <h2>{% trans "Replace Subscriptions" %}</h2>
69 <form class="form-inline" method="post" action="{% url "device-upload-opml" device.uid %}" enctype="multipart/form-data">
70 <p>{% trans "Replace your current subscriptions by uploading an OPML file." %}</p>
71 {% csrf_token %}
73 <input type="file" class="input-xlarge" name="opml" id="opml" />
75 <button class="btn" type="submit">{% trans "Upload" %}</button>
76 </form>
77 </div>
79 <div class="well">
80 <h2>{% trans "Delete" %}</h2>
81 <form action="{% url "device-delete" device.uid %}" method="POST">
82 {% csrf_token %}
83 <button class="btn btn-danger" type="submit">
84 <i class="icon-trash"></i> {% trans "Delete Device" %}
85 </button>
86 </form>
87 </div>
88 {% endif %}
90 {% endblock %}
93 {% block sidebar %}
95 {% if not device.deleted %}
97 <div class="well">
99 <h4>{% trans "Synchronize" %}</h4>
100 <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>
102 {% if synced_with|length_is:"0" %}
104 <p>{% blocktrans with device.name|striptags as devicename %}{{ devicename }} is currently not synchronized with other devices.{% endblocktrans %}</p>
106 {% else %}
108 <p>{% blocktrans with device.name|striptags as devicename and synced_with|device_list as synclist %}{{ devicename }} is currently synchronized with {{ synclist }}.{% endblocktrans %}</p>
109 <a href="{% url "device-unsync" device.uid %}">{% blocktrans with device.name|striptags as devicename %}Stop synchronisation for {{ devicename }} {% endblocktrans %}</a>
111 {% endif %}
113 {% if has_sync_targets %}
114 <form action="{% url "device-sync" device.uid %}" method="POST">
115 {% csrf_token %}
116 {{ sync_form.as_p }}
117 <button class="btn" type="submit">{% trans "Synchronize" %}</button>
118 </form>
119 {% endif %}
121 </div>
122 {% endif %}
124 {% endblock %}