source: branches/2.4/themes/default/template/thumbnails.tpl @ 16523

Last change on this file since 16523 was 16523, checked in by flop25, 12 years ago

merge r16522 from branch 2.4 to trunk
only load the js for the ajax loading, if one picture needs to be generated
bug:2684

  • Property svn:eol-style set to LF
File size: 2.0 KB
Line 
1{if !empty($thumbnails)}{strip}
2{*define_derivative name='derivative_params' width=160 height=90 crop=true*}
3{html_style}
4{*Set some sizes according to maximum thumbnail width and height*}
5.thumbnails SPAN,
6.thumbnails .wrap2 A,
7.thumbnails LABEL{ldelim}
8        width: {$derivative_params->max_width()+2}px;
9}
10
11.thumbnails .wrap2{ldelim}
12        height: {$derivative_params->max_height()+3}px;
13}
14{if $derivative_params->max_width() > 600}
15.thumbLegend {ldelim}font-size: 130%}
16{else}
17{if $derivative_params->max_width() > 400}
18.thumbLegend {ldelim}font-size: 110%}
19{else}
20.thumbLegend {ldelim}font-size: 90%}
21{/if}
22{/if}
23{/html_style}
24{foreach from=$thumbnails item=thumbnail}
25{assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)}
26{if !$derivative->is_cached()}
27{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
28{combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
29{/if}
30<li>
31        <span class="wrap1">
32                <span class="wrap2">
33                <a href="{$thumbnail.URL}">
34                        <img class="thumbnail" {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax-loader-small.gif" data-src="{$derivative->get_url()}"{/if} alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
35                </a>
36                </span>
37                {if $SHOW_THUMBNAIL_CAPTION }
38                <span class="thumbLegend">
39                <span class="thumbName">{$thumbnail.NAME}</span>
40                {if !empty($thumbnail.icon_ts)}
41                <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)">
42                {/if}
43                {if isset($thumbnail.NB_COMMENTS)}
44                <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
45                <br>
46                {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
47                </span>
48                {/if}
49
50                {if isset($thumbnail.NB_HITS)}
51                <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
52                <br>
53                {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
54                </span>
55                {/if}
56                </span>
57                {/if}
58        </span>
59        </li>
60{/foreach}{/strip}
61{/if}
Note: See TracBrowser for help on using the repository browser.