From 7798656c516db4a480f97d79e078917413a716ea Mon Sep 17 00:00:00 2001 From: Zaphod Date: Sun, 4 Mar 2012 16:28:42 +0000 Subject: 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 --- themes/default/template/picture.tpl | 63 +++++++++++++++++++++++++---- themes/default/template/picture_content.tpl | 41 ------------------- themes/default/template/slideshow.tpl | 2 + themes/default/theme.css | 9 +---- 4 files changed, 58 insertions(+), 57 deletions(-) (limited to 'themes/default') 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} -
-{/if} +{if isset($MENUBAR)}{$MENUBAR}{/if} +
{if isset($errors) or not empty($infos)} {include file='infos_errors.tpl'} {/if} @@ -12,13 +10,58 @@
- {$SECTION_TITLE} {$LEVEL_SEPARATOR}

{$current.TITLE}

+ {$SECTION_TITLE}{$LEVEL_SEPARATOR}

{$current.TITLE}

{$PHOTO}
+ +{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} + {'Photo sizes'|@translate} + +{/strip}{/if} + + {strip}{if isset($U_SLIDESHOW_START)} {'slideshow'|@translate} @@ -75,6 +118,7 @@ y.callService( {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
{**} +
{$ELEMENT_CONTENT} @@ -268,14 +312,17 @@ y.callService( {/if}
+
{if isset($COMMENT_COUNT)}
{if $COMMENT_COUNT > 0}

{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}

- {if $COMMENT_COUNT > 2} -
{$COMMENTS_ORDER_TITLE} - {/if} + {if $COMMENT_COUNT > 2} + {$COMMENTS_ORDER_TITLE} + {/if} + {else} +

{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}

{/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} -{$current.selected_derivative->get_type()|@translate} - -{/if} {foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip} 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'}
+
{$ELEMENT_CONTENT} {if isset($COMMENT_IMG)}

{$COMMENT_IMG}

{/if}
+
diff --git a/themes/default/theme.css b/themes/default/theme.css index fb6641223..2049d04af 100644 --- a/themes/default/theme.css +++ b/themes/default/theme.css @@ -340,14 +340,6 @@ TD.calDayHead { #imageToolBar .navigationButtons { float: right; } #imageToolBar .pwg-button {width:42px;} - -#derivativeSwitchLink { - padding: 0.2em; - position: absolute; - left: 5px; - top: 12%; -} - #derivativeSwitchBox, #sortOrderBox { padding: 0.5em 1em; border-radius: 4px; @@ -420,6 +412,7 @@ TD.calDayHead { clear: none; } +.noCommentText {display:none;} /** * Default Layout -- cgit v1.2.3