aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default')
-rw-r--r--themes/default/template/picture_content.tpl35
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