fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8317] Controller: sync code


From: Sigurd Nes
Subject: [Fmsystem-commits] [8317] Controller: sync code
Date: Thu, 15 Dec 2011 10:14:42 +0000

Revision: 8317
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8317
Author:   sigurdne
Date:     2011-12-15 10:14:42 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
Controller: sync code

Modified Paths:
--------------
    trunk/controller/inc/class.uicontrol.inc.php
    trunk/controller/inc/model/class.document.inc.php
    trunk/controller/templates/base/add_check_list_for_location.xsl
    trunk/controller/templates/base/view_calendar_month.xsl
    trunk/controller/templates/base/view_calendar_year.xsl

Property Changed:
----------------
    trunk/controller/inc/class.sodocument.inc.php
    trunk/controller/inc/class.uidocument.inc.php
    trunk/controller/inc/components/class.calendar_builder.inc.php
    trunk/controller/inc/components/class.date_generator.inc.php
    trunk/controller/inc/model/class.document.inc.php
    trunk/controller/templates/base/add_check_list_for_location.xsl
    trunk/controller/templates/base/view_calendar_month.xsl
    trunk/controller/templates/base/view_calendar_year.xsl


Property changes on: trunk/controller/inc/class.sodocument.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Modified: trunk/controller/inc/class.uicontrol.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol.inc.php        2011-12-15 09:46:55 UTC 
(rev 8316)
+++ trunk/controller/inc/class.uicontrol.inc.php        2011-12-15 10:14:42 UTC 
(rev 8317)
@@ -1,4 +1,33 @@
 <?php 
+       /**
+       * phpGroupWare - controller: a part of a Facilities Management System.
+       *
+       * @author Erink Holm-Larsen <address@hidden>
+       * @author Torstein Vadla <address@hidden>
+       * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * This file is part of phpGroupWare.
+       *
+       * phpGroupWare 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.
+       *
+       * phpGroupWare 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 phpGroupWare; if not, write to the Free Software
+       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
+       *
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+       * @package property
+       * @subpackage controller
+       * @version $Id$
+       */      
+
        phpgw::import_class('controller.uicommon');
        phpgw::import_class('property.boevent');
        phpgw::import_class('controller.socontrol');
@@ -26,7 +55,8 @@
                private $so_control_group_list;
                private $so_check_list_list;
                private $so_check_item;
-               
+               private $_category_acl;         
+
                public $public_functions = array
                (
                        'index' =>      true,
@@ -61,6 +91,10 @@
                        $this->so_check_list = 
CreateObject('controller.socheck_list');
                        $this->so_check_item = 
CreateObject('controller.socheck_item');
                        
+                       $config = CreateObject('phpgwapi.config','controller');
+                       $config->read();
+                       $this->_category_acl = 
isset($config->config_data['acl_at_control_area']) && 
$config->config_data['acl_at_control_area'] == 1 ? true : false;
+
                        self::set_active_menu('controller::control');
                }
                
@@ -73,6 +107,23 @@
                        phpgwapi_yui::load_widget('datatable');
                        phpgwapi_yui::load_widget('paginator');
 
+                       // Sigurd: Start categories
+                       $cats   = CreateObject('phpgwapi.categories', -1, 
'controller', '.control');
+                       $cats->supress_info     = true;
+
+                       $control_areas = 
$cats->formatted_xslt_list(array('format'=>'filter','selected' => 
$control_area_id,'globals' => true,'use_acl' => $this->_category_acl));
+                       array_unshift($control_areas['cat_list'],array 
('cat_id'=>'','name'=> lang('select value')));
+                       $control_areas_array2 = array();
+                       foreach($control_areas['cat_list'] as $cat_list)
+                       {
+                               $control_areas_array2[] = array
+                               (
+                                       'id'    => $cat_list['cat_id'],
+                                       'name'  => $cat_list['name'],
+                               );              
+                       }
+                       // END categories
+
                        $data = array(
                                'form' => array(
                                        'toolbar' => array(
@@ -108,7 +159,13 @@
                                 'text' => lang('Control_area'),
                                 'list' => 
$this->so_control_area->get_control_area_select_array(),
                                                        ),
+                                                       //as categories
                                                        array('type' => 
'filter',
+                                                               'name' => 
'control_areas',
+                                                               'text' => 
lang('Control_area') . 2,
+                                                               'list' => 
$control_areas_array2,
+                                                       ),
+                                                       array('type' => 
'filter',
                                                                'name' => 
'responsibilities',
                                 'text' => lang('Responsibility'),
                                 'list' => $this->so->get_roles(),
@@ -188,6 +245,23 @@
 
                        $control_areas_array = 
$this->so_control_area->get_control_areas_as_array();
 
+                       // Sigurd: START as categories
+                       $cats   = CreateObject('phpgwapi.categories', -1, 
'controller', '.control');
+                       $cats->supress_info     = true;
+
+                       $control_areas = 
$cats->formatted_xslt_list(array('format'=>'filter','selected' => 
$control_area_id,'globals' => true,'use_acl' => $this->_category_acl));
+                       array_unshift($control_areas['cat_list'],array 
('cat_id'=>'','name'=> lang('select value')));
+                       $control_areas_array2 = array();
+                       foreach($control_areas['cat_list'] as $cat_list)
+                       {
+                               $control_areas_array2[] = array
+                               (
+                                       'id'    => $cat_list['cat_id'],
+                                       'name'  => $cat_list['name'],
+                               );              
+                       }
+                       // END as categories
+
                        // Fetches prosedures that are related to first control 
area in list
                        $control_area_id = $control_areas_array[0]['id'];
                        $procedures_array = 
$this->so_procedure->get_procedures_by_control_area_id($control_area_id);
@@ -210,6 +284,7 @@
                                'editable'                                      
=> true,
                                'control'                                       
=> (isset($control)) ? $control->toArray(): null,
                                'control_areas_array'           => 
$control_areas_array,
+                               'control_areas_array2'          => 
array('options' => $control_areas_array2),
                                'procedures_array'                      => 
$procedures_array,
                                'role_array'                            => 
$role_array
                        );
@@ -742,4 +817,4 @@
 
                        return $this->yui_results($results);
                }
-       }
\ No newline at end of file
+       }


Property changes on: trunk/controller/inc/class.uidocument.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id


Property changes on: 
trunk/controller/inc/components/class.calendar_builder.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id


Property changes on: 
trunk/controller/inc/components/class.date_generator.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Modified: trunk/controller/inc/model/class.document.inc.php
===================================================================
--- trunk/controller/inc/model/class.document.inc.php   2011-12-15 09:46:55 UTC 
(rev 8316)
+++ trunk/controller/inc/model/class.document.inc.php   2011-12-15 10:14:42 UTC 
(rev 8317)
@@ -25,7 +25,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
        * @package property
        * @subpackage controller
-       * @version $Id: class.document.inc.php 8291 2011-12-14 14:50:00Z erikhl 
$
+       * @version $Id$
        */
 
 include_class('controller', 'model', 'inc/model/');


Property changes on: trunk/controller/inc/model/class.document.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Modified: trunk/controller/templates/base/add_check_list_for_location.xsl
===================================================================
--- trunk/controller/templates/base/add_check_list_for_location.xsl     
2011-12-15 09:46:55 UTC (rev 8316)
+++ trunk/controller/templates/base/add_check_list_for_location.xsl     
2011-12-15 10:14:42 UTC (rev 8317)
@@ -1,3 +1,4 @@
+<!-- $Id$ -->
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
 <xsl:variable name="date_format">d/m-Y</xsl:variable>
 
@@ -94,4 +95,4 @@
        </form>
        
         </div>
-</xsl:template>
\ No newline at end of file
+</xsl:template>


Property changes on: 
trunk/controller/templates/base/add_check_list_for_location.xsl
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Modified: trunk/controller/templates/base/view_calendar_month.xsl
===================================================================
--- trunk/controller/templates/base/view_calendar_month.xsl     2011-12-15 
09:46:55 UTC (rev 8316)
+++ trunk/controller/templates/base/view_calendar_month.xsl     2011-12-15 
10:14:42 UTC (rev 8317)
@@ -1,3 +1,4 @@
+<!-- $Id$ -->
 <xsl:template match="data" name="view_check_lists" 
xmlns:php="http://php.net/xsl";>
 <xsl:variable name="date_format">d/m-Y</xsl:variable>
 
@@ -151,4 +152,4 @@
                </xsl:otherwise>
        </xsl:choose>
 </div>
-</xsl:template>
\ No newline at end of file
+</xsl:template>


Property changes on: trunk/controller/templates/base/view_calendar_month.xsl
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Modified: trunk/controller/templates/base/view_calendar_year.xsl
===================================================================
--- trunk/controller/templates/base/view_calendar_year.xsl      2011-12-15 
09:46:55 UTC (rev 8316)
+++ trunk/controller/templates/base/view_calendar_year.xsl      2011-12-15 
10:14:42 UTC (rev 8317)
@@ -1,3 +1,4 @@
+<!-- $Id$ -->
 <xsl:template match="data" name="view_check_lists" 
xmlns:php="http://php.net/xsl";>
 <xsl:variable name="date_format">d/m-Y</xsl:variable>
 <xsl:variable name="year"><xsl:value-of select="year"/></xsl:variable>
@@ -106,4 +107,4 @@
                </xsl:choose>
        </ul>
 </div>
-</xsl:template>
\ No newline at end of file
+</xsl:template>


Property changes on: trunk/controller/templates/base/view_calendar_year.xsl
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id




reply via email to

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