101 lines
3.8 KiB
HTML
101 lines
3.8 KiB
HTML
<!doctype html>
|
|
<html lang="{{lang}}">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title>{{group.title}} | Administration | {{title}}</title>
|
|
<link rel="stylesheet" href="{{root_url}}static/style1.css"/>
|
|
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
|
<script type="text/javascript" src="{{root_url}}static/script1.js"></script>
|
|
</head>
|
|
<body style="background-image: linear-gradient(rgba(255,255,255,0.2),rgba(255,255,255,0.2)), url('/static/bg{{bg_id}}.jpg');">
|
|
<div class="center page">
|
|
<header>
|
|
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
|
</header>
|
|
|
|
<main>
|
|
<h1>Administration – {{title}}</h1>
|
|
<h2>{{group.title}}</h2>
|
|
|
|
<a href="{{root_url}}admin/g/{{parent_group_name}}">Groupe parent</a><br/>
|
|
|
|
{{#if errors}}
|
|
<div id="errors">
|
|
<span>Oups, il y a un problème :</span>
|
|
<ul>
|
|
{{#each errors}}
|
|
<li>{{this.text}}</li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#each groups}}
|
|
<a href="{{../root_url}}admin/g/{{this.name}}">{{this.title}}</a><br/>
|
|
{{/each}}
|
|
|
|
{{#if ads}}
|
|
<span>Cliquez sur une annonce pour afficher le détail.</span>
|
|
<form method="post">
|
|
<table id="ads">
|
|
<thead>
|
|
<tr><td></td><th>Annonce</th><th>Quantité</th><th>Vendeur</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each ads}}
|
|
<tr>
|
|
<td><input type="radio" name="ad" value="{{this.id}}" aria-label="Sélectionner l'annonce" required/></td>
|
|
<td onclick="ad_detail(event,'{{this.id}}')" title="Afficher le détail"><a href="{{../root_url}}admin/ad/{{this.id}}">{{this.ad.title}}</a></td>
|
|
<td>{{this.ad.quantity}}</td>
|
|
<td>{{this.ad.author}}</td>
|
|
</tr>
|
|
<tr id="ad-detail-{{this.id}}" class="ad-detail{{#unless this.selected}} ad-detail-no{{/unless}}">
|
|
<td colspan="4"><p>
|
|
{{#if this.ad.pubkey}}Clé publique : {{this.ad.pubkey}}<br/>{{/if}}
|
|
Prix : {{this.ad.price}}
|
|
</p></td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
<br/>
|
|
|
|
<fieldset>
|
|
<legend>Supprimer l'annonce sélectionnée</legend>
|
|
<button type="submit" name="a" value="rm_ad">Supprimer</button>
|
|
</fieldset>
|
|
</form>
|
|
<br/>
|
|
{{else}}
|
|
<p>Il n'y a pas encore d'annonce ici.</p>
|
|
{{/if}}
|
|
|
|
<form method="post" action="{{root_url}}admin">
|
|
<input type="hidden" name="a" value="new_group" autocomplete="off"/>
|
|
<input type="hidden" name="parent" value="{{group.name}}" autocomplete="off"/>
|
|
<fieldset>
|
|
<legend>Nouveau groupe</legend>
|
|
<label for="f_new_title">Titre :</label>
|
|
<input type="text" id="f_new_title" name="title" placeholder="Marché de Juneville"{{#if new_group_form_refill}} value="{{new_group_form_refill.title}}"{{/if}} required/><br/>
|
|
<label for="f_new_name">Identifiant (utilisé dans les URL, <code>[-_.a-zA-Z0-9]{1,64}</code>) :</label>
|
|
<input type="text" id="f_new_name" name="name" placeholder="juneville" maxlength="64"{{#if new_group_form_refill}} value="{{new_group_form_refill.name}}"{{/if}} required/><br/>
|
|
<input type="submit" value="Créer"/>
|
|
</fieldset>
|
|
</form>
|
|
</main>
|
|
|
|
<footer>
|
|
<hr style="clear: both;"/>
|
|
|
|
<p><a href="https://forum.duniter.org">Toutes les questions techniques ont leur place sur le forum.</a></p>
|
|
|
|
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
|
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
|
Image de fond : {{{bg_about}}}</p>
|
|
|
|
<p><a href="{{root_url}}">Accueil</a> – <a href="{{root_url}}admin/logout">Verrouiller</a></p>
|
|
</footer>
|
|
</div>
|
|
</body>
|
|
</html>
|