aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/template
diff options
context:
space:
mode:
authorZaphod <zaphod@piwigo.org>2012-03-04 16:28:42 +0000
committerZaphod <zaphod@piwigo.org>2012-03-04 16:28:42 +0000
commit7798656c516db4a480f97d79e078917413a716ea (patch)
tree296acd5df5139752e16b4c9d9feb76892f8bceac /themes/default/template
parentced48bdf83739affcd94f9e6ed02ca802da135e0 (diff)
feature 2588: template modification for v2.4
-> #content on picture & slideshow page -> class 'browsePathSeparator' on LEVEL_SEPARATOR on browsePath -> derivativeSwitchLink replaced by pwg-size icon (with associated css modification on themes) -> new id #theImageAndInfos that contains #theImage and #imageInfos git-svn-id: http://piwigo.org/svn/trunk@13474 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/template')
-rw-r--r--themes/default/template/picture.tpl63
-rw-r--r--themes/default/template/picture_content.tpl41
-rw-r--r--themes/default/template/slideshow.tpl2
3 files changed, 57 insertions, 49 deletions
diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl
index 2dfa597f0..98ca6cf5d 100644
--- a/themes/default/template/picture.tpl
+++ b/themes/default/template/picture.tpl
@@ -1,10 +1,8 @@
{* Example of resizeable
{include file='include/autosize.inc.tpl'}
*}
-{if isset($MENUBAR)}
-{$MENUBAR}
-<div id="content" class="contentWithMenu">
-{/if}
+{if isset($MENUBAR)}{$MENUBAR}{/if}
+<div id="content" {if isset($MENUBAR)}class="contentWithMenu"{/if}>
{if isset($errors) or not empty($infos)}
{include file='infos_errors.tpl'}
{/if}
@@ -12,13 +10,58 @@
<div id="imageHeaderBar">
<div class="browsePath">
- {$SECTION_TITLE} {$LEVEL_SEPARATOR} <h2>{$current.TITLE}</h2>
+ {$SECTION_TITLE}<span class="browsePathSeparator">{$LEVEL_SEPARATOR}</span><h2>{$current.TITLE}</h2>
</div>
<div class="imageNumber">{$PHOTO}</div>
</div>
<div id="imageToolBar">
<div class="actionButtons">
+
+{if count($current.unique_derivatives)>1}
+{footer_script}{literal}
+function changeImgSrc(url,typeSave,typeMap,typeDisplay)
+{
+ var theImg = document.getElementById("theMainImage");
+ if (theImg)
+ {
+ theImg.removeAttribute("width");theImg.removeAttribute("height");
+ theImg.src = url;
+ var elt = document.getElementById("derivativeSwitchLink");
+ if (elt) elt.innerHTML = typeDisplay;
+ theImg.useMap = "#map"+typeMap;
+ }
+ document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
+}
+
+function toggleDerivativeSwitchBox()
+{
+ var elt = document.getElementById("derivativeSwitchBox"),
+ ePos = document.getElementById("derivativeSwitchLink");
+ if (elt.style.display==="none")
+ {
+ elt.style.position = "absolute";
+ elt.style.left = (ePos.offsetLeft+10)+"px";
+ elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
+ elt.style.display="";
+ }
+ else
+ elt.style.display="none";
+}
+{/literal}{/footer_script}
+{strip}<a id="derivativeSwitchLink" href="javascript:toggleDerivativeSwitchBox()" 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" onclick="toggleDerivativeSwitchBox()" style="display:none">
+{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
+<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}','{$derivative->get_type()|@translate|@escape:javascript}')">{$derivative->get_type()|@translate} ({$derivative->get_size_hr()})</a><br>
+{/foreach}
+{if isset($U_ORIGINAL)}
+<a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'Original'|@translate}</a>
+{/if}
+</div>
+{/strip}{/if}
+
+
{strip}{if isset($U_SLIDESHOW_START)}
<a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
<span class="pwg-icon pwg-icon-slideshow"> </span><span class="pwg-button-text">{'slideshow'|@translate}</span>
@@ -75,6 +118,7 @@ y.callService(
{include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
</div>{*<!-- imageToolBar -->*}
+<div id="theImageAndInfos">
<div id="theImage">
{$ELEMENT_CONTENT}
@@ -268,14 +312,17 @@ y.callService(
</table>
{/if}
</div>
+</div>
{if isset($COMMENT_COUNT)}
<div id="comments">
{if $COMMENT_COUNT > 0}
<h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
- {if $COMMENT_COUNT > 2}
- <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow">{$COMMENTS_ORDER_TITLE}</a>
- {/if}
+ {if $COMMENT_COUNT > 2}
+ <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow">{$COMMENTS_ORDER_TITLE}</a>
+ {/if}
+ {else}
+ <h3 class="noCommentText">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
{/if}
{if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
diff --git a/themes/default/template/picture_content.tpl b/themes/default/template/picture_content.tpl
index 37c9a0a2e..abf3766c6 100644
--- a/themes/default/template/picture_content.tpl
+++ b/themes/default/template/picture_content.tpl
@@ -2,47 +2,6 @@
{if isset($COMMENT_IMG)}
title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
{/if}>
-{if count($current.unique_derivatives)>1}
-{footer_script}{literal}
-function changeImgSrc(url,typeSave,typeMap,typeDisplay)
-{
- var theImg = document.getElementById("theMainImage");
- if (theImg)
- {
- theImg.removeAttribute("width");theImg.removeAttribute("height");
- theImg.src = url;
- var elt = document.getElementById("derivativeSwitchLink");
- if (elt) elt.innerHTML = typeDisplay;
- theImg.useMap = "#map"+typeMap;
- }
- document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
-}
-
-function toggleDerivativeSwitchBox()
-{
- var elt = document.getElementById("derivativeSwitchBox"),
- ePos = document.getElementById("derivativeSwitchLink");
- if (elt.style.display==="none")
- {
- elt.style.position = "absolute";
- elt.style.left = (ePos.offsetLeft+10)+"px";
- elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
- elt.style.display="";
- }
- else
- elt.style.display="none";
-}
-{/literal}{/footer_script}
-<a id="derivativeSwitchLink" href="javascript:toggleDerivativeSwitchBox()">{$current.selected_derivative->get_type()|@translate}</a>
-<div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none">
-{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
-<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}','{$derivative->get_type()|@translate|@escape:javascript}')">{$derivative->get_type()|@translate} ({$derivative->get_size_hr()})</a><br>
-{/foreach}
-{if isset($U_ORIGINAL)}
-<a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'Original'|@translate}</a>
-{/if}
-</div>
-{/if}
{foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip}
<map name="map{$derivative->get_type()}" id="map{$derivative->get_type()}">
diff --git a/themes/default/template/slideshow.tpl b/themes/default/template/slideshow.tpl
index 71fa06558..c37996ebe 100644
--- a/themes/default/template/slideshow.tpl
+++ b/themes/default/template/slideshow.tpl
@@ -12,9 +12,11 @@
{include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
</div>
+<div id="content">
<div id="theImage">
{$ELEMENT_CONTENT}
{if isset($COMMENT_IMG)}
<p class="showlegend">{$COMMENT_IMG}</p>
{/if}
</div>
+</div>