This repository was archived by the owner on Jan 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.tpl
More file actions
64 lines (62 loc) · 2.3 KB
/
admin.tpl
File metadata and controls
64 lines (62 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<div class = "titlePage">
<h2>{'Produit Par'|@translate}</h2>
</div>
<!-- Create the form for creating and editing copyrights -->
<form action='{$PRODUCEDBY_PATH}-{if $edit == 0}create{else}update{/if}'
method='POST'>
<fieldset>
<legend>{if $edit == 0}{'Ajouter un auteur'|@translate}
{else}{'Modifier un auteur'|@translate}{/if}</legend>
<!-- If $edit != 0 we should remember the id of the copyright that is
edited -->
{if $edit != 0}<input type='hidden' name='id' id='id' value='{$PBid}' />{/if}
<!-- Put all the attributes of the copyright in a nice table -->
<table>
<tr>
<td>{'Name'|@translate}</td>
<td><input type='text' name='name' id='name' value='{$PBname|escape}' /></td>
</tr>
<tr>
<td></td>
<td><input type='submit' value="{if $edit == 0}{'Create'|@translate}{else}{'Update'|@translate}{/if}" /></td>
</tr>
</table>
</fieldset>
</form>
<!-- If we are on the 'homepage', show a table of all copyrights -->
{if $edit == 0}
<form>
<fieldset>
<legend>{'Modifier un auteur'|@translate}</legend>
<table>
<tr>
<!-- Create a nice header row -->
<th>{'Name'|@translate}</th>
<th>{'Actions'|@translate}</th>
</tr>
<!-- Loop over all copyrights -->
{if not empty($PBs)}
{foreach from=$PBs item=PB}
{strip}
<tr class="{cycle values="row1,row2"}"> <!-- This gives nicely colored
table rows -->
<td>{$PB.name}</td>
<!-- Show nice Edit and Delete icons -->
<td>
<a href="{$PRODUCEDBY_PATH}-edit&id={$PB.pb_id}">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png"
alt="{'Edit'|@translate}" title="{'Edit'|@translate}" />
</a>
<a href="{$PRODUCEDBY_PATH}-delete&id={$PB.pb_id}" onclick="return confirm(document.getElementById('btn_delete').title + '\n\n' + '{'Etes vous sur?'|@translate|@escape:'javascript'}');">
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/delete.png"
id="btn_delete" alt="{'Supprimer'|@translate}" title="{'Supprimer un auteur'|@translate}" />
</a>
</td>
</tr>
{/strip}
{/foreach}
{/if}
</table>
</fieldset>
</form>
{/if}