working with UI library now
This commit is contained in:
@@ -51,22 +51,28 @@
|
||||
<tr>
|
||||
<td class="border border-base-300 bg-base-200 p-2 text-center font-medium opacity-70">{{ row.hour_label }}</td>
|
||||
{% for cell in row.cells %}
|
||||
<td class="h-14 border border-base-300 p-1 align-top">
|
||||
<td class="relative h-14 border border-base-300">
|
||||
{% if cell.booked %}
|
||||
{% if is_admin %}
|
||||
<a href="/admin/booking/{{ cell.booking_id }}"
|
||||
class="block h-full rounded px-1 py-1 text-xs font-medium text-white shadow-sm transition hover:opacity-90"
|
||||
style="background-color: {{ cell.color }}">{{ cell.name }}</a>
|
||||
class="absolute inset-1 flex items-center overflow-hidden rounded px-1.5 text-xs font-medium text-white shadow-sm transition hover:opacity-90"
|
||||
style="background-color: {{ cell.color }}">
|
||||
<span class="min-w-0 truncate">{{ cell.name }}</span>
|
||||
</a>
|
||||
{% else %}
|
||||
<div class="h-full rounded px-1 py-1 text-xs font-medium text-white shadow-sm"
|
||||
style="background-color: {{ cell.color }}" title="{{ cell.name }}">{{ t(key="booked", lang=lang) }}</div>
|
||||
<div class="absolute inset-1 flex items-center overflow-hidden rounded px-1.5 text-xs font-medium text-white shadow-sm"
|
||||
style="background-color: {{ cell.color }}"{% if cell.title %} title="{{ cell.title }}"{% endif %}>
|
||||
<span class="min-w-0 truncate">
|
||||
{%- if cell.title %}{{ cell.title }}{% else %}{{ t(key="booked", lang=lang) }}{% endif -%}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if is_admin %}
|
||||
<a href="/admin/booking?court={{ court_id }}&date={{ cell.date }}&hour={{ cell.hour }}"
|
||||
class="flex h-full items-center justify-center rounded text-lg opacity-30 transition hover:bg-base-200 hover:opacity-100">+</a>
|
||||
class="absolute inset-0 flex items-center justify-center text-lg opacity-30 transition hover:bg-base-200 hover:opacity-100">+</a>
|
||||
{% else %}
|
||||
<div class="px-1 py-1 text-xs opacity-30">{{ t(key="free", lang=lang) }}</div>
|
||||
<div class="absolute inset-0 flex items-center justify-center text-xs opacity-30">{{ t(key="free", lang=lang) }}</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user