first commit
This commit is contained in:
commit
e6c52820cd
227 changed files with 16156 additions and 0 deletions
68
Templates/projects/list_projects.html
Normal file
68
Templates/projects/list_projects.html
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{% extends 'layouts/base.html' %}
|
||||
|
||||
{% block title %}Projets - {{ client_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="h3">Projets de {{ client_name }}</h1>
|
||||
<div>
|
||||
<a href="{{ url_for('client_details', client_id=client_id) }}" class="btn btn-outline-secondary me-2">
|
||||
<i class="fas fa-user"></i> Détails client
|
||||
</a>
|
||||
<a href="{{ url_for('add_client_project', client_id=client_id) }}" class="btn btn-primary">
|
||||
<i class="fas fa-plus"></i> Nouveau projet
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if projects and projects|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Statut</th>
|
||||
<th>Début</th>
|
||||
<th>Fin</th>
|
||||
<th>Budget</th>
|
||||
<th class="text-end">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for project in projects %}
|
||||
<tr>
|
||||
<td>{{ project.name }}</td>
|
||||
<td><span class="badge bg-secondary">{{ project.status }}</span></td>
|
||||
<td>{{ project.start_date or '—' }}</td>
|
||||
<td>{{ project.end_date or '—' }}</td>
|
||||
<td>
|
||||
{% if project.budget is not none %}
|
||||
{{ "%.2f"|format(project.budget) }} €
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<a class="btn btn-sm btn-outline-primary" href="{{ url_for('project_details', client_id=client_id, project_id=project.id) }}">
|
||||
<i class="fas fa-eye"></i>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{{ url_for('edit_client_project', client_id=client_id, project_id=project.id) }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<form action="{{ url_for('delete_client_project', client_id=client_id, project_id=project.id) }}" method="post" class="d-inline" onsubmit="return confirm('Supprimer ce projet ?');">
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-info">
|
||||
Aucun projet pour ce client. Créez-en un avec le bouton "Nouveau projet".
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue