[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6842] Merge 6840:6841 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6842] Merge 6840:6841 from trunk |
Date: |
Wed, 26 Jan 2011 07:40:15 +0000 |
Revision: 6842
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6842
Author: sigurdne
Date: 2011-01-26 07:40:14 +0000 (Wed, 26 Jan 2011)
Log Message:
-----------
Merge 6840:6841 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
branches/Version-1_0-branch/property/setup/phpgw_no.lang
branches/Version-1_0-branch/property/templates/base/location.xsl
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841
Modified: branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
2011-01-25 18:48:28 UTC (rev 6841)
+++ branches/Version-1_0-branch/property/inc/class.uilocation.inc.php
2011-01-26 07:40:14 UTC (rev 6842)
@@ -2064,6 +2064,32 @@
$file_tree = array();
if($location_code)
{
+ $_role_criteria = array
+ (
+ 'type' =>
'responsibility_role',
+ 'filter' => array('location' =>
".location.{$type_id}"),
+ 'order' => 'name'
+ );
+
+ $roles =
execMethod('property.sogeneric.get_list',$_role_criteria);
+
+ $soresponsible =
CreateObject('property.soresponsible');
+ $contacts = createObject('phpgwapi.contacts');
+ foreach ($roles as & $role)
+ {
+ $responsible_item =
$soresponsible->get_active_responsible_at_location($location_code, $role['id']);
+ $role['responsibility_contact'] =
$contacts->get_name_of_person_id($responsible_item['contact_id']);
+ $responsibility =
$soresponsible->read_single_contact($responsible_item['id']);
+ $role['responsibility_name'] =
$responsibility['responsibility_name'];
+ }
+
+ if($roles)
+ {
+ $tabs['roles'] = array('label' =>
lang('roles'), 'link' => '#roles');
+ }
+
+//_debug_array($roles);die();
+
$related =
$this->bo->read_entity_to_link($location_code);
$related_link = array();
@@ -2140,81 +2166,80 @@
}
}
+
$data = array
- (
- 'edit'
=> $view ? '' : true,
- 'lang_change_type'
=> lang('Change type'),
- 'lang_no_change_type'
=> lang('No Change type'),
- 'lang_change_type_statustext' =>
lang('Type of changes'),
- 'change_type_list'
=> (isset($change_type_list)?$change_type_list:''),
- 'check_history'
=> (isset($check_history)?$check_history:''),
- 'lang_history'
=> lang('History'),
- 'lang_history_statustext'
=> lang('Fetch the history for this item'),
- 'table_header'
=> (isset($table_header)?$table_header:''),
- 'values'
=> (isset($content)?$content:''),
+ (
+ 'roles'
=> $roles,
+ 'edit'
=> $view ? '' : true,
+ 'lang_change_type'
=> lang('Change type'),
+ 'lang_no_change_type' =>
lang('No Change type'),
+ 'lang_change_type_statustext' => lang('Type
of changes'),
+ 'change_type_list'
=> (isset($change_type_list)?$change_type_list:''),
+ 'check_history'
=> (isset($check_history)?$check_history:''),
+ 'lang_history'
=> lang('History'),
+ 'lang_history_statustext' =>
lang('Fetch the history for this item'),
+ 'table_header'
=> (isset($table_header)?$table_header:''),
+ 'values'
=> (isset($content)?$content:''),
- 'lang_related_info'
=> lang('related info'),
- 'entities_link'
=> (isset($entities_link)?$entities_link:''),
- 'related_link'
=> $related_link,
- 'edit_street'
=> (isset($edit_street)?$edit_street:''),
- 'edit_tenant'
=> (isset($edit_tenant)?$edit_tenant:''),
- 'edit_part_of_town'
=> (isset($edit_part_of_town)?$edit_part_of_town:''),
- 'edit_owner'
=> (isset($edit_owner)?$edit_owner:''),
- 'select_name_part_of_town'
=> (isset($select_name_part_of_town)?$select_name_part_of_town:''),
- 'part_of_town_list'
=> (isset($part_of_town_list)?$part_of_town_list:''),
- 'lang_town_statustext'
=> (isset($lang_town_statustext)?$lang_town_statustext:''),
- 'lang_part_of_town'
=> lang('Part of town'),
- 'lang_no_part_of_town'
=> lang('No part of town'),
- 'lang_owner'
=> (isset($lang_owner)?$lang_owner:''),
- 'owner_list'
=> (isset($owner_list)?$owner_list:''),
- 'lang_select_owner'
=> (isset($lang_select_owner)?$lang_select_owner:''),
- 'lang_owner_statustext'
=> (isset($lang_owner_statustext)?$lang_owner_statustext:''),
- 'additional_fields'
=> $additional_fields,
- 'attributes_group'
=> $attributes,
- //
'attributes_values' => $values['attributes'],
- 'lookup_functions'
=> isset($values['lookup_functions'])?$values['lookup_functions']:'',
- 'lang_none'
=> lang('None'),
+ 'lang_related_info'
=> lang('related info'),
+ 'entities_link'
=> (isset($entities_link)?$entities_link:''),
+ 'related_link'
=> $related_link,
+ 'edit_street'
=> (isset($edit_street)?$edit_street:''),
+ 'edit_tenant'
=> (isset($edit_tenant)?$edit_tenant:''),
+ 'edit_part_of_town'
=> (isset($edit_part_of_town)?$edit_part_of_town:''),
+ 'edit_owner'
=> (isset($edit_owner)?$edit_owner:''),
+ 'select_name_part_of_town' =>
(isset($select_name_part_of_town)?$select_name_part_of_town:''),
+ 'part_of_town_list'
=> (isset($part_of_town_list)?$part_of_town_list:''),
+ 'lang_town_statustext' =>
(isset($lang_town_statustext)?$lang_town_statustext:''),
+ 'lang_part_of_town'
=> lang('Part of town'),
+ 'lang_no_part_of_town' =>
lang('No part of town'),
+ 'lang_owner'
=> (isset($lang_owner)?$lang_owner:''),
+ 'owner_list'
=> (isset($owner_list)?$owner_list:''),
+ 'lang_select_owner'
=> (isset($lang_select_owner)?$lang_select_owner:''),
+ 'lang_owner_statustext' =>
(isset($lang_owner_statustext)?$lang_owner_statustext:''),
+ 'additional_fields'
=> $additional_fields,
+ 'attributes_group'
=> $attributes,
+// 'attributes_values'
=> $values['attributes'],
+ 'lookup_functions'
=> isset($values['lookup_functions'])?$values['lookup_functions']:'',
+ 'lang_none'
=> lang('None'),
+ 'msgbox_data'
=> (isset($msgbox_data)?$GLOBALS['phpgw']->common->msgbox($msgbox_data):''),
+ 'street_link'
=> "menuaction:'" . 'property'.".uilookup.street'",
+ 'lang_street'
=> lang('Address'),
+ 'lang_select_street_help' =>
lang('Select the street name'),
+ 'lang_street_num_statustext' => lang('Enter
the street number'),
+ 'value_street_id'
=> (isset($values['street_id'])?$values['street_id']:''),
+ 'value_street_name'
=> (isset($values['street_name'])?$values['street_name']:''),
+ 'value_street_number' =>
(isset($values['street_number'])?$values['street_number']:''),
+ 'tenant_link'
=> "menuaction:'" . 'property'.".uilookup.tenant'",
+ 'lang_tenant'
=> lang('tenant'),
+ 'value_tenant_id'
=> (isset($values['tenant_id'])?$values['tenant_id']:''),
+ 'value_last_name'
=> (isset($values['last_name'])?$values['last_name']:''),
+ 'value_first_name'
=> (isset($values['first_name'])?$values['first_name']:''),
+ 'lang_tenant_statustext' =>
lang('Select a tenant'),
+ 'size_last_name'
=> (isset($values['last_name'])?strlen($values['last_name']):''),
+ 'size_first_name'
=> (isset($values['first_name'])?strlen($values['first_name']):''),
+ 'lookup_type'
=> $lookup_type,
+ 'location_data'
=> $location_data,
+ 'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uilocation.index','type_id'=> $type_id, 'lookup_tenant'=>
$lookup_tenant)),
+ 'lang_save'
=> lang('save'),
+ 'lang_done'
=> lang('done'),
+ 'lang_done_statustext' =>
lang('Back to the list'),
+ 'lang_save_statustext' =>
lang('Save the location'),
+ 'lang_category'
=> lang('category'),
+ 'lang_no_cat'
=> lang('no category'),
+ 'lang_cat_statustext' =>
lang('Select the category the location belongs to. To do not use a category
select NO CATEGORY'),
+ 'select_name'
=> 'cat_id',
+ 'cat_list'
=>
$this->bocommon->select_category_list(array('format'=>'select','selected' =>
$values['cat_id'],'type' =>'location','type_id' =>$type_id,'order'=>'descr')),
+ 'textareacols'
=>
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'])
&& $GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'] ?
$GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'] : 40,
+ 'textarearows'
=>
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'])
&& $GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] ?
$GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] : 6,
+ 'tabs'
=> phpgwapi_yui::tabview_generate($tabs, 'general'),
+ 'documents'
=> $documents,
+ 'file_tree'
=> $file_tree,
+ 'lang_expand_all'
=> lang('expand all'),
+ 'lang_collapse_all'
=> lang('collapse all')
+ );
- 'msgbox_data'
=>
(isset($msgbox_data)?$GLOBALS['phpgw']->common->msgbox($msgbox_data):''),
-
- 'street_link'
=> "menuaction:'" . 'property'.".uilookup.street'",
- 'lang_street'
=> lang('Address'),
- 'lang_select_street_help'
=> lang('Select the street name'),
- 'lang_street_num_statustext' =>
lang('Enter the street number'),
- 'value_street_id'
=> (isset($values['street_id'])?$values['street_id']:''),
- 'value_street_name'
=> (isset($values['street_name'])?$values['street_name']:''),
- 'value_street_number'
=> (isset($values['street_number'])?$values['street_number']:''),
-
- 'tenant_link'
=> "menuaction:'" . 'property'.".uilookup.tenant'",
- 'lang_tenant'
=> lang('tenant'),
- 'value_tenant_id'
=> (isset($values['tenant_id'])?$values['tenant_id']:''),
- 'value_last_name'
=> (isset($values['last_name'])?$values['last_name']:''),
- 'value_first_name'
=> (isset($values['first_name'])?$values['first_name']:''),
- 'lang_tenant_statustext'
=> lang('Select a tenant'),
- 'size_last_name'
=> (isset($values['last_name'])?strlen($values['last_name']):''),
- 'size_first_name'
=> (isset($values['first_name'])?strlen($values['first_name']):''),
- 'lookup_type'
=> $lookup_type,
- 'location_data'
=> $location_data,
- 'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uilocation.index','type_id'=> $type_id, 'lookup_tenant'=>
$lookup_tenant)),
- 'lang_save'
=> lang('save'),
- 'lang_done'
=> lang('done'),
- 'lang_done_statustext'
=> lang('Back to the list'),
- 'lang_save_statustext'
=> lang('Save the location'),
- 'lang_category'
=> lang('category'),
- 'lang_no_cat'
=> lang('no category'),
- 'lang_cat_statustext'
=> lang('Select the category the location belongs to. To do not use a category
select NO CATEGORY'),
- 'select_name'
=> 'cat_id',
- 'cat_list'
=>
$this->bocommon->select_category_list(array('format'=>'select','selected' =>
$values['cat_id'],'type' =>'location','type_id' =>$type_id,'order'=>'descr')),
- 'textareacols'
=>
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'])
&& $GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'] ?
$GLOBALS['phpgw_info']['user']['preferences']['property']['textareacols'] : 40,
- 'textarearows'
=>
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'])
&& $GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] ?
$GLOBALS['phpgw_info']['user']['preferences']['property']['textarearows'] : 6,
- 'tabs'
=> phpgwapi_yui::tabview_generate($tabs, 'general'),
- 'documents'
=> $documents,
- 'file_tree'
=> $file_tree,
- 'lang_expand_all'
=> lang('expand all'),
- 'lang_collapse_all'
=> lang('collapse all')
- );
-
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/examples/treeview/assets/css/folders/tree.css');
phpgwapi_yui::load_widget('treeview');
$GLOBALS['phpgw']->js->validate_file( 'yahoo',
'location.edit', 'property' );
@@ -2643,7 +2668,8 @@
);
// values for datatable
- if(isset($datatable['rows']['row']) &&
is_array($datatable['rows']['row'])){
+ if(isset($datatable['rows']['row']) &&
is_array($datatable['rows']['row']))
+ {
foreach( $datatable['rows']['row'] as $row )
{
$json_row = array();
@@ -2651,11 +2677,11 @@
{
if(isset($column['format']) &&
$column['format']== "link" && $column['java_link']==true)
{
-
$json_row[$column['name']] = "<a href='#' id='".$column['link']."'
onclick='javascript:filter_data(this.id);'>" .$column['value']."</a>";
+
$json_row[$column['name']] = "<a href='#' id='{$column['link']}'
onclick='javascript:filter_data(this.id);'>{$column['value']}</a>";
}
else
if(isset($column['format']) && $column['format']== "link")
{
-
$json_row[$column['name']] = "<a href='".$column['link']."'>"
.$column['value']."</a>";
+
$json_row[$column['name']] = "<a
href='{$column['link']}'>{$column['value']}</a>";
}
else
{
Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang 2011-01-25
18:48:28 UTC (rev 6841)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang 2011-01-26
07:40:14 UTC (rev 6842)
@@ -1293,6 +1293,7 @@
reset property no Tilbakestill
residential environment property no Bo-miljø
responsible property no Ansvarlig
+responsibility property no Ansvar
responsible matrix property no Ansvarsmatrise
responsibility role property no Rolle for Ansvarsmatrise
result property no Resultat
@@ -1300,6 +1301,8 @@
revision property no Revisjon
rig addition property no Rigg tillegg
right property no Rettighet
+role property no Rolle
+roles property no Roller
roll back property no Rull tilbake
rollback invoice property no Rull tilbake bilag
run now property no Kjør nå
Modified: branches/Version-1_0-branch/property/templates/base/location.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/location.xsl
2011-01-25 18:48:28 UTC (rev 6841)
+++ branches/Version-1_0-branch/property/templates/base/location.xsl
2011-01-26 07:40:14 UTC (rev 6842)
@@ -248,7 +248,7 @@
<!-- add / edit -->
- <xsl:template match="edit">
+ <xsl:template match="edit" xmlns:php="http://php.net/xsl">
<script type="text/javascript">
self.name="first_Window";
function street_lookup()
@@ -451,10 +451,8 @@
</xsl:attribute>
</input>
<input size="{size_first_name}" type="text" name="first_name"
value="{value_first_name}" onClick="tenant_lookup();" readonly="readonly">
-
<xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
+
<xsl:attribute name="title">
<xsl:value-of select="lang_tenant_statustext"/>
-
<xsl:text>'; return true;</xsl:text>
</xsl:attribute>
</input>
</td>
@@ -467,6 +465,38 @@
<xsl:call-template
name="attributes_values"/>
<xsl:choose>
+ <xsl:when test="roles != ''">
+ <div id="roles">
+ <table
cellpadding="2" cellspacing="2" width="80%" align="left">
+ <tr
class="th">
+
<td class="th_text">
+
<xsl:value-of select="php:function('lang', 'role')" />
+
</td>
+
<td class="th_text">
+
<xsl:value-of select="php:function('lang', 'contact')" />
+
</td>
+
<td class="th_text">
+
<xsl:value-of select="php:function('lang', 'responsibility')" />
+
</td>
+ </tr>
+
<xsl:for-each select="roles">
+
<tr>
+
<td>
+
<xsl:value-of select="name"/>
+
</td>
+
<td>
+
<xsl:value-of select="responsibility_contact"/>
+
</td>
+
<td>
+
<xsl:value-of select="responsibility_name"/>
+
</td>
+
</tr>
+
</xsl:for-each>
+ </table>
+ </div>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
<xsl:when test="documents !=
''">
<div id="document">
<!-- Some style
for the expand/contract section-->
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6842] Merge 6840:6841 from trunk,
Sigurd Nes <=