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-12-17 12:44:02 +01:00
|
|
|
{* FIXME
|
|
|
|
{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-12-17 12:44:02 +01:00
|
|
|
{* FIXME
|
|
|
|
{if $session->canAccess($session::SECTION_USERS, $session::ACCESS_ADMIN)}
|
|
|
|
<td class="check">
|
|
|
|
{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">
|
2021-12-17 12:44:02 +01:00
|
|
|
{linkbutton shape="user" href="client.php?id=%d"|args:$membre.id label="Fiche client"}
|
|
|
|
{if $session->canAccess($session::SECTION_USERS, $session::ACCESS_WRITE)}
|
|
|
|
{linkbutton shape="edit" href="client_modifier.php?id=%d"|args:$membre.id label="Modifier"}
|
|
|
|
{/if}
|
2019-11-02 17:53:27 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{/foreach}
|
|
|
|
</tbody>
|
2021-12-17 12:44:02 +01:00
|
|
|
{* FIXME
|
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}
|
2021-12-17 12:44:02 +01:00
|
|
|
*}
|
2019-11-02 17:53:27 +01:00
|
|
|
</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"}
|