source: trunk/themes/default/template/picture_content.tpl @ 12796

Last change on this file since 12796 was 12796, checked in by rvelices, 12 years ago

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 ...
  • Property svn:eol-style set to LF
File size: 938 bytes
Line 
1<img src="{$current.selected_derivative->get_url()}" {$current.selected_derivative->get_size_htm()} alt="{$ALT_IMG}" id="theMainImage"
2{if isset($COMMENT_IMG)}
3        title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
4{/if}>
5{if count($current.available_derivative_types)>1}
6{footer_script}{literal}
7function changeImgSrc(url,type)
8{
9        var theImg = document.getElementById("theMainImage");
10        if (theImg)
11        {
12                theImg.removeAttribute("width");theImg.removeAttribute("height");
13                theImg.src = url;
14        }
15        document.cookie = 'picture_deriv=' + type;
16}
17{/literal}{/footer_script}
18<p>
19{foreach from=$current.available_derivative_types item=derivative_type}
20<a onclick="changeImgSrc('{$current.derivatives[$derivative_type]->get_url()|@escape:javascript}', '{$derivative_type}')" title="{$current.derivatives[$derivative_type]->get_size_hr()}">{$derivative_type}</a>
21{/foreach}
22</p>
23{/if}
Note: See TracBrowser for help on using the repository browser.