[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12595] property: hide categories
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12595] property: hide categories |
Date: |
Wed, 14 Jan 2015 10:23:01 +0000 |
Revision: 12595
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12595
Author: sigurdne
Date: 2015-01-14 10:23:00 +0000 (Wed, 14 Jan 2015)
Log Message:
-----------
property: hide categories
Modified Paths:
--------------
trunk/phpgwapi/inc/class.categories.inc.php
trunk/property/inc/class.uiimport.inc.php
trunk/property/inc/class.uiproject.inc.php
trunk/property/inc/class.uiworkorder.inc.php
trunk/property/templates/base/cat_sub_select.xsl
Modified: trunk/phpgwapi/inc/class.categories.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.categories.inc.php 2015-01-13 23:01:55 UTC (rev
12594)
+++ trunk/phpgwapi/inc/class.categories.inc.php 2015-01-14 10:23:00 UTC (rev
12595)
@@ -691,6 +691,10 @@
$cat_list = array();
while (is_array($cats) && list(,$cat) = each($cats))
{
+ if($cat['active'] == 2 &&
!in_array($cat['id'],$selected))//hidden
+ {
+ continue;
+ }
$sel_cat = '';
if (in_array($cat['id'],$selected))
{
Modified: trunk/property/inc/class.uiimport.inc.php
===================================================================
--- trunk/property/inc/class.uiimport.inc.php 2015-01-13 23:01:55 UTC (rev
12594)
+++ trunk/property/inc/class.uiimport.inc.php 2015-01-14 10:23:00 UTC (rev
12595)
@@ -60,10 +60,11 @@
'fm_ecodimb'
=> array('name' => 'fm_ecodimb (' . lang('dimb') . ')', 'permission' =>
PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT),
'fm_budget'
=> array('name' => 'fm_budget (' . lang('budget') . ')', 'permission'
=> PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT),
'fm_org_unit'
=> array('name' => 'fm_org_unit (' . lang('department') . ')', 'permission' =>
PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT),
+ 'fm_project_group'
=> array('name' => 'fm_project_group', 'permission' => PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT),
'fm_eco_periodization_outline' => array('name'
=> 'fm_eco_periodization_outline (' . lang('periodization outline') . ')',
'permission' => PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT),
'fm_eco_periodization' =>
array('name' => 'fm_eco_periodization (' . lang('periodization') . ')',
'permission' => PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT),
'fm_ecodimd'
=> array('name' => 'fm_ecodimd', 'permission' => PHPGW_ACL_READ | PHPGW_ACL_ADD
| PHPGW_ACL_EDIT),
- 'phpgw_categories'
=> array('name' => 'phpgw_categories (' . lang('categories') . ')',
'permission' => PHPGW_ACL_READ),
+ 'phpgw_categories'
=> array('name' => 'phpgw_categories (' . lang('categories') . ')',
'permission' => PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT),
);
$location_types =
execMethod('property.soadmin_location.select_location_type');
Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php 2015-01-13 23:01:55 UTC (rev
12594)
+++ trunk/property/inc/class.uiproject.inc.php 2015-01-14 10:23:00 UTC (rev
12595)
@@ -290,11 +290,11 @@
$_cats =
$this->cats->return_sorted_array(0,false,'','','',false, false);
//$this->cats->formatted_xslt_list(array('format'=>'filter','selected' =>
$this->cat_id,'globals' => True));
-
+
$values_combo_box[2] = array();
foreach($_cats as $_cat)
{
- if($_cat['level'] == 0 )
+ if($_cat['level'] == 0 &&
!$_cat['active'] == 2)
{
$values_combo_box[2][] = $_cat;
}
Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php 2015-01-13 23:01:55 UTC
(rev 12594)
+++ trunk/property/inc/class.uiworkorder.inc.php 2015-01-14 10:23:00 UTC
(rev 12595)
@@ -288,7 +288,7 @@
$values_combo_box[1] = array();
foreach($_cats as $_cat)
{
- if($_cat['level'] == 0 )
+ if($_cat['level'] == 0 &&
!$_cat['active'] == 2)
{
$values_combo_box[1][] = $_cat;
}
@@ -2029,12 +2029,19 @@
}
}
- $cat_sub = $this->cats->return_sorted_array($start =
0,$limit = false,$query = '',$sort = '',$order = '',$globals = False, false);
+ $_cat_sub = $this->cats->return_sorted_array($start =
0,$limit = false,$query = '',$sort = '',$order = '',$globals = False, false);
-
- foreach ($cat_sub as &$entry)
+ $selected_cat = $values['cat_id'] ? $values['cat_id']:
$project['cat_id'];
+ $cat_sub = array();
+ foreach ($_cat_sub as $entry)
{
+ if($entry['active'] == 2 && !$entry['id'] ==
$selected_cat)//hidden
+ {
+ continue;
+ }
$entry['name'] = str_repeat (' . ' ,
(int)$entry['level'] ) . $entry['name'];
+ $entry['title'] = $entry['description'];
+ $cat_sub[] = $entry;
}
$suppresscoordination =
isset($config->config_data['project_suppresscoordination']) &&
$config->config_data['project_suppresscoordination'] ? 1 : '';
@@ -2187,7 +2194,7 @@
'lang_save_statustext'
=> lang('Save the workorder'),
'lang_cat_sub'
=> lang('category'),
- 'cat_sub_list'
=> $this->bocommon->select_list($values['cat_id'] ?
$values['cat_id']: $project['cat_id'], $cat_sub),
+ 'cat_sub_list'
=> $this->bocommon->select_list($selected_cat, $cat_sub),
'cat_sub_name'
=> 'values[cat_id]',
'lang_cat_sub_statustext'
=> lang('select sub category'),
Modified: trunk/property/templates/base/cat_sub_select.xsl
===================================================================
--- trunk/property/templates/base/cat_sub_select.xsl 2015-01-13 23:01:55 UTC
(rev 12594)
+++ trunk/property/templates/base/cat_sub_select.xsl 2015-01-14 10:23:00 UTC
(rev 12595)
@@ -18,12 +18,12 @@
</xsl:variable>
<xsl:choose>
<xsl:when test="selected">
- <option value="{$id}" selected="selected">
+ <option value="{$id}" selected="selected"
title="{title}">
<xsl:value-of
disable-output-escaping="yes" select="name"/>
</option>
</xsl:when>
<xsl:otherwise>
- <option value="{$id}">
+ <option value="{$id}" title="{title}">
<xsl:value-of
disable-output-escaping="yes" select="name"/>
</option>
</xsl:otherwise>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12595] property: hide categories,
Sigurd Nes <=