Changeset 23716 for trunk


Ignore:
Timestamp:
Jun 30, 2013, 10:10:04 PM (11 years ago)
Author:
flop25
Message:

bug:2848
Switch to Desktop link in the menu also

Location:
trunk/themes/smartpocket
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/smartpocket/template/menubar.tpl

    r23713 r23716  
     1<ul data-role="listview">
     2  <li data-icon="delete"><a href="#menubar" data-rel="close">{'Close'|@translate}</a></li>
     3</ul>
    14{if !empty($blocks) }
    2 <ul data-role="listview">
    3   <li data-icon="delete"><a href="#menubar" data-rel="close">Close</a></li>
    4 </ul>
    55        {foreach from=$blocks key=id item=block}
    66                <div data-role="collapsible" data-inset="false" data-icon="false">
     
    1414        {/foreach}
    1515{/if}
     16<br>
     17<ul data-role="listview">
     18  <li data-role="list-divider">{'View in'|@translate}</li>
     19  <li><a href="{$TOGGLE_MOBILE_THEME_URL}">{'Desktop'|@translate}</a></li>
     20</ul>
  • trunk/themes/smartpocket/themeconf.inc.php

    r23713 r23716  
    5757$this->assign('thumbnail_derivative_params', ImageStdParams::get_by_type(IMG_SQUARE));
    5858
     59//------------------------------------------------------------- mobile version
     60add_event_handler('init', 'mobile_link');
     61
     62function mobile_link()
     63{
     64  global $template, $conf;
     65  if ( !empty($conf['mobile_theme']) && (get_device() != 'desktop' || mobile_theme()))
     66  {
     67    $template->assign('TOGGLE_MOBILE_THEME_URL',
     68        add_url_params(
     69          duplicate_index_url(),
     70          array('mobile' => mobile_theme() ? 'false' : 'true')
     71        )
     72      );
     73  }
     74}
    5975
    6076
Note: See TracChangeset for help on using the changeset viewer.