[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [20837] new template
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] [20837] new template |
Date: |
Fri, 20 Nov 2009 09:48:21 +0000 |
Revision: 20837
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20837
Author: sigurdne
Date: 2009-11-20 09:48:21 +0000 (Fri, 20 Nov 2009)
Log Message:
-----------
new template
Added Paths:
-----------
people/sigurdne/modules/phpgwapi/trunk/templates/portico/
people/sigurdne/modules/phpgwapi/trunk/templates/portico/css/
people/sigurdne/modules/phpgwapi/trunk/templates/portico/css/base.css
people/sigurdne/modules/phpgwapi/trunk/templates/portico/footer.tpl
people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.inc.php
people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.tpl
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/blank.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/collapsed-hover.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/collapsed.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/down-grey.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/down.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/expanded-hover.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/expanded.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/first-grey.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/first.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/home.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/configure.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/file_locked.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/folder_grey.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/folder_grey_open.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/help.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/identity.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/lock.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/messagebox_info.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/readme.txt
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/last-grey.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/last.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/left-grey.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/left.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-gard-top.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-split-bar-bg.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-split-bar-left.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-split-bar-right.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-splitbar.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-toolbar-bg.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/phpgw-icon-logo.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/right-grey.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/right.png
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/source/
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/source/arrows.xcf
people/sigurdne/modules/phpgwapi/trunk/templates/portico/js/
people/sigurdne/modules/phpgwapi/trunk/templates/portico/js/base.js
people/sigurdne/modules/phpgwapi/trunk/templates/portico/js/toolbar.js
people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.inc.php
people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.tpl
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/css/base.css
===================================================================
--- people/sigurdne/modules/phpgwapi/trunk/templates/portico/css/base.css
(rev 0)
+++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/css/base.css
2009-11-20 09:48:21 UTC (rev 20837)
@@ -0,0 +1,379 @@
+/*
+ Border-layout for CSS only layout
+*/
+
+body {
+ height: 100%;
+ background: #edf5ff;
+}
+
+div#border-layout {
+ text-align: left;
+}
+
+div#border-layout div.layout-north,
+div#border-layout div.layout-south
+{
+
+ position: absolute;
+ left: 0;
+ height: 26px;
+ width: 100%;
+}
+
+div#border-layout div.layout-north
+{
+ top: 0;
+}
+
+div#border-layout div.layout-south
+{
+ bottom: 0;
+}
+
+div#border-layout div.layout-west,
+div#border-layout div.layout-east
+{
+ position: absolute;
+ top: 31px;
+ bottom: 31px;
+ width: 194px;
+}
+
+div#border-layout div.layout-west
+{
+ left: 5px;
+}
+
+div#border-layout div.layout-east
+{
+ right: 5px;
+}
+
+div#border-layout div.layout-center {
+ position: absolute;
+ top: 31px;
+ bottom: 31px;
+ left: 204px;
+ right: 204px;
+}
+
+div#border-layout div.header
+{
+ height: 23px;
+ border: 1px solid #808080;
+ border-bottom: none;
+ background: #3f6ad1;
+}
+div#border-layout div.header h2
+{
+ font-size: 1em;
+ margin: 0px 3px;
+ color: #fff;
+ font-weight: bold;
+ line-height: 22px;
+}
+
+div#border-layout div.layout-west div.body,
+div#border-layout div.layout-east div.body,
+div#border-layout div.layout-center div.body
+{
+ background: #fff;
+ position: absolute;
+ overflow: auto;
+ top: 23px;
+ bottom: 0em;
+ border: 1px solid #808080;
+ left: 0px;
+ right: 0px;
+}
+
+div#border-layout div.layout-center div.body
+{
+ background: #fff;
+}
+
+
+/*
+ Border-layout for JS layout
+*/
+.yui-skin-sam .yui-layout .yui-layout-unit-top div.yui-layout-bd,
+.yui-skin-sam .yui-layout .yui-layout-unit-bottom div.yui-layout-bd
+{
+ border: none;
+}
+
+.yui-skin-sam .yui-layout div.header
+{
+ display: none;
+}
+
+.yui-skin-sam .yui-layout div.yui-layout-unit div.yui-layout-bd
+{
+ background-color: #fff;
+}
+
+.yui-skin-sam .yui-layout div.yui-layout-unit div.yui-layout-hd h2
+{
+ font-size: 1em;
+ margin: 0;
+}
+
+/*
+ Border-layout common for CSS and JS layout
+*/
+
+div.layout-north div.body,
+div.layout-south div.body
+{
+ position: relative;
+ float: left;
+ width: 100%;
+ background: #000;
+ color: #fff;
+ line-height: 26px;
+}
+
+div.layout-north div.body h2
+{
+ font-size: 1em;
+ font-weight: bold;
+ margin: 0 5px;
+}
+
+div.layout-north div.body div.button-bar
+{
+ position: absolute;
+ right: 0px;
+ top: 0px;
+ line-height: 26px;
+}
+
+div.layout-north div.body div.button-bar a
+{
+ color: #fff;
+ text-decoration: none;
+ margin: 0 5px;
+ display: block;
+ float: left;
+}
+
+div.layout-south div.body div.button-bar
+{
+ float: right;
+ margin: 0 5px;
+}
+
+
+/*
+ Navbar layout
+*/
+
+ul#navbar
+{
+ /*background: #fff;*/
+}
+
+ul#navbar li
+{
+ display: block;
+ white-space: nowrap;
+}
+
+ul#navbar li a
+{
+ color: #000;
+ text-decoration: none;
+ background-repeat: no-repeat;
+ background-position: left center;
+ display: inline-block;
+ padding-left: 20px;
+ margin-left: 20px;
+ padding: 2px 0px 2px 20px;
+}
+
+#navbar a.parent
+{
+ margin-left: 0px;
+}
+
+ul#navbar li a.current span
+{
+ background: #3f6ad1;
+ color: #fff;
+}
+ul#navbar li li
+{
+ padding-left: 20px;
+}
+
+#navbar li.collapsed ul
+{
+ display: none;
+}
+
+#navbar img.collapsed
+{
+ background: url(../images/collapsed.png) no-repeat center center;
+}
+
+#navbar img.collapsed:hover
+{
+ background-image: url(../images/collapsed-hover.png);
+}
+
+#navbar img.expanded
+{
+
+ background: url(../images/expanded.png) no-repeat center center;
+}
+
+#navbar img.expanded:hover
+{
+ background-image: url(../images/expanded-hover.png);
+}
+
+
+/*
+ Reset headings which get reset by YUI! - based on firefox 2 html.css
+*/
+
+h1
+{
+ font-size: 2em;
+ font-weight: bold;
+ margin: .67em 0;
+}
+
+h2
+{
+ font-size: 1.5em;
+ font-weight: bold;
+ margin: .83em 0;
+}
+
+h3
+{
+ font-size: 1.17em;
+ font-weight: bold;
+ margin: 1em 0;
+}
+
+h4
+{
+ font-weight: bold;
+ margin: 1.33em 0;
+}
+
+strong
+{
+ font-weight: bold;
+}
+
+/*
+ Error Related CSS
+*/
+.error
+{
+ background-color: #fcc;
+ border: 1px solid #f00;
+ color: #f00;
+}
+
+.msg
+{
+ background-color: #FFA500;
+ border: 1px solid #f00;
+ color: #f00;
+}
+
+.msg_good
+{
+ background-color: #99FF66;
+ border: 1px solid #00CC00;
+}
+
+.warn
+{
+ background-color: #ff8;
+ border: 1px solid #fc0;
+ color: #fc0;
+}
+
+div.error, div.warn
+{
+ font-weight: bold;
+ padding: 2px;
+ text-align: center;
+}
+
+/*
+ Table styling
+*/
+
+.row_on
+{
+ background-color: #eee;
+}
+
+.row_off
+{
+ background-color: #e9e9e9;
+}
+
+.row_on, .row_off
+{
+ padding: 3px;
+}
+
+.row_on:hover, .row_off:hover
+{
+ background-color: #fff;
+}
+
+thead, th, .th
+{
+ background: #ddd url(../images/ofm-gard-top.png) top left repeat-x;
+}
+/*
+ Menu layout ("navbar" conflicts with the template "simple" - testing -
try the admin section)
+*/
+
+ul#menu
+{
+ /*background: #fff;*/
+}
+
+ul#menu li
+{
+ display: block;
+ white-space: nowrap;
+}
+
+ul#menu li a
+{
+ color: #000;
+ text-decoration: none;
+ background-repeat: no-repeat;
+ background-position: left center;
+ display: inline-block;
+ padding-left: 20px;
+ margin-left: 0px;
+ padding: 2px 0px 2px 0px;
+}
+
+#menu a.parent
+{
+ margin-left: 0px;
+}
+
+ul#menu li a.current span
+{
+ background: #3f6ad1;
+ color: #fff;
+}
+
+ul#menu li li
+{
+ padding-left: 20px;
+}
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/footer.tpl
===================================================================
--- people/sigurdne/modules/phpgwapi/trunk/templates/portico/footer.tpl
(rev 0)
+++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/footer.tpl
2009-11-20 09:48:21 UTC (rev 20837)
@@ -0,0 +1,25 @@
+ </div>
+ </div>
+
+ <!--
+ <div class="layout-east">
+ <div class="header">
+ <h2>Widgetpanel</h2>
+ </div>
+
+ <div class="body" id="debug">
+
+ </div>
+ </div>
+ -->
+ <div class="layout-south">
+ <div class="body">
+ <div class="button-bar">
+ {powered_by}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.inc.php
===================================================================
--- people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.inc.php
(rev 0)
+++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.inc.php
2009-11-20 09:48:21 UTC (rev 20837)
@@ -0,0 +1,130 @@
+<?php
+ phpgw::import_class('phpgwapi.yui');
+ phpgw::import_class('phpgwapi.template_portico');
+
+ if ( !isset($GLOBALS['phpgw_info']['server']['site_title']) )
+ {
+ $GLOBALS['phpgw_info']['server']['site_title'] = lang('please
set a site name in admin > siteconfig');
+ }
+
+ $app = $GLOBALS['phpgw_info']['flags']['currentapp'];
+
+ $GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
+ $GLOBALS['phpgw']->template->set_unknowns('remove');
+ $GLOBALS['phpgw']->template->set_file('head', 'head.tpl');
+ $GLOBALS['phpgw']->template->set_block('head', 'stylesheet',
'stylesheets');
+ $GLOBALS['phpgw']->template->set_block('head', 'javascript',
'javascripts');
+
+ $javascripts = array();
+
+ $stylesheets = array();
+ if( !isset($GLOBALS['phpgw_info']['flags']['noframework']) )
+ {
+ phpgwapi_yui::load_widget('dragdrop');
+ phpgwapi_yui::load_widget('element');
+ phpgwapi_yui::load_widget('container');
+ phpgwapi_yui::load_widget('connection');
+ phpgwapi_yui::load_widget('resize');
+ $javascripts = array
+ (
+ "/phpgwapi/js/json/json.js",
+ "/phpgwapi/templates/portico/js/base.js"
+ );
+ }
+ phpgwapi_yui::load_widget('layout');
+ phpgwapi_yui::load_widget('button');
+
+ $stylesheets = array();
+
+ if( !isset($GLOBALS['phpgw_info']['flags']['no_reset_fonts']) )
+ {
+ $stylesheets[] =
'/phpgwapi/js/yahoo/reset-fonts-grids/reset-fonts-grids.css';
+ }
+
+ $stylesheets[] =
"/phpgwapi/js/yahoo/tabview/assets/skins/sam/tabview.css";
+ $stylesheets[] =
"/phpgwapi/js/yahoo/resize/assets/skins/sam/resize.css";
+ $stylesheets[] =
"/phpgwapi/js/yahoo/layout/assets/skins/sam/layout.css";
+ $stylesheets[] = "/phpgwapi/js/yahoo/menu/assets/skins/sam/menu.css";
+ $stylesheets[] =
"/phpgwapi/js/yahoo/button/assets/skins/sam/button.css";
+ $stylesheets[] = "/phpgwapi/templates/portico/css/base.css";
+
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
+ {
+ $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";
+
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
+ {
+ $stylesheets[] =
"/{$app}/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
+ }
+
+ foreach ( $stylesheets as $stylesheet )
+ {
+ if( file_exists( PHPGW_SERVER_ROOT . $stylesheet ) )
+ {
+ $GLOBALS['phpgw']->template->set_var( 'stylesheet_uri',
$GLOBALS['phpgw_info']['server']['webserver_url'] . $stylesheet );
+ $GLOBALS['phpgw']->template->parse('stylesheets',
'stylesheet', true);
+ }
+ }
+
+ foreach ( $javascripts as $javascript )
+ {
+ if( file_exists( PHPGW_SERVER_ROOT . $javascript ) )
+ {
+ $GLOBALS['phpgw']->template->set_var( 'javascript_uri',
$GLOBALS['phpgw_info']['server']['webserver_url'] . $javascript );
+ $GLOBALS['phpgw']->template->parse('javascripts',
'javascript', true);
+ }
+ }
+
+ // Construct navbar_config by taking into account the current selected
menu
+ // The only problem with this loop is that leafnodes will be included
+ $navbar_config = execMethod('phpgwapi.template_portico.retrieve_local',
'navbar_config');
+
+ if( isset($GLOBALS['phpgw_info']['flags']['menu_selection']) )
+ {
+ if(!isset($navbar_config))
+ {
+ $navbar_config = array();
+ }
+
+ $current_selection =
$GLOBALS['phpgw_info']['flags']['menu_selection'];
+
+ while($current_selection)
+ {
+ $navbar_config["navbar::$current_selection"] = true;
+ $current_selection = implode("::", explode("::",
$current_selection, -1));
+ }
+
+ phpgwapi_template_portico::store_local('navbar_config',
$navbar_config);
+ }
+
+ $_border_layout_config =
execMethod('phpgwapi.template_portico.retrieve_local', 'border_layout_config');
+
+ if(isset($GLOBALS['phpgw_info']['flags']['nonavbar']) &&
$GLOBALS['phpgw_info']['flags']['nonavbar'])
+ {
+ //FIXME This one removes the sidepanels - but the previous
settings are forgotten
+// $_border_layout_config = true;
+ }
+
+ $_border_layout_config = json_encode($_border_layout_config);
+
+ $_navbar_config = json_encode($navbar_config);
+
+ $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'),
+ 'site_title' =>
"{$GLOBALS['phpgw_info']['server']['site_title']}",
+ '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(),
+ 'border_layout_config' => $_border_layout_config,
+ 'navbar_config' => $_navbar_config
+ );
+
+ $GLOBALS['phpgw']->template->set_var($tpl_vars);
+
+ $GLOBALS['phpgw']->template->pfp('out', 'head');
+ unset($tpl_vars);
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.inc.php
___________________________________________________________________
Added: svn:keywords
+ Id Revision
Added: svn:eol-style
+ native
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.tpl
===================================================================
--- people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.tpl
(rev 0)
+++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/head.tpl
2009-11-20 09:48:21 UTC (rev 20837)
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<!-- BEGIN head -->
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
+ <meta name="author" content="phpGroupWare
http://www.phpgroupware.org">
+ <meta name="description" content="phpGroupWare">
+ <meta name="keywords" content="phpGroupWare">
+ <meta name="robots" content="none">
+ <title>{site_title}</title>
+ <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">
+ <!-- END stylesheet -->
+
+ {css}
+
+ <script type="text/javascript">
+ <!--
+ var strBaseURL = '{str_base_url}';
+ {win_on_events}
+ //-->
+ </script>
+ {javascript}
+ <script type="text/javascript">
+ <!--
+ var border_layout_config = {border_layout_config};
+ var navbar_config = {navbar_config};
+ //-->
+ </script>
+ <!-- BEGIN javascript -->
+ <script type="text/javascript"
src="{javascript_uri}"></script>
+ <!-- END javascript -->
+
+ </head>
+ <body class="yui-skin-sam">
+
+
+
+<!-- END head -->
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/blank.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/blank.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/collapsed-hover.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/collapsed-hover.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/collapsed.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/collapsed.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/down-grey.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/down-grey.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/down.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/down.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/expanded-hover.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/expanded-hover.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/expanded.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/expanded.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/first-grey.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/first-grey.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/first.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/first.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/home.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/home.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/configure.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/configure.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/file_locked.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/file_locked.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/folder_grey.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/folder_grey.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/folder_grey_open.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/folder_grey_open.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/help.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/help.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/identity.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/identity.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/lock.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/lock.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/messagebox_info.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/messagebox_info.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/readme.txt
===================================================================
---
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/readme.txt
(rev 0)
+++
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/readme.txt
2009-11-20 09:48:21 UTC (rev 20837)
@@ -0,0 +1,60 @@
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+This copyright and license notice covers the images in this directory.
+Note the license notice contains an add-on.
+************************************************************************
+
+TITLE: NUVOLA ICON THEME for KDE 3.x
+AUTHOR: David Vignoni | ICON KING
+SITE: http://www.icon-king.com
+MAILING LIST: http://mail.icon-king.com/mailman/listinfo/nuvola_icon-king.com
+
+Copyright (c) 2003-2004 David Vignoni.
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation,
+version 2.1 of the License.
+This library 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
+Lesser General Public License for more details.
+You should have received a copy of the GNU Lesser General Public
+License along with this library (see the the license.txt file); if not, write
to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA
+#######**** NOTE THIS ADD-ON ****#######
+The GNU Lesser General Public License or LGPL is written for software libraries
+in the first place. The LGPL has to be considered valid for this artwork
+library too.
+Nuvola icon theme for KDE 3.x is a special kind of software library, it is an
+artwork library, it's elements can be used in a Graphical User Interface, or
+GUI.
+Source code, for this library means:
+ - raster png image* .
+The LGPL in some sections obliges you to make the files carry
+notices. With images this is in some cases impossible or hardly usefull.
+With this library a notice is placed at a prominent place in the directory
+containing the elements. You may follow this practice.
+The exception in section 6 of the GNU Lesser General Public License covers
+the use of elements of this art library in a GUI.
+dave [at] icon-king.com
+
+Date: 15 october 2004
+Version: 1.0
+
+DESCRIPTION:
+
+Icon theme for KDE 3.x.
+Icons where designed using Adobe Illustrator, and then exported to PNG format.
+Icons shadows and minor corrections were done using Adobe Photoshop.
+Kiconedit was used to correct some 16x16 and 22x22 icons.
+
+LICENSE
+
+Released under GNU Lesser General Public License (LGPL)
+Look at the license.txt file.
+
+CONTACT
+
+David Vignoni
+e-mail : david [at] icon-king.com
+ICQ : 117761009
+http: http://www.icon-king.com
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/icons/readme.txt
___________________________________________________________________
Added: svn:keywords
+ Id Revision
Added: svn:eol-style
+ native
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/last-grey.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/last-grey.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/last.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/last.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/left-grey.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/left-grey.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/left.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/left.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-gard-top.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-gard-top.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-split-bar-bg.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-split-bar-bg.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-split-bar-left.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-split-bar-left.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-split-bar-right.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-split-bar-right.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-splitbar.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-splitbar.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-toolbar-bg.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/ofm-toolbar-bg.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/phpgw-icon-logo.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/phpgw-icon-logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/right-grey.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/right-grey.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/right.png
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/right.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/source/arrows.xcf
===================================================================
(Binary files differ)
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/images/source/arrows.xcf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/js/base.js
===================================================================
--- people/sigurdne/modules/phpgwapi/trunk/templates/portico/js/base.js
(rev 0)
+++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/js/base.js
2009-11-20 09:48:21 UTC (rev 20837)
@@ -0,0 +1,238 @@
+YAHOO.namespace ("PORTICO");
+
+YAHOO.PORTICO.DEBUG = true;
+YAHOO.PORTICO.LOG_ELEMENT = null;
+
+YAHOO.PORTICO.Log = function( html )
+{
+ if( !YAHOO.PORTICO.DEBUG )
+ {
+ return;
+ }
+
+ if( YAHOO.PORTICO.LOG_ELEMENT == null )
+ {
+ YAHOO.PORTICO.LOG_ELEMENT = document.getElementById('debug');
+ }
+
+ if( YAHOO.PORTICO.LOG_ELEMENT )
+ {
+ YAHOO.PORTICO.LOG_ELEMENT.innerHTML += html;
+ }
+};
+
+YAHOO.PORTICO.Store = function(location, data)
+{
+ var handleSuccess = function(o)
+ {
+ YAHOO.PORTICO.Log( "<strong>Success:</strong><br>" );
+ YAHOO.PORTICO.Log( "TID: " + o.tId + ", HTTP Status: "
+ o.status + ", Message: " + o.StatusText );
+ YAHOO.PORTICO.Log( "<br><br>" );
+ }
+
+ var handleFailure = function(o)
+ {
+ YAHOO.PORTICO.Log( "<strong>Failure:</strong><br>" );
+ YAHOO.PORTICO.Log( "TID: " + o.tId + ", HTTP Status: "
+ o.status + ", Message: " + o.StatusText );
+ YAHOO.PORTICO.Log( "<br><br>" );
+ }
+
+ var callback =
+ {
+ success: handleSuccess,
+ failure: handleFailure
+ };
+
+ var sUrl = phpGWLink('index.php',
+ {
+ menuaction: 'phpgwapi.template_portico.store',
+ phpgw_return_as: 'json',
+ location: location
+ });
+
+ var postData = 'data=' + JSON.stringify( data );
+ YAHOO.PORTICO.Log( "<strong>Sending payload:</strong><pre>" +
JSON.stringify( data ) + "</pre>" );
+ var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback,
postData);
+
+};
+
+YAHOO.PORTICO.NavBar = function()
+{
+ this.state = navbar_config.length == 0 ? {} : navbar_config;
+
+ var self = this;
+
+ this.buildWidget = function()
+ {
+ YAHOO.util.Event.on( "navbar", "click", this.clickHandler, this
);
+ };
+
+ this.clickHandler = function(e, obj)
+ {
+ //scope for 'this' is the DOM element whose click event was
detected
+
+ var elTarget = YAHOO.util.Event.getTarget(e);
+
+ if(elTarget.nodeName.toUpperCase() == "IMG" &&
+ ( elTarget.className == 'expanded' ||
elTarget.className == 'collapsed' ) )
+ {
+ YAHOO.util.Event.preventDefault(e);
+
+ // Should we expand or collapse ?
+ var new_state = ( elTarget.className == 'expanded' ?
'collapsed' : 'expanded' );
+
+ // Change CSS class (which sets image)
+ elTarget.className = new_state;
+
+ // Walk upwards the DOM-tree till we find an A element (which
has an id )
+ while(elTarget.nodeName.toUpperCase() != "A")
+ {
+ elTarget = elTarget.nextSibling;
+ }
+ var id = elTarget.id;
+
+ // Walk upwards the DOM-tree till we find a LI element
+ while (elTarget.nodeName.toUpperCase() != "LI")
+ {
+ elTarget = elTarget.parentNode;
+ }
+
+ // Do the actual collapse / expand by chaning the CSS class
+ elTarget.className = new_state;
+
+ // Cleanup leaf nodes introduced by header.inc.php
+ if(self.first_run)
+ {
+ for (var i in self.state)
+ {
+ var elm = document.getElementById( i );
+ while( elm != null &&
elm.nodeName.toUpperCase() != "UL" )
+ {
+ elm = elm.nextSibling;
+ }
+
+ if( elm == null ) {
+ delete self.state[i];
+ }
+ }
+ self.first_run=false;
+ }
+
+ // Store navbar state, this is done by only storing
expanded nodes
+ if(elTarget.className == 'expanded')
+ {
+ self.state[id] = true;
+ }
+ else if( self.state[id] )
+ {
+ delete self.state[id];
+ }
+
+ YAHOO.PORTICO.Store('navbar_config', self.state);
+ }
+ };
+
+ // Call "constructor"
+ self.buildWidget();
+};
+
+
+YAHOO.PORTICO.BorderLayout = function()
+{
+ this.config = border_layout_config.length == 0 ? {} :
border_layout_config;
+
+ var self = this;
+
+ this.buildWidget = function()
+ {
+ var DOM = YAHOO.util.Dom;
+ // Uncomment for make use of east-layout - also see: footer.tpl
+ // var layouts = Array( 'north', 'west', 'center', 'east', 'south'
);
+ var layouts = Array( 'north', 'west', 'center', 'south' );
+ var layout = Array();
+
+ // Collect layout units for border layout
+ var layoutDom = document.getElementById('border-layout');
+ for( i=0; i<layouts.length; i++ )
+ {
+ layout[ layouts[i] ] = DOM.getElementsByClassName(
'layout-' + layouts[i], 'div', layoutDom )[0];
+ }
+
+ if( typeof this.config.unitLeftWidth == 'undefined' )
+ {
+ this.config.unitLeftWidth = 200;
+ }
+
+ if( typeof this.config.unitRightWidth == 'undefined' )
+ {
+ this.config.unitRightWidth = 6;
+ }
+
+ this.layout = new YAHOO.widget.Layout({
+ minWidth: 600,
+ minHeight: 400,
+ units: [
+ { position: 'top', body: layout['north'],
height: 26 },
+ // { position: 'left', header: this.getHeader(
layout['west'] ), body: layout['west'], width: this.config.unitLeftWidth,
resize: true, scroll: true, gutter: "5px", collapse: false, maxWidth: 300,
minWidth: 6 },
+ { position: 'left', header: this.getHeader(
layout['west'] ), body: layout['west'], width: this.config.unitLeftWidth,
resize: true, scroll: true, gutter: "5px", collapse: true , maxWidth: 300,
minWidth: 6 },
+ { position: 'center', header: this.getHeader( layout['center']
), body: layout['center'], scroll: true, gutter: "5px 0px" },
+ // Uncomment for make use of east-layout
+ // { position: 'right', header: this.getHeader( layout['east']
), body: layout['east'], width: this.config.unitRightWidth, resize: true,
scroll: true, gutter: "5px", collapse: false, maxWidth: 300, minWidth: 6 },
+ { position: 'bottom', body: layout['south'], height: 26 }
+ ]
+ });
+
+ this.layout.render();
+
+// Would be nice to detect whether the menu is collapsed in a different page
and the setting transferred to the next one
+// if (this.config.collapsed == true)
+// {
+// this.layout.getUnitByPosition('left').collapse();
+// }
+ this.layout.on('resize', this.handleResize );
+ };
+
+ this.handleResize = function() {
+
+ //is it possible to detect if 'left' is collapsed ?
+ // var collapsed = some expression to detect...
+
+ var unitLeftWidth =
self.layout.getUnitByPosition('left').getSizes().wrap.w + 10;
+ var unitRightWidth =
self.layout.getUnitByPosition('right').getSizes().wrap.w + 10;
+
+ if( unitLeftWidth != self.config.unitLeftWidth ||
+ unitRightWidth != self.config.unitRightWidth )
+ {
+ self.config.unitLeftWidth = unitLeftWidth;
+ self.config.unitRightWidth = unitRightWidth;
+
+ YAHOO.PORTICO.Store( 'border_layout_config',
+ self.config
+ );
+ }
+
+ }
+
+ // Helper function to find DIV.header inside a layout unit and return
text of h2 element
+ this.getHeader = function( node )
+ {
+ var title="";
+
+ try
+ {
+ var div = YAHOO.util.Dom.getElementsByClassName(
'header', 'div', node )[0];
+ var header = div.getElementsByTagName('h2')[0];
+ title = header.innerHTML;
+ }
+ catch (e)
+ {
+ }
+ return title;
+ };
+
+ // Call "constructor"
+ self.buildWidget();
+};
+
+YAHOO.util.Event.onDOMReady( YAHOO.PORTICO.NavBar );
+YAHOO.util.Event.onDOMReady( YAHOO.PORTICO.BorderLayout );
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/js/toolbar.js
===================================================================
--- people/sigurdne/modules/phpgwapi/trunk/templates/portico/js/toolbar.js
(rev 0)
+++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/js/toolbar.js
2009-11-20 09:48:21 UTC (rev 20837)
@@ -0,0 +1,35 @@
+function initToolBar() {
+ var toolbars = YAHOO.util.Dom.getElementsByClassName( "toolbar" , "div"
);
+
+ for(var toolbar=0;toolbar<toolbars.length;toolbar++)
+ {
+
+ var buttons = toolbars[toolbar].getElementsByTagName("a");
+ var menus = toolbars[toolbar].getElementsByTagName("form");
+
+ for(var button=0;button<buttons.length;button++)
+ {
+ new YAHOO.widget.Button(buttons[button]);
+ }
+ for(var menu=0;menu<menus.length;menu++)
+ {
+ //FIXME: class can contain several classes
+ //alert(menus[menu].className.split(" "));
+ if(menus[menu].className == "menu")
+ {
+ var submit =
menus[menu].getElementsByTagName("input")[0];
+ var select =
menus[menu].getElementsByTagName("select")[0];
+ var label = menus[menu].title || submit.value;
+
+ if(select.value)
+ {
+ label += ": " +
select.options[select.selectedIndex].innerHTML;
+ }
+
+ new YAHOO.widget.Button(submit, { type: "menu",
menu: select, label: label });
+ }
+ }
+ }
+};
+
+YAHOO.util.Event.onDOMReady(initToolBar);
\ No newline at end of file
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.inc.php
===================================================================
--- people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.inc.php
(rev 0)
+++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.inc.php
2009-11-20 09:48:21 UTC (rev 20837)
@@ -0,0 +1,233 @@
+<?php
+
+ function parse_navbar($force = False)
+ {
+ $navbar = array();
+// if(!isset($GLOBALS['phpgw_info']['flags']['nonavbar']) ||
!$GLOBALS['phpgw_info']['flags']['nonavbar'])
+ {
+ $navbar = execMethod('phpgwapi.menu.get', 'navbar');
+ }
+
+ $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 ( $GLOBALS['phpgw']->acl->check('run', PHPGW_ACL_READ,
'preferences') )
+ {
+ $var['preferences_url'] =
$GLOBALS['phpgw']->link('/preferences/index.php');
+ $var['preferences_text'] = lang('preferences');
+ }
+
+ 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')";
+
+ $var['help_text'] = lang('help');
+ $var['help_icon'] = 'icon icon-help';
+ }
+
+ if ( isset($GLOBALS['phpgw_info']['user']['apps']['admin']) )
+ {
+ $var['debug_url'] = "javascript:openwindow('"
+ . $GLOBALS['phpgw']->link('/index.php', array
+ (
+ 'menuaction'=> 'property.uidebug_json.index'
+ )) . "','','')";
+
+ $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'] : '';
+
+ $navigation = array();
+ if(
!isset($GLOBALS['phpgw_info']['user']['preferences']['property']['nonavbar'])
|| $GLOBALS['phpgw_info']['user']['preferences']['property']['nonavbar'] !=
'yes' )
+ {
+ prepare_navbar($navbar);
+ $navigation = execMethod('phpgwapi.menu.get',
'navigation');
+ }
+ else
+ {
+ foreach($navbar as & $app_tmp)
+ {
+ $app_tmp['text'] = ' ...';
+ }
+ }
+
+ $treemenu = '';
+ foreach($navbar as $app => $app_data)
+ {
+ if(!in_array($app, array('logout', 'about',
'preferences')))
+ {
+ $submenu = isset($navigation[$app]) ?
render_submenu($app, $navigation[$app]) : '';
+ $treemenu .= render_item($app_data,
"navbar::{$app}", $submenu);
+ }
+ }
+ $var['treemenu'] = <<<HTML
+ <ul id="navbar">
+{$treemenu}
+ </ul>
+
+HTML;
+
+ $GLOBALS['phpgw']->template->set_var($var);
+ $GLOBALS['phpgw']->template->pfp('out','navbar');
+
+ $GLOBALS['phpgw']->hooks->process('after_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
+ static $footer_included = false;
+ if ( $footer_included )
+ {
+ return true;
+ }
+
+ $GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
+ $GLOBALS['phpgw']->template->set_file('footer', 'footer.tpl');
+
+ $var = array
+ (
+ 'powered_by' => lang('Powered by phpGroupWare
version %1', $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']),
+ );
+
+ $GLOBALS['phpgw']->template->set_var($var);
+
+ $GLOBALS['phpgw']->template->pfp('out', 'footer');
+
+ $footer_included = true;
+ }
+
+ /**
+ * Callback for usort($navbar)
+ *
+ * @param array $item1 the first item to compare
+ * @param array $item2 the second item to compare
+ * @return int result of comparision
+ */
+ function sort_navbar($item1, $item2)
+ {
+ $a =& $item1['order'];
+ $b =& $item2['order'];
+
+ if ($a == $b)
+ {
+ return strcmp($item1['text'], $item2['text']);
+ }
+ return ($a < $b) ? -1 : 1;
+ }
+
+ /**
+ * Organise the navbar properly
+ *
+ * @param array $navbar the navbar items
+ * @return array the organised navbar
+ */
+ function prepare_navbar(&$navbar)
+ {
+ if ( isset($navbar['admin']) && is_array($navbar['admin']) )
+ {
+ $navbar['admin']['children'] =
execMethod('phpgwapi.menu.get', 'admin');
+ }
+ uasort($navbar, 'sort_navbar');
+ }
Property changes on:
people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.inc.php
___________________________________________________________________
Added: svn:keywords
+ Id Revision
Added: svn:eol-style
+ native
Added: people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.tpl
===================================================================
--- people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.tpl
(rev 0)
+++ people/sigurdne/modules/phpgwapi/trunk/templates/portico/navbar.tpl
2009-11-20 09:48:21 UTC (rev 20837)
@@ -0,0 +1,49 @@
+<div id="debug-navbar">
+{debug}
+</div>
+ <div id="theme-gray">
+ <div class="border-layout" id="border-layout">
+ <div class="layout-north">
+ <div class="body">
+ <h2
class="icon">{site_title}</h2>
+ <div class="button-bar">
+ <a href="{home_url}"
class="icon icon-home">
+ {home_text}
+ </a>
+ <a href="{debug_url}"
class="icon icon-debug">
+ {debug_text}
+ </a>
+ <a href="{about_url}"
class="icon icon-about">
+ {about_text}
+ </a>
+ <a href="{help_url}"
class="{help_icon}">
+ {help_text}
+ </a>
+ <a
href="{preferences_url}" class="icon icon-preferences">
+
{preferences_text}
+ </a>
+ <a href="{logout_url}"
class="icon icon-logout">
+ {logout_text}
+ </a>
+ </div>
+ </div>
+ </div>
+
+ <div class="layout-west">
+ <div class="header">
+ <h2>{user_fullname}</h2>
+ </div>
+
+ <div class="body">
+ <div class="treeview">
+{treemenu}
+ </div>
+ </div>
+ </div>
+
+ <div class="layout-center">
+ <div class="header">
+ <h2>{current_app_title}</h2>
+ </div>
+
+ <div class="body">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [20837] new template,
Sigurd Nes <=