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

Last change on this file since 6608 was 6608, checked in by rvelices, 14 years ago

rv_menutree improved javascript (faster, async loading in browser, better compressed zith google closure compiler)

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({$RVMT_PATH}img/bpm.gif) no-repeat scroll;}
4.rvTree li.liOpen .bullet {ldelim}cursor:pointer;background-position:-38px center;}
5.rvTree li.liClosed .bullet {ldelim}cursor:pointer;background-position:-19px center;}
6.rvTree li.liBullet .bullet {ldelim}cursor:default;background-position:0 center;}
7.rvTree li.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}">{'Categories'|@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|@cat:'liOpen'}
40                {else}
41                        {assign var=liclass value=$liclass|@cat:'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} title="{$cat.TITLE}">{$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        rvTreeAutoConvert = document.getElementById("theCategoryMenu");
57        (function () {ldelim}
58        var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '{$RVMT_PATH|@cat:"js/rvtree-min.js"}';
59        var s0 = document.getElementsByTagName('script')[0]; s0.parentNode.insertBefore(s, s0);
60        })();
61  //RVTree.convertTree( document.getElementById("theCategoryMenu") );
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.