Skip to content

Commit

Permalink
Restyle devices table and sort by last used
Browse files Browse the repository at this point in the history
  • Loading branch information
esoergel committed Jun 11, 2024
1 parent 3b5df5a commit 546fa58
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions corehq/apps/users/templates/users/edit_commcare_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ <h4>{% trans "[Support only] Assigned Locations" %}</h4>
{% endif %}
<div class="tab-pane" id="user-metadata">
<div class="panel-body">
<table class="table table-striped table-hover">
<table class="table">
<tbody>
<tr>
<td>{% trans "Created On" %}</td>
Expand Down Expand Up @@ -228,14 +228,22 @@ <h4>{% trans "[Support only] Assigned Locations" %}</h4>
</span>
</td>
<td>
<ul class="list-unstyled">
{% for device in couch_user.devices %}
<li>
{{ device.last_used|to_user_time:request }} -
<code>{{ device.device_id }}</code>
</li>
{% endfor %}
</ul>
<table class="table-condensed table-bordered">
<thead>
<tr>
<th>Device ID</th>
<th>Last Used</th>
</tr>
</thead>
<tbody>
{% for device in couch_user.devices|dictsortreversed:"last_used" %}
<tr>
<td style="font-family: monospace">{{ device.device_id }}</td>
<td>{{ device.last_used|to_user_time:request }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</td>
</tr>
</tbody>
Expand Down

0 comments on commit 546fa58

Please sign in to comment.