Add Smartphone class
This commit is contained in:
parent
6caf01499d
commit
8669aeecec
@ -86,6 +86,16 @@ class Smartphone {
|
||||
function smartfooter()
|
||||
{
|
||||
include_once($this->template_dir.'footer.tpl.php');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show menu
|
||||
*/
|
||||
function smartmenu()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
include_once($this->template_dir.'menu.tpl.php');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -46,6 +46,16 @@ if (! isset($_GET["mainmenu"])) $_GET["mainmenu"]="home";
|
||||
* View
|
||||
*/
|
||||
|
||||
// Smartphone (for dev only)
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 && class_exists('Smartphone'))
|
||||
{
|
||||
// Template directory
|
||||
$smartphone->getTemplateDir();
|
||||
$smartphone->title = $langs->trans("Home");
|
||||
$smartphone->smartmenu();
|
||||
exit;
|
||||
}
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("HomeArea"));
|
||||
|
||||
32
htdocs/theme/phones/smartphone/tpl/menu.tpl.php
Normal file
32
htdocs/theme/phones/smartphone/tpl/menu.tpl.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
$this->smartheader($this->title);
|
||||
?>
|
||||
|
||||
<!-- START MENU SMARTPHONE TEMPLATE -->
|
||||
|
||||
<div id="topbar">
|
||||
<div id="title"><?php echo $this->title; ?></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php $this->smartfooter(); ?>
|
||||
|
||||
<!-- END MENU SMARTPHONE TEMPLATE -->
|
||||
Loading…
Reference in New Issue
Block a user