[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7147] Merge 7144:7146 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7147] Merge 7144:7146 from trunk |
Date: |
Mon, 28 Mar 2011 14:27:33 +0000 |
Revision: 7147
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7147
Author: sigurdne
Date: 2011-03-28 14:27:33 +0000 (Mon, 28 Mar 2011)
Log Message:
-----------
Merge 7144:7146 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/catch/setup/setup.inc.php
branches/Version-1_0-branch/catch/setup/tables_current.inc.php
branches/Version-1_0-branch/catch/setup/tables_update.inc.php
branches/Version-1_0-branch/property/inc/class.boentity.inc.php
branches/Version-1_0-branch/property/inc/class.uientity.inc.php
branches/Version-1_0-branch/property/inc/class.uitts.inc.php
branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
branches/Version-1_0-branch/property/templates/base/entity.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,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143
+
/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,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146
Modified: branches/Version-1_0-branch/catch/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/setup/setup.inc.php 2011-03-28
14:26:38 UTC (rev 7146)
+++ branches/Version-1_0-branch/catch/setup/setup.inc.php 2011-03-28
14:27:33 UTC (rev 7147)
@@ -27,7 +27,7 @@
*/
$setup_info['catch']['name'] = 'catch';
- $setup_info['catch']['version'] = '0.9.17.509';
+ $setup_info['catch']['version'] = '0.9.17.510';
$setup_info['catch']['app_order'] = 20;
$setup_info['catch']['enable'] = 1;
$setup_info['catch']['globals_checked'] = True;
Modified: branches/Version-1_0-branch/catch/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/setup/tables_current.inc.php
2011-03-28 14:26:38 UTC (rev 7146)
+++ branches/Version-1_0-branch/catch/setup/tables_current.inc.php
2011-03-28 14:27:33 UTC (rev 7147)
@@ -51,6 +51,7 @@
'lookup_tenant' => array('type' =>
'int','precision' => '4','nullable' => True),
'tracking' => array('type' => 'int','precision'
=> '4','nullable' => True),
'location_level' => array('type' =>
'int','precision' => '4','nullable' => True),
+ 'location_link_level' => array('type' =>
'int','precision' => '4','nullable' => True),
'fileupload' => array('type' =>
'int','precision' => '4','nullable' => True),
'loc_link' => array('type' => 'int','precision'
=> '4','nullable' => True),
'start_project' => array('type' =>
'int','precision' => '4','nullable' => True),
Modified: branches/Version-1_0-branch/catch/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/setup/tables_update.inc.php
2011-03-28 14:26:38 UTC (rev 7146)
+++ branches/Version-1_0-branch/catch/setup/tables_update.inc.php
2011-03-28 14:27:33 UTC (rev 7147)
@@ -266,7 +266,7 @@
}
/**
- * Update property version from 0.9.17.507 to 0.9.17.508
+ * Update catch version from 0.9.17.507 to 0.9.17.508
* Add optional hierarchy on entities
*
*/
@@ -286,7 +286,7 @@
}
}
/**
- * Update property version from 0.9.17.508 to 0.9.17.509
+ * Update catch version from 0.9.17.508 to 0.9.17.509
* Rename reserved fieldname to allow MySQL
*
*/
@@ -304,3 +304,23 @@
return $GLOBALS['setup_info']['catch']['currentver'];
}
}
+
+ /**
+ * Update catch version from 0.9.17.509 to 0.9.17.510
+ * Add location_link_level
+ *
+ */
+
+ $test[] = '0.9.17.509';
+ function catch_upgrade0_9_17_509()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_catch_category','location_link_level',
array('type' => 'int','precision' => '4','nullable' => True));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['catch']['currentver'] =
'0.9.17.510';
+ return $GLOBALS['setup_info']['catch']['currentver'];
+ }
+ }
Modified: branches/Version-1_0-branch/property/inc/class.boentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boentity.inc.php
2011-03-28 14:26:38 UTC (rev 7146)
+++ branches/Version-1_0-branch/property/inc/class.boentity.inc.php
2011-03-28 14:27:33 UTC (rev 7147)
@@ -61,24 +61,33 @@
var $type_app = array();
var $type;
- function property_boentity($session=false)
+ function property_boentity($session=false, $type = '',
$entity_id = 0, $cat_id = 0)
{
$this->solocation =
CreateObject('property.solocation');
$this->bocommon =
CreateObject('property.bocommon');
+ if(!$type)
+ {
+ $type
= phpgw::get_var('type');
+ }
+ if(!$entity_id)
+ {
+ $entity_id
= phpgw::get_var('entity_id', 'int');
+ }
+ if(!$cat_id)
+ {
+ $cat_id
= phpgw::get_var('cat_id', 'int');
+ }
$start
= phpgw::get_var('start', 'int', 'REQUEST', 0);
$query
= phpgw::get_var('query');
$sort
= phpgw::get_var('sort');
$order
= phpgw::get_var('order');
$filter
= phpgw::get_var('filter', 'int');
- $cat_id
= phpgw::get_var('cat_id', 'int');
$district_id =
phpgw::get_var('district_id', 'int');
- $entity_id
= phpgw::get_var('entity_id', 'int');
$status
= phpgw::get_var('status');
$start_date
= phpgw::get_var('start_date');
$end_date
= phpgw::get_var('end_date');
$allrows
= phpgw::get_var('allrows', 'bool');
- $type
= phpgw::get_var('type');
$criteria_id =
phpgw::get_var('criteria_id');
$this->criteria_id =
isset($criteria_id) && $criteria_id ? $criteria_id : '';
@@ -96,8 +105,8 @@
$this->soadmin_entity->type_app = $this->type_app;
$this->so->type =
$this->type;
+ $this->category_dir =
"{$this->type}_{$entity_id}_{$cat_id}";
- $this->category_dir =
"{$this->type}_{$entity_id}_{$cat_id}";
if ($session)
{
$this->read_sessiondata();
@@ -129,7 +138,7 @@
{
$this->order = $order;
}
- if(isset($_POST['cat_id']) || isset($_GET['cat_id']))
+ if($cat_id || isset($_POST['cat_id']) ||
isset($_GET['cat_id']))
{
$this->cat_id = $cat_id;
}
@@ -340,7 +349,7 @@
}
$values = $this->custom->prepare($values,
$this->type_app[$this->type],".{$this->type}.{$data['entity_id']}.{$data['cat_id']}",
$data['view']);
- // $soadmin_entity =
CreateObject('property.soadmin_entity');
+ // $soadmin_entity =
CreateObject('property.soadmin_entity');
if($values['location_code'])
{
Modified: branches/Version-1_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uientity.inc.php
2011-03-28 14:26:38 UTC (rev 7146)
+++ branches/Version-1_0-branch/property/inc/class.uientity.inc.php
2011-03-28 14:27:33 UTC (rev 7147)
@@ -763,6 +763,28 @@
)
);
+ $parameters2 = array
+ (
+ 'parameter' => array
+ (
+ array
+ (
+ 'name' =>
'location_code',
+ 'source' =>
'location_code'
+ ),
+ array
+ (
+ 'name' =>
'origin_id',
+ 'source' => 'id'
+ ),
+ array
+ (
+ 'name' =>
'p_num',
+ 'source' => 'id'
+ ),
+ )
+ );
+
if($this->acl_read)
{
$datatable['rowactions']['action'][] = array
@@ -823,6 +845,28 @@
'parameters'
=> $parameters
);
}
+
+ if( $category['start_ticket'])
+ {
+ $datatable['rowactions']['action'][] = array
+ (
+ 'my_name' =>
'edit',
+ 'text' =>
lang('start ticket'),
+ 'action' =>
$GLOBALS['phpgw']->link('/index.php',array
+ (
+ 'menuaction' =>
'property.uitts.add',
+ 'p_entity_id' =>
$this->entity_id,
+ 'p_cat_id'
=> $this->cat_id,
+ 'type'
=> $this->type,
+ 'target'
=> '_blank',
+ 'bypass'
=> true,
+ 'origin'
=> ".{$this->type}.{$this->entity_id}.{$this->cat_id}",
+
+ )),
+ 'parameters'
=> $parameters2
+ );
+ }
+
$jasper = execMethod('property.sojasper.read',
array('location_id' =>
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type],
$this->acl_location)));
foreach ($jasper as $report)
@@ -1476,6 +1520,20 @@
'origin_id' => $id
);
+ $add_to_project_link_data = array
+ (
+ 'menuaction' =>
'property.uiproject.index',
+ 'from' =>
'workorder',
+ 'lookup' => true,
+ 'query' =>
isset($values['location_data']['loc1']) ? $values['location_data']['loc1'] : '',
+ // 'p_num' => $id,
+ // 'p_entity_id' =>
$this->entity_id,
+ // 'p_cat_id' =>
$this->cat_id,
+ 'tenant_id' =>
$values['tenant_id'],
+ 'origin' =>
".{$this->type}.{$this->entity_id}.{$this->cat_id}",
+ 'origin_id' => $id
+ );
+
$ticket_link_data = array
(
'menuaction' =>
'property.uitts.add',
@@ -1846,6 +1904,7 @@
'start_project'
=> $category['start_project'],
'lang_start_project'
=> lang('start project'),
'project_link'
=> $GLOBALS['phpgw']->link('/index.php',$project_link_data),
+ 'add_to_project_link'
=> $GLOBALS['phpgw']->link('/index.php',$add_to_project_link_data),
'start_ticket'
=> $category['start_ticket'],
'lang_start_ticket'
=> lang('start ticket'),
'ticket_link'
=> $GLOBALS['phpgw']->link('/index.php',$ticket_link_data),
Modified: branches/Version-1_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uitts.inc.php
2011-03-28 14:26:38 UTC (rev 7146)
+++ branches/Version-1_0-branch/property/inc/class.uitts.inc.php
2011-03-28 14:27:33 UTC (rev 7147)
@@ -1681,7 +1681,8 @@
//------------------- start ticket from other location
$bypass = phpgw::get_var('bypass',
'bool');
- if(isset($_POST) && $_POST && isset($bypass) && $bypass)
+// if(isset($_POST) && $_POST && isset($bypass) && $bypass)
+ if($bypass)
{
$boadmin_entity =
CreateObject('property.boadmin_entity');
$location_code =
phpgw::get_var('location_code');
Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
2011-03-28 14:26:38 UTC (rev 7146)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
2011-03-28 14:27:33 UTC (rev 7147)
@@ -867,6 +867,17 @@
$values['location_data'] =
$ticket['location_data'];
}
+ if ( preg_match("/(^.entity.|^.catch.)/i", $origin) &&
$origin_id )
+ {
+ $_origin = explode('.', $origin);
+ $_boentity= CreateObject('property.boentity',
false, $_origin[1], $_origin[2], $_origin[3]);
+ $_entity =
$_boentity->read_single(array('entity_id'=>
$_origin[2],'cat_id'=>$_origin[3],'id'=>$origin_id, 'view' => true));
+ $values['location_data'] =
$_entity['location_data'];
+ unset($_origin);
+ unset($_boentity);
+ unset($_entity);
+ }
+
if(isset($values['origin']) && $values['origin'])
{
$origin = $values['origin'];
@@ -1182,6 +1193,7 @@
$table_header_workorder_budget[] = array
(
'lang_workorder_id' =>
lang('Workorder'),
+
'lang_sum' => lang('Sum')
);
Modified: branches/Version-1_0-branch/property/templates/base/entity.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/entity.xsl
2011-03-28 14:26:38 UTC (rev 7146)
+++ branches/Version-1_0-branch/property/templates/base/entity.xsl
2011-03-28 14:27:33 UTC (rev 7147)
@@ -316,40 +316,49 @@
<xsl:choose>
<xsl:when test="value_id!=''">
<table cellpadding="2" cellspacing="2"
width="80%" align="center">
- <xsl:choose>
- <xsl:when
test="start_project!=''">
- <tr>
+ <tr>
+ <xsl:choose>
+ <xsl:when
test="start_ticket!=''">
<td
valign="top">
+
<xsl:variable name="ticket_link"><xsl:value-of
select="ticket_link"/></xsl:variable>
+
<form method="post" action="{$ticket_link}">
+
<xsl:variable name="lang_start_ticket"><xsl:value-of
select="lang_start_ticket"/></xsl:variable>
+
<input type="submit" name="location" value="{$lang_start_ticket}">
+
<xsl:attribute name="title">
+
<xsl:value-of select="lang_start_ticket_statustext"/>
+
</xsl:attribute>
+
</input>
+
</form>
+ </td>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when
test="start_project!=''">
+ <td
valign="top">
<xsl:variable name="project_link"><xsl:value-of
select="project_link"/></xsl:variable>
<form method="post" action="{$project_link}">
-
<xsl:variable name="lang_start_project"><xsl:value-of
select="lang_start_project"/></xsl:variable>
+
<xsl:variable name="lang_start_project"><xsl:value-of
select="php:function('lang', 'generate new project')" /></xsl:variable>
<input type="submit" name="location" value="{$lang_start_project}">
<xsl:attribute name="title">
-
<xsl:value-of select="lang_start_project_statustext"/>
+
<xsl:value-of select="php:function('lang', 'click this
to generate a project with this information')" />
</xsl:attribute>
</input>
</form>
</td>
- </tr>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when
test="start_ticket!=''">
- <tr>
<td
valign="top">
-
<xsl:variable name="ticket_link"><xsl:value-of
select="ticket_link"/></xsl:variable>
-
<form method="post" action="{$ticket_link}">
-
<xsl:variable name="lang_start_ticket"><xsl:value-of
select="lang_start_ticket"/></xsl:variable>
-
<input type="submit" name="location" value="{$lang_start_ticket}">
+
<xsl:variable name="add_to_project_link"><xsl:value-of
select="add_to_project_link"/></xsl:variable>
+
<form method="post" action="{$add_to_project_link}">
+
<xsl:variable name="lang_add_to_project"><xsl:value-of
select="php:function('lang', 'add to project')" /></xsl:variable>
+
<input type="submit" name="location" value="{$lang_add_to_project}"
onMouseout="window.status='';return true;">
<xsl:attribute name="title">
-
<xsl:value-of select="lang_start_ticket_statustext"/>
+
<xsl:value-of select="php:function('lang', 'click this
to add an order to an existing project')" />
</xsl:attribute>
</input>
</form>
</td>
- </tr>
- </xsl:when>
- </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ </tr>
</table>
</xsl:when>
</xsl:choose>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7147] Merge 7144:7146 from trunk,
Sigurd Nes <=