aboutsummaryrefslogtreecommitdiffstats
path: root/template/yoga
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2009-03-04 21:49:21 +0000
committerpatdenice <patdenice@piwigo.org>2009-03-04 21:49:21 +0000
commitd3e6eabb053f311d5d8fd4ec80cfb0c1b32cf141 (patch)
tree8d1a164df1106c5238917c94ef8eaffb4f152b5b /template/yoga
parent9045f11c700970825022eb2762cfeb8db0598764 (diff)
Remove get_html_menu_category function and use smarty abilities.
git-svn-id: http://piwigo.org/svn/trunk@3171 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--template/yoga/menubar_categories.tpl19
1 files changed, 18 insertions, 1 deletions
diff --git a/template/yoga/menubar_categories.tpl b/template/yoga/menubar_categories.tpl
index 221a6d709..d650c49b9 100644
--- a/template/yoga/menubar_categories.tpl
+++ b/template/yoga/menubar_categories.tpl
@@ -8,7 +8,24 @@
<a href="{$block->data.U_CATEGORIES}">{'Categories'|@translate}</a>
</dt>
<dd>
- {$block->data.MENU_CATEGORIES_CONTENT}
+{assign var='ref_level' value=0}
+{foreach from=$block->data.MENU_CATEGORIES item=cat}
+ {if $cat.LEVEL > $ref_level}
+ <ul>
+ {else}
+ </li>
+ {'</ul></li>'|@str_repeat:$ref_level-$cat.LEVEL}
+ {/if}
+ <li {if $cat.SELECTED}class="selected"{/if}>
+ <a href="{$cat.URL}" {if $cat.IS_UPPERCAT}rel="up"{/if} title="{$cat.TITLE}">{$cat.NAME}</a>
+ {if $cat.count_images > 0}
+ <span class="{if $cat.nb_images > 0}menuInfoCat{else}menuInfoCatByChild{/if}" title="{$cat.TITLE}">[{$cat.count_images}]</span>
+ {/if}
+ {$cat.ICON_TS}
+ {assign var='ref_level' value=$cat.LEVEL}
+{/foreach}
+{'</li></ul>'|@str_repeat:$ref_level}
+
{if isset($block->data.U_UPLOAD)}
<ul>
<li>