[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7397] property: allow custom attributes on first tab
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7397] property: allow custom attributes on first tab |
Date: |
Fri, 17 Jun 2011 13:54:27 +0000 |
Revision: 7397
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7397
Author: sigurdne
Date: 2011-06-17 13:54:27 +0000 (Fri, 17 Jun 2011)
Log Message:
-----------
property: allow custom attributes on first tab
Modified Paths:
--------------
trunk/property/inc/class.uientity.inc.php
trunk/property/templates/base/entity.xsl
Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php 2011-06-17 13:19:00 UTC (rev
7396)
+++ trunk/property/inc/class.uientity.inc.php 2011-06-17 13:54:27 UTC (rev
7397)
@@ -1476,7 +1476,10 @@
{
$_no_link =
(int)$category['location_link_level'] + 2;
}
- if($entity['location_form'] )
+
+ $location_data = array();
+
+ if($entity['location_form'] &&
$category['location_level'] > 0)
{
$location_data=$bolocation->initiate_ui_location(array
(
@@ -1615,10 +1618,11 @@
$location =
".{$this->type}.{$this->entity_id}.{$this->cat_id}";
$attributes_groups =
$this->bo->get_attribute_groups($location, $values['attributes']);
+ $attributes_general = array();
$attributes = array();
foreach ($attributes_groups as $group)
{
- if(isset($group['attributes']))
+ if(isset($group['attributes']) &&
(isset($group['group_sort']) || !$location_data))
{
$_tab_name = str_replace(' ',
'_', $group['name']);
$active_tab = $active_tab ?
$active_tab : $_tab_name;
@@ -1627,6 +1631,10 @@
$attributes[] = $group;
unset($_tab_name);
}
+ else if(isset($group['attributes']) &&
!isset($group['group_sort']) && $location_data)
+ {
+ $attributes_general =
array_merge($attributes_general,$group['attributes']);
+ }
}
unset($attributes_groups);
@@ -1961,6 +1969,7 @@
'category_name'
=> $category['name'],
'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
'attributes_group'
=> $attributes,
+ 'attributes_general'
=> array('attributes' => $attributes_general),
'lookup_functions'
=> isset($values['lookup_functions'])?$values['lookup_functions']:'',
'lang_none'
=> lang('None'),
'location_data'
=> $location_data,
Modified: trunk/property/templates/base/entity.xsl
===================================================================
--- trunk/property/templates/base/entity.xsl 2011-06-17 13:19:00 UTC (rev
7396)
+++ trunk/property/templates/base/entity.xsl 2011-06-17 13:54:27 UTC (rev
7397)
@@ -212,6 +212,7 @@
<xsl:call-template name="location_view"/>
</xsl:otherwise>
</xsl:choose>
+
<xsl:apply-templates select="attributes_general/attributes"/>
</table>
</div>
</xsl:when>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7397] property: allow custom attributes on first tab,
Sigurd Nes <=