77 lines
3.3 KiB
Smarty
77 lines
3.3 KiB
Smarty
{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>
|
|
{if $session->canAccess('membres', Membres::DROIT_ADMIN)}<td class="check"><input type="checkbox" title="Tout cocher / décocher" /></td>{/if}
|
|
{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>
|
|
{if $session->canAccess('membres', Membres::DROIT_ADMIN)}<td class="check"><input type="checkbox" name="selected[]" value="{$membre.id}" /></td>{/if}
|
|
{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}
|
|
<td class="actions">
|
|
<a class="icn" href="{plugin_url file="client.php"}?id={$membre.id}" title="Fiche membre">👤</a>
|
|
{if $session->canAccess('membres', Membres::DROIT_ECRITURE)}<a class="icn" href="{plugin_url file="client_modifier.php"}?id={$membre.id}" title="Modifier la fiche membre">✎</a>{/if}
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
{if $session->canAccess('membres', Membres::DROIT_ADMIN)}
|
|
{include file="%s/templates/_list_actions.tpl"|args:$plugin_root colspan=count((array)$champs)+1}
|
|
{/if}
|
|
</table>
|
|
{else}
|
|
<p class="alert">
|
|
Aucun client trouvé.
|
|
</p>
|
|
{/if}
|
|
|
|
</form>
|
|
|
|
<form method="post" action="{$self_url}">
|
|
<fieldset>
|
|
<legend>Ajouter un client</legend>
|
|
<dl>
|
|
<dt><label for="f_nom">Nom</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
|
|
<dd><input type="nom" name="nom" id="f_nom"/></dd>
|
|
<dt><label for="f_adresse">Adresse</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
|
|
<dd><input type="text" name="adresse" id="f_adresse"/></dd>
|
|
<dt><label for="f_cp">Code postal</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
|
|
<dd><input type="text" name="code_postal" id="f_cp"/></dd>
|
|
<dt><label for="f_ville">Ville</label> <b title="(Champ obligatoire)">obligatoire</b></dt>
|
|
<dd><input type="text" name="ville" id="f_ville"/></dd>
|
|
<dt><label for="f_tel">Téléphone</label></dt>
|
|
<dd><input type="text" name="telephone" id="f_tel"/></dd>
|
|
<dt><label for="f_email">Adresse mail</label></dt>
|
|
<dd><input type="text" name="email" id="f_email"/></dd>
|
|
</dl>
|
|
</fieldset>
|
|
|
|
<p class="submit">
|
|
{csrf_field key="add_client"}
|
|
<input type="submit" name="add" value="Enregistrer →" />
|
|
</p>
|
|
</form>
|
|
|
|
|
|
{include file="admin/_foot.tpl"}
|