aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/template/index.tpl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--themes/default/template/index.tpl33
1 files changed, 33 insertions, 0 deletions
diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl
index bac0125e5..5f0853071 100644
--- a/themes/default/template/index.tpl
+++ b/themes/default/template/index.tpl
@@ -35,6 +35,39 @@ function toggleSortOrderBox()
{/literal}{/footer_script}
{/strip}</li>
{/if}
+
+{if !empty($image_derivatives)}
+ <li>{strip}<a href="javascript:toggleImageDerivativesBox()" id="derivativeChooseLink" title="{'Photo Sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
+ <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo Sizes'|@translate}</span>
+ </a>
+ <div id="derivativeSwitchBox" style="display:none; text-align:left" onclick="toggleImageDerivativesBox()">
+ {foreach from=$image_derivatives item=image_derivative name=deriv_loop}{if !$smarty.foreach.deriv_loop.first}<br>{/if}
+ {if $image_derivative.SELECTED}
+ <span>{$image_derivative.DISPLAY}</span>
+ {else}
+ <a href="{$image_derivative.URL}" rel="nofollow">{$image_derivative.DISPLAY}</a>
+ {/if}
+ {/foreach}
+ </div>
+ {footer_script}{literal}
+function toggleImageDerivativesBox()
+{
+ var elt = document.getElementById("derivativeSwitchBox"),
+ ePos = document.getElementById("derivativeChooseLink");
+ if (elt.style.display==="none")
+ {
+ elt.style.position = "absolute";
+ elt.style.left = (ePos.offsetLeft) + "px";
+ elt.style.top = (ePos.offsetTop + ePos.offsetHeight) + "px";
+ elt.style.display="";
+ }
+ else
+ elt.style.display="none";
+}
+ {/literal}{/footer_script}
+ {/strip}</li>
+{/if}
+
{if isset($favorite)}
<li><a href="{$favorite.U_FAVORITE}" title="{'delete all photos from your favorites'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
<span class="pwg-icon pwg-icon-favorite-del">&nbsp;</span><span class="pwg-button-text">{'delete all photos from your favorites'|@translate}</span>