Skip to content
Snippets Groups Projects
Commit 03b01bd4 authored by Alexander Kohler's avatar Alexander Kohler
Browse files

Projekt-Ansichten um Kürzel-Anzeige erweitert

- Kürzel-Badges in Projekt-Details und Listen hinzugefügt
- Verbesserte Benutzeroberfläche für Projekt-Aktionen
- Fallback-Behandlung für leere Datumsfelder
parent 18750ed4
No related branches found
No related tags found
1 merge request!4merge dev to main
...@@ -9,9 +9,12 @@ ...@@ -9,9 +9,12 @@
<div> <div>
<!-- Main project name as page heading --> <!-- Main project name as page heading -->
<h1 class="mb-1">{{ .Data.Project.Name }}</h1> <h1 class="mb-1">{{ .Data.Project.Name }}</h1>
<!-- Subheading with project ID badge and date range --> <!-- Subheading with project ID, shortcut badges and date range -->
<p class="text-muted mb-0"> <p class="text-muted mb-0">
<span class="badge bg-secondary me-2">{{ .Data.Project.ProjectID }}</span> <span class="badge bg-secondary me-2">{{ .Data.Project.ProjectID }}</span>
{{ if .Data.Project.Shortcut }}
<span class="badge bg-primary me-2">{{ .Data.Project.Shortcut }}</span>
{{ end }}
{{ .Data.Project.StartDate.Format "02.01.2006" }} - {{ .Data.Project.EndDate.Format "02.01.2006" }} {{ .Data.Project.StartDate.Format "02.01.2006" }} - {{ .Data.Project.EndDate.Format "02.01.2006" }}
</p> </p>
</div> </div>
...@@ -95,6 +98,12 @@ ...@@ -95,6 +98,12 @@
<dt class="col-sm-3">Projekt-ID:</dt> <dt class="col-sm-3">Projekt-ID:</dt>
<dd class="col-sm-9">{{ .Data.Project.ProjectID }}</dd> <dd class="col-sm-9">{{ .Data.Project.ProjectID }}</dd>
<!-- Project shortcut field -->
{{ if .Data.Project.Shortcut }}
<dt class="col-sm-3">Kürzel:</dt>
<dd class="col-sm-9"><span class="badge bg-primary">{{ .Data.Project.Shortcut }}</span></dd>
{{ end }}
<!-- Project name field --> <!-- Project name field -->
<dt class="col-sm-3">Name:</dt> <dt class="col-sm-3">Name:</dt>
<dd class="col-sm-9">{{ .Data.Project.Name }}</dd> <dd class="col-sm-9">{{ .Data.Project.Name }}</dd>
... ...
......
...@@ -23,38 +23,34 @@ ...@@ -23,38 +23,34 @@
<!-- Bootstrap card component with shadow for visual depth --> <!-- Bootstrap card component with shadow for visual depth -->
<div class="card h-100 shadow-sm project-card"> <div class="card h-100 shadow-sm project-card">
<!-- Card header with project ID and actions dropdown --> <!-- Card header with project ID, shortcut and actions dropdown -->
<div class="card-header d-flex justify-content-between align-items-center"> <div class="card-header d-flex justify-content-between align-items-center">
<!-- Display human-readable project ID (e.g., PRJ-2025-001) --> <!-- Display human-readable project ID and shortcut -->
<div>
<h6 class="mb-0 text-muted">{{ .ProjectID }}</h6> <h6 class="mb-0 text-muted">{{ .ProjectID }}</h6>
{{ if .Shortcut }}
<small class="badge bg-primary">{{ .Shortcut }}</small>
{{ end }}
</div>
<!-- Bootstrap dropdown for project actions (edit, delete) --> <!-- Project action buttons (edit, delete) -->
<div class="dropdown"> <div class="btn-group" role="group">
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" <!-- Edit button using HTMX for seamless navigation -->
type="button" <a class="btn btn-sm btn-outline-primary"
data-bs-toggle="dropdown">
</button>
<ul class="dropdown-menu">
<li>
<!-- Edit link using HTMX for seamless navigation -->
<a class="dropdown-item"
href="/project/{{ .ID.Hex }}/edit" href="/project/{{ .ID.Hex }}/edit"
hx-boost="true" hx-boost="true"
hx-target="body"> hx-target="body"
✏️ Bearbeiten title="Bearbeiten">
✏️
</a> </a>
</li>
<li><hr class="dropdown-divider"></li>
<li>
<!-- Delete button triggers modal for confirmation --> <!-- Delete button triggers modal for confirmation -->
<button class="dropdown-item text-danger" <button class="btn btn-sm btn-outline-danger"
type="button"
data-bs-toggle="modal" data-bs-toggle="modal"
data-bs-target="#deleteModal-{{ .ID.Hex }}"> data-bs-target="#deleteModal-{{ .ID.Hex }}"
🗑️ Löschen title="Löschen">
🗑️
</button> </button>
</li>
</ul>
</div> </div>
</div> </div>
...@@ -82,10 +78,10 @@ ...@@ -82,10 +78,10 @@
<!-- Project timeline showing start and end dates --> <!-- Project timeline showing start and end dates -->
<div class="d-flex justify-content-between text-small text-muted"> <div class="d-flex justify-content-between text-small text-muted">
<span> <span>
📅 {{ .StartDate.Format "02.01.2006" }} 📅 {{ if .StartDate.IsZero }}Nicht festgelegt{{ else }}{{ .StartDate.Format "02.01.2006" }}{{ end }}
</span> </span>
<span> <span>
🏁 {{ .EndDate.Format "02.01.2006" }} 🏁 {{ if .EndDate.IsZero }}Nicht festgelegt{{ else }}{{ .EndDate.Format "02.01.2006" }}{{ end }}
</span> </span>
</div> </div>
</div> </div>
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment