From 15345aeb4792bffadd13caa69e97a60c9fc838cc Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 23 Jul 2018 18:17:52 -0700 Subject: [PATCH] udiskie: Show special message when no storage device available Reviewed-by: James Valleroy --- plinth/modules/udiskie/templates/udiskie.html | 74 ++++++++++--------- 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/plinth/modules/udiskie/templates/udiskie.html b/plinth/modules/udiskie/templates/udiskie.html index abccae023..d30ae9126 100644 --- a/plinth/modules/udiskie/templates/udiskie.html +++ b/plinth/modules/udiskie/templates/udiskie.html @@ -28,40 +28,48 @@

{% trans "Devices" %}

- - - - - - - - - - - - - {% for device in devices %} + {% if not devices %} +

+ {% blocktrans trimmed %} + There are no additional storage devices attached. + {% endblocktrans %} +

+ {% else %} +
{% trans "Device" %}{% trans "Label" %}{% trans "Size" %}{% trans "Filesystem" %}{% trans "Mount Point" %}{% trans "Actions" %}
+ - - - - - - + + + + + + - {% endfor %} - -
{{ device.device }}{{ device.label }}{{ device.size }}{{ device.filesystem_type }}{{ device.mount_points|join:', ' }} - {% if device.mount_points %} -
- {% csrf_token %} - - -
- {% endif %} -
{% trans "Device" %}{% trans "Label" %}{% trans "Size" %}{% trans "Filesystem" %}{% trans "Mount Point" %}{% trans "Actions" %}
+ + + {% for device in devices %} + + {{ device.device }} + {{ device.label }} + {{ device.size }} + {{ device.filesystem_type }} + {{ device.mount_points|join:', ' }} + + {% if device.mount_points %} +
+ {% csrf_token %} + + +
+ {% endif %} + + + {% endfor %} + + + {% endif %} {% endblock %}