source: trunk/themes/smartpocket/template/thumbnails.tpl @ 23715

Last change on this file since 23715 was 23715, checked in by flop25, 11 years ago

Directly display the picture page if it uses a representative pict

File size: 1.5 KB
Line 
1{if !empty($thumbnails)}
2{combine_script id='klass' path='themes/smartpocket/js/klass.min.js'}
3{combine_script id='photoswipe' path='themes/smartpocket/js/code.photoswipe.jquery.min.js' require='klass,jquery.mobile'}
4{combine_script id='smartpocket' path='themes/smartpocket/js/smartpocket.js' require='photoswipe'}
5{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
6{combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
7
8<ul class="thumbnails">
9{foreach from=$thumbnails item=thumbnail}{strip}
10{assign var=derivative value=$pwg->derivative($thumbnail_derivative_params, $thumbnail.src_image)}
11{if isset($page_selection[$thumbnail.id]) and !isset($thumbnail.representative_ext)}
12  <li>
13    <a href="{$pwg->derivative_url($picture_derivative_params, $thumbnail.src_image)}" data-picture-url="{$thumbnail.URL}" rel="external">
14     <img {if !$derivative->is_cached()}data-{/if}src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}">
15    </a>
16  </li>
17{elseif isset($thumbnail.representative_ext)}
18  <li>
19    <a href="{$thumbnail.URL}" target="_blank" onClick="window.location='{$thumbnail.URL}'">
20     <img {if !$derivative->is_cached()}data-{/if}src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}">
21    </a>
22  </li>
23{else}
24  <li style="display:none;">
25    <a href="{$pwg->derivative_url($picture_derivative_params, $thumbnail.src_image)}" rel="external"></a>
26  </li>
27{/if}
28{/strip}{/foreach}
29</ul>
30{/if}
Note: See TracBrowser for help on using the repository browser.