aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-10-04 04:15:28 +0000
committerrvelices <rv-github@modusoptimus.com>2012-10-04 04:15:28 +0000
commitcc558d869496f051c1b667d37e4dcfc474c007d1 (patch)
treed6447c2284e229c432139dd23aa46b422fe134f9 /themes/default
parentb90d2721e5f7f81ac821ab5075472fbbb0917c67 (diff)
php optimizations:
- use faster [] operator instead of array_push - if tags are grouped by letter, don't add level to tags, sort etc ... git-svn-id: http://piwigo.org/svn/trunk@18455 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default')
-rw-r--r--themes/default/template/tags.tpl65
1 files changed, 32 insertions, 33 deletions
diff --git a/themes/default/template/tags.tpl b/themes/default/template/tags.tpl
index 2e47a3f83..c4327289a 100644
--- a/themes/default/template/tags.tpl
+++ b/themes/default/template/tags.tpl
@@ -19,40 +19,39 @@
{include file='infos_errors.tpl'}
-{if isset($tags)}
- {if $display_mode == 'cloud'}
- <div id="fullTagCloud">
- {foreach from=$tags item=tag}
- <span><a href="{$tag.URL}" class="tagLevel{$tag.level}" title="{$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}">{$tag.name}</a></span>
- {/foreach}
- </div>
- {/if}
- {if $display_mode == 'letters'}
- <table>
- <tr>
- <td valign="top">
- {foreach from=$letters item=letter}
- <fieldset class="tagLetter">
- <legend class="tagLetterLegend">{$letter.TITLE}</legend>
- <table class="tagLetterContent">
- {foreach from=$letter.tags item=tag}
- <tr class="tagLine">
- <td><a href="{$tag.URL}" title="{$tag.name}">{$tag.name}</a></td>
- <td class="nbEntries">{$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}</td>
- </tr>
- {/foreach}
- </table>
- </fieldset>
- {if isset($letter.CHANGE_COLUMN) }
- </td>
- <td valign="top">
- {/if}
- {/foreach}
- </td>
- </tr>
- </table>
- {/if}
+{if $display_mode == 'cloud' and isset($tags)}
+<div id="fullTagCloud">
+ {foreach from=$tags item=tag}
+ <span><a href="{$tag.URL}" class="tagLevel{$tag.level}" title="{$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}">{$tag.name}</a></span>
+ {/foreach}
+</div>
+{/if}
+
+{if $display_mode == 'letters' and isset($letters)}
+<table>
+ <tr>
+ <td valign="top">
+ {foreach from=$letters item=letter}
+<fieldset class="tagLetter">
+ <legend class="tagLetterLegend">{$letter.TITLE}</legend>
+ <table class="tagLetterContent">
+ {foreach from=$letter.tags item=tag}
+ <tr class="tagLine">
+ <td><a href="{$tag.URL}" title="{$tag.name}">{$tag.name}</a></td>
+ <td class="nbEntries">{$pwg->l10n_dec('%d photo', '%d photos', $tag.counter)}</td>
+ </tr>
+ {/foreach}
+ </table>
+</fieldset>
+ {if isset($letter.CHANGE_COLUMN) }
+ </td>
+ <td valign="top">
+ {/if}
+ {/foreach}
+ </td>
+ </tr>
+</table>
{/if}
</div> <!-- content -->