2019-11-02 17:53:27 +01:00
|
|
|
{include file="admin/_head.tpl" title="Clients — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id js=1}
|
|
|
|
{include file="%s/templates/_menu.tpl"|args:$plugin_root current="clients"}
|
|
|
|
|
|
|
|
{form_errors}
|
|
|
|
|
|
|
|
|
|
|
|
<form method="post" action="{$self_url}" class="memberList">
|
|
|
|
|
|
|
|
{if !empty($clients)}
|
|
|
|
<table class="list">
|
|
|
|
<thead class="userOrder">
|
|
|
|
<tr>
|
2021-04-11 14:25:59 +02:00
|
|
|
{if $session->canAccess($session::SECTION_USERS, $session::ACCESS_ADMIN)}<td class="check"><input type="checkbox" title="Tout cocher / décocher" /></td>{/if}
|
2019-11-02 17:53:27 +01:00
|
|
|
{foreach from=$champs key="c" item="champ"}
|
|
|
|
<td>{if $c == "numero"}#{else}{$champ.title}{/if} </td>
|
|
|
|
{/foreach}
|
|
|
|
<td></td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{foreach from=$clients item="membre"}
|
|
|
|
<tr>
|
2021-04-11 14:25:59 +02:00
|
|
|
{if $session->canAccess($session::SECTION_USERS, $session::ACCESS_ADMIN)}<td class="check">
|
2020-12-29 18:07:26 +01:00
|
|
|
{input type="checkbox" name="selected" value=$membre.id default=0}
|
|
|
|
</td>
|
|
|
|
{/if}
|
2019-11-02 17:53:27 +01:00
|
|
|
{foreach from=$champs key="c" item="cfg"}
|
|
|
|
<td>
|
|
|
|
{if $c == 'nom'}<a href="{plugin_url file="client.php"}?id={$membre.id}">{/if}
|
|
|
|
{$membre->$c}
|
|
|
|
{if $c == 'nom'}</a>{/if}
|
|
|
|
</td>
|
|
|
|
{/foreach}
|
2020-12-29 18:07:26 +01:00
|
|
|
<td class="tabs">
|
2019-11-02 17:53:27 +01:00
|
|
|
<a class="icn" href="{plugin_url file="client.php"}?id={$membre.id}" title="Fiche membre">👤</a>
|
2021-04-11 14:25:59 +02:00
|
|
|
{if $session->canAccess($session::SECTION_USERS, $session::ACCESS_WRITE)}<a class="icn" href="{plugin_url file="client_modifier.php"}?id={$membre.id}" title="Modifier la fiche membre">✎</a>{/if}
|
2019-11-02 17:53:27 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{/foreach}
|
|
|
|
</tbody>
|
2021-04-11 14:25:59 +02:00
|
|
|
{if $session->canAccess($session::SECTION_USERS, $session::ACCESS_ADMIN)}
|
2020-12-29 18:07:26 +01:00
|
|
|
{include file="%s/templates/_list_actions.tpl"|args:$plugin_root colspan=count((array)$champs)}
|
2019-11-02 17:53:27 +01:00
|
|
|
{/if}
|
|
|
|
</table>
|
|
|
|
{else}
|
2021-12-17 11:56:52 +01:00
|
|
|
<p class="alert block">
|
2019-11-02 17:53:27 +01:00
|
|
|
Aucun client trouvé.
|
|
|
|
</p>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<form method="post" action="{$self_url}">
|
|
|
|
<fieldset>
|
|
|
|
<legend>Ajouter un client</legend>
|
|
|
|
<dl>
|
2021-12-17 11:56:52 +01:00
|
|
|
{input type="text" name="nom" label="Nom" required=true}
|
|
|
|
{input type="text" name="adresse" label="Adresse" required=true}
|
|
|
|
{input type="text" name="code_postal" label="Code postal" required=true}
|
|
|
|
{input type="text" name="ville" label="Ville" required=true}
|
|
|
|
{input type="tel" name="telephone" label="Téléphone"}
|
|
|
|
{input type="email" name="email" label="Adresse e-mail"}
|
2019-11-02 17:53:27 +01:00
|
|
|
</dl>
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
<p class="submit">
|
|
|
|
{csrf_field key="add_client"}
|
2021-12-17 11:56:52 +01:00
|
|
|
{button type="submit" name="add" label="Enregistrer" shape="right" class="main"}
|
2019-11-02 17:53:27 +01:00
|
|
|
</p>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
{include file="admin/_foot.tpl"}
|