[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16686] more on eventplanner and helpdesk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16686] more on eventplanner and helpdesk |
Date: |
Thu, 4 May 2017 07:47:20 -0400 (EDT) |
Revision: 16686
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16686
Author: sigurdne
Date: 2017-05-04 07:47:20 -0400 (Thu, 04 May 2017)
Log Message:
-----------
more on eventplanner and helpdesk
Modified Paths:
--------------
trunk/eventplanner/inc/class.uiapplication.inc.php
trunk/eventplanner/inc/model/class.application.inc.php
trunk/eventplanner/js/portico/application.edit.js
trunk/eventplanner/templates/base/application.xsl
trunk/eventplanner/templates/base/application_info.xsl
trunk/eventplannerfrontend/js/portico/application.edit.js
trunk/eventplannerfrontend/templates/base/application.xsl
trunk/eventplannerfrontend/templates/base/application_info.xsl
trunk/helpdesk/inc/class.botts.inc.php
trunk/property/inc/class.botts.inc.php
Modified: trunk/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uiapplication.inc.php 2017-05-04 06:56:27 UTC
(rev 16685)
+++ trunk/eventplanner/inc/class.uiapplication.inc.php 2017-05-04 11:47:20 UTC
(rev 16686)
@@ -431,6 +431,7 @@
);
phpgwapi_jquery::formvalidator_generate(array('date',
'security', 'file'));
phpgwapi_jquery::load_widget('autocomplete');
+ self::rich_text_editor('summary');
self::add_javascript($this->currentapp, 'portico',
'application.edit.js');
self::render_template_xsl(array('application',
'datatable_inline'), array($mode => $data));
}
Modified: trunk/eventplanner/inc/model/class.application.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.application.inc.php 2017-05-04
06:56:27 UTC (rev 16685)
+++ trunk/eventplanner/inc/model/class.application.inc.php 2017-05-04
11:47:20 UTC (rev 16686)
@@ -179,7 +179,7 @@
'sortable' => false,
),
'summary' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
- 'type' => 'string',
+ 'type' => 'html',
'label' => 'summary',
'sortable' => false,
),
Modified: trunk/eventplanner/js/portico/application.edit.js
===================================================================
--- trunk/eventplanner/js/portico/application.edit.js 2017-05-04 06:56:27 UTC
(rev 16685)
+++ trunk/eventplanner/js/portico/application.edit.js 2017-05-04 11:47:20 UTC
(rev 16686)
@@ -66,7 +66,7 @@
return;
}
var id = $("#application_id").val();
-
+ document.getElementById('summary').value =
CKEDITOR.instances['summary'].getData();
if (id > 0)
{
document.form.submit();
Modified: trunk/eventplanner/templates/base/application.xsl
===================================================================
--- trunk/eventplanner/templates/base/application.xsl 2017-05-04 06:56:27 UTC
(rev 16685)
+++ trunk/eventplanner/templates/base/application.xsl 2017-05-04 11:47:20 UTC
(rev 16686)
@@ -440,8 +440,8 @@
<label>
<xsl:value-of select="php:function('lang', 'summary')"/>
</label>
- <textarea
cols="47" rows="7" name="summary" class="pure-input-1-2" >
-
<xsl:value-of select="application/summary"/>
+ <textarea
cols="47" rows="7" id="summary" name="summary" class="pure-input-1-2" >
+
<xsl:value-of disable-output-escaping="yes" select="application/summary"/>
</textarea>
</div>
<div
class="pure-control-group">
Modified: trunk/eventplanner/templates/base/application_info.xsl
===================================================================
--- trunk/eventplanner/templates/base/application_info.xsl 2017-05-04
06:56:27 UTC (rev 16685)
+++ trunk/eventplanner/templates/base/application_info.xsl 2017-05-04
11:47:20 UTC (rev 16686)
@@ -20,7 +20,9 @@
<label>
<xsl:value-of select="php:function('lang', 'program
description')"/>
</label>
- <xsl:value-of select="application/summary"/>
+ <div class="pure-custom">
+ <xsl:value-of disable-output-escaping="yes"
select="application/summary"/>
+ </div>
</div>
<div class="pure-control-group">
<label>
Modified: trunk/eventplannerfrontend/js/portico/application.edit.js
===================================================================
--- trunk/eventplannerfrontend/js/portico/application.edit.js 2017-05-04
06:56:27 UTC (rev 16685)
+++ trunk/eventplannerfrontend/js/portico/application.edit.js 2017-05-04
11:47:20 UTC (rev 16686)
@@ -66,6 +66,7 @@
return;
}
var id = $("#application_id").val();
+ document.getElementById('summary').value =
CKEDITOR.instances['summary'].getData();
if (id > 0)
{
Modified: trunk/eventplannerfrontend/templates/base/application.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/application.xsl 2017-05-04
06:56:27 UTC (rev 16685)
+++ trunk/eventplannerfrontend/templates/base/application.xsl 2017-05-04
11:47:20 UTC (rev 16686)
@@ -378,8 +378,8 @@
<label>
<xsl:value-of select="php:function('lang', 'summary')"/>
</label>
- <textarea
cols="47" rows="7" name="summary" class="pure-input-1-2" >
-
<xsl:value-of select="application/summary"/>
+ <textarea
cols="47" rows="7" id="summary" name="summary" class="pure-input-1-2" >
+
<xsl:value-of disable-output-escaping="yes" select="application/summary"/>
</textarea>
</div>
<div
class="pure-control-group">
Modified: trunk/eventplannerfrontend/templates/base/application_info.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/application_info.xsl
2017-05-04 06:56:27 UTC (rev 16685)
+++ trunk/eventplannerfrontend/templates/base/application_info.xsl
2017-05-04 11:47:20 UTC (rev 16686)
@@ -19,7 +19,9 @@
<label>
<xsl:value-of select="php:function('lang', 'program
description')"/>
</label>
- <xsl:value-of select="application/summary"/>
+ <div class="pure-custom">
+ <xsl:value-of disable-output-escaping="yes"
select="application/summary"/>
+ </div>
</div>
<div class="pure-control-group">
Modified: trunk/helpdesk/inc/class.botts.inc.php
===================================================================
--- trunk/helpdesk/inc/class.botts.inc.php 2017-05-04 06:56:27 UTC (rev
16685)
+++ trunk/helpdesk/inc/class.botts.inc.php 2017-05-04 11:47:20 UTC (rev
16686)
@@ -545,7 +545,7 @@
function read_additional_notes($id)
{
$additional_notes = array();
- $history_array =
$this->historylog->return_array(array(),array('C'),'','',$id);
+ $history_array =
$this->historylog->return_array(array(),array('C'),'history_timestamp','ASC',$id);
$i=2;
foreach ($history_array as $value)
@@ -775,19 +775,17 @@
$ticket = $this->read_single($id);
- $history_values =
$this->historylog->return_array(array(),array('O'),'history_timestamp','DESC',$id);
- $entry_date =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$this->dateformat);
-
if($ticket['status']=='X')
{
$history_values =
$this->historylog->return_array(array(),array('X'),'history_timestamp','DESC',$id);
- $timestampclosed =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],$this->dateformat);
+ $timestampclosed =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime']);
}
- $history_2 =
$this->historylog->return_array(array('C','O'),array(),'','',$id);
- $m=count($history_2)-1;
- $ticket['status']=$history_2[$m]['status'];
+ $history_values =
$this->historylog->return_array(array(),array('O'),'history_timestamp','DESC',$id);
+ $entry_date =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime']);
+ $status_text = $this->get_status_text();
+
$group_name=
$GLOBALS['phpgw']->accounts->id2name($ticket['group_id']);
// build subject
@@ -822,6 +820,7 @@
$body .= "<table>";
$body .= '<tr><td>'. lang('Date
Opened').'</td><td>: '.$entry_date."</td></tr>";
+ $body .= '<tr><td>'.
lang('status').'</td><td>: '.$status_text[$ticket['status']]."</td></tr>";
$body .= '<tr><td>'.
lang('Category').'</td><td>: '.
$this->get_category_name($ticket['cat_id']) ."</td></tr>";
$body .= '<tr><td>'. lang('Assigned
To').'</td><td>: '.$GLOBALS['phpgw']->accounts->id2name($ticket['assignedto'])."</td></tr>";
@@ -889,14 +888,12 @@
HTML;
$table_content .=
"<tr><td>{$i}</td><td>{$entry_date}</td><td>{$ticket['user_name']}</td><td>{$ticket['details']}</td></tr>";
- $history_array =
$this->historylog->return_array(array(), array('C'), 'history_id', 'DESC', $id);
- foreach ($history_array as $value)
+ $additional_notes =
$this->read_additional_notes($id);
+
+ foreach ($additional_notes as $value)
{
- $i++;
- $_date =
$GLOBALS['phpgw']->common->show_date($value['datetime']);
- $_note =
stripslashes($value['new_value']);
- $table_content .=
"<tr><td>{$i}</td><td>{$_date}</td><td>{$value['owner']}</td><td>{$_note}</td></tr>";
+ $table_content .=
"<tr><td>{$value['value_count']}</td><td>{$value['value_date']}</td><td>{$value['value_user']}</td><td>{$value['value_note']}</td></tr>";
}
$body.= "<table border='1' class='pure-table
pure-table-bordered pure-table-striped'>{$table_content}</table>";
$subject .= "::{$i}";
@@ -969,6 +966,15 @@
$prefs =
$this->bocommon->create_preferences('helpdesk',$account_id);
if(!isset($prefs['tts_notify_me']) ||
$prefs['tts_notify_me'] == 1)
{
+ /**
+ * Calculate email from username
+ */
+ if(!$prefs['email'])
+ {
+ $email_domain =
!empty($GLOBALS['phpgw_info']['server']['email_domain']) ?
$GLOBALS['phpgw_info']['server']['email_domain'] : 'bergen.kommune.no';
+ $account_lid =
$GLOBALS['phpgw']->accounts->get($account_id)->lid;
+ $prefs['email'] =
"address@hidden";
+ }
if
($validator->check_email_address($prefs['email']))
{
// Email address is technically
valid
Modified: trunk/property/inc/class.botts.inc.php
===================================================================
--- trunk/property/inc/class.botts.inc.php 2017-05-04 06:56:27 UTC (rev
16685)
+++ trunk/property/inc/class.botts.inc.php 2017-05-04 11:47:20 UTC (rev
16686)
@@ -1231,18 +1231,16 @@
$address_element =
$this->get_address_element($ticket['location_code']);
$history_values =
$this->historylog->return_array(array(), array('O'), 'history_timestamp',
'DESC', $id);
- $entry_date =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],
$this->dateformat);
+ $entry_date =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime']);
+ $status_text = $this->get_status_text();
+
if ($ticket['status'] == 'X')
{
$history_values =
$this->historylog->return_array(array(), array('X'), 'history_timestamp',
'DESC', $id);
- $timestampclosed =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime'],
$this->dateformat);
+ $timestampclosed =
$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime']);
}
- $history_2 = $this->historylog->return_array(array('C',
'O'), array(), '', '', $id);
- $m = count($history_2) - 1;
- $ticket['status'] = $history_2[$m]['status'];
-
$group_name =
$GLOBALS['phpgw']->accounts->id2name($ticket['group_id']);
// build subject
@@ -1267,6 +1265,7 @@
$body .= "<table>";
$body .= '<tr><td>'. lang('Date
Opened').'</td><td>: '.$entry_date."</td></tr>";
+ $body .= '<tr><td>'.
lang('status').'</td><td>: '.$status_text[$ticket['status']]."</td></tr>";
$body .= '<tr><td>'.
lang('Category').'</td><td>: '.
$this->get_category_name($ticket['cat_id']) ."</td></tr>";
$body .= '<tr><td>'. lang('Location') .
'</td><td>: ' . $ticket['location_code'] ."</td></tr>";
$body .= '<tr><td>'. lang('Address') .
'</td><td>: ' . $ticket['address'] ."</td></tr>";
@@ -1354,16 +1353,15 @@
HTML;
$table_content .=
"<tr><td>{$i}</td><td>{$entry_date}</td><td>{$ticket['user_name']}</td><td>{$ticket['details']}</td></tr>";
- $history_array =
$this->historylog->return_array(array(), array('C'), 'history_id', 'DESC', $id);
+ $additional_notes = $this->read_additional_notes($id);
- foreach ($history_array as $value)
+ foreach ($additional_notes as $value)
{
- $i++;
- $_date =
$GLOBALS['phpgw']->common->show_date($value['datetime']);
- $_note = stripslashes($value['new_value']);
- $table_content .=
"<tr><td>{$i}</td><td>{$_date}</td><td>{$value['owner']}</td><td>{$_note}</td></tr>";
+ $table_content .=
"<tr><td>{$value['value_count']}</td><td>{$value['value_date']}</td><td>{$value['value_user']}</td><td>{$value['value_note']}</td></tr>";
}
+
$body.= "<table border='1' class='pure-table
pure-table-bordered pure-table-striped'>{$table_content}</table>";
+
$subject .= "::{$i}";
if ($get_message)
@@ -1437,6 +1435,16 @@
$prefs =
$this->bocommon->create_preferences('property', $account_id);
if (!isset($prefs['tts_notify_me']) ||
$prefs['tts_notify_me'] == 1)
{
+ /**
+ * Calculate email from username
+ */
+ if(!$prefs['email'])
+ {
+ $email_domain =
!empty($GLOBALS['phpgw_info']['server']['email_domain']) ?
$GLOBALS['phpgw_info']['server']['email_domain'] : 'bergen.kommune.no';
+ $account_lid =
$GLOBALS['phpgw']->accounts->get($account_id)->lid;
+ $prefs['email'] =
"address@hidden";
+ }
+
if
($validator->check_email_address($prefs['email']))
{
// Email address is technically
valid
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16686] more on eventplanner and helpdesk,
sigurdne <=