source: extensions/PwgCarbon/template/thumbnails.tpl @ 25996

Last change on this file since 25996 was 25996, checked in by Miklfe, 10 years ago
File size: 2.9 KB
Line 
1{if !empty($thumbnails)}{strip}
2{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
3{combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
4{*define_derivative name='derivative_params' width=160 height=90 crop=true*}
5{html_style}
6{*Set some sizes according to maximum thumbnail width and height*}
7
8.thumbnails .wrap2{ldelim}
9        height: {$derivative_params->max_height()+3}px;
10}
11{if $derivative_params->max_width() > 600}
12.thumbLegend {ldelim}font-size: 130%}
13{else}
14{if $derivative_params->max_width() > 400}
15.thumbLegend {ldelim}font-size: 110%}
16{else}
17.thumbLegend {ldelim}font-size: 90%}
18{/if}
19{/if}
20{/html_style}
21
22
23
24{foreach from=$thumbnails item=thumbnail}
25{assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)}
26        <li>
27        <span class="wrap1">
28                <span class="wrap2">
29                <div class="thumbnail">         
30                        {if ($PwgCarbon.lytebox)==1}
31                                <a href="{$thumbnail.path}" class="lytebox" data-lyte-options="borderSize:100 slide:true group:name showNavigation:true navType:1 slideInterval:10000 pauseOnPrevClick:true pauseOnNextClick:true" title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'&#39;'|replace:'"':'&quot;'}">
32                                        {else}
33                        <a href="{$thumbnail.URL}">
34                        {/if}
35                                <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
36                                {if (empty($PwgCarbon.thumbreflex)) or (($PwgCarbon.thumbreflex)==1)}
37                                {footer_script}{literal}
38                                jQuery(function($) {
39                                        $(".thumbnail").reflect({height:0.2,opacity:0.2});
40                                });
41                                {/literal}{/footer_script}
42                                {/if}
43                        </a>
44                        {if $SHOW_THUMBNAIL_CAPTION }
45                        {if ($PwgCarbon.lytebox)==1}
46                                <a href="{$thumbnail.path}" class="lytebox" data-lyte-options="borderSize:100 slide:true group:name showNavigation:true navType:1 slideInterval:10000 pauseOnPrevClick:true pauseOnNextClick:true" title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'&#39;'|replace:'"':'&quot;'}">
47                                        {else}
48                        <a href="{$thumbnail.URL}">
49                        {/if}
50
51                        <div class=description>
52                                <span class="thumbLegend">
53                                                <span class="thumbName">{$thumbnail.NAME}</span>
54                                                {if !empty($thumbnail.icon_ts)}
55                                                        <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)">
56                                                {/if}
57                                        {if isset($thumbnail.NB_COMMENTS)}
58                                                <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
59                                                        <br>
60                                                        {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
61                                                </span>
62                                        {/if}
63                                        {if isset($thumbnail.NB_HITS)}
64                                                <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
65                                                        <br>
66                                                        {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
67                                                </span>
68                                        {/if}
69                                </span>
70                        </div>
71                        </a>
72                        </div>                         
73                </span>
74                {/if}
75        </span>
76        </li>
77
78{/foreach}{/strip}
79{/if}
Note: See TracBrowser for help on using the repository browser.