source: extensions/rv_menutree/trunk/menubar_categories.tpl @ 6389

Last change on this file since 6389 was 6389, checked in by patdenice, 14 years ago

Compatibility with piwigo 2.1

File size: 2.2 KB
Line 
1{known_script id="rvtree" src=$rvmt.PATH|@cat:"rvtree-min.js" }
2{html_head}
3<style type="text/css">
4{$rvmt.CSS}
5</style>
6{/html_head}
7<dt>
8  {if isset($U_START_FILTER)}
9  <a href="{$U_START_FILTER}" title="{'display only recently posted images'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_filter.png" class="button" alt="start filter"></a>
10  {/if}
11  {if isset($U_STOP_FILTER)}
12  <a href="{$U_STOP_FILTER}" title="{'return to the display of all images'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_filter.png" class="button" alt="stop filter"></a>
13  {/if}
14        <a href="{$block->data.U_CATEGORIES}">{'Categories'|@translate}</a>
15</dt>
16<dd>
17{assign var='ref_level' value=0}
18{foreach from=$block->data.MENU_CATEGORIES item=cat key=key}
19  {if $cat.LEVEL > $ref_level}
20          {if $ref_level == 0}
21                  <ul class="rvTree" id="theCategoryMenu">
22                {else}
23                  <ul>
24                {/if}
25  {else}
26    </li>
27    {'</ul></li>'|@str_repeat:$ref_level-$cat.LEVEL}
28  {/if}
29        {if $cat.SELECTED}
30                {assign var=liclass value='selected '}
31        {else}
32                {assign var=liclass value=''}
33        {/if}
34        {if $cat.count_categories > 0}
35                {if $rvmt.ALL_OPEN or isset($rvmt.UPPER_IDS[$cat.id])}
36                        {assign var=liclass value=$liclass|@cat:'liOpen'}
37                {else}
38                        {assign var=liclass value=$liclass|@cat:'liClosed'}
39                {/if}
40        {/if}
41    <li {if !empty($liclass)}class="{$liclass}"{/if}>
42      <a href="{$cat.URL}" {if $cat.IS_UPPERCAT}rel="up"{/if} title="{$cat.TITLE}">{$cat.NAME}</a>
43      {if $cat.count_images > 0}
44      <span class="{if $cat.nb_images > 0}menuInfoCat{else}menuInfoCatByChild{/if}" title="{$cat.TITLE}">[{$cat.count_images}]</span>
45      {/if}
46      {if !empty($cat.icon_ts)}
47      <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
48      {/if}
49  {assign var='ref_level' value=$cat.LEVEL}
50{/foreach}
51{'</li></ul>'|@str_repeat:$ref_level}
52<script type="text/javascript">
53  RVTree.convertTree( document.getElementById("theCategoryMenu") );
54</script>
55        {if isset($block->data.U_UPLOAD)}
56        <ul>
57                <li>
58                        <a href="{$block->data.U_UPLOAD}">{'Upload a picture'|@translate}</a>
59                </li>
60        </ul>
61        {/if}
62        <p class="totalImages">{$pwg->l10n_dec('%d image', '%d images', $block->data.NB_PICTURE)}</p>
63</dd>
Note: See TracBrowser for help on using the repository browser.