feature 2541 multisize

- core implementation + usage on most public/admin pages
- still to do: sync process, upload, gui/persistence for size parameters, migration script, center of interest ...

git-svn-id: http://piwigo.org/svn/trunk@12796 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices 2011-12-27 05:26:44 +00:00
commit 753f58d6a9
27 changed files with 1113 additions and 208 deletions

View file

@ -1,12 +1,23 @@
{if isset($high)}
{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
<a href="javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')">
{/if}
<img src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}" id="theMainImage"
{if isset($COMMENT_IMG)}
title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
{/if}>
{if isset($high) }
</a>
<p>{'Click on the photo to see it in high definition'|@translate}</p>
{/if}
<img src="{$current.selected_derivative->get_url()}" {$current.selected_derivative->get_size_htm()} alt="{$ALT_IMG}" id="theMainImage"
{if isset($COMMENT_IMG)}
title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
{/if}>
{if count($current.available_derivative_types)>1}
{footer_script}{literal}
function changeImgSrc(url,type)
{
var theImg = document.getElementById("theMainImage");
if (theImg)
{
theImg.removeAttribute("width");theImg.removeAttribute("height");
theImg.src = url;
}
document.cookie = 'picture_deriv=' + type;
}
{/literal}{/footer_script}
<p>
{foreach from=$current.available_derivative_types item=derivative_type}
<a onclick="changeImgSrc('{$current.derivatives[$derivative_type]->get_url()|@escape:javascript}', '{$derivative_type}')" title="{$current.derivatives[$derivative_type]->get_size_hr()}">{$derivative_type}</a>
{/foreach}
</p>
{/if}