source: trunk/themes/default/template/thumbnails.tpl @ 16504

Revision 16504, 2.0 KB checked in by flop25, 7 years ago (diff)

adding the loader ajax-loader-small.gif for thumbnails.tpl & mainpage_categories.tpl
bug:2684

  • Property svn:eol-style set to LF
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.thumbnails SPAN,
8.thumbnails .wrap2 A,
9.thumbnails LABEL{ldelim}
10        width: {$derivative_params->max_width()+2}px;
11}
12
13.thumbnails .wrap2{ldelim}
14        height: {$derivative_params->max_height()+3}px;
15}
16{if $derivative_params->max_width() > 600}
17.thumbLegend {ldelim}font-size: 130%}
18{else}
19{if $derivative_params->max_width() > 400}
20.thumbLegend {ldelim}font-size: 110%}
21{else}
22.thumbLegend {ldelim}font-size: 90%}
23{/if}
24{/if}
25{/html_style}
26{foreach from=$thumbnails item=thumbnail}
27{assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)}
28        <li>
29        <span class="wrap1">
30                <span class="wrap2">
31                <a href="{$thumbnail.URL}">
32                        <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}">
33                </a>
34                </span>
35                {if $SHOW_THUMBNAIL_CAPTION }
36                <span class="thumbLegend">
37                <span class="thumbName">{$thumbnail.NAME}</span>
38                {if !empty($thumbnail.icon_ts)}
39                <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)">
40                {/if}
41                {if isset($thumbnail.NB_COMMENTS)}
42                <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
43                <br>
44                {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
45                </span>
46                {/if}
47
48                {if isset($thumbnail.NB_HITS)}
49                <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
50                <br>
51                {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
52                </span>
53                {/if}
54                </span>
55                {/if}
56        </span>
57        </li>
58{/foreach}{/strip}
59{/if}
Note: See TracBrowser for help on using the repository browser.