diff options
Diffstat (limited to 'themes/smartpocket/template')
-rw-r--r-- | themes/smartpocket/template/footer.tpl | 17 | ||||
-rw-r--r-- | themes/smartpocket/template/header.tpl | 4 | ||||
-rw-r--r-- | themes/smartpocket/template/index.tpl | 2 | ||||
-rw-r--r-- | themes/smartpocket/template/infos_errors.tpl | 32 | ||||
-rw-r--r-- | themes/smartpocket/template/menubar.tpl | 5 | ||||
-rw-r--r-- | themes/smartpocket/template/navigation_bar.tpl | 14 | ||||
-rw-r--r-- | themes/smartpocket/template/profile.tpl | 2 | ||||
-rw-r--r-- | themes/smartpocket/template/profile_content.tpl | 7 | ||||
-rw-r--r-- | themes/smartpocket/template/thumbnails.tpl | 25 |
9 files changed, 79 insertions, 29 deletions
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}
+<div class="pwg_footer ui-bar-a">
+ <h6>
+ {'Powered by'|@translate} <a href="{$PHPWG_URL}" class="Piwigo">Piwigo</a>
+ {$VERSION}
+ {if isset($CONTACT_MAIL)}
+ - {'Contact'|@translate}
+ <a href="mailto:{$CONTACT_MAIL}?subject={'A comment on your site'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
+ {/if}
+ <br>{'Display'|@translate} :
+ <b>{'Mobile'|@translate}</b> | <a href="{$TOGGLE_MOBILE_THEME_URL}">{'Classic'|@translate}</a>
+ </h6>
+</div>
+{/if}
{get_combined_scripts load='footer'}
</div><!-- /page -->
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 @@ </head>
<body>
-<div data-role="page">
+<div data-role="page" data-theme="a">
-<div data-role="header" data-theme="c">
+<div data-role="header">
<div class="title">
<a href="{$U_HOME}" class="home_button" data-icon="home" data-iconpos="notext" data-role="button"></a>
{$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 @@ -<div data-role="content">
+<div data-role="content" data-theme="a">
{if !empty($CATEGORIES)}{$CATEGORIES}{/if}
{if !empty($THUMBNAILS)}{$THUMBNAILS}{/if}
</div>
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) } -<div class="errors"> - <ul> - {foreach from=$errors item=error} - <li>{$error}</li> - {/foreach} - </ul> +{if isset($errors)} +<div class="ui-bar ui-bar-e errors"> + <h3>{'Error'|@translate}</h3> + <div><a href="#" data-role="button" data-icon="delete" data-iconpos="notext" class="close-button">Button</a></div> + <p>{'<br>'|@implode:$errors}</p> </div> {/if} {if not empty($infos)} -<div class="infos"> - <ul> - {foreach from=$infos item=info} - <li>{$info}</li> - {/foreach} - </ul> +<div class="ui-bar ui-bar-b infos"> + <h3>{'Info'|@translate}</h3> + <div><a href="#" data-role="button" data-icon="delete" data-iconpos="notext" class="close-button">Button</a></div> + <p>{'<br>'|@implode:$infos}</p> </div> -{/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 @@ <select name="identification" id="identification" data-icon="grid" data-iconpos="notext" data-native-menu="false"> - <option value="" data-placeholder="true">{'Identification'|@translate}</option> + <option></option> + <optgroup label="{'Identification'|@translate}"> {if isset($U_REGISTER)} <option value="{$U_REGISTER}">{'Register'|@translate}</option> @@ -18,6 +19,8 @@ <option value="{$U_ADMIN}">{'Administration'|@translate}</option> {/if} + </optgroup> + </select> {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} +<div class="ui-bar ui-bar-a" style="text-align:center;"> +<div data-role="controlgroup" data-type="horizontal"> +{strip} + {if isset($navbar.URL_PREV)} + <a href="{$navbar.URL_PREV}" rel="prev" data-role="button" data-icon="arrow-l" data-inline="true">{'Previous'|@translate}</a> + {/if} + <a href="#" data-role="button" data-inline="true">{$navbar.CURRENT_PAGE} / {$navbar.pages|@key} </a> + {if isset($navbar.URL_NEXT)} + <a href="{$navbar.URL_NEXT}" rel="next" data-role="button" data-icon="arrow-r" data-iconpos="right" data-inline="true">{'Next'|@translate}</a> + {/if} +{/strip} +</div> +</div> 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 @@ -<div data-role="content"> {include file='infos_errors.tpl'} +<div data-role="content"> {$PROFILE_CONTENT} </div> 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 @@ - <form method="post" name="profile" action="{$F_ACTION}" id="profile" class="properties"> <div data-role="fieldcontain"> @@ -30,6 +29,11 @@ {if $ALLOW_USER_CUSTOMIZATION} <div data-role="fieldcontain"> + <label for="nb_image_page">{'Number of photos per page'|@translate}</label> + <input type="range" name="nb_image_page" id="nb_image_page" value="{$NB_IMAGE_PAGE}" min="1" max="100" /> + </div> + + <div data-role="fieldcontain"> <label for="language">{'Language'|@translate}</label> {html_options name=language options=$language_options selected=$language_selection} </div> @@ -38,7 +42,6 @@ <div data-role="fieldcontain"> {if $ALLOW_USER_CUSTOMIZATION} - <input type="hidden" name="nb_image_page" value="{$NB_IMAGE_PAGE}"> <input type="hidden" name="theme" value="{$template_selection}"> <input type="hidden" name="recent_period" value="{$RECENT_PERIOD}"> <input type="hidden" name="expand" value="{$EXPAND}"> 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}
-<div data-role="content">
<ul class="thumbnails">
-{foreach from=$thumbnails item=thumbnail}
+{foreach from=$thumbnails item=thumbnail}{strip}
+{if isset($page_selection[$thumbnail.id])}
<li>
<a href="{$pwg->derivative_url($derivative_params_full, $thumbnail.src_image)}" rel="external">
<img src="{$pwg->derivative_url($derivative_params_thumb, $thumbnail.src_image)}" alt="{$thumbnail.TN_ALT}">
</a>
</li>
-{/foreach}
+{else}
+ <li style="display:none;">
+ <a href="{$pwg->derivative_url($derivative_params_full, $thumbnail.src_image)}" rel="external"></a>
+ </li>
+{/if}
+{/strip}{/foreach}
</ul>
-</div>
{/if}
|