You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.4 KiB
58 lines
2.4 KiB
<div hx-target="this" class="p-2 border rounded-lg inline-flex gap-2 my-2 bg-gray-200">
|
|
<div class="grid grid-cols-3 gap-2 justify-center w-full max-w-2xl mx-auto">
|
|
<div class="col-span-3">
|
|
<dl class="row flex flex-inline">
|
|
<dt class="col-sm-3 font-bold mr-2">Status:</dt>
|
|
{% if task.status == "TODO" %}
|
|
<dd class="font-semibold text-green-500"
|
|
{% elif task.status == "DOING" %}
|
|
<dd class="font-semibold text-yellow-500"
|
|
{% elif task.status == "DONE" or task.status == "CANCELED" %}
|
|
<dd class="font-semibold text-gray-500"
|
|
{% endif %}
|
|
>
|
|
{{ task.status }}
|
|
</dd>
|
|
</dl>
|
|
<dl class="row flex flex-inline flex-wrap">
|
|
<dt class="col-sm-3 font-bold mr-2">Name:</dt>
|
|
<dd class="col-sm-9 whitespace-pre-line">{{ task.name }}</dd>
|
|
</dl>
|
|
<dl class="flex flex-col flex-inline">
|
|
<dt class="col-sm-3 font-bold mr-2">Description:</dt>
|
|
<dd class="col-sm-9 whitespace-pre-line">{{ task.description }}</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<button type="button"
|
|
hx-post="{% url 'tasks:task-item' task.id %}"
|
|
hx-swap="outerHTML"
|
|
class="inline-block px-5 py-1.5 bg-green-600 text-white font-medium text-xs leading-tight
|
|
uppercase rounded shadow-md hover:bg-green-700 hover:shadow-lg focus:bg-green-700
|
|
focus:shadow-lg focus:outline-none focus:ring-0 active:bg-green-800 active:shadow-lg
|
|
transition duration-150 ease-in-out">
|
|
Back
|
|
</button>
|
|
|
|
<button type="button"
|
|
hx-post="{% url 'tasks:task-update' task.id %}"
|
|
hx-swap="outerHTML"
|
|
class="inline-block px-5 py-1.5 bg-blue-600 text-white font-medium text-xs leading-tight
|
|
uppercase rounded shadow-md hover:bg-blue-700 hover:shadow-lg focus:bg-blue-700
|
|
focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg
|
|
transition duration-150 ease-in-out">
|
|
Update
|
|
</button>
|
|
|
|
<button type="button"
|
|
hx-post="{% url 'tasks:task-delete' task.id %}"
|
|
hx-swap="outerHTML"
|
|
class="inline-block px-5 py-1.5 bg-red-600 text-white font-medium text-xs leading-tight
|
|
uppercase rounded shadow-md hover:bg-red-700 hover:shadow-lg focus:bg-red-700
|
|
focus:shadow-lg focus:outline-none focus:ring-0 active:bg-red-800 active:shadow-lg
|
|
transition duration-150 ease-in-out">
|
|
Delete
|
|
</button>
|
|
</div>
|
|
</div>
|