mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
ui: Make all tables responsive
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
1 parent
fef8da230f
commit
83dcafac55
28 files changed
+1085
-1026
No files matched your search
@@ -19,60 +19,62 @@
|
||||
|
||||
<p>{% trans "The following storage devices are in use:" %}</p>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Device" %}</th>
|
||||
<th>{% trans "Label" %}</th>
|
||||
<th>{% trans "Mount Point" %}</th>
|
||||
<th>{% trans "Type" %}</th>
|
||||
<th>{% trans "Used" %}</th>
|
||||
<th>{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for disk in disks %}
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ disk.device }}</td>
|
||||
<td>{{ disk.label|default_if_none:"" }}</td>
|
||||
<td>{{ disk.mount_points|join:"<br>" }}</td>
|
||||
<td>{{ disk.filesystem_type }}</td>
|
||||
<td>
|
||||
{% if 'percent_used' in disk %}
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped
|
||||
{% if disk.percent_used < 75 %}
|
||||
bg-success
|
||||
{% elif disk.percent_used < 90 %}
|
||||
bg-warning
|
||||
{% else %}
|
||||
bg-danger
|
||||
{% endif %}"
|
||||
role="progressbar" aria-valuenow="disk.percent_used"
|
||||
aria-valuemin="0" aria-valuemax="100"
|
||||
style="width: {{ disk.percent_used }}%;">
|
||||
{{ disk.percent_used }}%
|
||||
</div>
|
||||
</div>
|
||||
<div>{{ disk.used_str }} / {{ disk.size_str }}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if disk.is_removable %}
|
||||
<form class="form" method="post"
|
||||
action="{% url 'storage:eject' disk.device|urlencode:'' %}">
|
||||
{% csrf_token %}
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-sm btn-default fa fa-eject">
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</td>
|
||||
<th>{% trans "Device" %}</th>
|
||||
<th>{% trans "Label" %}</th>
|
||||
<th>{% trans "Mount Point" %}</th>
|
||||
<th>{% trans "Type" %}</th>
|
||||
<th>{% trans "Used" %}</th>
|
||||
<th>{% trans "Actions" %}</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for disk in disks %}
|
||||
<tr>
|
||||
<td>{{ disk.device }}</td>
|
||||
<td>{{ disk.label|default_if_none:"" }}</td>
|
||||
<td>{{ disk.mount_points|join:"<br>" }}</td>
|
||||
<td>{{ disk.filesystem_type }}</td>
|
||||
<td>
|
||||
{% if 'percent_used' in disk %}
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-striped
|
||||
{% if disk.percent_used < 75 %}
|
||||
bg-success
|
||||
{% elif disk.percent_used < 90 %}
|
||||
bg-warning
|
||||
{% else %}
|
||||
bg-danger
|
||||
{% endif %}"
|
||||
role="progressbar" aria-valuenow="disk.percent_used"
|
||||
aria-valuemin="0" aria-valuemax="100"
|
||||
style="width: {{ disk.percent_used }}%;">
|
||||
{{ disk.percent_used }}%
|
||||
</div>
|
||||
</div>
|
||||
<div>{{ disk.used_str }} / {{ disk.size_str }}</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if disk.is_removable %}
|
||||
<form class="form" method="post"
|
||||
action="{% url 'storage:eject' disk.device|urlencode:'' %}">
|
||||
{% csrf_token %}
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-sm btn-default fa fa-eject">
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if expandable_root_size %}
|
||||
<h3>{% trans "Partition Expansion" %}</h3>
|
||||
|
||||
Reference in new issue
Block a user