Directly display the picture page if it uses a representative pict

git-svn-id: http://piwigo.org/svn/trunk@23715 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
flop25
2013-06-30 19:41:33 +00:00
parent 85d592c8d4
commit 80576a8ff6
+7 -1
View File
@@ -8,12 +8,18 @@
<ul class="thumbnails">
{foreach from=$thumbnails item=thumbnail}{strip}
{assign var=derivative value=$pwg->derivative($thumbnail_derivative_params, $thumbnail.src_image)}
{if isset($page_selection[$thumbnail.id])}
{if isset($page_selection[$thumbnail.id]) and !isset($thumbnail.representative_ext)}
<li>
<a href="{$pwg->derivative_url($picture_derivative_params, $thumbnail.src_image)}" data-picture-url="{$thumbnail.URL}" rel="external">
<img {if !$derivative->is_cached()}data-{/if}src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}">
</a>
</li>
{elseif isset($thumbnail.representative_ext)}
<li>
<a href="{$thumbnail.URL}" target="_blank" onClick="window.location='{$thumbnail.URL}'">
<img {if !$derivative->is_cached()}data-{/if}src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}">
</a>
</li>
{else}
<li style="display:none;">
<a href="{$pwg->derivative_url($picture_derivative_params, $thumbnail.src_image)}" rel="external"></a>