[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11935] Frontend / controller: publish controller to
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11935] Frontend / controller: publish controller to frontend |
Date: |
Fri, 02 May 2014 13:47:50 +0000 |
Revision: 11935
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11935
Author: sigurdne
Date: 2014-05-02 13:47:50 +0000 (Fri, 02 May 2014)
Log Message:
-----------
Frontend / controller: publish controller to frontend
Modified Paths:
--------------
trunk/controller/inc/class.uicalendar.inc.php
trunk/controller/inc/class.uicase.inc.php
trunk/controller/inc/class.uicheck_list.inc.php
trunk/frontend/setup/default_records.inc.php
trunk/frontend/setup/setup.inc.php
trunk/frontend/setup/tables_update.inc.php
Added Paths:
-----------
trunk/frontend/templates/base/controller.xsl
Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php 2014-05-02 13:45:10 UTC
(rev 11934)
+++ trunk/controller/inc/class.uicalendar.inc.php 2014-05-02 13:47:50 UTC
(rev 11935)
@@ -88,6 +88,16 @@
$this->location_finder = new location_finder();
self::set_active_menu('controller::location_check_list');
+
+ if(phpgw::get_var('noframework', 'bool'))
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework']
= true;
+
phpgwapi_cache::session_set('controller','noframework',true);
+ }
+ else if
(phpgwapi_cache::session_get('controller','noframework'))
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework']
= true;
+ }
}
public function view_calendar_for_month()
@@ -246,9 +256,9 @@
}
}
- public function view_calendar_for_year()
+ public function view_calendar_for_year($location_code = '')
{
- $location_code = phpgw::get_var('location_code');
+ $location_code = $location_code ? $location_code :
phpgw::get_var('location_code');
$year = phpgw::get_var('year');
$role = phpgw::get_var('role', 'int', 'REQUEST', -1);
Modified: trunk/controller/inc/class.uicase.inc.php
===================================================================
--- trunk/controller/inc/class.uicase.inc.php 2014-05-02 13:45:10 UTC (rev
11934)
+++ trunk/controller/inc/class.uicase.inc.php 2014-05-02 13:47:50 UTC (rev
11935)
@@ -103,6 +103,15 @@
$this->add =
$GLOBALS['phpgw']->acl->check('.checklist', PHPGW_ACL_ADD, 'controller');//2
$this->edit =
$GLOBALS['phpgw']->acl->check('.checklist', PHPGW_ACL_EDIT, 'controller');//4
$this->delete =
$GLOBALS['phpgw']->acl->check('.checklist', PHPGW_ACL_DELETE, 'controller');//8
+ if(phpgw::get_var('noframework', 'bool'))
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework']
= true;
+
phpgwapi_cache::session_set('controller','noframework',true);
+ }
+ else if
(phpgwapi_cache::session_get('controller','noframework'))
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework']
= true;
+ }
}
private function _get_case_data()
Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php 2014-05-02 13:45:10 UTC
(rev 11934)
+++ trunk/controller/inc/class.uicheck_list.inc.php 2014-05-02 13:47:50 UTC
(rev 11935)
@@ -102,6 +102,16 @@
$this->delete =
$GLOBALS['phpgw']->acl->check('.checklist', PHPGW_ACL_DELETE, 'controller');//8
self::set_active_menu('controller::control::check_list');
+
+ if(phpgw::get_var('noframework', 'bool'))
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework']
= true;
+
phpgwapi_cache::session_set('controller','noframework',true);
+ }
+ else if
(phpgwapi_cache::session_get('controller','noframework'))
+ {
+ $GLOBALS['phpgw_info']['flags']['noframework']
= true;
+ }
}
/**
Modified: trunk/frontend/setup/default_records.inc.php
===================================================================
--- trunk/frontend/setup/default_records.inc.php 2014-05-02 13:45:10 UTC
(rev 11934)
+++ trunk/frontend/setup/default_records.inc.php 2014-05-02 13:47:50 UTC
(rev 11935)
@@ -20,4 +20,5 @@
$GLOBALS['phpgw']->locations->add('.property.refurbishment',
'refurbishment', 'frontend', false);
$GLOBALS['phpgw']->locations->add('.property.services', 'services',
'frontend', false);
$GLOBALS['phpgw']->locations->add('.delegates', 'delegates',
'frontend', false);
+ $GLOBALS['phpgw']->locations->add('.controller', 'controller',
'frontend', false);
Modified: trunk/frontend/setup/setup.inc.php
===================================================================
--- trunk/frontend/setup/setup.inc.php 2014-05-02 13:45:10 UTC (rev 11934)
+++ trunk/frontend/setup/setup.inc.php 2014-05-02 13:47:50 UTC (rev 11935)
@@ -1,6 +1,6 @@
<?php
$setup_info['frontend']['name'] = 'frontend';
- $setup_info['frontend']['version'] = '0.5';
+ $setup_info['frontend']['version'] = '0.6';
$setup_info['frontend']['app_order'] = 9;
// $setup_info['frontend']['tables'] = array();
$setup_info['frontend']['enable'] = 1;
@@ -14,6 +14,12 @@
'email' => 'address@hidden'
);
+ $setup_info['property']['maintainer'] = array
+ (
+ 'name' => 'Sigurd Nes',
+ 'email' => 'address@hidden'
+ );
+
/* Dependencies for this app to work */
$setup_info['frontend']['depends'][] = array(
'appname' => 'phpgwapi',
Modified: trunk/frontend/setup/tables_update.inc.php
===================================================================
--- trunk/frontend/setup/tables_update.inc.php 2014-05-02 13:45:10 UTC (rev
11934)
+++ trunk/frontend/setup/tables_update.inc.php 2014-05-02 13:47:50 UTC (rev
11935)
@@ -75,3 +75,18 @@
$GLOBALS['setup_info']['frontend']['currentver'] = '0.5';
return $GLOBALS['setup_info']['frontend']['currentver'];
}
+
+ /**
+ * Update frontend version from 04 to 0.5
+ * Add new location as placeholders for functions and menues
+ *
+ */
+ $test[] = '0.5';
+ function frontend_upgrade0_5()
+ {
+ $GLOBALS['phpgw']->locations->add('.controller', 'controller',
'frontend', false);
+ $GLOBALS['setup_info']['frontend']['currentver'] = '0.6';
+ return $GLOBALS['setup_info']['frontend']['currentver'];
+ }
+
+
Added: trunk/frontend/templates/base/controller.xsl
===================================================================
--- trunk/frontend/templates/base/controller.xsl
(rev 0)
+++ trunk/frontend/templates/base/controller.xsl 2014-05-02 13:47:50 UTC
(rev 11935)
@@ -0,0 +1,25 @@
+<xsl:template match="controller" xmlns:php="http://php.net/xsl">
+ <div class="yui-navset" id="controller_tabview">
+ <div class="yui-content">
+
+ <xsl:variable name="controller_params">
+
<xsl:text>menuaction:controller.uicalendar.view_calendar_for_year,
noframework:1, location_code:</xsl:text>
+ <xsl:value-of select="location_code" />
+ </xsl:variable>
+
+ <xsl:variable name="controller_url">
+ <xsl:value-of select="php:function('get_phpgw_link',
'/index.php', $controller_params )" />
+ </xsl:variable>
+
+ <iframe id="controller_content" width="100%" height="500"
src="{$controller_url}">
+
+ <p>Your browser does not support iframes.</p>
+ </iframe>
+ <xsl:value-of select="php:function('lang', 'controller')"/>
+ </div>
+ </div>
+</xsl:template>
+
+
+
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11935] Frontend / controller: publish controller to frontend,
Sigurd Nes <=