source: extensions/rv_menutree/trunk/template/rv_menutree_categories.tpl @ 8308

Last change on this file since 8308 was 8308, checked in by rvelices, 10 years ago

rv_menutree compatible with piwigo trunk (future 2.2)

File size: 2.9 KB
Line 
1{html_head}
2<style type="text/css">
3/*.rvTree */li .bullet {ldelim}padding-left:14px;margin-left:0;background:url({$ROOT_URL}plugins/{$RVMT_BASE_NAME}/img/bpm.gif) no-repeat scroll;}
4/*.rvTree */.liOpen .bullet {ldelim}cursor:pointer;background-position:-38px center;}
5/*.rvTree */.liClosed .bullet {ldelim}cursor:pointer;background-position:-19px center;}
6/*.rvTree */.liBullet .bullet {ldelim}cursor:default;background-position:0 center;}
7/*.rvTree */.liClosed ul {ldelim}display:none;}
8</style>
9{/html_head}
10<dt>
11  {if isset($U_START_FILTER)}
12  <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>
13  {/if}
14  {if isset($U_STOP_FILTER)}
15  <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>
16  {/if}
17        <a href="{$block->data.U_CATEGORIES}">{'Albums'|@translate}</a>
18</dt>
19<dd>
20{assign var='ref_level' value=0}
21{foreach from=$block->data.MENU_CATEGORIES item=cat key=key}
22        {if $cat.LEVEL > $ref_level}
23                {if $ref_level == 0}
24                        <ul class="rvTree" id="theCategoryMenu">
25                {else}
26                        <ul>
27                {/if}
28        {else}
29        </li>
30        {'</ul></li>'|@str_repeat:$ref_level-$cat.LEVEL}
31        {/if}
32        {if $cat.SELECTED}
33                {assign var=liclass value='selected '}
34        {else}
35                {assign var=liclass value=''}
36        {/if}
37        {if $cat.count_categories > 0}
38                {if isset($U_STOP_FILTER) or isset($RVMT_UPPER_IDS[$cat.id])}
39                        {assign var=liclass value="`$liclass`liOpen"}
40                {else}
41                        {assign var=liclass value="`$liclass`liClosed"}
42                {/if}
43        {/if}
44        <li{if !empty($liclass)} class="{$liclass}"{/if}>
45                <a href="{$cat.URL}" {if $cat.IS_UPPERCAT}rel="up"{/if}>{$cat.NAME}</a>
46                {if $cat.count_images > 0}
47                <span class="{if $cat.nb_images > 0}menuInfoCat{else}menuInfoCatByChild{/if}" title="{$cat.TITLE}">[{$cat.count_images}]</span>
48                {/if}
49                {if !empty($cat.icon_ts)}
50                <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="(!)">
51                {/if}
52        {assign var='ref_level' value=$cat.LEVEL}
53{/foreach}
54{'</li></ul>'|@str_repeat:$ref_level}
55<script type="text/javascript">
56        var _rvTreeAutoQueue = _rvTreeAutoQueue || [];
57        _rvTreeAutoQueue.push(  document.getElementById("theCategoryMenu") );
58        (function () {ldelim}
59        var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '{$ROOT_URL}plugins/{$RVMT_BASE_NAME}/js/rvtree.min.js';
60        var s0 = document.getElementsByTagName('script')[0]; s0.parentNode.insertBefore(s, s0);
61        })();
62</script>
63        {if isset($block->data.U_UPLOAD)}
64        <ul>
65                <li>
66                        <a href="{$block->data.U_UPLOAD}">{'Upload a picture'|@translate}</a>
67                </li>
68        </ul>
69        {/if}
70        <p class="totalImages">{$pwg->l10n_dec('%d image', '%d images', $block->data.NB_PICTURE)}</p>
71</dd>
Note: See TracBrowser for help on using the repository browser.