Skip to content

Commit

Permalink
feat: highlight current row and open it directly
Browse files Browse the repository at this point in the history
  • Loading branch information
iosifnicolae2 authored Sep 25, 2024
1 parent 8c5b649 commit 823dce0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions templates/admin/change_list_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</a>
{% else %}
{% if "action-toggle" in header.text and forloop.counter == 1 %}
<label class="flex flex-row items-center gap-2 ml-3">
<label class="flex flex-row items-center gap-2">
{{ header.text|capfirst }}

</label>
Expand Down Expand Up @@ -71,13 +71,14 @@
</td>
</tr>
{% endif %}

<tr class="{% cycle '' 'bg-gray-50 dark:bg-white/[.02]' %} block border mb-3 rounded-md shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-gray-800">
<tr class="{% cycle '' 'bg-gray-50 dark:bg-white/[.02]' %} block border mb-3 rounded-md shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-gray-800 hover:bg-gray-100 cursor-pointer" @click="if(!$event.target.matches('input')) window.location.href = '{{ result.instance_pk }}/change'">
{% for item in result %}
{{ item }}
{% endfor %}
{% include 'unfold/helpers/actions_row.html' with actions=actions_row instance_pk=result.instance_pk %}
</tr>


{% endfor %}
</tbody>
</table>
Expand Down

0 comments on commit 823dce0

Please sign in to comment.