2023-08-04 17:41:29 +02:00
|
|
|
{include file="_head.tpl" title="Clients — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id js=1}
|
2019-11-02 17:53:27 +01:00
|
|
|
{include file="%s/templates/_menu.tpl"|args:$plugin_root current="clients"}
|
|
|
|
|
2021-12-17 13:01:05 +01:00
|
|
|
{if $list->count()}
|
|
|
|
{include file="common/dynamic_list_head.tpl"}
|
2019-11-02 17:53:27 +01:00
|
|
|
|
2021-12-17 13:01:05 +01:00
|
|
|
{foreach from=$list->iterate() item="row"}
|
2019-11-02 17:53:27 +01:00
|
|
|
<tr>
|
2021-12-17 13:01:05 +01:00
|
|
|
<td>{$row.id}</td>
|
|
|
|
<th><a href="client.php?id={$row.id}">{$row.nom}</a></th>
|
|
|
|
|
|
|
|
{foreach from=$row item="value" key="key"}
|
|
|
|
{if $key == 'id' || $key == 'nom'}
|
|
|
|
<?php continue; ?>
|
|
|
|
{/if}
|
2024-01-11 20:41:19 +01:00
|
|
|
{if $key == 'siret'}
|
|
|
|
<?php $value = implode(' ', str_split($value, 3)); ?>
|
|
|
|
{/if}
|
2021-12-17 13:01:05 +01:00
|
|
|
<td>{$value}</td>
|
2019-11-02 17:53:27 +01:00
|
|
|
{/foreach}
|
2021-12-17 13:01:05 +01:00
|
|
|
<td class="actions">
|
2021-12-17 14:09:10 +01:00
|
|
|
{if $session->canAccess($session::SECTION_ACCOUNTING, $session::ACCESS_ADMIN)}
|
|
|
|
{linkbutton shape="delete" href="client_supprimer.php?id=%d"|args:$row.id label="Supprimer"}
|
|
|
|
{/if}
|
|
|
|
{if $session->canAccess($session::SECTION_USERS, $session::ACCESS_ADMIN)}
|
2021-12-17 13:01:05 +01:00
|
|
|
{linkbutton shape="edit" href="client_modifier.php?id=%d"|args:$row.id label="Modifier"}
|
|
|
|
{/if}
|
2021-12-17 14:09:10 +01:00
|
|
|
{linkbutton shape="user" href="client.php?id=%d"|args:$row.id label="Fiche client"}
|
2021-12-17 12:44:02 +01:00
|
|
|
</td>
|
2021-12-17 13:01:05 +01:00
|
|
|
</tr>
|
|
|
|
{/foreach}
|
|
|
|
|
2019-11-02 17:53:27 +01:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-12-17 13:01:05 +01:00
|
|
|
|
|
|
|
<p class="help">
|
|
|
|
Export de la liste :
|
|
|
|
{linkbutton href="?export=csv" label="Export CSV" shape="download"}
|
|
|
|
{linkbutton href="?export=ods" label="Export tableur" shape="download"}
|
|
|
|
</p>
|
|
|
|
|
2019-11-02 17:53:27 +01:00
|
|
|
{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}
|
|
|
|
|
2021-12-17 13:01:05 +01:00
|
|
|
{form_errors}
|
2019-11-02 17:53:27 +01:00
|
|
|
|
|
|
|
<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}
|
2024-01-11 20:41:19 +01:00
|
|
|
{input type="text" name="siret" label="SIREN/SIRET" required=true}
|
2021-12-17 11:56:52 +01:00
|
|
|
{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>
|
|
|
|
|
|
|
|
|
2023-08-01 22:56:38 +02:00
|
|
|
{include file="_foot.tpl"}
|