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{footer_script}
25  var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png", max_requests = {$maxRequests};
26{/footer_script}
27{foreach from=$thumbnails item=thumbnail}
28{assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)}
29{if !$derivative->is_cached()}
30{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
31{combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
32{/if}
33<li>
34	<span class="wrap1">
35		<span class="wrap2">
36		<a href="{$thumbnail.URL}">
37			<img class="thumbnail" {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="{$ROOT_URL}{$themeconf.icon_dir}/img_small.png" data-src="{$derivative->get_url()}"{/if} alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
38		</a>
39		</span>
40		{if $SHOW_THUMBNAIL_CAPTION }
41		<span class="thumbLegend">
42		<span class="thumbName">{$thumbnail.NAME}</span>
43		{if !empty($thumbnail.icon_ts)}
44		<img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)">
45		{/if}
46		{if isset($thumbnail.NB_COMMENTS)}
47		<span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
48		<br>
49		{$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
50		</span>
51		{/if}
52
53		{if isset($thumbnail.NB_HITS)}
54		<span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
55		<br>
56		{$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
57		</span>
58		{/if}
59		</span>
60		{/if}
61	</span>
62	</li>
63{/foreach}{/strip}
64{/if}
65