fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [17346] booking: session handling and code formatting


From: sigurdne
Subject: [Fmsystem-commits] [17346] booking: session handling and code formatting
Date: Wed, 22 Nov 2017 04:17:37 -0500 (EST)

Revision: 17346
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17346
Author:   sigurdne
Date:     2017-11-22 04:17:37 -0500 (Wed, 22 Nov 2017)
Log Message:
-----------
booking: session handling and code formatting

Modified Paths:
--------------
    trunk/phpgwapi/templates/bkbooking/head.inc.php
    trunk/phpgwapi/templates/bkbooking/head.tpl
    trunk/phpgwapi/templates/bookingfrontend/head.inc.php

Modified: trunk/phpgwapi/templates/bkbooking/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/bkbooking/head.inc.php     2017-11-22 08:36:34 UTC 
(rev 17345)
+++ trunk/phpgwapi/templates/bkbooking/head.inc.php     2017-11-22 09:17:37 UTC 
(rev 17346)
@@ -54,7 +54,7 @@
        $stylesheets[] = "/phpgwapi/templates/pure/css/pure-min.css";
        $stylesheets[] = "/phpgwapi/templates/pure/css/pure-extension.css";
        $stylesheets[] = 
"/phpgwapi/templates/pure/css/grids-responsive-min.css";
-    $stylesheets[] = 
"/phpgwapi/js/DataTables/extensions/Responsive/css/responsive.dataTables.min.css";
+       $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";
@@ -62,7 +62,7 @@
        $stylesheets[] = "/{$app}/templates/portico/css/base.css";
        $stylesheets[] = 
"/{$app}/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
        $stylesheets[] = "/phpgwapi/templates/bkbooking/css/frontend.css";
-    $stylesheets[] = "/bookingfrontend/css/bookingfrontend.css";
+       $stylesheets[] = "/bookingfrontend/css/bookingfrontend.css";
 
        foreach ( $stylesheets as $stylesheet )
        {
@@ -180,20 +180,21 @@
                $robots = '<meta name="robots" content="none">';
        }
 
-    $test = $GLOBALS['phpgw']->common->get_on_events();
-    $test = str_replace('window.onload = 
function()','$(document).ready(function()',$test);
-    $test = str_replace("\n}\n","\n})\n",$test);
+       $test = $GLOBALS['phpgw']->common->get_on_events();
+       $test = str_replace('window.onload = 
function()','$(document).ready(function()',$test);
+       $test = str_replace("\n}\n","\n})\n",$test);
        $app = lang($app);
        $tpl_vars = array
        (
                'css'                   => $GLOBALS['phpgw']->common->get_css(),
                'javascript'    => $GLOBALS['phpgw']->common->get_javascript(),
-               'img_icon'      => 
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
+               'img_icon'              => 
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
+               'site_url'              => 
$GLOBALS['phpgw']->link('/bookingfrontend/', 
array('menuaction'=>'bookingfrontend.uisearch.index')),
                'site_title'    => 
"{$GLOBALS['phpgw_info']['server']['site_title']}",
                'str_base_url'  => $GLOBALS['phpgw']->link('/', array(), true),
                'webserver_url' => $webserver_url,
 //             'win_on_events' => $GLOBALS['phpgw']->common->get_on_events(),
-        'win_on_events'        => $test,
+               'win_on_events' => $test,
                'navbar_config' => $_navbar_config,
                'metainfo_author' => $author,
                'metainfo_keywords' => $keywords,
@@ -211,8 +212,8 @@
 #              $tpl_vars['help_url'] = => '#';
        }
        $bouser = CreateObject('bookingfrontend.bouser');
-    $org = CreateObject('bookingfrontend.uiorganization');
-    $orgid = $org->get_orgid($bouser->orgnr);
+       $org = CreateObject('bookingfrontend.uiorganization');
+       $orgid = $org->get_orgid($bouser->orgnr);
        if($bouser->is_logged_in())
        {
                $tpl_vars['organization_json'] = 
json_encode(phpgwapi_cache::session_get($bouser->get_module(), 
$bouser::ORGARRAY_SESSION_KEY));
@@ -219,15 +220,19 @@
 
                $tpl_vars['change_org_header'] = lang('Change organization');
 
-        if ( $bouser->orgname == '000000000') {
-            $tpl_vars['login_text_org'] = lang('SSN not registred');
-            $tpl_vars['login_text'] = lang('Logout');
-            $tpl_vars['org_url'] = '#';
-        } else {
-               $tpl_vars['login_text_org'] = $bouser->orgname;
-            $tpl_vars['login_text'] = lang('Logout');
-            $tpl_vars['org_url'] = 
"/bookingfrontend/?menuaction=bookingfrontend.uiorganization.show&id=".$orgid;
-        }
+               if ( $bouser->orgname == '000000000')
+               {
+                       $tpl_vars['login_text_org'] = lang('SSN not registred');
+                       $tpl_vars['login_text'] = lang('Logout');
+                       $tpl_vars['org_url'] = '#';
+               }
+               else
+               {
+                       $tpl_vars['login_text_org'] = $bouser->orgname;
+                       $tpl_vars['login_text'] = lang('Logout');
+                       $tpl_vars['org_url'] = 
$GLOBALS['phpgw']->link('/bookingfrontend/', 
array('menuaction'=>'bookingfrontend.uiorganization.show', 'id'=> $orgid));
+       //              $tpl_vars['org_url'] = 
"/bookingfrontend/?menuaction=bookingfrontend.uiorganization.show&id=".$orgid;
+               }
                $tpl_vars['login_text'] = $bouser->orgnr . ' :: ' . 
lang('Logout');
                $tpl_vars['login_url'] = 'logout.php';
        }

Modified: trunk/phpgwapi/templates/bkbooking/head.tpl
===================================================================
--- trunk/phpgwapi/templates/bkbooking/head.tpl 2017-11-22 08:36:34 UTC (rev 
17345)
+++ trunk/phpgwapi/templates/bkbooking/head.tpl 2017-11-22 09:17:37 UTC (rev 
17346)
@@ -12,44 +12,42 @@
                <link rel="icon" href="{img_icon}" type="image/x-ico">
                <link rel="shortcut icon" href="{img_icon}">
                <!-- BEGIN stylesheet -->
-               <link href="{stylesheet_uri}" type="text/css" rel="StyleSheet">
+               <link href="{stylesheet_uri}" type="text/css" rel="StyleSheet">
         <!-- END stylesheet -->
 
                {css}
 
                <script type="text/javascript">
-               <!--
+                       <!--
                        var strBaseURL = '{str_base_url}';
-               //-->
+                       //-->
                </script>
                {javascript}
                <!-- BEGIN javascript -->
-                       <script type="text/javascript" 
src="{javascript_uri}"></script>
-       <!-- END javascript -->
+               <script type="text/javascript" src="{javascript_uri}"></script>
+               <!-- END javascript -->
 
                <script type="text/javascript">
                <!--
                        {win_on_events}
-               //-->
+                       //-->
                </script>
 
        </head>
-<body>
-    <div id="wrapper">
-    <div id="header">
-       <div id="login-bar">
-               <!--a href="{manual_url}">{manual_text}</a> <a 
href="{help_url}">{help_text}</a> <a href="{login_url}">{login_text}</a-->
-               <a href="{manual_url}">{manual_text}</a> <a 
href="{help_url}">{help_text}</a> <a href="{org_url}">{login_text_org}</a><a 
href="{login_url}">{login_text}</a> <span id="change"></span>
-       </div>
-        <a href="index.php?menuaction=bookingfrontend.uisearch.index"><div 
id="logo"></div></a>
-               <div id="centerimage"></div>
-               <form action="index.php" method="get" id="header-search" 
class="{header_search_class}">
-                       <input type="hidden" name="menuaction" 
value="bookingfrontend.uisearch.index" />
-               <input class="query
-" type="text" name="searchterm"/>
-               <xsl:text> </xsl:text><input type="submit" 
value="{lbl_search}"/>
-               </form>
-    </div>
-<div class="yui-skin-sam" id='frontend'>
-<div id="line"></div>
-  <div style='margin:0; padding: 0; line-height: 0'>&nbsp;</div>
+       <body>
+               <div id="wrapper">
+                       <div id="header">
+                               <div id="login-bar">
+                                       <!--a 
href="{manual_url}">{manual_text}</a> <a href="{help_url}">{help_text}</a> <a 
href="{login_url}">{login_text}</a-->
+                                       <a 
href="{manual_url}">{manual_text}</a> <a href="{help_url}">{help_text}</a> <a 
href="{org_url}">{login_text_org}</a><a href="{login_url}">{login_text}</a> 
<span id="change"></span>
+                               </div>
+                               <a href="{site_url}"><div id="logo"></div></a>
+                               <div id="centerimage"></div>
+                               <form action="{site_url}" method="get" 
id="header-search" class="{header_search_class}">
+                                       <input class="query" type="text" 
name="searchterm"/>
+                                       <xsl:text> </xsl:text><input 
type="submit" value="tralala{lbl_search}"/>
+                               </form>
+                       </div>
+                       <div class="yui-skin-sam" id='frontend'>
+                               <div id="line"></div>
+                               <div style='margin:0; padding: 0; line-height: 
0'>&nbsp;</div>

Modified: trunk/phpgwapi/templates/bookingfrontend/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/bookingfrontend/head.inc.php       2017-11-22 
08:36:34 UTC (rev 17345)
+++ trunk/phpgwapi/templates/bookingfrontend/head.inc.php       2017-11-22 
09:17:37 UTC (rev 17346)
@@ -51,9 +51,9 @@
        $stylesheets[] = "/phpgwapi/templates/pure/css/pure-min.css";
        $stylesheets[] = "/phpgwapi/templates/pure/css/pure-extension.css";
        $stylesheets[] = 
"/phpgwapi/templates/pure/css/grids-responsive-min.css";
-    $stylesheets[] = 
"/phpgwapi/js/DataTables/extensions/Responsive/css/responsive.dataTables.min.css";
+       $stylesheets[] = 
"/phpgwapi/js/DataTables/extensions/Responsive/css/responsive.dataTables.min.css";
        $stylesheets[] = "/{$app}/templates/base/css/base.css";
-    $stylesheets[] = "/{$app}/css/bookingfrontend.css";
+       $stylesheets[] = "/{$app}/css/bookingfrontend.css";
        $stylesheets[] = "/phpgwapi/templates/bookingfrontend/css/frontend.css";
 
        
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
@@ -173,19 +173,19 @@
    phpgwapi_cache::session_set('phpgwapi', 'footer_info', $footer_info);
 
        $test = $GLOBALS['phpgw']->common->get_on_events();
-    $test = str_replace('window.onload = 
function()','$(document).ready(function()',$test);
-    $test = str_replace("\n}\n","\n})\n",$test);
+       $test = str_replace('window.onload = 
function()','$(document).ready(function()',$test);
+       $test = str_replace("\n}\n","\n})\n",$test);
 
        $tpl_vars = array
        (
                'css'                   => $GLOBALS['phpgw']->common->get_css(),
                'javascript'    => $GLOBALS['phpgw']->common->get_javascript(),
-               'img_icon'      => 
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
+               'img_icon'        => 
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
                'site_title'    => $site_title,
                'str_base_url'  => $GLOBALS['phpgw']->link('/', array(), true),
                'site_url'      => $GLOBALS['phpgw']->link("/{$app}/", array()),
                'webserver_url' => $webserver_url,
-        'win_on_events'        => $test,
+               'win_on_events' => $test,
                'metainfo_author' => $author,
                'metainfo_keywords' => $keywords,
                'metainfo_description' => $description,
@@ -203,8 +203,8 @@
 //     _debug_array($user);
 
        $bouser = CreateObject('bookingfrontend.bouser');
-    $org = CreateObject('bookingfrontend.uiorganization');
-    $orgid = $org->get_orgid($bouser->orgnr);
+       $org = CreateObject('bookingfrontend.uiorganization');
+       $orgid = $org->get_orgid($bouser->orgnr);
        if($bouser->is_logged_in())
        {
                $tpl_vars['organization_json'] = 
json_encode(phpgwapi_cache::session_get($bouser->get_module(), 
$bouser::ORGARRAY_SESSION_KEY));
@@ -211,18 +211,18 @@
 
                $tpl_vars['change_org_header'] = lang('Change organization');
 
-        if ( $bouser->orgname == '000000000')
-        {
-            $tpl_vars['login_text_org'] = lang('SSN not registred');
-            $tpl_vars['login_text'] = lang('Logout');
-            $tpl_vars['org_url'] = '#';
-        }
-        else
-        {
-               $tpl_vars['login_text_org'] = $bouser->orgname;
-            $tpl_vars['login_text'] = lang('Logout');
-            $tpl_vars['org_url'] = 
"/bookingfrontend/?menuaction=bookingfrontend.uiorganization.show&id=".$orgid;
-        }
+               if ( $bouser->orgname == '000000000')
+               {
+                       $tpl_vars['login_text_org'] = lang('SSN not registred');
+                       $tpl_vars['login_text'] = lang('Logout');
+                       $tpl_vars['org_url'] = '#';
+               }
+               else
+               {
+                       $tpl_vars['login_text_org'] = $bouser->orgname;
+                       $tpl_vars['login_text'] = lang('Logout');
+                       $tpl_vars['org_url'] = 
$GLOBALS['phpgw']->link('/bookingfrontend/', 
array('menuaction'=>'bookingfrontend.uiorganization.show', 'id'=> $orgid));
+               }
                $tpl_vars['login_text'] = $bouser->orgnr . ' :: ' . 
lang('Logout');
                $tpl_vars['login_url'] = 'logout.php';
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]