Added branding and updated layouts using base_authenticated.html; applied consistent Tailwind styling across authentication and ticket pages; improved usability with hover effects and clearer typography. New Features: - Enhancements: - Refactored login page layout to use a centered card with branding and modern styling. - Updated profile page to use the authenticated base template and a refined card design. - Enhanced ticket list page with a descriptive subtitle, SVG icon, and refined table styling including hover states and better typography. Bug Fixes: - Fixed template inheritance to use base_authenticated.html for profile and tickets pages. - Corrected form button text and styling for consistency.
61 lines
3.5 KiB
HTML
61 lines
3.5 KiB
HTML
{% extends "base_authenticated.html" %}
|
|
{% block title %}Projects{% endblock %}
|
|
{% block content_inner %}
|
|
<div class="flex items-center justify-between mb-6">
|
|
<div>
|
|
<h1 class="text-2xl font-bold text-gray-900">Projects</h1>
|
|
<p class="text-gray-500 mt-1">Manage and track all your projects.</p>
|
|
</div>
|
|
<a href="{% url 'project_create' %}" class="btn bg-blue-600 text-white hover:bg-blue-700 border-0">
|
|
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
|
|
New Project
|
|
</a>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 lg:grid-cols-4 gap-4 mb-6">
|
|
{% for s in status_counts %}
|
|
<div class="bg-white rounded-xl p-4 shadow-sm border border-gray-100">
|
|
<p class="text-sm text-gray-500">{{ s.status|title }}</p>
|
|
<p class="text-2xl font-bold text-gray-900">{{ s.count }}</p>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="grid gap-4">
|
|
{% for project in projects %}
|
|
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 hover:shadow-md transition-shadow">
|
|
<div class="p-5">
|
|
<div class="flex items-start justify-between">
|
|
<div class="flex items-start gap-4">
|
|
<div class="w-10 h-10 rounded-xl bg-blue-600 flex items-center justify-center text-white font-bold text-sm flex-shrink-0">
|
|
{{ project.name|first|upper }}
|
|
</div>
|
|
<div>
|
|
<a href="{% url 'project_detail' project.pk %}" class="text-lg font-semibold text-gray-900 hover:text-blue-600 transition-colors">{{ project.name }}</a>
|
|
<div class="flex items-center gap-3 mt-1">
|
|
<span class="text-xs px-2.5 py-1 rounded-full font-medium {% if project.status == 'active' %}bg-green-100 text-green-700{% elif project.status == 'planning' %}bg-blue-100 text-blue-700{% elif project.status == 'review' %}bg-amber-100 text-amber-700{% else %}bg-gray-100 text-gray-700{% endif %}">
|
|
{{ project.get_status_display }}
|
|
</span>
|
|
<span class="text-xs text-gray-500">Client: {{ project.client.username }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex gap-2">
|
|
<a href="{% url 'project_detail' project.pk %}" class="btn btn-sm btn-ghost">View</a>
|
|
{% if user.is_admin %}
|
|
<a href="{% url 'project_edit' project.pk %}" class="btn btn-sm btn-ghost">Edit</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% empty %}
|
|
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 p-12 text-center">
|
|
<svg class="w-12 h-12 text-gray-300 mx-auto mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg>
|
|
<p class="text-gray-500">No projects yet.</p>
|
|
<a href="{% url 'project_create' %}" class="btn bg-blue-600 text-white hover:bg-blue-700 border-0 mt-3">Create your first project</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock %}
|