source: extensions/Copyrights/admin.tpl @ 12192

Revision 12192, 3.2 KB checked in by Mattias, 8 years ago (diff)

Fixed a small bug with single quotes in the copyright name
and some very small things

Line 
1<div class = "titlePage">
2  <h2>{'Copyrights'|@translate}</h2>
3</div>
4
5<!-- Create the form for creating and editing copyrights -->
6<form action='{$COPYRIGHTS_PATH}-{if $edit == 0}create{else}update{/if}'
7      method='POST'>
8  <fieldset>
9    <legend>{if $edit == 0}{'Create copyright'|@translate}
10            {else}{'Update copyright'|@translate}{/if}</legend>
11      <!-- If $edit != 0 we should remember the id of the copyright that is
12           edited -->
13      {if $edit != 0}<input type='hidden' name='id' id='id' value='{$CRid}' />{/if}
14      <!-- Put all the attributes of the copyright in a nice table -->
15      <table>
16        <tr>
17          <td>{'Name'|@translate}</td>
18          <td><input type='text' name='name' id='name' value='{$CRname|escape}' /></td>
19        </tr>
20        <tr>
21          <td>{'URL'|@translate}</td>
22          <td><input type='text' name='url'  id='url'  value='{$CRurl|escape}' /></td>
23        </tr>
24        <tr>
25          <td>{'Description'|@translate}</td>
26          <td><textarea name='descr' id='descr'>{$CRdescr}</textarea></td>
27        </tr>
28        <tr>
29          <td>{'Visible'|@translate}</td>
30          <td>{if $CRvisible != 0}
31            <input type='checkbox' name='visible' id='visible' value='show' checked='checked' />
32          {else}
33            <input type='checkbox' name='visible' id='visible' value='show' />
34            {/if}</td>
35        </tr>
36        <tr>
37          <td></td>
38          <td><input type='submit' value="{if $edit == 0}{'Create'|@translate}{else}{'Update'|@translate}{/if}" /></td>
39        </tr>
40      </table>
41  </fieldset>
42</form>
43
44<!-- If we are on the 'homepage', show a table of all copyrights -->
45{if $edit == 0}
46<form>
47  <fieldset>
48    <legend>{'Edit copyright'|@translate}</legend>
49    <table>
50      <tr>
51        <!-- Create a nice header row -->
52        <th>{'Name'|@translate}</th>
53        <th>{'URL'|@translate}</th>
54        <th>{'Description'|@translate}</th>
55        <th>{'Visible'|@translate}</th>
56        <th>{'Actions'|@translate}</th>
57      </tr>
58    <!-- Loop over all copyrights -->
59    {if not empty($CRs)}
60    {foreach from=$CRs item=CR}
61    {strip}
62      <tr class="{cycle values="row1,row2"}"> <!-- This gives nicely colored
63                                                   table rows -->
64        <td>{$CR.name}</td>
65        <td><a href="{$CR.url}">{$CR.url}</a></td>
66        <td>{$CR.descr}</td>
67        <td>{if $CR.visible != 0}{'Yes'|@translate}
68          {else}{'No'|@translate}{/if}
69        </td>
70        <!-- Show nice Edit and Delete icons -->
71        <td>
72          <a href="{$COPYRIGHTS_PATH}-edit&id={$CR.cr_id}">
73            <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/edit_s.png"
74            alt="{'Edit'|@translate}" title="{'Edit'|@translate}" />
75          </a>
76          <a href="{$COPYRIGHTS_PATH}-delete&id={$CR.cr_id}" onclick="return confirm(document.getElementById('btn_delete').title + '\n\n' + '{'Are you sure?'|@translate|@escape:'javascript'}');">
77            <img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/delete.png"
78            id="btn_delete" alt="{'Delete'|@translate}" title="{'Delete copyright'|@translate}" />
79          </a>
80        </td>
81      </tr>
82    {/strip}
83    {/foreach}
84    {/if}
85    </table>
86  </fieldset>
87</form>
88{/if}
Note: See TracBrowser for help on using the repository browser.