[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8732]
From: |
Erik Holm-Larsen |
Subject: |
[Fmsystem-commits] [8732] |
Date: |
Tue, 31 Jan 2012 08:13:04 +0000 |
Revision: 8732
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8732
Author: erikhl
Date: 2012-01-31 08:13:03 +0000 (Tue, 31 Jan 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.menu.inc.php
trunk/controller/inc/hook_home.inc.php
trunk/controller/templates/base/config.tpl
Added Paths:
-----------
trunk/controller/inc/hook_settings.inc.php
Modified: trunk/controller/inc/class.menu.inc.php
===================================================================
--- trunk/controller/inc/class.menu.inc.php 2012-01-30 18:39:47 UTC (rev
8731)
+++ trunk/controller/inc/class.menu.inc.php 2012-01-31 08:13:03 UTC (rev
8732)
@@ -164,6 +164,11 @@
'url' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uilocation.responsiblility_role', 'menu_selection' =>
'admin::controller::role_at_location') ),
'text' => lang('role at
location'),
'image' => array('property',
'responsibility_role')
+ ),
+ 'controller_document_types' => array
+ (
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'controller.uidocument.document_types', 'menu_selection' =>
'admin::controller::controller_document_types') ),
+ 'text' => lang('Document
types')
)
);
}
@@ -173,13 +178,13 @@
$menus['preferences'] = array
(
// in case of userprefs - need a hook
for 'settings'
-/*
+
array
(
'text' =>
$GLOBALS['phpgw']->translation->translate('Preferences', array(), true),
'url' =>
$GLOBALS['phpgw']->link('/preferences/preferences.php', array('appname' =>
'controller', 'type'=> 'user') )
),
-*/
+
array
(
'text' =>
$GLOBALS['phpgw']->translation->translate('Grant Access', array(), true),
Modified: trunk/controller/inc/hook_home.inc.php
===================================================================
--- trunk/controller/inc/hook_home.inc.php 2012-01-30 18:39:47 UTC (rev
8731)
+++ trunk/controller/inc/hook_home.inc.php 2012-01-31 08:13:03 UTC (rev
8732)
@@ -36,6 +36,11 @@
$so = CreateObject('controller.socheck_list');
$so_control = CreateObject('controller.socontrol');
+
+ $config = CreateObject('phpgwapi.config','controller');
+ $config->read();
+ $limit_no_of_planned =
isset($config->config_data['no_of_planned_controls']) &&
$config->config_data['no_of_planned_controls'] > 0 ?
$config->config_data['no_of_planned_controls']:5;
+ $limit_no_of_assigned =
isset($config->config_data['no_of_assigned_controls']) &&
$config->config_data['no_of_assigned_controls'] > 0 ?
$config->config_data['no_of_assigned_controls']:10;
//echo '<H1> Hook for controller </H1>';
//$location_code = '1101';
@@ -147,12 +152,18 @@
}
//sort data by planned date for check list
sort($portalbox1_data);
+ //$limit = 5;
+ $tmp = 0;
foreach($portalbox1_data as $check_list_dates)
{
- $portalbox1->data[] = $check_list_dates[1];
+ if($tmp < $limit_no_of_planned)
+ {
+ $portalbox1->data[] = $check_list_dates[1];
+ }
+ $tmp++;
}
echo "\n".'<!-- BEGIN checklist info
-->'."\n".$portalbox1->draw()."\n".'<!-- END checklist info -->'."\n";
-
+
$portalbox2 = CreateObject('phpgwapi.listbox', array
(
'title' => "Mine tildelte kontroller",
@@ -180,7 +191,7 @@
foreach ( $var as $key => $value )
{
- // $portalbox->set_controls($key,$value);
+// $portalbox2->set_controls($key,$value);
}
$category_name = array(); // caching
@@ -241,8 +252,14 @@
}
//sort data by due date for check list
sort($portalbox2_data);
+ //$limit = 20;
+ $tmp = 0;
foreach($portalbox2_data as $check_list_dates)
{
- $portalbox2->data[] = $check_list_dates[1];
+ if($tmp < $limit_no_of_assigned)
+ {
+ $portalbox2->data[] = $check_list_dates[1];
+ }
+ $tmp++;
}
echo "\n".'<!-- BEGIN assigned checklist info
-->'."\n".$portalbox2->draw()."\n".'<!-- END assigned checklist info -->'."\n";
Added: trunk/controller/inc/hook_settings.inc.php
===================================================================
--- trunk/controller/inc/hook_settings.inc.php (rev 0)
+++ trunk/controller/inc/hook_settings.inc.php 2012-01-31 08:13:03 UTC (rev
8732)
@@ -0,0 +1,35 @@
+<?php
+ /**
+ * phpGroupWare - controller: a part of a Facilities Management System.
+ *
+ * @author Erik 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$
+ */
+
+
+
+ create_input_box('Number of planned controls on home
page','no_of_planned_controls', '');
+ create_input_box('Number of assigned controls on home
page','no_of_assigned_controls', '');
+
\ No newline at end of file
Modified: trunk/controller/templates/base/config.tpl
===================================================================
--- trunk/controller/templates/base/config.tpl 2012-01-30 18:39:47 UTC (rev
8731)
+++ trunk/controller/templates/base/config.tpl 2012-01-31 08:13:03 UTC (rev
8732)
@@ -22,6 +22,18 @@
</select>
</td>
</tr>
+ <tr class="row_on">
+ <td>Antall planlagte kontroller som skal vises.</td>
+ <td>
+ <input type="text"
name="newsettings[no_of_planned_controls]"
value="{value_no_of_planned_controls}"/>
+ </td>
+ </tr>
+ <tr class="row_off">
+ <td>Antall tildelte kontroller som skal vises</td>
+ <td>
+ <input type="text"
name="newsettings[no_of_assigned_controls]"
value="{value_no_of_assigned_controls}"/>
+ </td>
+ </tr>
<!-- END body -->
<!-- BEGIN footer -->
<tr class="th">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8732],
Erik Holm-Larsen <=