Ignore:
Timestamp:
Jul 7, 2011, 1:27:50 PM (13 years ago)
Author:
J.Commelin
Message:

Refactored code and added comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Copyrights/admin.tpl

    r11624 r11656  
    33</div>
    44
     5<!-- Create the form for creating and editing copyrights -->
    56<form action='{$COPYRIGHTS_PATH}-{if $edit == 0}create{else}update{/if}'
    67      method='POST'>
     
    89    <legend>{if $edit == 0}{'Create copyright'|@translate}
    910            {else}{'Update copyright'|@translate}{/if}</legend>
     11      <!-- If $edit != 0 we should remember the id of the copyright that is
     12           edited -->
    1013      {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 -->
    1115      <table>
    1216        <tr>
     
    3741  </fieldset>
    3842</form>
     43
     44<!-- If we are on the 'homepage', show a table of all copyrights -->
    3945{if $edit == 0}
    4046<form>
     
    4349    <table>
    4450      <tr>
     51        <!-- Create a nice header row -->
    4552        <th>{'Name'|@translate}</th>
    4653        <th>{'URL'|@translate}</th>
     
    4956        <th>{'Actions'|@translate}</th>
    5057      </tr>
     58    <!-- Loop over all copyrights -->
    5159    {if not empty($CRs)}
    5260    {foreach from=$CRs item=CR}
    5361    {strip}
    54       <tr class="{cycle values="row1,row2"}">
     62      <tr class="{cycle values="row1,row2"}"> <!-- This gives nicely colored
     63                                                   table rows -->
    5564        <td>{$CR.name}</td>
    5665        <td><a href="{$CR.url}">{$CR.url}</a></td>
Note: See TracChangeset for help on using the changeset viewer.