source: extensions/Slimi/template/thumbnails.tpl @ 18812

Last change on this file since 18812 was 18812, checked in by Miklfe, 11 years ago
File size: 3.1 KB
Line 
1{php}
2    global $page, $template;
3    $template->assign('cat_name', $page['category']['name']);
4       
5        global $Slimi;  $this->assign( 'Slimi', $Slimi);
6{/php}
7
8
9<div id="carouselthumb">
10<div id="wrap">
11<ul id="carousel" class="jcarousel-skin-cat">
12                {if !empty($category_thumbnails)}
13               
14                {foreach from=$category_thumbnails item=cat}
15
16
17                        <li>
18                                        <div class="illustration">
19                                                <a href="{$cat.URL}">
20                                                        <img src="{$ROOT_URL}{$cat.representative.path}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$derivative_params->max_width()}" height="{$derivative_params->max_height()-2}"/>
21                                                        <div class="CatMPdescription">
22                                                                <h3>
23                                                                        {$cat.NAME}
24                                                                        {if !empty($cat.icon_ts)}
25                                                                        <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" alt="(!)">
26                                                                        {/if}
27                                                                </h3>
28                                                               
29                                                                {if isset($cat.INFO_DATES) }
30                                                                <p class="dates">{$cat.INFO_DATES}</p>
31                                                                {/if}
32                                                                <p class="Nb_images">{$cat.CAPTION_NB_IMAGES}</p>
33                                                                {if not empty($cat.DESCRIPTION)}
34                                                                <p>{$cat.DESCRIPTION}</p>
35                                                                {/if}
36                                                        </div>
37                                                </a>
38                                        </div>
39                        </li>
40                {/foreach}{/if}
41
42
43        {foreach from=$thumbnails item=thumbnail}
44        {assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)}
45                <li>
46                        <div class="iIllustration">
47
48                                <a href="{if ($Slimi.lytebox_slimi)==1}{$thumbnail.path}" class="lytebox" rev="slide:true group:name showNavigation:true navType:1 slideInterval:6000"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'&#39;'|replace:'"':'&quot;'}">
49                                <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" min-width="{$derivative_params->max_width()}" height="{$derivative_params->max_height()}"/>
50                       
51                               
52                               
53                {if $SHOW_THUMBNAIL_CAPTION }
54                        <div class="CatMPdescription">
55                                                <H3>
56                                                {$thumbnail.NAME}
57                                                {if !empty($thumbnail.icon_ts)}
58                                                        <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)">
59                                                {/if}
60                                                </h3>
61                                        {if isset($thumbnail.NB_COMMENTS)}
62                                                <p class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
63                                                        {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
64                                                </p>
65                                        {/if}
66                                        {if isset($thumbnail.NB_HITS)}
67                                                <p class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
68                                                        {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
69                                                </p>
70                                        {/if}
71                        </div>
72                {/if}
73                                </a>   
74                        </div> 
75                </li>
76        {/foreach}
77</ul>
78{footer_script}{literal}
79function mycarousel_initCallback(carousel)
80{
81    // Pause autoscrolling if the user moves with the cursor over the clip.
82    carousel.clip.hover(function() {
83        carousel.stopAuto();
84    }, function() {
85        carousel.startAuto();
86    });
87};
88
89jQuery(document).ready(function() {
90    jQuery('#carousel').jcarousel({
91        auto: 0,
92                wrap: 'circular',
93                scroll: 2,
94                initCallback: mycarousel_initCallback,
95               
96    });
97});
98
99{/literal}{/footer_script}
100
101</div>
102</div>
Note: See TracBrowser for help on using the repository browser.