source: extensions/Extended_author/admin.tpl @ 11819

Last change on this file since 11819 was 11819, checked in by Mattias, 13 years ago

Added all files to the svn repository

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