refactor(templates): reorganize template hierarchy and update includes
reorganize templates into pages/ and modals/ directories for better structure update includes to reference new paths, maintaining functionality
This commit is contained in:
19 files changed
+8
-71
No files matched your search
@@ -1,63 +0,0 @@
|
||||
<!-- Create Ticket Modal -->
|
||||
<div x-cloak x-show="createTicketOpen" class="fixed inset-0 z-50 flex items-center justify-center">
|
||||
<div class="fixed inset-0 bg-black/50" @click="createTicketOpen = false"></div>
|
||||
<div class="relative bg-white dark:bg-gray-950 rounded-xl shadow-xl border border-gray-200 dark:border-gray-600 w-full max-w-4xl mx-auto my-auto max-h-[90vh] overflow-y-auto z-10 p-6 md:p-8">
|
||||
<div class="px-8 py-5 flex items-center justify-between">
|
||||
<h3 class="text-xl font-bold text-gray-900 dark:text-white">Create Ticket</h3>
|
||||
<button @click="createTicketOpen = false" class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300">
|
||||
<i class="fas fa-times text-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
<form method="post" action="{% url 'ticket-create' %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="project" {% if project %}value="{{ project.id }}"{% else %}:value="createTicketData.project"{% endif %}>
|
||||
<input type="hidden" name="epic" :value="createTicketData.epic">
|
||||
|
||||
<div class="px-8 pb-6 space-y-5">
|
||||
<div class="grid grid-cols-2 gap-6">
|
||||
<div class="col-span-2">
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Ticket Name<span class="text-red-500">*</span></label>
|
||||
<input type="text" name="name" x-model="createTicketData.name" required class="w-full px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Status</label>
|
||||
<select name="status" x-model="createTicketData.status_id" required class="w-full px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
{% for s in statuses %}
|
||||
<option value="{{ s.id }}">{{ s.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Priority</label>
|
||||
<select name="priority" x-model="createTicketData.priority_id" class="w-full px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<option value="">— None —</option>
|
||||
{% for p in priorities %}
|
||||
<option value="{{ p.id }}">{{ p.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Start Date</label>
|
||||
<input type="date" name="start_date" x-model="createTicketData.start_date" class="w-full px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Due Date</label>
|
||||
<input type="date" name="due_date" x-model="createTicketData.due_date" class="w-full px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Description</label>
|
||||
{% include "components/rich_text_editor.html" with input_name="description" alpine_model="createTicketData.description" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-8 py-5 flex justify-start gap-3">
|
||||
<button type="submit" class="px-5 py-2 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-lg transition-colors shadow-sm">Create Ticket</button>
|
||||
<button type="button" @click="createTicketOpen = false" class="px-5 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors shadow-sm">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,46 +0,0 @@
|
||||
<!-- Edit Epic Modal -->
|
||||
<div x-cloak x-show="editEpicOpen" class="fixed inset-0 z-50 flex items-center justify-center">
|
||||
<div class="fixed inset-0 bg-black/50" @click="editEpicOpen = false"></div>
|
||||
<div class="relative bg-white dark:bg-gray-950 rounded-xl shadow-xl border border-gray-200 dark:border-gray-600 w-full max-w-4xl mx-auto my-auto max-h-[90vh] overflow-y-auto z-10 p-6 md:p-8">
|
||||
<div class="px-8 py-5 flex items-center justify-between">
|
||||
<h3 class="text-xl font-bold text-gray-900 dark:text-white" x-text="'Edit ' + editEpicData.name">Edit Epic</h3>
|
||||
<button @click="editEpicOpen = false" class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300">
|
||||
<i class="fas fa-times text-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
<form method="post" :action="'/epics/' + editEpicData.id + '/edit/'">
|
||||
{% csrf_token %}
|
||||
<div class="px-8 pb-6 space-y-5">
|
||||
<div class="grid grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Epic Name<span class="text-red-500">*</span></label>
|
||||
<input type="text" name="name" x-model="editEpicData.name" required class="w-full px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Sort Order</label>
|
||||
<input type="number" name="sort_order" x-model="editEpicData.sort_order" class="w-full px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<span class="text-xs text-gray-500 dark:text-gray-400 mt-1 block">Lower numbers appear first</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-6">
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Start Date</label>
|
||||
<input type="date" name="start_date" x-model="editEpicData.start_date" class="w-full px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">End Date</label>
|
||||
<input type="date" name="end_date" x-model="editEpicData.end_date" class="w-full px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-lg bg-white dark:bg-gray-900 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-semibold text-gray-900 dark:text-gray-300 mb-1.5">Description</label>
|
||||
{% include "components/rich_text_editor.html" with input_name="description" alpine_model="editEpicData.description" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-8 py-5 flex justify-start gap-3">
|
||||
<button type="submit" class="px-5 py-2 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-lg transition-colors shadow-sm">Save changes</button>
|
||||
<button type="button" @click="editEpicOpen = false" class="px-5 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors shadow-sm">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,53 +0,0 @@
|
||||
<!-- External Dashboard Modal -->
|
||||
<div x-cloak x-show="{{ show_state }}" class="fixed inset-0 z-50 flex items-center justify-center">
|
||||
<div class="fixed inset-0 bg-black/50" @click="{{ show_state }} = false"></div>
|
||||
<div class="relative bg-white dark:bg-gray-950 rounded-xl shadow-xl max-w-lg w-full mx-4 border border-gray-200 dark:border-gray-700 overflow-hidden">
|
||||
<div class="px-6 py-4 border-b border-gray-100 dark:border-gray-700 flex items-center justify-between">
|
||||
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">External Dashboard</h3>
|
||||
<button @click="{{ show_state }} = false" class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
<div class="px-6 py-5 space-y-5">
|
||||
<div>
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-2">Dashboard URL</h4>
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="text" readonly value="{{ request.scheme }}://{{ request.get_host }}{% url 'external-dashboard' external_access.access_token %}" class="flex-1 px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-gray-100" id="dashboard-url">
|
||||
<button type="button" onclick="copyToClipboard('dashboard-url','Dashboard URL copied!')" class="px-3 py-2 bg-blue-500 text-white rounded-lg text-sm hover:bg-blue-600 shrink-0">Copy</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-2">Password</h4>
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="text" readonly value="{{ external_access.password }}" class="flex-1 px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-gray-100 font-mono" id="dashboard-password">
|
||||
<button type="button" onclick="copyToClipboard('dashboard-password','Password copied!')" class="px-3 py-2 bg-green-500 text-white rounded-lg text-sm hover:bg-green-600 shrink-0">Copy</button>
|
||||
</div>
|
||||
</div>
|
||||
{% if external_access.last_accessed_at %}
|
||||
<div>
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-1">Last Accessed</h4>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400">{{ external_access.last_accessed_at|date:"d/m/Y H:i" }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<h4 class="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-2">Status</h4>
|
||||
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium {% if external_access.is_active %}bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400{% else %}bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400{% endif %}">
|
||||
{{ external_access.is_active|yesno:"Active,Inactive" }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="bg-blue-50 dark:bg-blue-900/20 p-4 rounded-lg">
|
||||
<h5 class="text-sm font-medium text-blue-900 dark:text-blue-100 mb-2">Instructions</h5>
|
||||
<ol class="text-sm text-blue-800 dark:text-blue-200 space-y-1 list-decimal list-inside">
|
||||
<li>Share the Dashboard URL with your external users</li>
|
||||
<li>Provide them with the password for access</li>
|
||||
<li>Users will be able to view project progress and tickets</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="flex items-center justify-between pt-1">
|
||||
<form method="post" action="{% url 'external-access-regenerate-project' project.id %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="dk-btn dk-btn-ghost text-sm text-amber-600"><i class="fas fa-undo mr-1"></i>Regenerate</button>
|
||||
</form>
|
||||
<button @click="{{ show_state }} = false" class="dk-btn dk-btn-ghost text-sm">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user