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

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

Themes can define their own rv_menutree_categories.tpl

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