Changeset 18455 for trunk/themes/default


Ignore:
Timestamp:
Oct 4, 2012, 6:15:28 AM (12 years ago)
Author:
rvelices
Message:

php optimizations:

  • use faster [] operator instead of array_push
  • if tags are grouped by letter, don't add level to tags, sort etc ...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/template/tags.tpl

    r14240 r18455  
    2020{include file='infos_errors.tpl'}
    2121
    22 {if isset($tags)}
    23         {if $display_mode == 'cloud'}
    24         <div id="fullTagCloud">
    25                 {foreach from=$tags item=tag}
    26                 <span><a href="{$tag.URL}" class="tagLevel{$tag.level}" title="{$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}">{$tag.name}</a></span>
     22
     23{if $display_mode == 'cloud' and isset($tags)}
     24<div id="fullTagCloud">
     25        {foreach from=$tags item=tag}
     26        <span><a href="{$tag.URL}" class="tagLevel{$tag.level}" title="{$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}">{$tag.name}</a></span>
     27        {/foreach}
     28</div>
     29{/if}
     30
     31{if $display_mode == 'letters' and isset($letters)}
     32<table>
     33        <tr>
     34                <td valign="top">
     35        {foreach from=$letters item=letter}
     36<fieldset class="tagLetter">
     37        <legend class="tagLetterLegend">{$letter.TITLE}</legend>
     38        <table class="tagLetterContent">
     39                {foreach from=$letter.tags item=tag}
     40                <tr class="tagLine">
     41                        <td><a href="{$tag.URL}" title="{$tag.name}">{$tag.name}</a></td>
     42                        <td class="nbEntries">{$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}</td>
     43                </tr>
    2744                {/foreach}
    28         </div>
    29         {/if}
    30 
    31   {if $display_mode == 'letters'}
    32   <table>
    33     <tr>
    34       <td valign="top">
    35     {foreach from=$letters item=letter}
    36   <fieldset class="tagLetter">
    37     <legend class="tagLetterLegend">{$letter.TITLE}</legend>
    38     <table class="tagLetterContent">
    39       {foreach from=$letter.tags item=tag}
    40       <tr class="tagLine">
    41         <td><a href="{$tag.URL}" title="{$tag.name}">{$tag.name}</a></td>
    42         <td class="nbEntries">{$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}</td>
    43       </tr>
    44       {/foreach}
    45     </table>
    46   </fieldset>
    47       {if isset($letter.CHANGE_COLUMN) }
    48       </td>
    49       <td valign="top">
    50       {/if}
    51     {/foreach}
    52       </td>
    53     </tr>
    54   </table>
    55   {/if}
     45        </table>
     46</fieldset>
     47                {if isset($letter.CHANGE_COLUMN) }
     48                </td>
     49                <td valign="top">
     50                {/if}
     51        {/foreach}
     52                </td>
     53        </tr>
     54</table>
    5655{/if}
    5756
Note: See TracChangeset for help on using the changeset viewer.