[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property inc/class.boproject.inc.php inc/class....
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property inc/class.boproject.inc.php inc/class.... |
Date: |
Thu, 29 Jun 2006 10:06:13 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 06/06/29 10:06:13
Modified files:
inc : class.boproject.inc.php
class.boworkorder.inc.php
class.soproject.inc.php
class.soworkorder.inc.php
class.uiproject.inc.php
class.uiworkorder.inc.php
setup : phpgw_no.lang
templates/base : project.xsl workorder.xsl
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boproject.inc.php?cvsroot=phpgroupware&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boworkorder.inc.php?cvsroot=phpgroupware&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soproject.inc.php?cvsroot=phpgroupware&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soworkorder.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiproject.inc.php?cvsroot=phpgroupware&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiworkorder.inc.php?cvsroot=phpgroupware&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/property/setup/phpgw_no.lang?cvsroot=phpgroupware&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/project.xsl?cvsroot=phpgroupware&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/workorder.xsl?cvsroot=phpgroupware&r1=1.6&r2=1.7
Patches:
Index: inc/class.boproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boproject.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- inc/class.boproject.inc.php 17 Apr 2006 11:36:05 -0000 1.15
+++ inc/class.boproject.inc.php 29 Jun 2006 10:06:13 -0000 1.16
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.boproject.inc.php,v 1.15 2006/04/17 11:36:05
sigurdne Exp $
+ * @version $Id: class.boproject.inc.php,v 1.16 2006/06/29 10:06:13
sigurdne Exp $
*/
/**
@@ -362,6 +362,7 @@
case 'T': $type = lang('Category
changed'); break;
case 'SO': $type = lang('Initial
Status'); break;
case 'S': $type = lang('Status
changed'); break;
+ case 'SC': $type = lang('Status
confirmed'); break;
default: break;
}
Index: inc/class.boworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boworkorder.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- inc/class.boworkorder.inc.php 10 May 2006 11:10:20 -0000 1.15
+++ inc/class.boworkorder.inc.php 29 Jun 2006 10:06:13 -0000 1.16
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.boworkorder.inc.php,v 1.15 2006/05/10 11:10:20
sigurdne Exp $
+ * @version $Id: class.boworkorder.inc.php,v 1.16 2006/06/29 10:06:13
sigurdne Exp $
*/
/**
@@ -299,6 +299,7 @@
case 'T': $type = lang('Category
changed'); break;
case 'SO': $type = lang('Initial
Status'); break;
case 'S': $type = lang('Status
changed'); break;
+ case 'SC': $type = lang('Status
confirmed'); break;
default: break;
}
Index: inc/class.soproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- inc/class.soproject.inc.php 17 Apr 2006 11:36:05 -0000 1.28
+++ inc/class.soproject.inc.php 29 Jun 2006 10:06:13 -0000 1.29
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.soproject.inc.php,v 1.28 2006/04/17 11:36:05
sigurdne Exp $
+ * @version $Id: class.soproject.inc.php,v 1.29 2006/06/29 10:06:13
sigurdne Exp $
*/
/**
@@ -731,12 +731,8 @@
$this->update_request_status($project['project_id'],$project['status'],$project['cat_id'],$project['coordinator']);
- if ($old_status != $project['status'])
+ if (($old_status != $project['status']) ||
$project['confirm_status'])
{
-
$historylog->add('S',$project['project_id'],$project['status']);
-
- $this->db->query("UPDATE fm_workorder set
status='". $project['status'] . "' WHERE project_id= '" .
$project['project_id'] ."'",__LINE__,__FILE__);
-
$this->db2->query("SELECT id from fm_workorder
WHERE project_id=" . (int)$project['project_id'] ,__LINE__,__FILE__);
while ($this->db2->next_record())
{
@@ -746,14 +742,39 @@
if (isset($workorder) AND is_array($workorder))
{
$historylog_workorder =
CreateObject($this->currentapp.'.historylog','workorder');
+ }
+
+ if($old_status != $project['status'])
+ {
+
$historylog->add('S',$project['project_id'],$project['status']);
+
+ $this->db->query("UPDATE fm_workorder
set status='". $project['status'] . "' WHERE project_id= '" .
$project['project_id'] ."'",__LINE__,__FILE__);
+
+ if (isset($workorder) AND
is_array($workorder))
+ {
foreach($workorder as $workorder_id)
{
$historylog_workorder->add('S',$workorder_id,$project['status']);
}
}
-
$receipt['notice_owner'][]=lang('Status
changed') . ': ' . $project['status'];
}
+ elseif($project['confirm_status'])
+ {
+
$historylog->add('SC',$project['project_id'],$project['status']);
+
+ if (isset($workorder) AND
is_array($workorder))
+ {
+ foreach($workorder as
$workorder_id)
+ {
+
$historylog_workorder->add('SC',$workorder_id,$project['status']);
+ }
+ }
+ $receipt['notice_owner'][]=lang('Status
confirmed') . ': ' . $project['status'];
+ }
+
+ }
+
if ($old_categroy != $project['cat_id'])
{
$historylog->add('T',$project['project_id'],$project['cat_id']);
Index: inc/class.soworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soworkorder.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- inc/class.soworkorder.inc.php 10 May 2006 11:10:20 -0000 1.20
+++ inc/class.soworkorder.inc.php 29 Jun 2006 10:06:13 -0000 1.21
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.soworkorder.inc.php,v 1.20 2006/05/10 11:10:20
sigurdne Exp $
+ * @version $Id: class.soworkorder.inc.php,v 1.21 2006/06/29 10:06:13
sigurdne Exp $
*/
/**
@@ -612,7 +612,14 @@
if ($old_status != $workorder['status'])
{
$historylog->add('S',$workorder['workorder_id'],$workorder['status']);
+ $receipt['notice_owner'][]=lang('Status
changed') . ': ' . $workorder['status'];
}
+ elseif($workorder['confirm_status'])
+ {
+
$historylog->add('SC',$workorder['workorder_id'],$workorder['status']);
+ $receipt['notice_owner'][]=lang('Status
confirmed') . ': ' . $workorder['status'];
+ }
+
if ($old_budget != $workorder['budget'])
{
$historylog->add('B',$workorder['workorder_id'],$workorder['budget']);
Index: inc/class.uiproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- inc/class.uiproject.inc.php 28 Jun 2006 20:09:31 -0000 1.28
+++ inc/class.uiproject.inc.php 29 Jun 2006 10:06:13 -0000 1.29
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiproject.inc.php,v 1.28 2006/06/28 20:09:31
sigurdne Exp $
+ * @version $Id: class.uiproject.inc.php,v 1.29 2006/06/29 10:06:13
sigurdne Exp $
*/
/**
@@ -679,7 +679,7 @@
$GLOBALS['phpgw']->send = CreateObject('phpgwapi.send');
}
- $rcpt =
$GLOBALS['phpgw']->send->msg('email',$values['mail_address'], $subject,
stripslashes($message), '', $cc, $bcc, $from_email, $from_name, 'plain');
+ $rcpt =
$GLOBALS['phpgw']->send->msg('email',$values['mail_address'], $subject,
stripslashes($message), '', $cc, $bcc, $from_email, $from_name, 'html');
if(!$rcpt)
{
@@ -717,6 +717,7 @@
$from_name=$GLOBALS['phpgw_info']['user']['fullname'];
$from_email=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['email'];
+ $body = '<a href ="http://' .
$GLOBALS['phpgw_info']['server']['hostname'] .
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproject.edit&id='
. $values['project_id']).'">' . lang('project %1 has been edited',$id) .'</a>'
. "\n";
foreach($receipt['notice_owner'] as $notice)
{
$body .= $notice . "\n";
@@ -724,12 +725,16 @@
$body .= lang('Altered by') .
': ' . $from_name . "\n";
+ $body = nl2br($body);
+
if
(!is_object($GLOBALS['phpgw']->send))
{
$GLOBALS['phpgw']->send
= CreateObject('phpgwapi.send');
}
- $returncode =
$GLOBALS['phpgw']->send->msg('email',$to,$subject=lang('Project %1 is
altered',$id),$body, False,False,False, $from_email, $from_name, 'plain');
+
+
+ $returncode =
$GLOBALS['phpgw']->send->msg('email',$to,$subject=lang('project %1 has been
edited',$id),$body, False,False,False, $from_email, $from_name, 'html');
if (!$returncode) // not
nice, but better than failing silently
{
@@ -941,7 +946,7 @@
'lang_select_request' =>
lang('Select request'),
'lang_select_request_statustext' =>
lang('Add request for this project'),
'lang_request_statustext' =>
lang('Link to the request for this project'),
- 'lang_delete_request_statustext'=> lang('Check
to delete this request from this project'),
+ 'lang_delete_request_statustext'
=> lang('Check to delete this request from this project'),
'link_select_request' =>
$GLOBALS['phpgw']->link('/index.php',$link_request_data),
'link_request'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.view'),
@@ -993,7 +998,7 @@
'lang_reserve_remainder' =>
lang('reserve remainder'),
'value_reserve_remainder' =>
$reserve_remainder,
- 'value_reserve_remainder_percent'=>
$remainder_percent,
+ 'value_reserve_remainder_percent'
=> $remainder_percent,
'vendor_data'
=> $vendor_data,
'location_data'
=> $location_data,
@@ -1031,7 +1036,6 @@
'sum_workorder_calculation' =>
$values['sum_workorder_calculation'],
'workorder_budget'
=> $values['workorder_budget'],
'sum_workorder_actual_cost' =>
$values['sum_workorder_actual_cost'],
-
'lang_actual_cost'
=> lang('Actual cost'),
'lang_coordinator'
=> lang('Coordinator'),
'lang_sum'
=> lang('Sum'),
@@ -1045,6 +1049,8 @@
'lang_no_status'
=> lang('Select status'),
'lang_status'
=> lang('Status'),
'lang_status_statustext' =>
lang('What is the current status of this project ?'),
+ 'lang_confirm_status'
=> lang('Confirm status'),
+ 'lang_confirm_statustext'
=> lang('Confirm status to the history'),
'branch_list'
=> $this->bo->select_branch_p_list($values['project_id']),
'lang_branch'
=> lang('branch'),
@@ -1070,7 +1076,6 @@
'lang_ask_approval_statustext' =>
lang('Check this to send a mail to your supervisor for approval'),
'value_approval_mail_address' =>
$supervisor_email,
-
'currency'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['currency']
);
Index: inc/class.uiworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- inc/class.uiworkorder.inc.php 28 Jun 2006 20:09:31 -0000 1.25
+++ inc/class.uiworkorder.inc.php 29 Jun 2006 10:06:13 -0000 1.26
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiworkorder.inc.php,v 1.25 2006/06/28 20:09:31
sigurdne Exp $
+ * @version $Id: class.uiworkorder.inc.php,v 1.26 2006/06/29 10:06:13
sigurdne Exp $
*/
/**
@@ -554,7 +554,7 @@
$subject = lang(Approval).": ".
$values['workorder_id'];
// $message = lang('Workorder %1
needs approval',$values['workorder_id']);
- $message = '<a href ="http://'
. $GLOBALS['phpgw_info']['server']['hostname'] .
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit&id='
. $values['project_id']).'">' . lang('Workorder %1 needs
approval',$values['workorder_id'] .'</a>';
+ $message = '<a href ="http://'
. $GLOBALS['phpgw_info']['server']['hostname'] .
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit&id='
. $values['project_id']).'">' . lang('Workorder %1 needs
approval',$values['workorder_id']) .'</a>';
$mail_method=
$config->config_data['fmwrkorder_mail'];
if ($mail_method=='smtp'):
@@ -578,6 +578,7 @@
{
$receipt['message'][]=array('msg'=>lang('%1 is
notified',$values['mail_address']));
}
+
}
}
@@ -600,6 +601,48 @@
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.view&id='
. $id);
}
+
+
+ if (isset($receipt['notice_owner']) AND
is_array($receipt['notice_owner']))
+ {
+
if($this->account!=$project['coordinator'] &&
$config->config_data['workorder_approval'])
+ {
+ $prefs_coordinator =
$this->bocommon->create_preferences($this->currentapp,$project['coordinator']);
+ $to =
$prefs_coordinator['email'];
+
+
$from_name=$GLOBALS['phpgw_info']['user']['fullname'];
+
$from_email=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['email'];
+
+ $body = '<a href
="http://' . $GLOBALS['phpgw_info']['server']['hostname'] .
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit&id='
. $id).'">' . lang('workorder %1 has been edited',$id) .'</a>' . "\n";
+
foreach($receipt['notice_owner'] as $notice)
+ {
+ $body .=
$notice . "\n";
+ }
+
+ $body .= lang('Altered
by') . ': ' . $from_name . "\n";
+
+ $body = nl2br($body);
+
+ if
(!is_object($GLOBALS['phpgw']->send))
+ {
+
$GLOBALS['phpgw']->send = CreateObject('phpgwapi.send');
+ }
+
+ $returncode =
$GLOBALS['phpgw']->send->msg('email',$to,$subject=lang('workorder %1 has been
edited',$id),$body, False,False,False, $from_email, $from_name, 'html');
+
+ if (!$returncode)
// not nice, but better than failing silently
+ {
+
$receipt['error'][]=array('msg'=>"uiworkorder::edit: sending message to '$to'
subject='$subject' failed !!!");
+
$receipt['error'][]=array('msg'=> $GLOBALS['phpgw']->send->err['desc']);
+ }
+ else
+ {
+
$receipt['message'][]=array('msg'=>lang('%1 is notified',$to));
+ }
+ }
+ }
+
+
if( $project['key_fetch'] &&
!$values['key_fetch'])
{
$values['key_fetch']=$project['key_fetch'];
@@ -857,6 +900,8 @@
'lang_no_status' =>
lang('Select status'),
'lang_status' =>
lang('Status'),
'lang_status_statustext' =>
lang('What is the current status of this workorder ?'),
+ 'lang_confirm_status' =>
lang('Confirm status'),
+ 'lang_confirm_statustext' =>
lang('Confirm status to the history'),
'branch_list' =>
$boproject->select_branch_p_list($project['project_id']),
'lang_branch' =>
lang('branch'),
Index: setup/phpgw_no.lang
===================================================================
RCS file: /sources/phpgroupware/property/setup/phpgw_no.lang,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- setup/phpgw_no.lang 25 Jun 2006 17:24:06 -0000 1.11
+++ setup/phpgw_no.lang 29 Jun 2006 10:06:13 -0000 1.12
@@ -2,6 +2,7 @@
%1 Entrances has been updated to not active of %2 already not active
property no %1 Innganger er oppdatert til IKKE AKTIVE av %2 som var
IKKE ACTIVE fra før
%1 entries is added! property no %1 poster er lagt til
%1 entries is updated! property no %1 poster er oppdatert
+%1 is notified property no Melding sendt til %1
%1 Properties has been updated to not active of %2 already not active
property no %1 Eiendommer er oppdatert til IKKE AKTIVE av %2 som
var IKKE ACTIVE fra før
Access error property no Manglende tilgang
acl_locastion is missing property no ACL-lokalisering mangler
@@ -142,6 +143,7 @@
apartment id property no leilighet ID
apply property no Bruk
Apply the values property no Bruke verdier
+Approval property no Godkjenning
Approval from property no Godkjenning fra
Approval from is updated property no Godkjenning fra er
oppdatert
Archive property no Arkiv
@@ -269,6 +271,8 @@
common costs property no Fellsekostnader
Condidtion degree property no Tilstandsgrad
Config property no Konfigurer
+Confirm status property no Bekreft status
+Confirm status to the history property no Bekreft status til
historikk
Consequence property no Konsekvens
consequential damage property no Følgeskader
Consequential damage property no Følgeskader
@@ -1366,6 +1370,7 @@
Start this entity from property no Start denne entiteten fra
prosjekt
Status property no Status
status code property no Statuskode
+Status confirmed property no Status bekreftet
Status changed property no Status er endret
Status for the entity category property no Status for
entitets-kategorien
status has been added property no Status er lagt til
Index: templates/base/project.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/project.xsl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- templates/base/project.xsl 10 Apr 2006 09:39:13 -0000 1.6
+++ templates/base/project.xsl 29 Jun 2006 10:06:13 -0000 1.7
@@ -1,4 +1,4 @@
-<!-- $Id: project.xsl,v 1.6 2006/04/10 09:39:13 sigurdne Exp $ -->
+<!-- $Id: project.xsl,v 1.7 2006/06/29 10:06:13 sigurdne Exp $ -->
<xsl:template name="app_data">
<xsl:choose>
@@ -385,6 +385,24 @@
<xsl:call-template
name="status_select"/>
</td>
</tr>
+ <xsl:choose>
+ <xsl:when test="value_project_id!=''">
+ <tr>
+ <td>
+ <xsl:value-of
select="lang_confirm_status"/>
+ </td>
+ <td>
+ <input type="checkbox"
name="values[confirm_status]" value="True" onMouseout="window.status='';return
true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+
<xsl:value-of select="lang_confirm_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
<tr>
<td valign="top">
<xsl:value-of select="lang_start_date"/>
Index: templates/base/workorder.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/workorder.xsl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- templates/base/workorder.xsl 10 Apr 2006 09:39:12 -0000 1.6
+++ templates/base/workorder.xsl 29 Jun 2006 10:06:13 -0000 1.7
@@ -1,4 +1,4 @@
-<!-- $Id: workorder.xsl,v 1.6 2006/04/10 09:39:12 sigurdne Exp $ -->
+<!-- $Id: workorder.xsl,v 1.7 2006/06/29 10:06:13 sigurdne Exp $ -->
<xsl:template name="app_data">
<xsl:choose>
@@ -624,6 +624,24 @@
<xsl:call-template
name="status_select"/>
</td>
</tr>
+ <xsl:choose>
+ <xsl:when test="value_workorder_id!=''">
+ <tr>
+ <td>
+ <xsl:value-of
select="lang_confirm_status"/>
+ </td>
+ <td>
+ <input type="checkbox"
name="values[confirm_status]" value="True" onMouseout="window.status='';return
true;">
+ <xsl:attribute
name="onMouseover">
+
<xsl:text>window.status='</xsl:text>
+
<xsl:value-of select="lang_confirm_statustext"/>
+ <xsl:text>';
return true;</xsl:text>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ </xsl:when>
+ </xsl:choose>
<tr>
<td valign="top">
<xsl:value-of select="lang_start_date"/>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property inc/class.boproject.inc.php inc/class....,
Sigurd Nes <=