[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14400] Syncromind: Merge 14272:14399 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14400] Syncromind: Merge 14272:14399 from trunk |
Date: |
Wed, 18 Nov 2015 11:26:08 +0000 |
Revision: 14400
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14400
Author: sigurdne
Date: 2015-11-18 11:26:07 +0000 (Wed, 18 Nov 2015)
Log Message:
-----------
Syncromind: Merge 14272:14399 from trunk
Modified Paths:
--------------
branches/dev-syncromind/activitycalendar/inc/class.uiactivities.inc.php
branches/dev-syncromind/booking/inc/class.socompleted_reservation_export.inc.php
branches/dev-syncromind/booking/inc/class.socompleted_reservation_export_file.inc.php
branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
branches/dev-syncromind/booking/inc/class.uicompleted_reservation_export_file.inc.php
branches/dev-syncromind/booking/inc/class.uievent.inc.php
branches/dev-syncromind/booking/templates/base/application.xsl
branches/dev-syncromind/bookingfrontend/inc/class.uibuilding.inc.php
branches/dev-syncromind/controller/inc/class.uicase.inc.php
branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
branches/dev-syncromind/controller/inc/class.uicomponent.inc.php
branches/dev-syncromind/controller/setup/phpgw_no.lang
branches/dev-syncromind/controller/templates/base/check_list/add_check_list.xsl
branches/dev-syncromind/controller/templates/base/check_list/edit_check_list.xsl
branches/dev-syncromind/controller/templates/base/component.xsl
branches/dev-syncromind/controller/templates/base/config.tpl
branches/dev-syncromind/property/inc/import/import_update_generic.php
Property Changed:
----------------
branches/dev-syncromind/
branches/dev-syncromind/booking/
branches/dev-syncromind/bookingfrontend/
branches/dev-syncromind/controller/
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,13670-13689,13691-13726,13731-13773,13775,13778-13791,13793-13800,13802-13811,13816-13880,13882-13931,13934,13940-13963,13978-14029,14031-14268
+ /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,13691-13726,13731-13773,13775,13778-13791,13793-13800,13802-13811,13816-13880,13882-13931,13934,13940-13963,13978-14029,14031-14268,14273-14399
Modified:
branches/dev-syncromind/activitycalendar/inc/class.uiactivities.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.uiactivities.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/activitycalendar/inc/class.uiactivities.inc.php
2015-11-18 11:26:07 UTC (rev 14400)
@@ -15,6 +15,9 @@
protected $so_contact;
protected $so_activity;
protected $so_arena;
+ private $validator;
+ private $config_booking;
+ private $debug;
public $public_functions = array
(
'index' =>
true,
@@ -33,16 +36,22 @@
public function __construct()
{
parent::__construct();
- $this->bo_org =
CreateObject('booking.boorganization');
- $this->bo_group =
CreateObject('booking.bogroup');
- $this->so_org =
activitycalendar_soorganization::get_instance();
- $this->so_group =
activitycalendar_sogroup::get_instance();
- $this->so_contact =
activitycalendar_socontactperson::get_instance();
- $this->so_activity =
activitycalendar_soactivity::get_instance();
- $this->so_arena =
activitycalendar_soarena::get_instance();
+ $this->bo_org =
CreateObject('booking.boorganization');
+ $this->bo_group =
CreateObject('booking.bogroup');
+ $this->so_org =
activitycalendar_soorganization::get_instance();
+ $this->so_group =
activitycalendar_sogroup::get_instance();
+ $this->so_contact =
activitycalendar_socontactperson::get_instance();
+ $this->so_activity =
activitycalendar_soactivity::get_instance();
+ $this->so_arena =
activitycalendar_soarena::get_instance();
self::set_active_menu('activitycalendar::activities');
- $config =
CreateObject('phpgwapi.config', 'activitycalendar');
+ $config =
CreateObject('phpgwapi.config', 'activitycalendar');
$config->read();
+ $this->config_booking =
CreateObject('phpgwapi.config', 'booking');
+ $this->config_booking->read();
+
+ $this->validator =
CreateObject('phpgwapi.EmailAddressValidator');
+
+ $this->debug = false;
}
/**
@@ -414,7 +423,8 @@
$email = false;
if(isset($email_param))
{
- $email = true;
+ $email = true;
+ $num_of_objects = null;
}
$uid = $GLOBALS['phpgw_info']['user']['account_id'];
@@ -530,32 +540,39 @@
function send_email_to_selection($activities)
{
- $c = createobject('phpgwapi.config',
'activitycalendarfrontend');
+ $c =
createobject('phpgwapi.config', 'activitycalendarfrontend');
$c->read();
- $config = $c->config_data;
+ $config = $c->config_data;
+ $_subject = lang('mail_subject_update');
$mailBaseURL = $c->config_data['mailBaseURL'];
foreach($activities as $activity)
{
+ $subject = "{$_subject}::" .
$activity->get_title();
//$activity =
activitycalendar_soactivity::get_instance()->get_single($activity_id);
- $subject =
lang('mail_subject_update');
//$link_text = "<a
href='http://www.bergen.kommune.no/aktivby/registreringsskjema/ny/?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}'>Rediger
opplysninger for {$activity->get_title()}</a>";
//$link_text = "<a
href='{$mailBaseURL}?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}'>Rediger
opplysninger for {$activity->get_title()}</a>";
- $link_text = "<a
href='http://www.bergen.kommune.no/aktivitetsoversikt/?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}'>Rediger
opplysninger for {$activity->get_title()}</a>";
- $office_name =
activitycalendar_soactivity::get_instance()->get_office_name($activity->get_office());
+ $link_text = "<a
href='http://www.bergen.kommune.no/aktivitetsoversikt/?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}'>Rediger
opplysninger for {$activity->get_title()}</a>";
+ $office_name =
activitycalendar_soactivity::get_instance()->get_office_name($activity->get_office());
/*
$uid =
$GLOBALS['phpgw_info']['user']['account_id'];
$user_office_id =
activitycalendar_soactivity::get_instance()->get_office_from_user($uid);
$office_footer =
activitycalendar_soactivity::get_instance()->get_office_description($user_office_id);
*/
- $office_id =
$activity->get_office();
+ $office_id = $activity->get_office();
if($office_id == 1)
- $office_id_new = 2;
+ {
+ $office_id_new = 2;
+ }
else if($office_id == 2)
- $office_id_new = 1;
+ {
+ $office_id_new = 1;
+ }
else
- $office_id_new = (int)$office_id;
- $office_footer =
activitycalendar_soactivity::get_instance()->get_office_description($office_id_new);
+ {
+ $office_id_new = (int)$office_id;
+ }
+ $office_footer =
activitycalendar_soactivity::get_instance()->get_office_description($office_id_new);
if($activity->get_state() == 2)
{
$body =
lang('mail_body_update_frontend', $activity->get_title(), $link_text,
$office_footer, $office_name);
@@ -572,24 +589,33 @@
if($activity->get_group_id() &&
$activity->get_group_id() > 0)
{
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_group_id(),
true));
- /*
if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
+ /*if($activity->get_contact_person_2()
&& $activity->get_contact_person_2()->get_email())
+ {
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_2(),
$subject, $body);
+ }
else */
if($activity->get_contact_person_1() &&
$activity->get_contact_person_1()->get_email())
+ {
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_1(),
$subject, $body);
+ }
}
else if($activity->get_organization_id() &&
$activity->get_organization_id() > 0)
{
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_organization_id()));
- /*
if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
+ /*if($activity->get_contact_person_2()
&& $activity->get_contact_person_2()->get_email())
+ {
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_2(),
$subject, $body);
+ }
else */
if($activity->get_contact_person_1() &&
$activity->get_contact_person_1()->get_email())
+ {
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_1(),
$subject, $body);
+ }
}
}
- //$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.index', 'message' =>
'E-post sendt'));
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.index',
+ 'message' => 'E-post sendt'));
}
public function send_mail()
@@ -614,11 +640,17 @@
$office_name =
activitycalendar_soactivity::get_instance()->get_office_name($activity->get_office());
$office_id =
$activity->get_office();
if($office_id == 1)
+ {
$office_id_new = 2;
+ }
else if($office_id == 2)
+ {
$office_id_new = 1;
+ }
else
+ {
$office_id_new = (int)$office_id;
+ }
$office_footer =
activitycalendar_soactivity::get_instance()->get_office_description($office_id_new);
$body =
lang('mail_body_update', $activity->get_title(), $link_text, $office_footer,
$office_name);
}
@@ -636,21 +668,25 @@
{
//$contact_person2 =
activitycalendar_socontactperson::get_instance()->get_group_contact2($activity>get_group_id());
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_group_id(),
true));
- /*
if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
+ /*if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_2(),
$subject, $body);
else */
if($activity->get_contact_person_1() &&
$activity->get_contact_person_1()->get_email())
+ {
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_1(),
$subject, $body);
+ }
}
else if($activity->get_organization_id() &&
$activity->get_organization_id() > 0)
{
//$contact_person2 =
activitycalendar_socontactperson::get_instance()->get_oup_contact2($activity>get_group_id());
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_organization_id()));
- /*
if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
+ /*if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_2(),
$subject, $body);
else */
if($activity->get_contact_person_1() &&
$activity->get_contact_person_1()->get_email())
+ {
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_1(),
$subject, $body);
+ }
}
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.index',
@@ -666,8 +702,7 @@
$GLOBALS['phpgw']->send =
CreateObject('phpgwapi.send');
}
- $config = CreateObject('phpgwapi.config', 'booking');
- $config->read();
+ $config = $this->config_booking;
$from = isset($config->config_data['email_sender'])
&& $config->config_data['email_sender'] ? $config->config_data['email_sender']
: "noreply<address@hidden'phpgw_info']['server']['hostname']}>";
//$from = "address@hidden";
@@ -676,16 +711,35 @@
return false;
}
- $mailtoAddress =
activitycalendar_socontactperson::get_instance()->get_mailaddress_for_org_contact($contact_person->get_id());
+ $mailtoAddress =
trim(activitycalendar_socontactperson::get_instance()->get_mailaddress_for_org_contact($contact_person->get_id()));
//$mailtoAddress = "address@hidden";
//var_dump($mailtoAddress);
//var_dump($mailtoAddress.';'.$from.';'.$subject);
if(strlen($mailtoAddress) > 0)
{
+
if(!$this->validator->check_email_address($mailtoAddress))
+ {
+ $GLOBALS['phpgw']->log->error(array(
+ 'text' =>
'uiactivities::send_mailnotification_to_group() : not a valid address.: %1',
+ 'p1' => $mailtoAddress,
+ 'line' => __LINE__,
+ 'file' => __FILE__
+ ));
+ $msg = "Overskrift: \"{$subject}\";
Adressen feiler på validering:\"{$mailtoAddress}\"";
+ _debug_array($msg);
+ return false;
+ }
+
+ _debug_array($mailtoAddress);
+ _debug_array($subject);
+
+ if($this->debug)
+ {
+ return false;
+ }
+
try
{
- //var_dump('inne i try');
-// var_dump('inne i try - org;');
$GLOBALS['phpgw']->send->msg('email',
$mailtoAddress, $subject, $body, '', '', '', $from, '', 'html');
}
catch(phpmailerException $e)
@@ -711,8 +765,7 @@
$GLOBALS['phpgw']->send =
CreateObject('phpgwapi.send');
}
- $config = CreateObject('phpgwapi.config', 'booking');
- $config->read();
+ $config = $this->config_booking;
$from = isset($config->config_data['email_sender'])
&& $config->config_data['email_sender'] ? $config->config_data['email_sender']
: "noreply<address@hidden'phpgw_info']['server']['hostname']}>";
//$from = "address@hidden";
@@ -721,15 +774,35 @@
return false;
}
- $mailtoAddress =
activitycalendar_socontactperson::get_instance()->get_mailaddress_for_group_contact($contact_person->get_id());
+ $mailtoAddress =
trim(activitycalendar_socontactperson::get_instance()->get_mailaddress_for_group_contact($contact_person->get_id()));
//$mailtoaddress = "address@hidden";
//var_dump($mailtoAddress.';'.$from.';'.$subject);
if(strlen($mailtoAddress) > 0)
{
+
if(!$this->validator->check_email_address($mailtoAddress))
+ {
+ $GLOBALS['phpgw']->log->error(array(
+ 'text' =>
'uiactivities::send_mailnotification_to_group() : not a valid address.: %1',
+ 'p1' => $mailtoAddress,
+ 'line' => __LINE__,
+ 'file' => __FILE__
+ ));
+ $msg = "Overskrift: \"{$subject}\";
Adressen feiler på validering:\"{$mailtoAddress}\"";
+ _debug_array($msg);
+
+ return false;
+ }
+
+ _debug_array($mailtoAddress);
+ _debug_array($subject);
+
+ if($this->debug)
+ {
+ return false;
+ }
+
try
{
-// var_dump('inne i try - group;');
-// $send->msg('email', $mailtoAddress, $subject, $body, '', '',
'', $from, '', 'html');
$GLOBALS['phpgw']->send->msg('email',
$mailtoAddress, $subject, $body, '', '', '', $from, '', 'html');
}
catch(phpmailerException $e)
Property changes on: branches/dev-syncromind/booking
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking: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,13179-13344,13434-13481,13778-13791,13816-13880,13882-13931,13940-13963,13978-14029
+ /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking: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,13179-13344,13434-13481,13778-13791,13816-13880,13882-13931,13940-13963,13978-14029,14273-14399
Modified:
branches/dev-syncromind/booking/inc/class.socompleted_reservation_export.inc.php
===================================================================
---
branches/dev-syncromind/booking/inc/class.socompleted_reservation_export.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
+++
branches/dev-syncromind/booking/inc/class.socompleted_reservation_export.inc.php
2015-11-18 11:26:07 UTC (rev 14400)
@@ -890,7 +890,7 @@
$log_cost = $reservation['cost'];
$log_varelinjer_med_dato =
$reservation['article_description'].' - '.$reservation['description'];
- $log[] =
$log_order_id.';'.$log_customer_name.' -
'.$log_customer_nr.';'.$log_varelinjer_med_dato.';'.$log_buidling.';'.$log_cost;
+ $log[] =
$reservation['id'].';'.$reservation['reservation_type'].';'.
$log_order_id.';'.$log_customer_name.' -
'.$log_customer_nr.';'.$log_varelinjer_med_dato.';'.$log_buidling.';'.$log_cost;
} else {
//item level
@@ -974,7 +974,7 @@
$log_cost = $reservation['cost'];
$log_varelinjer_med_dato =
$reservation['article_description'].' - '.$reservation['description'];
- $log[] =
$log_order_id.';'.$log_customer_name.' -
'.$log_customer_nr.';'.$log_varelinjer_med_dato.';'.$log_buidling.';'.$log_cost;
+ $log[] =
$reservation['id'].';'.$reservation['reservation_type'].';'.
$log_order_id.';'.$log_customer_name.' -
'.$log_customer_nr.';'.$log_varelinjer_med_dato.';'.$log_buidling.';'.$log_cost;
}
}
@@ -1148,7 +1148,7 @@
$log_cost = $reservation['cost'];
$log_varelinjer_med_dato =
$reservation['article_description'].' - '.$reservation['description'];
- $log[] = $log_order_id.';'.$log_customer_name.'
-
'.$log_customer_nr.';'.$log_varelinjer_med_dato.';'.$log_buidling.';'.$log_cost;
+ $log[] =
$reservation['id'].';'.$reservation['reservation_type'].';'.
$log_order_id.';'.$log_customer_name.' -
'.$log_customer_nr.';'.$log_varelinjer_med_dato.';'.$log_buidling.';'.$log_cost;
$output[] = implode('', str_replace(array("\n",
"\r"), '', $startpost));
$output[] = implode('', str_replace(array("\n",
"\r"), '', $fakturalinje));
Modified:
branches/dev-syncromind/booking/inc/class.socompleted_reservation_export_file.inc.php
===================================================================
---
branches/dev-syncromind/booking/inc/class.socompleted_reservation_export_file.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
+++
branches/dev-syncromind/booking/inc/class.socompleted_reservation_export_file.inc.php
2015-11-18 11:26:07 UTC (rev 14400)
@@ -163,7 +163,7 @@
$export_data[$export_type] =
$this->combine_export_result_data($export_results[$export_type]);
}
- $log = "Ordrenr;Kunde navn - Nummer;Varelinjer
med dato;Bygg;Beløp\n";
+ $log =
"Reservasjon_Id;Reservasjon_Type;Ordrenr;Kunde navn - Nummer;Varelinjer med
dato;Bygg;Beløp\n";
$log .= $export_log;
$export_log = $log;
Modified: branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/booking/inc/class.uiapplication.inc.php
2015-11-18 11:26:07 UTC (rev 14400)
@@ -948,7 +948,7 @@
);
foreach($copy as $f)
{
- $event[] = array($f, $application[$f]);
+ $event[] = array($f,
htmlentities($application[$f]));
}
foreach($application['agegroups'] as $ag)
{
Modified:
branches/dev-syncromind/booking/inc/class.uicompleted_reservation_export_file.inc.php
===================================================================
---
branches/dev-syncromind/booking/inc/class.uicompleted_reservation_export_file.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
+++
branches/dev-syncromind/booking/inc/class.uicompleted_reservation_export_file.inc.php
2015-11-18 11:26:07 UTC (rev 14400)
@@ -162,7 +162,8 @@
'label' => lang('Download'),
'href' => $this->link_to('download',
array('id' => $export_file['id']))
);
- if ($export_file['total_items'] > 0 and $export_file['id'] >
$config->config_data['invoice_last_id'] and
!empty($export_file['log_filename'])) {
+ if ($export_file['total_items'] > 0 and
!empty($export_file['log_filename'])) //and $export_file['id'] >
$config->config_data['invoice_last_id'] )
+ {
$export_file['log'] = array(
'label' => lang('log'),
'href' => $this->link_to('log',
array('id' => $export_file['id']))
Modified: branches/dev-syncromind/booking/inc/class.uievent.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uievent.inc.php 2015-11-18
08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/booking/inc/class.uievent.inc.php 2015-11-18
11:26:07 UTC (rev 14400)
@@ -423,7 +423,7 @@
$_POST['contact_phone'] =
$organization['contacts'][1]['phone'];
}
}
- if (!$_POST['application_id'])
+ if
(is_array($event['dates']))//(!$_POST['application_id'])
{
$temp_errors = array();
foreach( $event['dates'] as $checkdate)
Modified: branches/dev-syncromind/booking/templates/base/application.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/application.xsl
2015-11-18 08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/booking/templates/base/application.xsl
2015-11-18 11:26:07 UTC (rev 14400)
@@ -180,9 +180,11 @@
<xsl:if test="not(contains($assocdata,
from_))">
<script type="text/javascript">
applicationDate[<xsl:value-of
select="id"/>] = '<xsl:value-of select="substring(from_,0,11)"/>';
+
var oArgs = {menuaction:'bookingfrontend.uibuilding.schedule',
id: building_id, backend: true, date: applicationDate[<xsl:value-of
select="id"/>]};
+
var scheduleUrl = phpGWLink('bookingfrontend/', oArgs);
</script>
<a href="javascript: void(0)"
-
onclick="window.open('/bookingfrontend/index.php?menuaction=bookingfrontend.uibuilding.schedule&id='+building_id+'&backend=true&date='+applicationDate[{id}],
'', 'width=1048, height=600, scrollbars=yes');return false;">
+
onclick="window.open(scheduleUrl, '', 'width=1048, height=600,
scrollbars=yes');return false;">
<i class="fa
fa-exclamation-circle"></i>
</a>
</xsl:if>
Property changes on: branches/dev-syncromind/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune/bookingfrontend:9468-12740,12743-12875,12986
/trunk/bookingfrontend: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,13346-13399,13434-13481,13940-13963
+ /branches/stavangerkommune/bookingfrontend:9468-12740,12743-12875,12986
/trunk/bookingfrontend: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,13346-13399,13434-13481,13940-13963,14273-14399
Modified: branches/dev-syncromind/bookingfrontend/inc/class.uibuilding.inc.php
===================================================================
--- branches/dev-syncromind/bookingfrontend/inc/class.uibuilding.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/bookingfrontend/inc/class.uibuilding.inc.php
2015-11-18 11:26:07 UTC (rev 14400)
@@ -22,27 +22,37 @@
public function information_screen()
{
- $today = new DateTime(phpgw::get_var('date', 'GET'), new
DateTimeZone('Europe/Oslo'));
+ $today = new DateTime(phpgw::get_var('date', 'string', 'GET'),
new DateTimeZone('Europe/Oslo'));
$date = $today;
+ $currentday = $today;//Sigurd: Needed?
- $building = $this->bo->read_single(phpgw::get_var('id', 'GET'));
- $start = phpgw::get_var('start', 'GET');
- $end = phpgw::get_var('end', 'GET');
- $res = phpgw::get_var('res', 'GET');
- $color = phpgw::get_var('color', 'GET');
- $fontsize = phpgw::get_var('fontsize', 'GET');
- $weekend = phpgw::get_var('weekend', 'GET');
+ $building_id = phpgw::get_var('id','int' ,'GET');
+ $building = $this->bo->read_single($building_id);
+ $start = phpgw::get_var('start', 'int', 'GET');
+ $end = phpgw::get_var('end', 'int', 'GET');
+ $res = phpgw::get_var('res', 'string', 'GET');
+ $color = phpgw::get_var('color', 'string','GET');
+ $fontsize = phpgw::get_var('fontsize', 'int', 'GET');
+ $weekend = phpgw::get_var('weekend', 'int','GET');
- if ($start != '')
+ if ($start)
+ {
$timestart = $start;
+ }
else
+ {
$timestart = 8;
+ }
- if ($end != '')
+ if ($end)
+ {
$timeend = $end;
+ }
else
+ {
$timeend = 22;
+ }
$timediff = $timeend - $timestart;
$cellwidth = 88 / ($timediff * 2);
@@ -57,15 +67,19 @@
"Sun" => "Søndag"
);
- $bookings =
$this->booking_bo->building_infoscreen_schedule(phpgw::get_var('id', 'GET'),
$date, $res);
+ $bookings =
$this->booking_bo->building_infoscreen_schedule($building_id, $date, $res);
$from = clone $date;
$from->setTime(0, 0, 0);
// Make sure $from is a monday
- if ($from->format('w') != 1) {
+ if ($from->format('w') != 1)
+ {
$from->modify('last monday');
if ($weekend == 1)
+ {
$from->modify('next Saturday');
- if ($weekend == 3) {
+ }
+ if ($weekend == 3)
+ {
$currentday = clone $date;
$currentday->setTime(0, 0, 0);
$from = $currentday;
@@ -97,16 +111,25 @@
'Sun' => array()
);
if ($weekend == 1)
+ {
$list = $list2;
+ }
elseif ($weekend == 2)
+ {
$list = $list3;
- elseif ($weekend == 3) {
+ }
+ elseif ($weekend == 3)
+ {
$day = $currentday->format('D');
$list = array($day => array());
- } else
+ }
+ else
+ {
$list = $list1;
+ }
- foreach ($list as $key => &$item) {
+ foreach ($list as $key => &$item)
+ {
$item = $bookings['results'][$key];
}
@@ -116,18 +139,24 @@
$html .= '<meta name="author" content="Bergen Kommune">';
$html .= '<style>';
$html .= 'body { font-size: 12px; padding: 0px; border-spacing: 0px;}
';
- if ($fontsize != '') {
+ if ($fontsize != '')
+ {
$html .= 'table { font-family: Tahoma, Verdana, Helvetica; width:
100%; height: 100%; margin: 0px; font-size: ' . $fontsize . 'px;
border-collapse: collapse;} ';
- } else {
+ }
+ else
+ {
$html .= 'table { font-family: Tahoma, Verdana,Helvetica; width:
100%; height: 100%; margin: 0px; font-size: 12px; border-collapse: collapse;} ';
}
$html .= 'th { text-align: left; padding: 2px 8px; border: 1px solid
black;} ';
$html .= 'td { font-weight: bold; text-align: left; padding: 4px 8px;
border: 1px solid black;} ';
$html .= 'tr.header { background-color: #333; color: white; } ';
- if ($color != '') {
+ if ($color != '')
+ {
$html .= 'td.data { background-color: #' . $color . '; } ';
- } else {
+ }
+ else
+ {
$html .= 'td.data { background-color: #ccffff; } ';
}
$html .= '</style>';
@@ -136,7 +165,8 @@
$html .= '<thead>';
$html .= '<tr>';
$html .= '<th colspan="2" style="text-align: left; width:
12%;">Bane</th>';
- while ($time < $timeend) {
+ while ($time < $timeend)
+ {
$html .= '<th colspan="1" style="width: ' . $cellwidth . '%;
text-align: left;">' . str_pad($time, 2, '0', STR_PAD_LEFT) . ':00</th>';
$html .= '<th colspan="1" style="width: ' . $cellwidth . '%;
text-align: left;">' . str_pad($time, 2, '0', STR_PAD_LEFT) . ':30</th>';
$time += 1;
@@ -147,9 +177,11 @@
$first = '';
$len = (($timeend - $timestart) * 2) + 2;
- foreach ($list as $day => $resources) {
+ foreach ($list as $day => $resources)
+ {
- if ($first != $day) {
+ if ($first != $day)
+ {
$first = $day;
$html .= '<tr class="header">';
$html .= '<td colspan="' . $len . '" width="12%">';
@@ -161,55 +193,78 @@
$from = date('d.m.Y', strtotime($from . ' 00:00:01 +1 day'));
}
- foreach ($resources as $res => $booking) {
+ foreach ($resources as $res => $booking)
+ {
$html .= '<tr>';
$html .= '<td colspan="2">';
$html .= $res;
$html .= '</td>';
$last = -1;
- foreach ($booking as $date => $value) {
+ foreach ($booking as $date => $value)
+ {
$time2 = $timestart;
$bftime = explode(':', substr($value['from_'], -8));
$bttime = explode(':', substr($value['to_'], -8));
if ($bftime[1] == 30)
+ {
$bftime = $bftime[0] + 0.5;
+ }
else
+ {
$bftime = intval($bftime[0]);
-
+ }
if ($bttime[1] == 30)
- $bttime = $bttime[0] + 0.5;
+ {
+ $bttime = $bttime[0] + 0.5;
+ }
else
- $bttime = intval($bttime[0]);
+ {
+ $bttime = intval($bttime[0]);
+ }
- while ($time2 < $timeend) {
-
- if ($bftime == $time2 && $time2 < $timeend) {
+ while ($time2 < $timeend)
+ {
+ if ($bftime == $time2 && $time2 < $timeend)
+ {
$last = $bttime;
$colspan = $value['colspan'];
- if ($bttime > $timeend) {
+ if ($bttime > $timeend)
+ {
$colspan = $value['colspan'] - ($bttime -
$timeend);
}
$testlen = 12 * $colspan;
$html .= '<td colspan="' . $colspan . '"
class="data" style="">';
if (strlen($value['name']) > $testlen)
+ {
$html .= $value['shortname'] . " ";
+ }
else
+ {
$html .= $value['name'] . " ";
+ }
$html .= '</td>';
- } elseif ($last === -1 && $bftime < $timestart &&
$bttime > $timestart) {
+ }
+ elseif ($last === -1 && $bftime
< $timestart && $bttime > $timestart)
+ {
$last = $bttime;
$colspan = ($bttime - $timestart) * 2;
$html .= '<td colspan="' . $colspan . '"
class="data" style="">';
$testlen = 12 * $colspan;
if (strlen($value['name']) > $testlen)
+ {
$html .= $value['shortname'] . " ";
+ }
else
+ {
$html .= $value['name'] . " ";
+ }
$html .= '</td>';
- } elseif ($last === -1 && $bftime != $timestart &&
$bftime < $timeend && $bftime > $timestart) {
+ }
+ elseif ($last === -1 && $bftime
!= $timestart && $bftime < $timeend && $bftime > $timestart)
+ {
$colspan = ($bftime - $timestart) * 2;
$html .= '<td colspan="' . $colspan . '">';
@@ -217,7 +272,9 @@
$html .= '</td>';
$last = $bttime;
- } elseif ($last != -1 && $bftime != $last && $time2 >
$last && $last < $bftime && $bftime < $timeend) {
+ }
+ elseif ($last != -1 && $bftime
!= $last && $time2 > $last && $last < $bftime && $bftime < $timeend)
+ {
$colspan = ($bftime - $last) * 2;
$html .= '<td colspan="' . $colspan . '">';
$html .= " ";
@@ -225,7 +282,8 @@
$last = $bttime;
}
- if ($time2 >= $timeend) {
+ if ($time2 >= $timeend)
+ {
$last = $timestart - 1;
}
$time2 += 0.5;
@@ -241,7 +299,7 @@
header('Content-type: text/html');
echo $html;
- exit;
+ $GLOBALS['phpgw']->common->phpgw_exit();
}
public function schedule()
Property changes on: branches/dev-syncromind/controller
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/stavangerkommune/controller:12743-12875,12986
/trunk/controller: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,13691-13726,13728-13729,13731-13773,13802-13811,13816-13880,13882-13931,13940-13963,13978-14029,14031-14268
+ /branches/stavangerkommune/controller:12743-12875,12986
/trunk/controller: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,13691-13726,13728-13729,13731-13773,13802-13811,13816-13880,13882-13931,13940-13963,13978-14029,14031-14268,14273-14399
Modified: branches/dev-syncromind/controller/inc/class.uicase.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicase.inc.php 2015-11-18
08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/controller/inc/class.uicase.inc.php 2015-11-18
11:26:07 UTC (rev 14400)
@@ -826,14 +826,18 @@
}
$case_id = phpgw::get_var('case_id');
- $check_list_id = phpgw::get_var('check_list_id');
-
- $status = $this->so->delete($case_id);
+
+ $case = $this->so->get_single($case_id);
+
$case->set_status(controller_check_item_case::STATUS_CLOSED);
+
+ $status = false;
+ if($this->so->store($case))
+ {
+ $status = $this->so->delete($case_id);
+ }
if($status)
{
-
-
return json_encode( array( "status" =>
"deleted" ) );
}
else
@@ -850,7 +854,6 @@
}
$case_id = phpgw::get_var('case_id');
- $check_list_id = phpgw::get_var('check_list_id');
$case = $this->so->get_single($case_id);
$case->set_status(controller_check_item_case::STATUS_CLOSED);
Modified: branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
2015-11-18 11:26:07 UTC (rev 14400)
@@ -375,6 +375,7 @@
'type' => $type,
'current_year' => $year,
'current_month_nr' => $month_nr,
+ 'current_month_name' => lang("month
{$month_nr} capitalized"),
'building_location_code' =>
$building_location_code,
'location_level' => $level,
'check_list_type' => 'add_check_list',
@@ -501,6 +502,7 @@
'type' => $type,
'current_year' => $year,
'current_month_nr' => $month,
+ 'current_month_name' => lang("month {$month}
capitalized"),
'building_location_code' =>
$building_location_code,
'location_level' => $level,
'required_actual_hours' =>
$required_actual_hours,
Modified: branches/dev-syncromind/controller/inc/class.uicomponent.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicomponent.inc.php
2015-11-18 08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/controller/inc/class.uicomponent.inc.php
2015-11-18 11:26:07 UTC (rev 14400)
@@ -836,7 +836,7 @@
{
return array(
'components' => null,
- 'summary' =>
$this->get_summary($values),
+ 'summary' =>
$this->get_summary($values, $user_id),
'location_filter' => $location_filter
);
}
@@ -1134,7 +1134,7 @@
return
"{$repeat_type}<br/>{$link}<br/>{$assigned_to}<br/>{$time}";
}
- private function get_summary($data)
+ private function get_summary($data, $user_id)
{
@@ -1174,15 +1174,25 @@
);
+
+ $grand_total_count = 0;
+ $grand_total_billable_hours = 0;
+
foreach($data as $entry)
{
for ( $_month=1; $_month < 13; $_month++ )
{
+ if($user_id && $user_id !=
$entry[$_month]['info']['assigned_to'])
+ {
+ continue;
+ }
if(isset($entry[$_month]['status']))
{
$summary[$entry[$_month]['status']][$_month]['count'] +=1;
$summary[$entry[$_month]['status']][$_month]['billable_hours'] +=
$entry[$_month]['info']['billable_hours'];
+ $grand_total_count +=1;
+ $grand_total_billable_hours +=
$entry[$_month]['info']['billable_hours'];
}
}
@@ -1271,6 +1281,7 @@
Totalt
</td>
<td>
+ {$grand_total_count}</br>{$grand_total_billable_hours}
</td>
HTML;
foreach($fields as $field)
Modified: branches/dev-syncromind/controller/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind/controller/setup/phpgw_no.lang 2015-11-18
08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/controller/setup/phpgw_no.lang 2015-11-18
11:26:07 UTC (rev 14400)
@@ -389,4 +389,5 @@
request ical event controller no Send MøteInnkalling
summary common no Sammendrag
components controller no Komponenter
-report type controller no RapportType
\ No newline at end of file
+report type controller no RapportType
+lang_control_mandatory_location controller no Påkrevd
lokasjonsvalg
\ No newline at end of file
Modified:
branches/dev-syncromind/controller/templates/base/check_list/add_check_list.xsl
===================================================================
---
branches/dev-syncromind/controller/templates/base/check_list/add_check_list.xsl
2015-11-18 08:12:24 UTC (rev 14399)
+++
branches/dev-syncromind/controller/templates/base/check_list/add_check_list.xsl
2015-11-18 11:26:07 UTC (rev 14400)
@@ -14,7 +14,7 @@
<!-- ================== CHECKLIST DETAILS
===================== -->
<div id="check_list_details">
- <h3 class="box_header">Sjekklistedetaljer</h3>
+ <h3
class="box_header">Sjekklistedetaljer::<xsl:value-of
select="current_month_name"/></h3>
<xsl:variable name="action_url">
<xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:controller.uicheck_list.save_check_list')" />
Modified:
branches/dev-syncromind/controller/templates/base/check_list/edit_check_list.xsl
===================================================================
---
branches/dev-syncromind/controller/templates/base/check_list/edit_check_list.xsl
2015-11-18 08:12:24 UTC (rev 14399)
+++
branches/dev-syncromind/controller/templates/base/check_list/edit_check_list.xsl
2015-11-18 11:26:07 UTC (rev 14400)
@@ -12,7 +12,7 @@
<!-- ================== CHECKLIST DETAILS ===================== -->
<div id="check_list_details">
- <h3 class="box_header">Sjekklistedetaljer</h3>
+ <h3 class="box_header">Sjekklistedetaljer::<xsl:value-of
select="current_month_name"/></h3>
<xsl:variable name="action_url"><xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:controller.uicheck_list.save_check_list')" /></xsl:variable>
<form id="frm_update_check_list" action="{$action_url}"
method="post">
<xsl:variable name="check_list_id"><xsl:value-of
select="check_list/id"/></xsl:variable>
Modified: branches/dev-syncromind/controller/templates/base/component.xsl
===================================================================
--- branches/dev-syncromind/controller/templates/base/component.xsl
2015-11-18 08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/controller/templates/base/component.xsl
2015-11-18 11:26:07 UTC (rev 14400)
@@ -252,6 +252,7 @@
{
$("#receipt").html('');
+ var report_type = $("#report_type").val();
var user_id = $("#user_id").val();
var custom_frontend =
$("[name='custom_frontend']").val();
@@ -288,6 +289,17 @@
$("[for='user_only']").show();
}
+ if(report_type == 'summary')
+ {
+ $("[name='user_only']").hide();
+ $("[for='user_only']").hide();
+ }
+ else
+ {
+ $("[name='user_only']").show();
+ $("[for='user_only']").show();
+ }
+
var requestUrl = $("#queryForm").attr("action");
requestUrl += '&phpgw_return_as=json' + "&" +
$("#queryForm").serialize();
Modified: branches/dev-syncromind/controller/templates/base/config.tpl
===================================================================
--- branches/dev-syncromind/controller/templates/base/config.tpl
2015-11-18 08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/controller/templates/base/config.tpl
2015-11-18 11:26:07 UTC (rev 14400)
@@ -52,15 +52,23 @@
</select>
</td>
</tr>
-
<tr class="row_off">
+ <td>{lang_control_mandatory_location}</td>
+ <td>
+ <select
name="newsettings[control_mandatory_location]">
+ <option value=""
{selected_control_mandatory_location_}>{lang_no}</option>
+ <option value="1"
{selected_control_mandatory_location_1}>{lang_yes}</option>
+ </select>
+ </td>
+ </tr>
+ <tr class="row_on">
<td>{lang_document_category}:</td>
<td>
- <!--to be able to blank the setting - need an empty value-->
- <input type = 'hidden' name="newsettings[document_cat][]"
value="">
- <table>
-{hook_document_cat}
- </table>
+ <!--to be able to blank the setting - need an
empty value-->
+ <input type = 'hidden'
name="newsettings[document_cat][]" value="">
+ <table>
+ {hook_document_cat}
+ </table>
</td>
</tr>
Modified: branches/dev-syncromind/property/inc/import/import_update_generic.php
===================================================================
--- branches/dev-syncromind/property/inc/import/import_update_generic.php
2015-11-18 08:12:24 UTC (rev 14399)
+++ branches/dev-syncromind/property/inc/import/import_update_generic.php
2015-11-18 11:26:07 UTC (rev 14400)
@@ -316,7 +316,7 @@
{
if(!$_value = $data[array_search($key,
$fields)])
{
- throw new Exception("Fant ikke
verdi for feltet 'primary key'");
+ throw new Exception("Fant ikke
verdi for feltet 'primary key' {$key}");
}
$primary_key[] = "$key='{$_value}'";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14400] Syncromind: Merge 14272:14399 from trunk,
Sigurd Nes <=