- Add custom border, background, and spacing utilities to base template - Enhance message notification styling and layout - Update delete modal button appearance and behavior - Refine comment card component with Tailwind classes and responsive behavior - Adjust sidebar responsiveness for mobile view
94 lines
6.8 KiB
HTML
94 lines
6.8 KiB
HTML
{% extends "base_authenticated.html" %}
|
|
{% block title %}{{ project.name }}{% endblock %}
|
|
{% block content_inner %}
|
|
<div class="card-surface overflow-hidden mb-6">
|
|
<div class="bg-blue-600 px-6 py-8">
|
|
<div class="flex items-start justify-between">
|
|
<div>
|
|
<h1 class="text-2xl font-bold text-white">{{ project.name }}</h1>
|
|
<div class="flex items-center gap-3 mt-2">
|
|
<span class="text-xs px-2 py-1 rounded-full font-medium border bg-white/20 text-white border-white/30">{{ project.get_status_display }}</span>
|
|
<span class="text-white/80 text-sm">Client: {{ project.client.username }}</span>
|
|
</div>
|
|
</div>
|
|
{% if user.is_admin %}
|
|
<div class="flex gap-2">
|
|
<a href="{% url 'project_edit' project.pk %}" class="px-3 py-1.5 rounded-lg text-sm font-medium text-white bg-white/20 hover:bg-white/30 transition-colors">Edit</a>
|
|
<label for="delete-modal-project" class="px-3 py-1.5 rounded-lg text-sm font-medium bg-red-50 text-red-700 hover:bg-red-100 border border-red-200 transition-colors cursor-pointer">Delete</label>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="p-6">
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-3 p-4 bg-hover rounded-xl mb-6">
|
|
<div>
|
|
<p class="text-xs text-muted uppercase tracking-wider font-medium">Open Issues</p>
|
|
<p class="text-2xl font-bold text-primary mt-1">{{ open_issues }}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-xs text-muted uppercase tracking-wider font-medium">Members</p>
|
|
<p class="text-2xl font-bold text-primary mt-1">{{ project.members.count }}</p>
|
|
</div>
|
|
<div>
|
|
<p class="text-xs text-muted uppercase tracking-wider font-medium">Created</p>
|
|
<p class="text-2xl font-bold text-primary mt-1">{{ project.created_at|date:"M Y" }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
<h3 class="font-semibold text-primary mb-3">Team Members</h3>
|
|
<div class="flex flex-wrap gap-2">
|
|
{% for member in project.members.all %}
|
|
<div class="flex items-center gap-2 px-3 py-1.5 bg-hover rounded-full">
|
|
<div class="w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center text-white text-xs font-bold">{{ member.username|first|upper }}</div>
|
|
<span class="text-sm text-secondary">{{ member.username }}</span>
|
|
<span class="text-xs text-tertiary">({{ member.get_role_display }})</span>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
|
<a href="{% url 'issue_list' %}?project={{ project.pk }}" class="p-4 card-surface hover:border-blue-300 transition-colors">
|
|
<div class="flex items-center gap-3">
|
|
<div class="w-10 h-10 rounded-lg bg-amber-100 flex items-center justify-center"><svg class="w-5 h-5 text-amber-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v3m0 0v3m0-3h3m-3 0H9"/></svg></div>
|
|
<div><p class="font-semibold text-primary">Issues</p><p class="text-sm text-tertiary">{{ issues.count }} total</p></div>
|
|
</div>
|
|
</a>
|
|
<a href="{% url 'ticket_list' %}?project={{ project.pk }}" class="p-4 card-surface hover:border-blue-300 transition-colors">
|
|
<div class="flex items-center gap-3">
|
|
<div class="w-10 h-10 rounded-lg bg-blue-100 flex items-center justify-center"><svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 5v2m0 4v2m0 4v2M5 5a2 2 0 00-2 2v3a2 2 0 110 4v3a2 2 0 002 2h14a2 2 0 002-2v-3a2 2 0 110-4V7a2 2 0 00-2-2H5z"/></svg></div>
|
|
<div><p class="font-semibold text-primary">Tickets</p><p class="text-sm text-tertiary">{{ tickets.count }} recent</p></div>
|
|
</div>
|
|
</a>
|
|
<a href="{% url 'invoice_list' %}?project={{ project.pk }}" class="p-4 card-surface hover:border-blue-300 transition-colors">
|
|
<div class="flex items-center gap-3">
|
|
<div class="w-10 h-10 rounded-lg bg-green-100 flex items-center justify-center"><svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg></div>
|
|
<div><p class="font-semibold text-primary">Invoices</p><p class="text-sm text-tertiary">View finance</p></div>
|
|
</div>
|
|
</a>
|
|
<a href="{% url 'board_list' %}" class="p-4 card-surface hover:border-blue-300 transition-colors">
|
|
<div class="flex items-center gap-3">
|
|
<div class="w-10 h-10 rounded-lg bg-sky-100 flex items-center justify-center"><svg class="w-5 h-5 text-sky-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7"/></svg></div>
|
|
<div><p class="font-semibold text-primary">Kanban</p><p class="text-sm text-tertiary">View boards</p></div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
|
|
{% if tickets %}
|
|
<div class="mt-6">
|
|
<h3 class="font-semibold text-primary mb-3">Recent Tickets</h3>
|
|
{% for ticket in tickets %}
|
|
<a href="{% url 'ticket_detail' ticket.pk %}" class="flex items-center justify-between p-3 rounded-xl hover:bg-hover transition-colors">
|
|
<span class="text-sm font-medium text-primary">{{ ticket.title }}</span>
|
|
<span class="text-xs px-2 py-1 rounded-full font-medium border {% if ticket.ticket_type == 'bug' %}bg-red-50 text-red-700 border-red-200{% elif ticket.ticket_type == 'feature_request' %}bg-blue-50 text-blue-700 border-blue-200{% else %}bg-sky-50 text-sky-700 border-sky-200{% endif %}">{{ ticket.get_ticket_type_display }}</span>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% url 'project_delete' project.pk as delete_url %}
|
|
{% include "components/delete_modal.html" with modal_id="delete-modal-project" delete_url=delete_url %}
|
|
{% endblock %}
|