source: extensions/Versa/template/thumbnails.tpl

Last change on this file was 31833, checked in by lexming, 7 years ago

Initial commit

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1{if !empty($thumbnails)}{strip}
2{html_style}
3{*Set some sizes according to maximum thumbnail width and height*}
4.thumbnails LI{ldelim}
5        max-width: {$derivative_params->max_width()}px;
6        flex-basis: {$derivative_params->max_width()/2}px;
7{rdelim}
8{/html_style}
9{footer_script}
10  var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png", max_requests = {$maxRequests};
11{/footer_script}
12{foreach from=$thumbnails item=thumbnail}
13{assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)}
14{if !$derivative->is_cached()}
15{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
16{combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
17{/if}
18<li>
19        <a href="{$thumbnail.URL}#theImage">
20                <img class="thumbPhoto" {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}">
21        </a>
22        {if $SHOW_THUMBNAIL_CAPTION }
23        <div class="thumbLegend">
24                <p class="thumbName"><span>{$thumbnail.NAME}
25                {if !empty($thumbnail.icon_ts)}
26                &nbsp;<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
27                {/if}
28                </span></p>
29                {if isset($thumbnail.NB_COMMENTS)}
30                <p class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"><span>
31                {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
32                </span></p>
33                {/if}
34                {if isset($thumbnail.NB_HITS)}
35                <p class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits"><span>
36                {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
37                </span></p>
38                {/if}
39        </div>
40        {/if}
41</li>
42{/foreach}{/strip}
43{/if}
Note: See TracBrowser for help on using the repository browser.