[10874] | 1 | <div class = "titlePage"> |
---|
| 2 | <h2>{'Copyrights'|@translate}</h2> |
---|
| 3 | </div> |
---|
| 4 | |
---|
[11656] | 5 | <!-- Create the form for creating and editing copyrights --> |
---|
[11622] | 6 | <form action='{$COPYRIGHTS_PATH}-{if $edit == 0}create{else}update{/if}' |
---|
[10874] | 7 | method='POST'> |
---|
| 8 | <fieldset> |
---|
| 9 | <legend>{if $edit == 0}{'Create copyright'|@translate} |
---|
| 10 | {else}{'Update copyright'|@translate}{/if}</legend> |
---|
[11656] | 11 | <!-- If $edit != 0 we should remember the id of the copyright that is |
---|
| 12 | edited --> |
---|
[10874] | 13 | {if $edit != 0}<input type='hidden' name='id' id='id' value='{$CRid}' />{/if} |
---|
[11656] | 14 | <!-- Put all the attributes of the copyright in a nice table --> |
---|
[10874] | 15 | <table> |
---|
| 16 | <tr> |
---|
| 17 | <td>{'Name'|@translate}</td> |
---|
[12192] | 18 | <td><input type='text' name='name' id='name' value='{$CRname|escape}' /></td> |
---|
[10874] | 19 | </tr> |
---|
| 20 | <tr> |
---|
| 21 | <td>{'URL'|@translate}</td> |
---|
[12192] | 22 | <td><input type='text' name='url' id='url' value='{$CRurl|escape}' /></td> |
---|
[10874] | 23 | </tr> |
---|
| 24 | <tr> |
---|
[10973] | 25 | <td>{'Description'|@translate}</td> |
---|
[11143] | 26 | <td><textarea name='descr' id='descr'>{$CRdescr}</textarea></td> |
---|
[10973] | 27 | </tr> |
---|
| 28 | <tr> |
---|
[10874] | 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> |
---|
[11656] | 43 | |
---|
| 44 | <!-- If we are on the 'homepage', show a table of all copyrights --> |
---|
[10874] | 45 | {if $edit == 0} |
---|
| 46 | <form> |
---|
| 47 | <fieldset> |
---|
| 48 | <legend>{'Edit copyright'|@translate}</legend> |
---|
| 49 | <table> |
---|
| 50 | <tr> |
---|
[11656] | 51 | <!-- Create a nice header row --> |
---|
[10874] | 52 | <th>{'Name'|@translate}</th> |
---|
| 53 | <th>{'URL'|@translate}</th> |
---|
[10973] | 54 | <th>{'Description'|@translate}</th> |
---|
[10874] | 55 | <th>{'Visible'|@translate}</th> |
---|
| 56 | <th>{'Actions'|@translate}</th> |
---|
| 57 | </tr> |
---|
[11656] | 58 | <!-- Loop over all copyrights --> |
---|
[10874] | 59 | {if not empty($CRs)} |
---|
| 60 | {foreach from=$CRs item=CR} |
---|
| 61 | {strip} |
---|
[11656] | 62 | <tr class="{cycle values="row1,row2"}"> <!-- This gives nicely colored |
---|
| 63 | table rows --> |
---|
[10874] | 64 | <td>{$CR.name}</td> |
---|
| 65 | <td><a href="{$CR.url}">{$CR.url}</a></td> |
---|
[11624] | 66 | <td>{$CR.descr}</td> |
---|
[10874] | 67 | <td>{if $CR.visible != 0}{'Yes'|@translate} |
---|
| 68 | {else}{'No'|@translate}{/if} |
---|
| 69 | </td> |
---|
[11678] | 70 | <!-- Show nice Edit and Delete icons --> |
---|
[10874] | 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} |
---|