diff options
author | rvelices <rv-github@modusoptimus.com> | 2011-12-27 05:26:44 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2011-12-27 05:26:44 +0000 |
commit | 753f58d6a966a1051dcd62a3eeab8fc18798bcac (patch) | |
tree | 2ebbfec86d511aa980e0d23c170bfa5006a8793e /themes/default/template | |
parent | e77e68b7db17c28c1ca44f4865758f2afb871d07 (diff) |
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
Diffstat (limited to 'themes/default/template')
-rw-r--r-- | themes/default/template/picture_content.tpl | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/themes/default/template/picture_content.tpl b/themes/default/template/picture_content.tpl index 53681b585..a4a9b4760 100644 --- a/themes/default/template/picture_content.tpl +++ b/themes/default/template/picture_content.tpl @@ -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}
\ No newline at end of file |