From 26ed60c972da7e18325c35a62e72025d1a70fbf1 Mon Sep 17 00:00:00 2001 From: patdenice Date: Sat, 18 Feb 2012 20:26:52 +0000 Subject: feature:2577 Many improvements git-svn-id: http://piwigo.org/svn/trunk@13234 68402e56-0260-453c-a942-63ccdbb3a9ee --- themes/smartpocket/template/footer.tpl | 17 ++++++++++++- themes/smartpocket/template/header.tpl | 4 ++-- themes/smartpocket/template/index.tpl | 2 +- themes/smartpocket/template/infos_errors.tpl | 32 ++++++++++++++----------- themes/smartpocket/template/menubar.tpl | 5 +++- themes/smartpocket/template/navigation_bar.tpl | 14 +++++++++++ themes/smartpocket/template/profile.tpl | 2 +- themes/smartpocket/template/profile_content.tpl | 7 ++++-- themes/smartpocket/template/thumbnails.tpl | 25 +++++++++++++------ 9 files changed, 79 insertions(+), 29 deletions(-) create mode 100644 themes/smartpocket/template/navigation_bar.tpl (limited to 'themes/smartpocket/template') diff --git a/themes/smartpocket/template/footer.tpl b/themes/smartpocket/template/footer.tpl index 3de169077..5dec6da88 100644 --- a/themes/smartpocket/template/footer.tpl +++ b/themes/smartpocket/template/footer.tpl @@ -1,4 +1,19 @@ - +{if !empty($navbar)} +{include file='navigation_bar.tpl'|@get_extent:'navbar'} +{else} + +{/if} {get_combined_scripts load='footer'} diff --git a/themes/smartpocket/template/header.tpl b/themes/smartpocket/template/header.tpl index 06248f78c..d15821a19 100644 --- a/themes/smartpocket/template/header.tpl +++ b/themes/smartpocket/template/header.tpl @@ -46,9 +46,9 @@ -
+
-
+
{$GALLERY_TITLE} diff --git a/themes/smartpocket/template/index.tpl b/themes/smartpocket/template/index.tpl index f9d319783..6793bc493 100644 --- a/themes/smartpocket/template/index.tpl +++ b/themes/smartpocket/template/index.tpl @@ -1,4 +1,4 @@ -
+
{if !empty($CATEGORIES)}{$CATEGORIES}{/if} {if !empty($THUMBNAILS)}{$THUMBNAILS}{/if}
diff --git a/themes/smartpocket/template/infos_errors.tpl b/themes/smartpocket/template/infos_errors.tpl index ce2db88d9..72ae50f18 100644 --- a/themes/smartpocket/template/infos_errors.tpl +++ b/themes/smartpocket/template/infos_errors.tpl @@ -1,19 +1,23 @@ -{if isset($errors) } -
-
    - {foreach from=$errors item=error} -
  • {$error}
  • - {/foreach} -
+{if isset($errors)} +
+

{'Error'|@translate}

+ +

{'
'|@implode:$errors}

{/if} {if not empty($infos)} -
-
    - {foreach from=$infos item=info} -
  • {$info}
  • - {/foreach} -
+
+

{'Info'|@translate}

+ +

{'
'|@implode:$infos}

-{/if} \ No newline at end of file +{/if} + +{footer_script}{literal} +$(document).ready(function () { + $('.close-button').click(function() { + $(this).parents('.ui-bar').remove(); + }); +}); +{/literal}{/footer_script} \ No newline at end of file diff --git a/themes/smartpocket/template/menubar.tpl b/themes/smartpocket/template/menubar.tpl index 49fa37e14..e4679c98e 100644 --- a/themes/smartpocket/template/menubar.tpl +++ b/themes/smartpocket/template/menubar.tpl @@ -1,6 +1,7 @@ {footer_script}{literal} diff --git a/themes/smartpocket/template/navigation_bar.tpl b/themes/smartpocket/template/navigation_bar.tpl new file mode 100644 index 000000000..2dfbbe950 --- /dev/null +++ b/themes/smartpocket/template/navigation_bar.tpl @@ -0,0 +1,14 @@ +{capture}{$navbar.pages|@end}{/capture} +
+
+{strip} + {if isset($navbar.URL_PREV)} + + {/if} + {$navbar.CURRENT_PAGE} / {$navbar.pages|@key}  + {if isset($navbar.URL_NEXT)} + + {/if} +{/strip} +
+
diff --git a/themes/smartpocket/template/profile.tpl b/themes/smartpocket/template/profile.tpl index fde414605..f4c1b8f25 100644 --- a/themes/smartpocket/template/profile.tpl +++ b/themes/smartpocket/template/profile.tpl @@ -1,4 +1,4 @@ -
{include file='infos_errors.tpl'} +
{$PROFILE_CONTENT}
diff --git a/themes/smartpocket/template/profile_content.tpl b/themes/smartpocket/template/profile_content.tpl index 6c9cb5064..2b6604fa1 100644 --- a/themes/smartpocket/template/profile_content.tpl +++ b/themes/smartpocket/template/profile_content.tpl @@ -1,4 +1,3 @@ -
@@ -29,6 +28,11 @@ {/if} {if $ALLOW_USER_CUSTOMIZATION} +
+ + +
+
{html_options name=language options=$language_options selected=$language_selection} @@ -38,7 +42,6 @@
{if $ALLOW_USER_CUSTOMIZATION} - diff --git a/themes/smartpocket/template/thumbnails.tpl b/themes/smartpocket/template/thumbnails.tpl index 5e33dd0ee..acd20af19 100644 --- a/themes/smartpocket/template/thumbnails.tpl +++ b/themes/smartpocket/template/thumbnails.tpl @@ -2,7 +2,7 @@ {combine_script id='klass' path='themes/smartpocket/js/klass.min.js'} {combine_script id='photoswipe' path='themes/smartpocket/js/code.photoswipe.jquery.min.js' require='klass,jquery.mobile'} -{define_derivative name='derivative_params_thumb' width=150 height=150 crop=true} +{define_derivative name='derivative_params_thumb' width=120 height=120 crop=true} {define_derivative name='derivative_params_full' type='large'} {footer_script}{literal} @@ -10,23 +10,34 @@ $(document).ready(function(){ var options = { jQueryMobile: true, - //allowUserZoom: false, imageScaleMethod: "fitNoUpscale" }; $(".thumbnails a").photoSwipe(options); - $(".thumbnails img").load(function() { $(this).css('border', '1px solid #3c3c3c') }); + $(document).bind('orientationchange', set_thumbnails_width); + set_thumbnails_width(); }); }(window, window.jQuery, window.Code.PhotoSwipe)); + +function set_thumbnails_width() { + nb_thumbs = Math.max(3, Math.ceil($('.thumbnails').width() / 130)); + width = Math.floor(1000000 / nb_thumbs) / 10000; + $('.thumbnails li').css('width', width+'%'); +} + {/literal}{/footer_script} -
    -{foreach from=$thumbnails item=thumbnail} +{foreach from=$thumbnails item=thumbnail}{strip} +{if isset($page_selection[$thumbnail.id])}
  • {$thumbnail.TN_ALT}
  • -{/foreach} +{else} +
  • + +
  • +{/if} +{/strip}{/foreach}
-
{/if} -- cgit v1.2.3