2022-02-25 15:41:50 +01:00
<!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 >
2022-02-26 11:27:39 +01:00
< body style = "background-image: linear-gradient(rgba(255,255,255,0.2),rgba(255,255,255,0.2)), url('/static/bg{{bg_id}}.jpg');" >
2022-02-25 15:41:50 +01:00
< 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 >
2022-02-26 11:27:39 +01:00
< h1 > Administration – {{title}}< / h1 >
< h2 > {{group.title}}< / h2 >
2022-02-27 23:35:30 +01:00
< a href = "{{root_url}}admin/g/{{parent_group_name}}" > Groupe parent< / a > < br / >
2022-02-25 15:41:50 +01:00
{{#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}}
2022-02-27 23:35:30 +01:00
< a href = "{{../root_url}}admin/g/{{this.name}}" > {{this.title}}< / a > < br / >
2022-02-25 15:41:50 +01:00
{{/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}}
2022-02-28 19:02:02 +01:00
< form method = "post" >
< input type = "hidden" name = "a" value = "edit_group" autocomplete = "off" / >
< input type = "hidden" name = "group" value = "{{group.name}}" autocomplete = "off" / >
< fieldset >
< legend > Modifier le groupe< / legend >
< label for = "f_edit_title" > Titre :< / label >
< input type = "text" id = "f_edit_title" name = "title" placeholder = "Marché de Juneville" value = "{{group.title}}" required / > < br / >
< label for = "f_edit_name" > Identifiant (utilisé dans les URL, < code > [-_.a-zA-Z0-9]{1,64}< / code > ) :< / label >
< input type = "text" id = "f_edit_name" name = "name" placeholder = "juneville" maxlength = "64" value = "{{group.name}}" required / > < br / >
< input type = "submit" value = "Modifier" / >
< / fieldset >
< / form >
2022-02-25 15:41:50 +01:00
< 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 / >
2022-02-26 11:27:39 +01:00
Image de fond : {{{bg_about}}}< / p >
2022-02-25 15:41:50 +01:00
< p > < a href = "{{root_url}}" > Accueil< / a > – < a href = "{{root_url}}admin/logout" > Verrouiller< / a > < / p >
< / footer >
< / div >
< / body >
< / html >