cadoles-arcad/template/layouts/admin_apps_list.html.tmpl

91 lines
3.5 KiB
Cheetah

{{define "title"}}Applications - Administration - Arcad{{end}}
{{define "body"}}
{{template "header" .}}
<section class="block">
<div>
<div>
<div>
{{template "admin_menu" "apps"}}
</div>
<div>
{{template "flash" .}}
<h4 class="text-xl text-center font-bold mb-2">Liste des applications installées</h4>
<div class="text-right mb-2">
<b>Total</b> {{ .AppsCount }}
</div>
<div class="relative overflow-x-auto shadow-md sm:rounded-lg">
<table class="w-full text-sm text-left text-gray-500 dark:text-gray-400">
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
<tr>
<th scope="col" class="px-6 py-3">
ID
</th>
<th scope="col" class="px-6 py-3">
Titre
</th>
<th scope="col" class="px-6 py-3">
Version
</th>
<th scope="col" class="px-6 py-3">
Ordre d'affichage
</th>
<th scope="col" class="px-6 py-3">
Publiée ?
</th>
<th scope="col" class="px-6 py-3">
Tags
</th>
<th scope="col" class="px-6 py-3">
Actions
</th>
</tr>
</thead>
<tbody>
{{range .Apps}}
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<th scope="row" class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap">
<code>{{ .ID }}</code>
</th>
<td class="px-6 py-4">
{{ .Manifest.Title }}
</td>
<td class="px-6 py-4">
{{ if eq .Manifest.Version "" }}--{{else}}{{ .Manifest.Version }}{{end}}
</td>
<td class="px-6 py-4">
{{ .Order }}
</td>
<td class="px-6 py-4">
{{ if .Published }}oui{{else}}non{{end}}
</td>
<td class="px-6 py-4">
{{range .Manifest.Tags}}
<span class="tag is-info">{{ . }}</span>
{{end}}
</td>
<td class="px-6 py-4 text-right">
<a class="font-medium block m-auto mt-8 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded" href="/admin/apps/{{ .ID }}">Modifier</a>
</td>
</tr>
{{else}}
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700">
<td colspan="7">
Aucune application installée.
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
{{end}}
{{define "body_script"}}
<script defer src="/admin.js"></script>
{{end}}
{{template "base" .}}