facturation/templates/clients.tpl

65 lines
2.2 KiB
Smarty
Raw Normal View History

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"}
{if $list->count()}
{include file="common/dynamic_list_head.tpl"}
2019-11-02 17:53:27 +01:00
{foreach from=$list->iterate() item="row"}
2019-11-02 17:53:27 +01:00
<tr>
<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}
<td>{$value}</td>
2019-11-02 17:53:27 +01:00
{/foreach}
<td class="actions">
{linkbutton shape="user" href="client.php?id=%d"|args:$row.id label="Fiche client"}
{if $session->canAccess($session::SECTION_USERS, $session::ACCESS_WRITE)}
{linkbutton shape="edit" href="client_modifier.php?id=%d"|args:$row.id label="Modifier"}
{/if}
</td>
</tr>
{/foreach}
2019-11-02 17:53:27 +01:00
</tbody>
</table>
<p class="help">
Export de la liste&nbsp;:
{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}
<p class="alert block">
2019-11-02 17:53:27 +01:00
Aucun client trouvé.
</p>
{/if}
{form_errors}
2019-11-02 17:53:27 +01:00
<form method="post" action="{$self_url}">
<fieldset>
<legend>Ajouter un client</legend>
<dl>
{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"}
{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"}