|
9 | 9 |
|
10 | 10 | <div>
|
11 | 11 |
|
12 |
| - {% if list_actions %} |
13 |
| - <form method="POST" data-actions-form> |
14 |
| - {{ csrf_input }} |
15 |
| - <select name="action_key"> |
16 |
| - <option value="">Actions</option> |
17 |
| - {% for action in list_actions %} |
18 |
| - <option>{{ action }}</option> |
19 |
| - {% endfor %} |
20 |
| - </select> |
21 |
| - <input type="hidden" name="action_pks" value="" /> |
22 |
| - <button type="submit" disabled>Apply</button> |
23 |
| - </form> |
24 |
| - {% endif %} |
| 12 | + <div class="flex items-center justify-between pb-2 border-b border-stone-200"> |
| 13 | + <div class="font-semibold"> |
| 14 | + {{ title }} |
| 15 | + </div> |
| 16 | + <div> |
| 17 | + {% if list_actions %} |
| 18 | + <form method="POST" data-actions-form> |
| 19 | + {{ csrf_input }} |
| 20 | + <select name="action_key"> |
| 21 | + <option value="">Actions</option> |
| 22 | + {% for action in list_actions %} |
| 23 | + <option>{{ action }}</option> |
| 24 | + {% endfor %} |
| 25 | + </select> |
| 26 | + <input type="hidden" name="action_pks" value="" /> |
| 27 | + <button type="submit" disabled>Apply</button> |
| 28 | + </form> |
| 29 | + {% endif %} |
25 | 30 |
|
26 |
| - {% if show_search %} |
27 |
| - <div class="flex justify-end"> |
28 |
| - <form method="GET" class="flex"> |
29 |
| - <div class="relative max-w-xs"> |
30 |
| - <label for="search" class="sr-only">Search</label> |
31 |
| - <input |
32 |
| - {% if search_query %}value="{{ search_query }}"{% endif %} |
33 |
| - type="text" |
34 |
| - name="search" |
35 |
| - id="search" |
36 |
| - class="block w-full p-3 pl-10 text-sm border-gray-200 rounded-md focus:border-blue-500 focus:ring-blue-500" |
37 |
| - placeholder="Search for items" |
38 |
| - > |
39 |
| - <div class="absolute inset-y-0 left-0 flex items-center pl-4 pointer-events-none"> |
40 |
| - <svg class="h-3.5 w-3.5 text-gray-400" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
41 |
| - <path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"></path> |
42 |
| - </svg> |
43 |
| - </div> |
| 31 | + {% if show_search %} |
| 32 | + <div class="flex justify-end"> |
| 33 | + <form method="GET" class="flex"> |
| 34 | + <div class="relative max-w-xs"> |
| 35 | + <label for="search" class="sr-only">Search</label> |
| 36 | + <input |
| 37 | + {% if search_query %}value="{{ search_query }}"{% endif %} |
| 38 | + type="text" |
| 39 | + name="search" |
| 40 | + id="search" |
| 41 | + class="block w-full px-3 pl-10 text-sm border-gray-200 rounded-md focus:border-blue-500 focus:ring-blue-500" |
| 42 | + placeholder="Search for items" |
| 43 | + > |
| 44 | + <div class="absolute inset-y-0 left-0 flex items-center pl-4 pointer-events-none"> |
| 45 | + <svg class="h-3.5 w-3.5 text-gray-400" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
| 46 | + <path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"></path> |
| 47 | + </svg> |
| 48 | + </div> |
| 49 | + </div> |
| 50 | + <!-- <button type="submit">Search</button> --> |
| 51 | + </form> |
44 | 52 | </div>
|
45 |
| - <button type="submit">Search</button> |
46 |
| - </form> |
| 53 | + {% endif %} |
| 54 | + </div> |
47 | 55 | </div>
|
48 |
| - {% endif %} |
49 | 56 |
|
50 | 57 | <div class="overflow-auto">
|
51 |
| - <table class="w-full mt-4 text-sm table-auto"> |
| 58 | + <table class="w-full mt-6 text-sm table-auto"> |
52 | 59 | <thead>
|
53 |
| - <tr> |
| 60 | + <tr class="bg-stone-100 [&>th]:py-2 [&>:first-child]:rounded-l-md [&>:last-child]:rounded-r-md"> |
54 | 61 | {% if list_actions %}<th></th>{% endif %}
|
55 | 62 |
|
56 | 63 | {% for field in list_fields %}
|
57 | 64 | {% if order_by_field is defined %}
|
58 |
| - <th class="font-mono"> |
59 |
| - <a href="?order_by={{ '-' if not order_by_direction else '' }}{{ field }}"> |
| 65 | + <th> |
| 66 | + <a class="font-mono text-xs font-normal text-gray-600" href="?order_by={{ '-' if not order_by_direction else '' }}{{ field }}"> |
60 | 67 | {{ field }}
|
61 | 68 | {% if field == order_by_field %}
|
62 | 69 | {% if order_by_direction == "-" %}
|
|
68 | 75 | </a>
|
69 | 76 | </th>
|
70 | 77 | {% else %}
|
71 |
| - <th class="font-mono">{{ field }}</th> |
| 78 | + <th class="font-mono text-xs font-normal text-gray-600">{{ field }}</th> |
72 | 79 | {% endif %}
|
73 | 80 | {% endfor %}
|
74 | 81 | <th></th>
|
|
0 commit comments