mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
udiskie: Show special message when no storage device available
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
4ca97fc872
commit
15345aeb47
@ -28,40 +28,48 @@
|
|||||||
|
|
||||||
<h3>{% trans "Devices" %}</h3>
|
<h3>{% trans "Devices" %}</h3>
|
||||||
|
|
||||||
<table class="table table-bordered table-condensed table-striped">
|
{% if not devices %}
|
||||||
<thead>
|
<p>
|
||||||
<tr>
|
{% blocktrans trimmed %}
|
||||||
<th>{% trans "Device" %}</th>
|
There are no additional storage devices attached.
|
||||||
<th>{% trans "Label" %}</th>
|
{% endblocktrans %}
|
||||||
<th>{% trans "Size" %}</th>
|
</p>
|
||||||
<th>{% trans "Filesystem" %}</th>
|
{% else %}
|
||||||
<th>{% trans "Mount Point" %}</th>
|
<table class="table table-bordered table-condensed table-striped">
|
||||||
<th>{% trans "Actions" %}</th>
|
<thead>
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for device in devices %}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ device.device }}</td>
|
<th>{% trans "Device" %}</th>
|
||||||
<td>{{ device.label }}</td>
|
<th>{% trans "Label" %}</th>
|
||||||
<td>{{ device.size }}</td>
|
<th>{% trans "Size" %}</th>
|
||||||
<td>{{ device.filesystem_type }}</td>
|
<th>{% trans "Filesystem" %}</th>
|
||||||
<td>{{ device.mount_points|join:', ' }}</td>
|
<th>{% trans "Mount Point" %}</th>
|
||||||
<td>
|
<th>{% trans "Actions" %}</th>
|
||||||
{% if device.mount_points %}
|
|
||||||
<form class="form" method="post"
|
|
||||||
action="{% url 'udiskie:eject' device.device|urlencode:"" %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
|
|
||||||
<button type="submit"
|
|
||||||
class="btn btn-sm btn-default glyphicon glyphicon-eject">
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
{% for device in devices %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ device.device }}</td>
|
||||||
|
<td>{{ device.label }}</td>
|
||||||
|
<td>{{ device.size }}</td>
|
||||||
|
<td>{{ device.filesystem_type }}</td>
|
||||||
|
<td>{{ device.mount_points|join:', ' }}</td>
|
||||||
|
<td>
|
||||||
|
{% if device.mount_points %}
|
||||||
|
<form class="form" method="post"
|
||||||
|
action="{% url 'udiskie:eject' device.device|urlencode:"" %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
<button type="submit"
|
||||||
|
class="btn btn-sm btn-default glyphicon glyphicon-eject">
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user