feat: renommer package ui pour frontend
Si on suit les considérations du domain-driven design, le fait qu'on réfère toustes à cette partie du code comme `le frontend` me pousse à renommer le package pour mieux réflèter notre utilisation. Ça devrait rendre plus évident où les fichiers sources du frontend sont situés.
This commit is contained in:
parent
74fe5ac697
commit
076bb1a90c
98 changed files with 9 additions and 12 deletions
55
frontend/admin-edit.html
Normal file
55
frontend/admin-edit.html
Normal file
|
@ -0,0 +1,55 @@
|
|||
{{ define "admin-edit-html" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>AGECEM</title>
|
||||
{{ template "general-html" }}
|
||||
<link rel="stylesheet" href="/public/css/admin-edit.css">
|
||||
<script src="https://unpkg.com/htmx.org@2.0.3"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ template "header-html" }}
|
||||
{{ if .Error }}
|
||||
<b>{{ .Error }}</b>
|
||||
{{ end }}
|
||||
<article id="moduleAdminEdit">
|
||||
<h2>Modifier les documents</h2>
|
||||
|
||||
{{ range .Buckets }}
|
||||
{{ $bucketID := .ID }}
|
||||
<h3>{{ .DisplayName }} ({{ .ID }})</h3>
|
||||
{{ if not .DocumentKeys }}
|
||||
<p><i>Aucun document de type {{ .DisplayName }} enregistré, voir le <a href="/admin">panneau d'administration</a> pour en ajouter.</i></p>
|
||||
{{ else }}
|
||||
<table>
|
||||
<tr><th></th><th>Renommer</th><th>Effacer</th></tr>
|
||||
{{ range .DocumentKeys }}
|
||||
<tr>
|
||||
<td>{{ . }}</td>
|
||||
<td><a
|
||||
hx-get="/admin/documents/edit/{{$bucketID}}/{{.}}/key"
|
||||
hx-target="#app-dialog"
|
||||
hx-on:click="document.getElementById('app-dialog').style.display = 'block';">
|
||||
<button>🖉</button>
|
||||
</a></td>
|
||||
<td><a
|
||||
hx-get="/admin/documents/edit/{{$bucketID}}/{{.}}/delete"
|
||||
hx-target="#app-dialog"
|
||||
hx-on:click="document.getElementById('app-dialog').style.display = 'block';">
|
||||
<button>🗑</button>
|
||||
</a></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div id="app-dialog" style="display: none;"> </div>
|
||||
</article>
|
||||
{{ template "footer-html" }}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue