[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15946] more on template
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15946] more on template |
Date: |
Thu, 3 Nov 2016 15:31:41 +0000 (UTC) |
Revision: 15946
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15946
Author: sigurdne
Date: 2016-11-03 15:31:40 +0000 (Thu, 03 Nov 2016)
Log Message:
-----------
more on template
Modified Paths:
--------------
trunk/controller/templates/base/component.xsl
trunk/mobilefrontend/home.php
trunk/phpgwapi/templates/mobilefrontend/footer.tpl
trunk/phpgwapi/templates/mobilefrontend/head.inc.php
trunk/phpgwapi/templates/mobilefrontend/head.tpl
trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php
trunk/phpgwapi/templates/mobilefrontend/navbar.tpl
Modified: trunk/controller/templates/base/component.xsl
===================================================================
--- trunk/controller/templates/base/component.xsl 2016-11-03 15:31:25 UTC
(rev 15945)
+++ trunk/controller/templates/base/component.xsl 2016-11-03 15:31:40 UTC
(rev 15946)
@@ -17,19 +17,20 @@
</func:function>
<xsl:template match="data">
- <h2>
- <xsl:value-of select="datatable_name"/>
- </h2>
- <div id="receipt"></div>
+ <h2>
+ <xsl:value-of select="datatable_name"/>
+ </h2>
+ <div class="content">
+ <div id="receipt"></div>
- <div class="pure-g">
- <div class="pure-u-1 pure-u-md-1-2">
- <xsl:apply-templates select="form" />
+ <div class="pure-g">
+ <div class="pure-u-1 pure-u-md-1-2">
+ <xsl:apply-templates select="form" />
+ </div>
+ <div class="pure-u-1 pure-u-md-1-2">
+ <xsl:call-template name="icon_color_map" />
+ </div>
</div>
- <div class="pure-u-1 pure-u-md-1-2">
- <xsl:call-template name="icon_color_map" />
- </div>
- </div>
<xsl:apply-templates select="paging"/>
@@ -38,6 +39,7 @@
</div>
<xsl:apply-templates select="datatable"/>
<xsl:apply-templates select="form/list_actions"/>
+ </div>
</xsl:template>
@@ -202,9 +204,9 @@
<tr id = 'location_code'>
<td>
<label for='location_code'>
- <xsl:value-of
select="php:function('lang', 'location')"/>
+ <xsl:value-of
select="php:function('lang', 'location')"/>
</label>
- </td>
+ </td>
<td>
<input type="hidden"
id="location_code" name="location_code" />
<input type="text"
id="location_name" name="location_name" />
@@ -216,7 +218,7 @@
<label for='extra_filter'>
Extra
</label>
- </td>
+ </td>
<td>
<div id="extra_filter">
</div>
Modified: trunk/mobilefrontend/home.php
===================================================================
--- trunk/mobilefrontend/home.php 2016-11-03 15:31:25 UTC (rev 15945)
+++ trunk/mobilefrontend/home.php 2016-11-03 15:31:40 UTC (rev 15946)
@@ -31,46 +31,16 @@
*/
require_once '../header.inc.php';
- /*
- // check if forward parameter is set
- if ( isset($_GET['phpgw_forward']) &&
is_array($_GET['phpgw_forward']) )
- {
- foreach($_GET as $name => $value)
- {
- // find phpgw_ in the $_GET parameters but skip phpgw_forward because
of redirect call below
- if (preg_match('/phpgw_/', $name) && ($name != 'phpgw_forward'))
- {
- $name = substr($name, 6); // cut 'phpgw_'
- $extra_vars[$name] = $value;
- }
- }
-
- $GLOBALS['phpgw']->redirect_link($_GET['phpgw_forward'], $extra_vars);
- exit;
- }
- */
if (isset($GLOBALS['phpgw_info']['server']['force_default_app']) &&
$GLOBALS['phpgw_info']['server']['force_default_app'] != 'user_choice')
{
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] =
$GLOBALS['phpgw_info']['server']['force_default_app'];
}
- /*
- if (isset($_GET['cd']) && $_GET['cd']=='yes'
- &&
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'])
- &&
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']
- &&
$GLOBALS['phpgw_info']['user']['apps'][$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']])
- {
- $GLOBALS['phpgw']->redirect_link('/' .
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] . '/' .
'index.php');
- exit;
- }
- else */
- {
+ phpgw::import_class('phpgwapi.jquery');
+ phpgwapi_jquery::load_widget('core');
+ $GLOBALS['phpgw']->common->phpgw_header();
+ echo parse_navbar();
- phpgw::import_class('phpgwapi.jquery');
- phpgwapi_jquery::load_widget('core');
- $GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
- }
$GLOBALS['phpgw']->translation->add_app('mainscreen');
if (lang('mainscreen_message') != '!mainscreen_message')
@@ -108,23 +78,6 @@
}
}
- $controller_url = $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'controller.uicontrol.control_list'));
- $controller_text = lang('controller');
- $tts_url = $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uitts.index'));
- $tts_text = lang('ticket');
- $condition_survey_url = $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'property.uicondition_survey.index'));
- $condition_survey_text =
$GLOBALS['phpgw']->translation->translate('condition survey', array(), false,
'property');
-
- $temp_menu = <<<HTML
- <div id="home-menu">
- <a href="{$controller_url}">{$controller_text}</a>
- <a href="{$tts_url}">{$tts_text}</a>
- <a href="{$condition_survey_url}">{$condition_survey_text}</a>
- </div>
-HTML;
-
- echo $temp_menu;
-
$GLOBALS['phpgw']->hooks->process('home_mobilefrontend', $sorted_apps);
if (isset($GLOBALS['portal_order']) &&
is_array($GLOBALS['portal_order']))
Modified: trunk/phpgwapi/templates/mobilefrontend/footer.tpl
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/footer.tpl 2016-11-03 15:31:25 UTC
(rev 15945)
+++ trunk/phpgwapi/templates/mobilefrontend/footer.tpl 2016-11-03 15:31:40 UTC
(rev 15946)
@@ -1,11 +1,20 @@
</div>
-<div id="footer">
+ <div id="footer">
-</div>
-<div id="footer_address">
-{site_title}
-</div>
-
+ </div>
+ <div class="footer l-box is-center">
+ {site_title}
+ </div>
+ {javascript_end}
+ <script type="text/javascript">
+ (function (window, document)
+ {
+
document.getElementById('toggle').addEventListener('click', function (e)
+ {
+
document.getElementById('tuckedMenu').classList.toggle('custom-menu-tucked');
+
document.getElementById('toggle').classList.toggle('x');
+ });
+ })(this, this.document);
+ </script>
</body>
- {javascript_end}
</html>
Modified: trunk/phpgwapi/templates/mobilefrontend/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/head.inc.php 2016-11-03
15:31:25 UTC (rev 15945)
+++ trunk/phpgwapi/templates/mobilefrontend/head.inc.php 2016-11-03
15:31:40 UTC (rev 15946)
@@ -24,12 +24,15 @@
$stylesheets[] =
"/phpgwapi/js/DataTables/extensions/Responsive/css/responsive.dataTables.min.css";
$stylesheets[] = "/phpgwapi/templates/portico/css/base.css";
- $stylesheets[] =
"/phpgwapi/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
+// $stylesheets[] =
"/phpgwapi/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
$stylesheets[] = "/{$app}/templates/base/css/base.css";
$stylesheets[] = "/{$app}/templates/portico/css/base.css";
$stylesheets[] =
"/{$app}/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
- $stylesheets[] = "/phpgwapi/templates/mobilefrontend/css/frontend.css";
+ $stylesheets[] = "/phpgwapi/templates/bookingfrontend/css/frontend.css";
+ $stylesheets[] = "/bookingfrontend/css/bookingfrontend.css";
+// $stylesheets[] = "/phpgwapi/templates/mobilefrontend/css/frontend.css";
+
foreach ( $stylesheets as $stylesheet )
{
if( file_exists( PHPGW_SERVER_ROOT . $stylesheet ) )
@@ -56,6 +59,7 @@
'javascript' => $GLOBALS['phpgw']->common->get_javascript(),
'img_icon' =>
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
'site_title' =>
"{$GLOBALS['phpgw_info']['server']['site_title']}",
+ 'site_url' => $GLOBALS['phpgw']->link('/home.php',
array()),
'str_base_url' => $GLOBALS['phpgw']->link('/', array(), true),
'webserver_url' =>
$GLOBALS['phpgw_info']['server']['webserver_url'],
'win_on_events' => $GLOBALS['phpgw']->common->get_on_events(),
Modified: trunk/phpgwapi/templates/mobilefrontend/head.tpl
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/head.tpl 2016-11-03 15:31:25 UTC
(rev 15945)
+++ trunk/phpgwapi/templates/mobilefrontend/head.tpl 2016-11-03 15:31:40 UTC
(rev 15946)
@@ -30,20 +30,22 @@
</head>
<body>
- <div id="wrapper">
- <div id="header">
- <div id="login-bar">
- <a href="{manual_url}">{manual_text}</a>
- <a href="{home_url}">{home_text}</a>
- <a href="{logout_url}">{logout_text}</a>
- </div>
- <div id="current_user">{current_user}</div>
- <div id="app_header">{current_app_header}</div>
- <!--<div id="logo"> </div>
- <div id="centerimage"></div>-->
+
+ <div class="home-menu custom-menu-wrapper">
+ <div class="pure-menu custom-menu custom-menu-top">
+ <a href="{site_url}" class="pure-menu-heading
custom-menu-brand">{site_title}</a>
+ <a href="#" class="custom-menu-toggle"
id="toggle"><s class="bar"></s><s class="bar"></s></a>
</div>
- <div class="yui-skin-sam" id='frontend'>
- <div id="line"></div>
- <div style='margin:0; padding: 0; line-height:
0'> </div>
+ <div class="pure-menu pure-menu-horizontal
pure-menu-scrollable custom-menu custom-menu-bottom custom-menu-tucked"
id="tuckedMenu">
+ <div class="custom-menu-screen"></div>
+ <ul class="pure-menu-list">
+ <li class="pure-menu-item"><a
href="{manual_url}" class="pure-menu-link">{manual_text}</a></li>
+ <li class="pure-menu-item"><a
href="{home_url}" class="pure-menu-link">{home_text}</a></li>
+ <li class="pure-menu-item"><a
href="{logout_url}" class="pure-menu-link">{logout_text}</a></li>
+ </ul>
+ </div>
+ </div>
+ <div id="content-wrapper">
+ <div id="app_header">{current_app_header}</div>
Modified: trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php 2016-11-03
15:31:25 UTC (rev 15945)
+++ trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php 2016-11-03
15:31:40 UTC (rev 15946)
@@ -2,183 +2,60 @@
function parse_navbar($force = False)
{
-
- $user = $GLOBALS['phpgw']->accounts->get(
$GLOBALS['phpgw_info']['user']['id'] );
-
-/*
- $var = array
- (
- 'home_url' =>
$GLOBALS['phpgw']->link('/home.php'),
- 'home_text' => lang('home'),
- 'home_icon' => 'icon icon-home',
- 'about_url' =>
$GLOBALS['phpgw']->link('/about.php', array('app' =>
$GLOBALS['phpgw_info']['flags']['currentapp']) ),
- 'about_text' => lang('about'),
- 'logout_url' =>
$GLOBALS['phpgw']->link('/logout.php'),
- 'logout_text' => lang('logout'),
- 'user_fullname' => $user->__toString()
- );
-
-*/
-
- if(!isset($GLOBALS['phpgw_info']['flags']['nonavbar']) ||
!$GLOBALS['phpgw_info']['flags']['nonavbar'])
+ $config_controller = CreateObject('phpgwapi.config',
'controller')->read();
+ if( isset($config_controller['home_alternative']) &&
$config_controller['home_alternative'] == 1 )
{
- $currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $applications = '';
- $exclude = array('home', 'about', 'logout');
- $navbar = execMethod('phpgwapi.menu.get', 'navbar');
- prepare_navbar($navbar);
- foreach ( $navbar as $app => $app_data )
- {
- if ( in_array($app, $exclude) )
- {
- continue;
- }
- if ( $app == $currentapp)
- {
- $app_data['text'] =
"[<b>{$app_data['text']}</b>]";
- }
+ $controller_url = $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'controller.uicomponent.index'));
- $applications .= <<<HTML
- <a
href="{$app_data['url']}">{$app_data['text']}</a>
-HTML;
- }
-
- $var['applications'] = $applications;
-
- $menu_array =
execMethod('phpgwapi.menu.get_local_menu', $currentapp);
- $var['app_menu'] =
phpgwapi_menu::render_horisontal_menu($menu_array);
}
-
-/*
- if ( $GLOBALS['phpgw']->acl->check('run', PHPGW_ACL_READ,
'preferences') )
+ else
{
- $var['preferences_url'] =
$GLOBALS['phpgw']->link('/preferences/index.php');
- $var['preferences_text'] = lang('preferences');
+ $controller_url = $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'controller.uicontrol.control_list'));
}
- if ( isset($GLOBALS['phpgw_info']['user']['apps']['manual']) )
- {
- $var['help_url'] = "javascript:openwindow('"
- . $GLOBALS['phpgw']->link('/index.php', array
- (
- 'menuaction'=> 'manual.uimanual.help',
- 'app' =>
$GLOBALS['phpgw_info']['flags']['currentapp'],
- 'section' =>
isset($GLOBALS['phpgw_info']['apps']['manual']['section']) ?
$GLOBALS['phpgw_info']['apps']['manual']['section'] : '',
- 'referer' => phpgw::get_var('menuaction')
- )) . "','700','600')";
+ $site_url = $GLOBALS['phpgw']->link('/home.php', array());
- $var['help_text'] = lang('help');
- $var['help_icon'] = 'icon icon-help';
- }
+ $controller_text = lang('controller');
+ $tts_url = $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'property.uitts.index'));
+ $tts_text = lang('ticket');
+ $condition_survey_url = $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'property.uicondition_survey.index'));
+ $condition_survey_text =
$GLOBALS['phpgw']->translation->translate('condition survey', array(), false,
'property');
- if ( isset($GLOBALS['phpgw_info']['user']['apps']['admin']) )
- {
- $var['debug_url'] = "javascript:openwindow('"
- . $GLOBALS['phpgw']->link('/index.php', array
- (
- 'menuaction'=> 'property.uidebug_json.index'
- )) . "','','')";
+ $topmenu = <<<HTML
+ <div class="pure-menu pure-menu-horizontal">
+ <ul class="pure-menu-list">
+ <li class="pure-menu-heading pure-menu-link
pure-menu-selected">
+ <a href="{$site_url}"
class="pure-menu-link">{$GLOBALS['phpgw_info']['user']['fullname']}</a>
+ </li>
+ <li class="pure-menu-item">
+ <a href="{$controller_url}"
class="pure-menu-link">{$controller_text}</a>
+ </li>
+ <li class="pure-menu-item">
+ <a href="{$tts_url}"
class="pure-menu-link">{$tts_text}</a>
+ </li>
+ <li class="pure-menu-item">
+ <a href="{$condition_survey_url}"
class="pure-menu-link">{$condition_survey_text}</a>
+ </li>
+ </ul>
+ </div>
+HTML;
- $var['debug_text'] = lang('debug');
- $var['debug_icon'] = 'icon icon-debug';
- }
-*/
$GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
$GLOBALS['phpgw']->template->set_file('navbar', 'navbar.tpl');
$flags = &$GLOBALS['phpgw_info']['flags'];
$var['current_app_title'] = isset($flags['app_header']) ?
$flags['app_header'] : lang($GLOBALS['phpgw_info']['flags']['currentapp']);
- $flags['menu_selection'] = isset($flags['menu_selection']) ?
$flags['menu_selection'] : '';
-//
+// $flags['menu_selection'] = isset($flags['menu_selection']) ?
$flags['menu_selection'] : '';
- $controller_url = $GLOBALS['phpgw']->link( '/index.php',
array('menuaction' => 'controller.uicontrol.control_list') );
- $controller_text = lang('controller');
- $tts_url = $GLOBALS['phpgw']->link( '/index.php', array('menuaction' =>
'property.uitts.index') );
- $tts_text = lang('ticket');
+ $var['topmenu'] = $topmenu;
-//
-
$GLOBALS['phpgw']->template->set_var($var);
$GLOBALS['phpgw']->template->pfp('out','navbar');
register_shutdown_function('parse_footer_end');
}
- function item_expanded($id)
- {
- static $navbar_state;
- if( !isset( $navbar_state ) )
- {
- $navbar_state =
execMethod('phpgwapi.template_portico.retrieve_local', 'navbar_config');
- }
- return isset( $navbar_state[ $id ]);
- }
- function render_item($item, $id='', $children='')
- {
- $icon_style = $expand_class = $current_class = $link_class =
$parent_class = '';
- static $blank_image;
- if ( !isset($blank_image) )
- {
- $blank_image =
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'blank.png');
- }
- if ( isset($item['image']) )
- {
- $icon_style = ' style="background-image: url(' .
$GLOBALS['phpgw']->common->image($item['image'][0], $item['image'][1]) . ')"';
- }
- if ( $children )
- {
- $expand_class = item_expanded($id) ? '
class="expanded"' : ' class="collapsed"';
- $parent_class = ' parent';
- }
- if ( $id ==
"navbar::{$GLOBALS['phpgw_info']['flags']['menu_selection']}" )
- {
- $current_class = 'current';
- }
-
- $link_class =" class=\"{$current_class}{$parent_class}\"";
-
- $out = <<<HTML
- <li{$expand_class}>
-
-HTML;
- if( $expand_class )
- {
- $out .= <<<HTML
- <img
src="{$blank_image}"{$expand_class}width="16" height="16" alt="+/-" />
-
-HTML;
- }
- return <<<HTML
-$out
- <a
href="{$item['url']}"{$link_class}{$icon_style} id="{$id}">
- <span>{$item['text']}</span>
- </a>
-{$children}
- </li>
-
-HTML;
- }
-
- function render_submenu($parent, $menu)
- {
- $out = '';
- foreach ( $menu as $key => $item )
- {
- $children = isset($item['children']) ? render_submenu(
"{$parent}::{$key}", $item['children']) : '';
- $out .= render_item($item, "navbar::{$parent}::{$key}",
$children);
- //$debug .= "{$parent}::{$key}<br>";
- }
-
- $out = <<<HTML
- <ul>
-{$out}
- </ul>
-
-HTML;
- return $out;
- }
-
function parse_footer_end()
{
// Stop the register_shutdown_function causing the footer to be
included twice - skwashd dec07
Modified: trunk/phpgwapi/templates/mobilefrontend/navbar.tpl
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/navbar.tpl 2016-11-03 15:31:25 UTC
(rev 15945)
+++ trunk/phpgwapi/templates/mobilefrontend/navbar.tpl 2016-11-03 15:31:40 UTC
(rev 15946)
@@ -1,5 +1,5 @@
<!-- BEGIN navbar -->
- <div id="applications">{applications}</div>
- <div id="app-menu">{app_menu}</div>
+ <div id="horizontal-menu">{topmenu}</div>
+ <div id="app-menu">{app_menu}</div>
<!-- END navbar -->
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15946] more on template,
sigurdne <=