diff --git a/htdocs/core/class/smartphone.class.php b/htdocs/core/class/smartphone.class.php index ce774cd0c04..a8b2c3f95b4 100644 --- a/htdocs/core/class/smartphone.class.php +++ b/htdocs/core/class/smartphone.class.php @@ -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'); + } } diff --git a/htdocs/index.php b/htdocs/index.php index b0c65629ae8..ae63fdb438b 100644 --- a/htdocs/index.php +++ b/htdocs/index.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")); diff --git a/htdocs/theme/phones/smartphone/tpl/menu.tpl.php b/htdocs/theme/phones/smartphone/tpl/menu.tpl.php new file mode 100644 index 00000000000..7fcfb498be0 --- /dev/null +++ b/htdocs/theme/phones/smartphone/tpl/menu.tpl.php @@ -0,0 +1,32 @@ + + * + * 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); +?> + + + +