Merge pull request #793 from gpodder/remove-advertise
[mygpo.git] / mygpo / web / templates / device-edit.html
blob594deadd647334bd18bde27d719efbc472b3fce7
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="panel panel-default">
27 <div class="panel-heading">
28 <h2 class="panel-title">{% trans "Edit" %}</h2>
29 </div>
30 <div class="panel-body">
31 <form class="form" action="{% url "device-update" device.uid %}" method="POST">
33 {{ device_form.non_field_errors }}
34 {% csrf_token %}
36 <div class="form-group">
37 <label class="control-label">Name</label>
38 {{ device_form.name }}
39 </div>
41 <div class="form-group">
42 <label class="control-label">Type</label>
43 {{ device_form.type }}
44 </div>
46 <div class="form-group">
47 <label class="control-label">Device-ID
48 </label>
49 {{ device_form.uid }}
50 <span class="help-block">use the same in your client</span>
51 </div>
53 <button class="btn btn-default" type="submit">{% trans "Save" %}</button>
54 </form>
55 </div>
56 </div>
59 <div class="panel panel-default">
60 <div class="panel-heading">
61 <h2 class="panel-title">{% trans "Replace Subscriptions" %}</h2>
62 </div>
63 <div class="panel-body">
64 <form class="form-inline" method="post" action="{% url "device-upload-opml" device.uid %}" enctype="multipart/form-data">
65 <p>{% trans "Replace your current subscriptions by uploading an OPML file." %}</p>
66 {% csrf_token %}
68 <input type="file" class="input-xlarge" name="opml" id="opml" />
70 <button class="btn" type="submit">{% trans "Upload" %}</button>
71 </form>
72 </div>
73 </div>
75 <div class="panel panel-danger">
76 <div class="panel-heading">
77 <h2 class="panel-title">{% trans "Delete" %}</h2>
78 </div>
79 <div class="panel-body">
80 <form action="{% url "device-delete" device.uid %}" method="POST">
81 {% csrf_token %}
82 <button class="btn btn-danger" type="submit">
83 <i class="icon-trash"></i> {% trans "Delete Device" %}
84 </button>
85 </form>
86 </div>
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 %}