|
2 | 2 |
|
3 | 3 | {{ define "page" }} |
4 | 4 | <div class="w-full bg-base-200 border-b border-base-300"> |
5 | | - <div class="max-w-5xl mx-auto px-4 h-24 flex items-center justify-between"> |
| 5 | + <div class="max-w-5xl md:mx-auto px-4 py-3 md:h-24 flex flex-row items-center justify-between gap-2"> |
6 | 6 | <div> |
7 | 7 | <h3>All Items</h3> |
8 | 8 | <div class="text-sm text-base-content/50 font-mono"> |
|
11 | 11 | <span>{{ len .Data.Categories }} categories</span> |
12 | 12 | </div> |
13 | 13 | </div> |
14 | | - <div class="flex gap-2"> |
| 14 | + <div class="flex gap-2 shrink-0"> |
15 | 15 | <div class="dropdown dropdown-end"> |
16 | | - <div tabindex="0" role="button" class="btn btn-ghost">More ▾</div> |
| 16 | + <div tabindex="0" role="button" class="btn btn-ghost"> |
| 17 | + <span class="md:hidden w-4 h-4">{{ template "dot-menu-icon" . }}</span> |
| 18 | + <span class="hidden md:inline">More ▾</span> |
| 19 | + </div> |
17 | 20 | <ul tabindex="0" class="dropdown-content menu bg-base-100 rounded-box z-1 w-48 p-2 shadow border border-base-300"> |
18 | 21 | <li> |
19 | 22 | <a href="{{ .Data.PrintURL }}" target="_blank"> |
|
35 | 38 | </li> |
36 | 39 | </ul> |
37 | 40 | </div> |
38 | | - <a class="btn btn-primary" href="/orgs/{{ .Data.OrgID }}/equipment/new">+ Add Item</a> |
| 41 | + <a class="btn btn-primary" href="/orgs/{{ .Data.OrgID }}/equipment/new"> |
| 42 | + <span class="md:hidden">+</span> |
| 43 | + <span class="hidden md:inline">+ Add Item</span> |
| 44 | + </a> |
39 | 45 | </div> |
40 | 46 | </div> |
41 | 47 | </div> |
42 | 48 | <div class="w-full bg-base-100 border-b border-base-200"> |
43 | | - <div class="max-w-5xl mx-auto px-4 h-14 flex gap-1 items-center overflow-x-auto scrollbar-none"> |
44 | | - <form method="get" action="/orgs/{{ .Data.OrgID }}/equipment" id="filter-form" data-auto-submit class="flex items-center gap-1 flex-nowrap"> |
45 | | - <label class="input input-sm w-xs shrink-0"> |
| 49 | + <div class="max-w-5xl mx-auto px-4 py-2 md:h-14 flex items-center"> |
| 50 | + <form method="get" action="/orgs/{{ .Data.OrgID }}/equipment" id="filter-form" data-auto-submit class="flex items-center gap-1 flex-wrap md:flex-nowrap w-full"> |
| 51 | + <label class="input w-full md:w-xs md:flex-none"> |
46 | 52 | <span class="flex text-secondary opacity-50 [&>svg]:w-4 [&>svg]:h-4">{{ template "search-icon" . }}</span> |
47 | 53 | <input type="search" name="q" placeholder="Search" {{ if $.Data.Query }}value="{{ $.Data.Query }}"{{ end }} /> |
48 | 54 | </label> |
49 | | - <select name="category" class="select select-sm"> |
| 55 | + <select name="category" class="select w-full md:w-auto"> |
50 | 56 | <option value="">All categories</option> |
51 | 57 | {{ range .Data.Categories }} |
52 | 58 | <option value="{{ .Name }}" {{ if eq $.Data.Category .Name }}selected{{ end }}>{{ .Name }}</option> |
|
63 | 69 | <tr> |
64 | 70 | <th></th> |
65 | 71 | <th>NAME</th> |
66 | | - <th class="text-right">CATEGORY</th> |
67 | 72 | <th class="text-right">STOCK</th> |
68 | 73 | </tr> |
69 | 74 | </thead> |
70 | 75 | <tbody> |
71 | 76 | {{ range .Data.Inventories }} |
72 | 77 | <tr> |
73 | 78 | <td class="w-16 items-center"> |
74 | | - <div class="w-12 h-12 rounded-md border-2 border-base-200 overflow-hidden flex items-center justify-center"> |
| 79 | + <div class="w-16 h-16 bg-base-200 rounded-lg border-dashed border-2 border-base-300 overflow-hidden flex items-center justify-center"> |
75 | 80 | {{ if .ImageURL }} |
76 | 81 | <button type="button" class="cursor-pointer w-full h-full" data-modal-target="photo-viewer-dialog" data-photo-src="{{ .ImageURL }}"> |
77 | 82 | <img src="{{ .ImageURL }}" alt="{{ .Name }}" class="w-full h-full object-contain" /> |
|
88 | 93 | <div class="flex items-center gap-1.5"> |
89 | 94 | <span class="text-xs text-secondary">{{ .Type.Label }}</span> |
90 | 95 | {{ if eq .Kind 2 }}<span class="text-xs text-secondary">• Combination</span>{{ end }} |
| 96 | + <span class="text-xs text-secondary">• <a href="/orgs/{{ $.Data.OrgID }}/settings/equipment-categories/{{ .CategoryID }}" class="link link-hover">{{ .CategoryName }}</a></span> |
91 | 97 | </div> |
92 | 98 | </td> |
93 | | - <td> |
94 | | - <span class="inline-flex items-center gap-1.5"> |
95 | | - <a href="/orgs/{{ $.Data.OrgID }}/settings/equipment-categories/{{ .CategoryID }}" class="link link-hover">{{ .CategoryName }}</a> |
96 | | - </span> |
97 | | - </td> |
98 | 99 | <td class="w-4 text-right"> |
99 | 100 | {{ if eq .Type.Label "Serialized" }} |
100 | 101 | <a href="/orgs/{{ $.Data.OrgID }}/equipment/{{ .ID }}/units" class="link link-hover">{{ .TotalStock }}</a> |
|
0 commit comments