bug:2848
Switch to Desktop link in the menu also git-svn-id: http://piwigo.org/svn/trunk@23716 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
80576a8ff6
commit
19ae5b7e2e
2 changed files with 24 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{if !empty($blocks) }
|
||||
<ul data-role="listview">
|
||||
<li data-icon="delete"><a href="#menubar" data-rel="close">Close</a></li>
|
||||
<li data-icon="delete"><a href="#menubar" data-rel="close">{'Close'|@translate}</a></li>
|
||||
</ul>
|
||||
{if !empty($blocks) }
|
||||
{foreach from=$blocks key=id item=block}
|
||||
<div data-role="collapsible" data-inset="false" data-icon="false">
|
||||
{if not empty($block->template)}
|
||||
|
|
@ -12,4 +12,9 @@
|
|||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/if}
|
||||
<br>
|
||||
<ul data-role="listview">
|
||||
<li data-role="list-divider">{'View in'|@translate}</li>
|
||||
<li><a href="{$TOGGLE_MOBILE_THEME_URL}">{'Desktop'|@translate}</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -56,6 +56,22 @@ if (!empty($_COOKIE['screen_size']))
|
|||
$this->assign('picture_derivative_params', ImageStdParams::get_by_type($type));
|
||||
$this->assign('thumbnail_derivative_params', ImageStdParams::get_by_type(IMG_SQUARE));
|
||||
|
||||
//------------------------------------------------------------- mobile version
|
||||
add_event_handler('init', 'mobile_link');
|
||||
|
||||
function mobile_link()
|
||||
{
|
||||
global $template, $conf;
|
||||
if ( !empty($conf['mobile_theme']) && (get_device() != 'desktop' || mobile_theme()))
|
||||
{
|
||||
$template->assign('TOGGLE_MOBILE_THEME_URL',
|
||||
add_url_params(
|
||||
duplicate_index_url(),
|
||||
array('mobile' => mobile_theme() ? 'false' : 'true')
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( !function_exists( 'add_menu_on_public_pages' ) ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue