[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13690] Syncromind: Merge 13669:13689 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13690] Syncromind: Merge 13669:13689 from trunk |
Date: |
Mon, 03 Aug 2015 09:35:53 +0000 |
Revision: 13690
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13690
Author: sigurdne
Date: 2015-08-03 09:35:52 +0000 (Mon, 03 Aug 2015)
Log Message:
-----------
Syncromind: Merge 13669:13689 from trunk
Modified Paths:
--------------
branches/dev-syncromind/property/inc/class.bogeneric.inc.php
branches/dev-syncromind/property/inc/class.sogeneric.inc.php
branches/dev-syncromind/property/inc/class.solocation.inc.php
branches/dev-syncromind/property/inc/class.soresponsible.inc.php
branches/dev-syncromind/property/inc/class.uilocation.inc.php
branches/dev-syncromind/property/inc/class.uiresponsible.inc.php
branches/dev-syncromind/property/setup/setup.inc.php
branches/dev-syncromind/property/setup/tables_current.inc.php
branches/dev-syncromind/property/setup/tables_update.inc.php
branches/dev-syncromind/property/templates/base/responsible.xsl
Property Changed:
----------------
branches/dev-syncromind/
Property changes on: branches/dev-syncromind
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668
+ /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689
Modified: branches/dev-syncromind/property/inc/class.bogeneric.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.bogeneric.inc.php
2015-08-03 09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/inc/class.bogeneric.inc.php
2015-08-03 09:35:52 UTC (rev 13690)
@@ -157,6 +157,13 @@
}
}
}
+ if
(isset($field['values_def']['get_single_value']) &&
$field['values_def']['get_single_value'])
+ {
+ foreach($values as &$entry)
+ {
+ $entry[$field['name']] =
execMethod($field['values_def']['get_single_value'],$entry[$field['name']]);
+ }
+ }
}
$this->total_records = $this->so->total_records;
Modified: branches/dev-syncromind/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.sogeneric.inc.php
2015-08-03 09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/inc/class.sogeneric.inc.php
2015-08-03 09:35:52 UTC (rev 13690)
@@ -2345,7 +2345,6 @@
'valueset' => false,
'method' => 'preferences.boadmin_acl.get_locations',
'method_input' => array('acl_app' => 'property', 'selected' =>
'##location##')
-//
'method_input' => array('acl_app' => '$this->appname', 'selected' =>
'##location##', 'have_categories' => true)
)
),
array
@@ -2356,6 +2355,7 @@
'values_def'
=> array
(
'valueset' => false,
+
'get_single_value' => 'property.soresponsible.get_responsibility_name',
'method' => 'property.boresponsible.get_responsibilities',
'method_input' => array('appname' => '$this->appname', 'selected' =>
'##responsibility_id##')
)
Modified: branches/dev-syncromind/property/inc/class.solocation.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.solocation.inc.php
2015-08-03 09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/inc/class.solocation.inc.php
2015-08-03 09:35:52 UTC (rev 13690)
@@ -554,7 +554,7 @@
{
$joinmethod .= " {$this->join}
fm_responsibility_contact ON ( fm_location{$type_id}.location_code =
fm_responsibility_contact.location_code))";
$paranthesis .='(';
- $joinmethod .= " {$this->join}
fm_responsibility_role ON ( fm_responsibility_contact.id =
fm_responsibility_role.responsibility_role_id))";
+ $joinmethod .= " {$this->join}
fm_responsibility_role ON ( fm_responsibility_contact.responsibility_role_id =
fm_responsibility_role.id))";
$paranthesis .='(';
$cols.= ',fm_responsibility_role.id as
role_id';
Modified: branches/dev-syncromind/property/inc/class.soresponsible.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.soresponsible.inc.php
2015-08-03 09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/inc/class.soresponsible.inc.php
2015-08-03 09:35:52 UTC (rev 13690)
@@ -438,7 +438,31 @@
return $receipt;
}
+ /**
+ * get the responsibility name
+ *
+ * @param type $id
+ * @return string name
+ */
+ public function get_responsibility_name($id)
+ {
+ static $names = array();
+ $i = (int) $id;
+ if ($names[$i])
+ {
+ return $names[$i];
+ }
+
+
+ $sql = "SELECT * FROM fm_responsibility WHERE id=
{$id}";
+ $this->db->query($sql, __LINE__, __FILE__);
+ $this->db->next_record();
+ $name = $this->db->f('name', true);
+ $names[$i] = $name;
+ return $name;
+ }
+
/**
* Read single responsibility type
*
@@ -601,7 +625,6 @@
'p_num'
=> $this->db->f('p_num', true),
'p_entity_id'
=> $this->db->f('p_entity_id'),
'p_cat_id'
=> $this->db->f('p_cat_id'),
- 'ecodimb'
=> $this->db->f('ecodimb'),
'remark'
=> $this->db->f('remark', true),
);
}
@@ -633,7 +656,6 @@
isset($values['extra']['p_num']) ?
$values['extra']['p_num'] : '',
isset($values['extra']['p_entity_id'])
? $values['extra']['p_entity_id'] : '',
isset($values['extra']['p_cat_id']) ?
$values['extra']['p_cat_id'] : '',
- $values['ecodimb'],
$values['remark'],
$this->account,
time()
@@ -644,7 +666,7 @@
$this->db->transaction_begin();
$this->db->query("INSERT INTO fm_responsibility_contact
(responsibility_role_id, contact_id,"
- ." location_code, active_from, active_to,
p_num, p_entity_id, p_cat_id, ecodimb, remark, created_by, created_on)"
+ ." location_code, active_from, active_to,
p_num, p_entity_id, p_cat_id, remark, created_by, created_on)"
." VALUES ($insert_values)", __LINE__,
__FILE__);
if($this->db->transaction_commit())
@@ -679,8 +701,7 @@
|| $values['active_from'] !=
$orig['active_from']
|| $values['active_to'] != $orig['active_to']
|| $values['extra']['p_num'] != $orig['p_num']
- || $values['remark'] != $orig['remark']
- || $values['ecodimb'] != $orig['ecodimb'])
+ || $values['remark'] != $orig['remark'])
{
$receipt = $this->add_contact($values);
@@ -690,7 +711,6 @@
$value_set['expired_by'] =
$this->account;
$value_set['expired_on'] =
time();
- $value_set['ecodimb'] =
$values['ecodimb'];
}
$value_set =
$this->db->validate_update($value_set);
@@ -760,8 +780,7 @@
'created_on'
=> $this->db->f('created_on'),
'expired_by'
=> $this->db->f('expired_by'),
'expired_on'
=> $this->db->f('expired_on'),
- 'priority'
=> $this->db->f('priority'), // FIXME - evaluate the need for this one
- 'ecodimb'
=> $this->db->f('ecodimb')
+ 'priority'
=> $this->db->f('priority') // FIXME - evaluate the need for this one
);
return $values;
@@ -849,14 +868,8 @@
$todo = false;
$item_filter = '';
- if(isset($data['ecodimb']) && $data['ecodimb'])
+ if(isset($data['extra']['p_entity_id']) &&
$data['extra']['p_entity_id'])
{
- $item_filter = " AND ecodimb =
'{$data['ecodimb']}'";
- $location_filter[] = '';
- $todo = true;
- }
- elseif(isset($data['extra']['p_entity_id']) &&
$data['extra']['p_entity_id'])
- {
$location_code = implode('-',
$data['location']);
$item_filter = " AND p_num =
'{$data['extra']['p_num']}'"
@@ -864,7 +877,6 @@
.' AND p_cat_id =' . (int)
$data['extra']['p_cat_id'];
$location_filter[] = " AND location_code =
'{$location_code}'";
- $ordermethod = '';
$todo = true;
}
else if(isset($data['location']) && $data['location'])
@@ -887,7 +899,6 @@
// Start at the bottom level
$location_filter =
array_reverse($location_filter);
- $ordermethod = ' ORDER by location_code.id ASC';
$todo = true;
}
Modified: branches/dev-syncromind/property/inc/class.uilocation.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uilocation.inc.php
2015-08-03 09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/inc/class.uilocation.inc.php
2015-08-03 09:35:52 UTC (rev 13690)
@@ -478,6 +478,10 @@
'order' => 'name'
);
$values_combo_box[4] =
execMethod('property.sogeneric.get_list',$_role_criteria);
+ foreach($values_combo_box[4] as &$_role)
+ {
+ $_role['name'] .= ':: ' .
execMethod('property.soresponsible.get_responsibility_name',$_role['id']);
+ }
array_unshift ($values_combo_box[4], array('id'=>'',
'name'=>lang('no role')));
$combos[] = array('type' => 'filter',
'name' => 'role_id',
Modified: branches/dev-syncromind/property/inc/class.uiresponsible.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiresponsible.inc.php
2015-08-03 09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/inc/class.uiresponsible.inc.php
2015-08-03 09:35:52 UTC (rev 13690)
@@ -588,7 +588,7 @@
'parameters' =>
json_encode($parameters)
);
}
-
+/*
$data['datatable']['actions'][] = array
(
'my_name' =>
'contacts',
@@ -600,7 +600,7 @@
)),
'parameters' =>
json_encode($parameters2)
);
-
+*/
if($this->acl_add)
{
$data['datatable']['actions'][] = array
@@ -1232,7 +1232,6 @@
'created_on'
=> $entry['created_on'],
'contact_name'
=> $entry['contact_name'],
'remark'
=> $entry['remark'],
- 'ecodimb'
=> $entry['ecodimb'],
'link_edit'
=> $link_edit,
'text_edit'
=> $text_edit,
'lang_edit_text'
=> $lang_edit_text,
@@ -1286,20 +1285,6 @@
'type_id'
=> $type_id
)
)),
- 'sort_ecodimb' =>
$this->nextmatchs->show_sort_order(array
- (
- 'sort' => $this->sort,
- 'var' => 'ecodimb',
- 'order' => $this->order,
- 'extra' => array
- (
- 'menuaction' =>
'property.uiresponsible.contact',
- 'allrows'
=> $this->allrows,
- 'appname'
=> $this->appname,
- 'location'
=> $this->location,
- 'type_id'
=> $type_id
- )
- )),
'lang_contact' =>
lang('contact'),
'lang_location' =>
lang('location'),
'lang_item' =>
lang('item'),
@@ -1308,7 +1293,6 @@
'lang_created_on' =>
lang('created'),
'lang_created_by' =>
lang('supervisor'),
'lang_remark' =>
lang('remark'),
- 'lang_ecodimb' => lang('dimb'),
'lang_edit' =>
$this->acl_edit ? lang('edit') : '',
// 'lang_delete'
=> $this->acl_delete ? lang('delete') : '',
);
@@ -1428,8 +1412,6 @@
if (isset($values) && is_array($values))
{
- $values['ecodimb'] =
phpgw::get_var('ecodimb');
-
if(!$this->acl_edit)
{
$this->no_access();
@@ -1574,12 +1556,6 @@
)
);
- $ecodimb_data=$bocommon->initiate_ecodimb_lookup(array
- (
- 'ecodimb' =>
$values['ecodimb'],
- 'ecodimb_descr' =>
$values['ecodimb_descr'])
- );
-
$link_data = array
(
'menuaction' =>
'property.uiresponsible.edit_contact',
@@ -1626,7 +1602,6 @@
$data = array
(
- 'ecodimb_data'
=> $ecodimb_data,
'value_entry_date'
=> isset($values['entry_date']) ? $values['entry_date'] : '',
'value_name'
=> isset($values['name']) ? $values['name'] : '',
'value_remark'
=> isset($values['remark']) ? $values['remark'] : '',
Modified: branches/dev-syncromind/property/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/setup.inc.php 2015-08-03
09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/setup/setup.inc.php 2015-08-03
09:35:52 UTC (rev 13690)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.692';
+ $setup_info['property']['version'] = '0.9.17.693';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: branches/dev-syncromind/property/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/tables_current.inc.php
2015-08-03 09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/setup/tables_current.inc.php
2015-08-03 09:35:52 UTC (rev 13690)
@@ -2538,7 +2538,6 @@
'created_by' => array('type' => 'int',
'precision' => 4,'nullable' => False),
'expired_on' => array('type' => 'int',
'precision' => 4,'nullable' => True),
'expired_by' => array('type' => 'int',
'precision' => 4,'nullable' => True),
- 'ecodimb' => array('type' => 'int','precision'
=> 4,'nullable' => True),
'remark' => array('type' => 'text','nullable'
=> True)
),
'pk' => array('id'),
Modified: branches/dev-syncromind/property/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/tables_update.inc.php
2015-08-03 09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/setup/tables_update.inc.php
2015-08-03 09:35:52 UTC (rev 13690)
@@ -8562,4 +8562,24 @@
$GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.692';
return $GLOBALS['setup_info']['property']['currentver'];
}
+ }
+
+ /**
+ * Update property version from 0.9.17.691 to 0.9.17.692
+ * Alter field name.
+ */
+ $test[] = '0.9.17.692';
+ function property_upgrade0_9_17_692()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('fm_responsibility_contact',array(),'ecodimb');
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.693';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
}
\ No newline at end of file
Modified: branches/dev-syncromind/property/templates/base/responsible.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/responsible.xsl
2015-08-03 09:31:55 UTC (rev 13689)
+++ branches/dev-syncromind/property/templates/base/responsible.xsl
2015-08-03 09:35:52 UTC (rev 13690)
@@ -384,11 +384,6 @@
<xsl:value-of select="lang_contact"/>
</td>
<td class="th_text" width="10%" align="left">
- <a href="{sort_ecodimb}">
- <xsl:value-of select="lang_ecodimb"/>
- </a>
- </td>
- <td class="th_text" width="10%" align="left">
<a href="{$sort_location}">
<xsl:value-of select="lang_location"/>
</a>
@@ -443,9 +438,6 @@
<xsl:value-of select="contact_name"/>
</td>
<td align="left">
- <xsl:value-of select="ecodimb"/>
- </td>
- <td align="left">
<xsl:value-of select="location_code"/>
</td>
<td align="left">
@@ -606,7 +598,6 @@
</input>
</td>
</tr>
- <xsl:call-template name="ecodimb_form"/>
<xsl:call-template
name="location_form"/>
<tr>
<td>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13690] Syncromind: Merge 13669:13689 from trunk,
Sigurd Nes <=