[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17582] Stable: Merge 17515:17581 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17582] Stable: Merge 17515:17581 from trunk |
Date: |
Mon, 15 Jan 2018 06:03:24 -0500 (EST) |
Revision: 17582
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17582
Author: sigurdne
Date: 2018-01-15 06:03:23 -0500 (Mon, 15 Jan 2018)
Log Message:
-----------
Stable: Merge 17515:17581 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/.gitignore
branches/Version-2_0-branch/activitycalendar/inc/class.uiactivities.inc.php
branches/Version-2_0-branch/admin/setup/phpgw_no.lang
branches/Version-2_0-branch/booking/inc/class.async_task_send_reminder.inc.php
branches/Version-2_0-branch/booking/inc/class.boallocation.inc.php
branches/Version-2_0-branch/booking/inc/class.boapplication.inc.php
branches/Version-2_0-branch/booking/inc/class.bobooking.inc.php
branches/Version-2_0-branch/booking/inc/class.boevent.inc.php
branches/Version-2_0-branch/booking/inc/class.uiallocation.inc.php
branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
branches/Version-2_0-branch/booking/inc/class.uibooking.inc.php
branches/Version-2_0-branch/booking/inc/class.uicommon.inc.php
branches/Version-2_0-branch/booking/inc/class.uievent.inc.php
branches/Version-2_0-branch/booking/inc/class.uisend_email.inc.php
branches/Version-2_0-branch/booking/js/base/common.js
branches/Version-2_0-branch/booking/setup/phpgw_no.lang
branches/Version-2_0-branch/booking/templates/base/application.xsl
branches/Version-2_0-branch/booking/templates/base/event_edit.xsl
branches/Version-2_0-branch/bookingfrontend/inc/class.bosearch.inc.php
branches/Version-2_0-branch/bookingfrontend/inc/class.uiapplication.inc.php
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/application.xsl
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/application_new.xsl
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/search.xsl
branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
branches/Version-2_0-branch/controller/inc/class.uicheck_list.inc.php
branches/Version-2_0-branch/controller/inc/class.uicontrol_group.inc.php
branches/Version-2_0-branch/eventplanner/inc/class.bobooking.inc.php
branches/Version-2_0-branch/eventplanner/inc/class.bocalendar.inc.php
branches/Version-2_0-branch/helpdesk/inc/class.botts.inc.php
branches/Version-2_0-branch/helpdesk/setup/phpgw_no.lang
branches/Version-2_0-branch/phpgwapi/inc/class.send.inc.php
branches/Version-2_0-branch/phpgwapi/templates/aalesund/css/sample.css
branches/Version-2_0-branch/phpgwapi/templates/aalesund/head.tpl
branches/Version-2_0-branch/phpgwapi/templates/aalesund/js/sample.js
branches/Version-2_0-branch/property/inc/class.boevent.inc.php
branches/Version-2_0-branch/property/inc/class.botts.inc.php
branches/Version-2_0-branch/property/inc/class.boworkorder.inc.php
branches/Version-2_0-branch/property/inc/class.sotts.inc.php
branches/Version-2_0-branch/property/inc/class.uitts.inc.php
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205.php
branches/Version-2_0-branch/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
branches/Version-2_0-branch/property/inc/custom/default/varsle_prosjektoordinator_ved_avsluttet_relatert_melding_BBB.php
branches/Version-2_0-branch/property/setup/phpgw_no.lang
branches/Version-2_0-branch/property/setup/setup.inc.php
branches/Version-2_0-branch/property/setup/tables_current.inc.php
branches/Version-2_0-branch/property/setup/tables_update.inc.php
branches/Version-2_0-branch/property/templates/base/tts.xsl
branches/Version-2_0-branch/rental/inc/model/class.agresso_lg04.inc.php
branches/Version-2_0-branch/rental/templates/base/config.tpl
Added Paths:
-----------
branches/Version-2_0-branch/controller/js/controller/ajax_calendar_for_locations.js
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_aggregated.xsl
Property Changed:
----------------
branches/Version-2_0-branch/
branches/Version-2_0-branch/booking/
branches/Version-2_0-branch/bookingfrontend/
Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch 2018-01-15 11:03:23 UTC (rev 17582)
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:ignore
## -1,9 +1,9 ##
header.inc.php
+.buildpath
+.vscode
.svnignore
.cache
+.project
+nbproject
.settings
-.project
.*.swp
-nbproject
-.buildpath
-.~lock.hms_1_1.xml#
Modified: svn:mergeinfo
## -1,4 +1,4 ##
/branches/dev-syncromind:13653
/branches/dev-syncromind-2:14933-16846
/branches/stavangerkommune:12743-12875,12986
-/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972,16974-16977,16979-16982,16984,16986,16988-16999,17001,17003,17005-17018,17020-17023,17025-17026,17028-17033,17035,17037,17039-17040,17042-17050,17052-17053,17055,17057-17058,17060,17062-17064,17066,17068-17074,17076-17088,17090,17092,17094,17096,17098,17100-17101,17103-17104,17106-17108,17110-17121,17123-17124,17126-17132,17134-17143,17145-17150,17152-17157,17159,17161-17162,17164,17166-17167,17169-17173,17175-17188,17190-17195,17197-17205,17207-17212,17214,17216-17277,17279,17281,17283-17285,17287-17288,17290-17301,17303-17311,17313-17314,17316-17317,17319,17321-17330,17332-17333,17335-17340,17342,17344-17346,17349-17351,17353-17354,17356-17357,17359,17361,17363-17366,17368,17370,17372-17378,17380,17382-17392,17394-17424,17426-17430,17432-17477,17479,17481-17487,17489,17491,17493-17509,17511-17512,17514
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314,16316-16318,16320-16322,16324,16326-16330,16332,16334,16336,16338-16339,16341-16342,16344,16346,16348,16350,16352-16353,16355-16358,16360,16362,16364-16369,16371,16373,16375-16378,16380,16382-16383,16385,16387,16389,16391,16393-16395,16397,16399-16402,16404,16406,16408,16410-16415,16417,16419-16420,16422-16425,16427,16429-16440,16442,16444,16446,16448-16449,16451,16453,16455-16463,16465-16472,16474-16475,16477-16484,16486,16488,16490-16497,16499,16501-16503,16505-16512,16514-16517,16519,16521,16523,16525,16527-16532,16534,16536-16541,16543,16545-16554,16556,16558-16565,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16600-16601,16603-16608,16610-16614,16616-16618,16620-16621,16623-16624,16626,16628,16630,16632-16638,16640,16642,16644,16646-16651,16653-16663,16665,16667,16669,16671,16673,16675,16677,16679-16680,16682,16684,16686,16688-16692,16694-16695,16697-16699,16701,16703,16705-16706,16708,16710,16712,16714,16716-16718,16720-16728,16730-16732,16734-16739,16741,16743-16746,16748-16750,16752-16755,16757,16759-16761,16763,16765,16767,16769-16774,16776,16778-16783,16785-16788,16790,16792,16794,16796-16802,16804-16807,16809,16811-16817,16819,16821-16825,16827-16831,16833,16835-16836,16838,16840-16844,16846-16847,16849,16851,16853-16854,16856-16859,16861,16863-16865,16867,16869-16871,16873,16875-16876,16878,16880-16881,16883,16885,16887-16888,16890,16892,16894-16900,16902,16904,16906,16908-16909,16911-16916,16918-16919,16921,16923,16925,16927,16929-16930,16932,16934,16936-16937,16939-16942,16944,16946,16948,16950,16952-16953,16955-16959,16961,16963,16965-16970,16972,16974-16977,16979-16982,16984,16986,16988-16999,17001,17003,17005-17018,17020-17023,17025-17026,17028-17033,17035,17037,17039-17040,17042-17050,17052-17053,17055,17057-17058,17060,17062-17064,17066,17068-17074,17076-17088,17090,17092,17094,17096,17098,17100-17101,17103-17104,17106-17108,17110-17121,17123-17124,17126-17132,17134-17143,17145-17150,17152-17157,17159,17161-17162,17164,17166-17167,17169-17173,17175-17188,17190-17195,17197-17205,17207-17212,17214,17216-17277,17279,17281,17283-17285,17287-17288,17290-17301,17303-17311,17313-17314,17316-17317,17319,17321-17330,17332-17333,17335-17340,17342,17344-17346,17349-17351,17353-17354,17356-17357,17359,17361,17363-17366,17368,17370,17372-17378,17380,17382-17392,17394-17424,17426-17430,17432-17477,17479,17481-17487,17489,17491,17493-17509,17511-17512,17514,17516-17581
\ No newline at end of property
Modified: branches/Version-2_0-branch/.gitignore
===================================================================
--- branches/Version-2_0-branch/.gitignore 2018-01-15 09:53:13 UTC (rev
17581)
+++ branches/Version-2_0-branch/.gitignore 2018-01-15 11:03:23 UTC (rev
17582)
@@ -2,4 +2,5 @@
/header.inc.php
/.cache
/.settings
-/.project
\ No newline at end of file
+/.project
+/.vscode
\ No newline at end of file
Modified:
branches/Version-2_0-branch/activitycalendar/inc/class.uiactivities.inc.php
===================================================================
--- branches/Version-2_0-branch/activitycalendar/inc/class.uiactivities.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/activitycalendar/inc/class.uiactivities.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -1271,7 +1271,7 @@
{
$GLOBALS['phpgw']->send->msg('email',
$mailtoAddress, $subject, $body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
if ($e)
{
@@ -1334,7 +1334,7 @@
{
$GLOBALS['phpgw']->send->msg('email',
$mailtoAddress, $subject, $body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
if ($e)
{
Modified: branches/Version-2_0-branch/admin/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/admin/setup/phpgw_no.lang 2018-01-15
09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/admin/setup/phpgw_no.lang 2018-01-15
11:03:23 UTC (rev 17582)
@@ -137,4 +137,5 @@
data admin no Data
settings admin no Innstillinger
color selector admin no Farge velger
-would you like to check for a new version when admins login admin no
Vil du sjekke om det finnes ny versjon når administratorer logger inn
\ No newline at end of file
+would you like to check for a new version when admins login admin no
Vil du sjekke om det finnes ny versjon når administratorer logger inn
+view error log common no Vis feilmeldingslogg
Index: branches/Version-2_0-branch/booking
===================================================================
--- branches/Version-2_0-branch/booking 2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking 2018-01-15 11:03:23 UTC (rev 17582)
Property changes on: branches/Version-2_0-branch/booking
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
/branches/dev-syncromind-2/booking:14933-16846
/branches/stavangerkommune/booking:9468-12740,12743-12875,12986
-/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212,16297-16305,16307-16314,16393-16395,16490-16497,16514-16517,16534,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16616-16618,16730,16734-16739,16748-16750,16769-16774,16785-16788,16796-16802,16835-16836,16846-16847,16883,16885,16908-16909,16939-16942,16944,16946,16948,17020-17023,17028-17033,17039-17040,17076-17088,17126-17132,17134-17143,17152-17157,17175-17188,17313-17314,17353-17354,17370,17394-17424,17426-17430,17432-17477,17493-17509
\ No newline at end of property
+/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212,16297-16305,16307-16314,16393-16395,16490-16497,16514-16517,16534,16567-16575,16577-16584,16586-16588,16590,16592-16593,16595-16596,16598,16616-16618,16730,16734-16739,16748-16750,16769-16774,16785-16788,16796-16802,16835-16836,16846-16847,16883,16885,16908-16909,16939-16942,16944,16946,16948,17020-17023,17028-17033,17039-17040,17076-17088,17126-17132,17134-17143,17152-17157,17175-17188,17313-17314,17353-17354,17370,17394-17424,17426-17430,17432-17477,17493-17509,17516-17581
\ No newline at end of property
Modified:
branches/Version-2_0-branch/booking/inc/class.async_task_send_reminder.inc.php
===================================================================
---
branches/Version-2_0-branch/booking/inc/class.async_task_send_reminder.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++
branches/Version-2_0-branch/booking/inc/class.async_task_send_reminder.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -65,7 +65,7 @@
$sql = "update bb_booking set
reminder = 3 where id = " . $booking['id'];
$this->db->query($sql);
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// do nothing. nowhere to log
or display error messages
}
@@ -103,7 +103,7 @@
$sql = "update bb_event set reminder =
3 where id = " . $event['id'];
$this->db->query($sql);
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// do nothing. nowhere to log or
display error messages
}
Modified: branches/Version-2_0-branch/booking/inc/class.boallocation.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.boallocation.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.boallocation.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -81,7 +81,7 @@
{
$send->msg('email', $adr, $subject,
$body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform user if something goes
wrong
}
@@ -166,7 +166,7 @@
{
$send->msg('email', $adr, $subject,
$body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform user if something goes
wrong
}
Modified: branches/Version-2_0-branch/booking/inc/class.boapplication.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.boapplication.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.boapplication.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -115,7 +115,7 @@
{
$send->msg('email', $bemail, $bsubject, $bbody, '', '', '', $from, '', 'html');
}
- catch
(phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform
user if something goes wrong
}
@@ -145,7 +145,7 @@
{
$send->msg('email',
$application['contact_email'], $subject, $body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform user if something goes wrong
}
@@ -157,7 +157,9 @@
function send_admin_notification( $application, $message = null
)
{
if
(!(isset($GLOBALS['phpgw_info']['server']['smtp_server']) &&
$GLOBALS['phpgw_info']['server']['smtp_server']))
- return;
+ {
+// return;
+ }
$send = CreateObject('phpgwapi.send');
$config = CreateObject('phpgwapi.config', 'booking');
@@ -173,9 +175,13 @@
$mailadresses = explode("\n", $mailadresses);
if ($GLOBALS['phpgw_info']['server']['webserver_url']
!= '' && isset($config->config_data['external_site_address']))
+ {
$link = $external_site_address .
$GLOBALS['phpgw_info']['server']['webserver_url'] .
'/index.php?menuaction=booking.uiapplication.show&id=' . $application['id'];
+ }
else
+ {
$link = $external_site_address .
'/index.php?menuaction=booking.uiapplication.show&id=' . $application['id'];
+ }
$activity =
$this->activity_bo->read_single($application['activity_id']);
@@ -203,7 +209,7 @@
{
$send->msg('email', $adr, $subject,
$body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform user if something goes
wrong
}
Modified: branches/Version-2_0-branch/booking/inc/class.bobooking.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.bobooking.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.bobooking.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -158,7 +158,7 @@
{
$send->msg('email', $adr, $subject,
$body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform user if something goes
wrong
}
@@ -287,7 +287,7 @@
{
$send->msg('email', $adr, $subject,
$body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform user if something goes
wrong
}
Modified: branches/Version-2_0-branch/booking/inc/class.boevent.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.boevent.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.boevent.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -164,7 +164,7 @@
{
$send->msg('email', $adr, $subject,
$body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform user if something goes
wrong
}
@@ -252,7 +252,7 @@
{
$send->msg('email', $adr, $subject,
$body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform user if something goes
wrong
}
Modified: branches/Version-2_0-branch/booking/inc/class.uiallocation.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uiallocation.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.uiallocation.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -558,7 +558,7 @@
{
$send->msg('email',
$contact['email'], $subject, $body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
}
@@ -575,7 +575,7 @@
$allocation['building_name'] =
$allocation['building']['name'];
$errors = array();
$tabs = array();
- $tabs['generic'] = array('label' => lang('Allocations
Edit'), 'link' => '#allocations_edit');
+ $tabs['generic'] = array('label' => lang('edit
allocation'), 'link' => '#allocations_edit');
$active_tab = 'generic';
if ($_SERVER['REQUEST_METHOD'] == 'POST')
Modified: branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.uiapplication.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -618,11 +618,11 @@
if ($_POST['contact_email'] !=
$_POST['contact_email2'])
{
$errors['email'] = lang('The e-mail
addresses you entered do not match');
- $application['contact_email2'] =
$_POST['contact_email2'];
+ $application['contact_email2'] =
phpgw::get_var('contact_email2', 'string', 'POST');
}
else
{
- $application['contact_email2'] =
$_POST['contact_email2'];
+ $application['contact_email2'] =
phpgw::get_var('contact_email2', 'string', 'POST');
}
foreach ($application['agegroups'] as $ag)
@@ -845,7 +845,7 @@
array_set_default($_POST, 'accepted_documents',
array());
$application = array_merge($application,
extract_values($_POST, $this->fields));
- $application['message'] = $_POST['comment'];
+ $application['message'] =
phpgw::get_var('comment', 'string', 'POST');
$this->agegroup_bo->extract_form_data($application);
$this->extract_customer_identifier($application);
@@ -1041,8 +1041,8 @@
}
elseif ($_POST['comment'])
{
- $application['comment'] =
$_POST['comment'];
- $this->add_comment($application,
$_POST['comment']);
+ $application['comment'] =
phpgw::get_var('comment', 'string', 'POST');
+ $this->add_comment($application,
$application['comment']);
$update = true;
$notify = true;
}
@@ -1049,7 +1049,7 @@
elseif ($_POST['status'])
{
$this->check_application_assigned_to_current_user($application);
- $application['status'] =
$_POST['status'];
+ $application['status'] =
phpgw::get_var('status', 'string', 'POST');
if ($application['status'] ==
'REJECTED')
{
@@ -1193,7 +1193,7 @@
self::check_date_availability($application);
$application['tabs'] =
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
phpgwapi_jquery::formvalidator_generate(array('file'),
'file_form');
-
+ self::rich_text_editor('comment');
$application['description'] =
html_entity_decode(nl2br($application['description']));
$application['equipment'] =
html_entity_decode(nl2br($application['equipment']));
Modified: branches/Version-2_0-branch/booking/inc/class.uibooking.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uibooking.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.uibooking.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -704,7 +704,7 @@
{
$send->msg('email',
$contact['email'], $subject, $body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
}
Modified: branches/Version-2_0-branch/booking/inc/class.uicommon.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uicommon.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.uicommon.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -871,19 +871,19 @@
if ($GLOBALS['phpgw_info']['flags']['currentapp'] ==
'bookingfrontend')
{
$html = 'var html = "<div
class=\'date-container\'>"+
- "<a class=\'close-btn btnclose\'
href=\'javascript:void(0);\'>' . $lang_remove . '</a>"+
- "<dt><label
for=\'new_start_date_"+this.counter+"\'>' . $lang_from . '</label></dt>"+
- "<dd><input class=\'new_datepicker time\'
name=\'from_[]\' id=\'new_start_date_"+this.counter+"\' type=\'text\'
placeholder =\'' . $placeholder . '\'>"+
- "</input></dd>"+
- "<dt><label for=\'new_end_date_"+this.counter+"\'
>' . $lang_to . '</label></dt>"+
- "<dd><input class=\'new_datepicker time\'
name=\'to_[]\' id=\'new_end_date_"+this.counter+"\' type=\'text\' placeholder
=\'' . $placeholder . '\'>"+
- "</input></dd>"+
+ "<a class=\'btnclose\'
href=\'javascript:void(0);\'>' . $lang_remove . '</a>"+
+ "<div class=\'form-group\'><label
for=\'new_start_date_"+this.counter+"\'>' . $lang_from . '</label>"+
+ "<input class=\'new_datepicker time form-control\'
name=\'from_[]\' id=\'new_start_date_"+this.counter+"\' type=\'text\'
placeholder =\'' . $placeholder . '\'>"+
+ "</input></div>"+
+ "<div class=\'form-group\'><label
for=\'new_end_date_"+this.counter+"\' >' . $lang_to . '</label>"+
+ "<input class=\'new_datepicker time form-control\'
name=\'to_[]\' id=\'new_end_date_"+this.counter+"\' type=\'text\' placeholder
=\'' . $placeholder . '\'>"+
+ "</input></div>"+
"</div>"';
}
else
{
$html = 'var html = "<div
class=\'date-container\'>"+
- "<a class=\'close-btn
btnclose\' href=\'javascript:void(0);\'>-</a>"+
+ "<a class=\'close-btn
btnclose\' href=\'javascript:void(0);\'></a>"+
"<div
class=\'pure-control-group\'>"+
"<label
for=\'new_start_date_"+this.counter+"\'><h4>' . $lang_from . '</h4></label>"+
"<input
class=\'new_datepicker time pure-input-2-3\' name=\'from_[]\'
id=\'new_start_date_"+this.counter+"\' type=\'text\' placeholder =\'' .
$placeholder . '\'>"+
Modified: branches/Version-2_0-branch/booking/inc/class.uievent.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uievent.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.uievent.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -617,7 +617,7 @@
{
$send->msg('email', $receiver,
$subject, $body, '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
// TODO: Inform user if something goes
wrong
}
@@ -966,7 +966,8 @@
}
}
$receipt = $this->bo->update($event);
- $this->redirect(array('menuaction' =>
'booking.uievent.edit', 'id' => $event['id']));
+ // $this->redirect(array('menuaction' =>
'booking.uievent.edit', 'id' => $event['id']));
+ $this->redirect(array('menuaction' =>
'booking.uiapplication.show', 'id' => $event['application_id']));
}
}
@@ -999,7 +1000,7 @@
$event['resources_json'] =
json_encode(array_map('intval', $event['resources']));
$event['application_link'] =
self::link(array('menuaction' => 'booking.uiapplication.show',
'id' => $event['application_id']));
- $event['cancel_link'] = self::link(array('menuaction'
=> 'booking.uievent.index'));
+ $event['cancel_link'] = self::link(array('menuaction'
=> 'booking.uiapplication.index'));
$event['editable'] = true;
$activities = $this->activity_bo->fetch_activities();
$activities = $activities['results'];
Modified: branches/Version-2_0-branch/booking/inc/class.uisend_email.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uisend_email.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/inc/class.uisend_email.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -129,7 +129,7 @@
$send->msg('email', $contact['email'],
$subject, $body, '', '', '', $from, '', 'html');
$result['ok'][] = $contact;
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$result['failed'][] = $contact;
}
Modified: branches/Version-2_0-branch/booking/js/base/common.js
===================================================================
--- branches/Version-2_0-branch/booking/js/base/common.js 2018-01-15
09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/js/base/common.js 2018-01-15
11:03:23 UTC (rev 17582)
@@ -35,9 +35,8 @@
var captionEl =
dlImage.appendChild(document.createElement('dt'));
imgEl.setAttribute('src',
v.src.replace(/&/gi, '&'));
imgEl.setAttribute('onClick',
'openModal(this)');
-
captionEl.appendChild(document.createTextNode(v.description));
+
captionEl.appendChild(document.createTextNode(v.description));
container.appendChild(dlImage);
-
});
}
});
Modified: branches/Version-2_0-branch/booking/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/booking/setup/phpgw_no.lang 2018-01-15
09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/setup/phpgw_no.lang 2018-01-15
11:03:23 UTC (rev 17582)
@@ -717,3 +717,4 @@
ftp password booking no Ftp passord
last id booking no Siste ID
do not edit! booking no Ikke endre!
+approve booking no Godkjenn
\ No newline at end of file
Modified: branches/Version-2_0-branch/booking/templates/base/application.xsl
===================================================================
--- branches/Version-2_0-branch/booking/templates/base/application.xsl
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/templates/base/application.xsl
2018-01-15 11:03:23 UTC (rev 17582)
@@ -105,7 +105,7 @@
<br />Melding fra saksbehandler ligger under historikk, deretter vises kopi av
din søknad.<br /> Skal du gi en melding til saksbehandler skriver du denne inn
i feltet under "Legg til en kommentar"</span>
</div>
</xsl:if>
-<!-- <form method="POST">
+ <!--
<form method="POST">
<div
class="pure-control-group">
<label
for="comment">
<xsl:value-of select="php:function('lang', 'Add a comment')" />
@@ -127,36 +127,40 @@
<h3>1.
<xsl:value-of select="php:function('lang', 'History and comments (%1)',
count(application/comments/author))" /></h3>
</legend>
</div>
- <table
class="historyTable">
- <tr>
-
<th><xsl:value-of select="php:function('lang', 'Time')" /></th>
-
<th><xsl:value-of select="php:function('lang', 'Comment')" /></th>
- </tr>
+ <table
class="historyTable">
+ <tr>
+ <th>
+
<xsl:value-of select="php:function('lang', 'Time')" />
+ </th>
+ <th>
+
<xsl:value-of select="php:function('lang', 'Comment')" />
+ </th>
+ </tr>
- <xsl:for-each
select="application/comments[author]">
+ <xsl:for-each
select="application/comments[author]">
- <tr>
- <td>
-
<xsl:value-of select="php:function('pretty_timestamp', time)"/>: <xsl:value-of
select="author"/>
- </td>
-
<xsl:choose>
-
<xsl:when
test='contains(comment,"bookingfrontend.uidocument_building.download")'>
-
<td>
-
<xsl:value-of select="comment" disable-output-escaping="yes"/>
-
</td>
-
</xsl:when>
-
<xsl:otherwise>
-
<td>
-
<xsl:value-of select="comment"/>
-
</td>
-
</xsl:otherwise>
-
</xsl:choose>
- </tr>
+ <tr>
+
<td>
+
<xsl:value-of select="php:function('pretty_timestamp', time)"/>:
<xsl:value-of select="author"/>
+
</td>
+
<xsl:choose>
+
<xsl:when
test='contains(comment,"bookingfrontend.uidocument_building.download")'>
+
<td>
+
<xsl:value-of select="comment"
disable-output-escaping="yes"/>
+
</td>
+
</xsl:when>
+
<xsl:otherwise>
+
<td>
+
<xsl:value-of select="comment"
disable-output-escaping="yes"/>
+
</td>
+
</xsl:otherwise>
+
</xsl:choose>
+ </tr>
- </xsl:for-each>
+ </xsl:for-each>
- </table>
+ </table>
</div>
</div>
@@ -167,7 +171,8 @@
<h3>1.1
<xsl:value-of select="php:function('lang', 'attachments')" /></h3>
</legend>
</div>
- <div
id="attachments_container"/><br/>
+ <div
id="attachments_container"/>
+ <br/>
<form method="POST"
enctype='multipart/form-data' id='file_form'>
<input
name="name" id='field_name' type='file' >
<xsl:attribute name='title'>
@@ -186,7 +191,8 @@
<xsl:text>Max 2M:: jpg, png, gif, xls, xlsx, doc, docx, txt , pdf, odt,
ods</xsl:text>
</xsl:attribute>
</input>
- <br/><br/>
+ <br/>
+ <br/>
<input
type="submit" value="{php:function('lang', 'Add attachment')}" />
</form>
@@ -213,7 +219,7 @@
<xsl:value-of select="php:function('lang', 'Description')" />
</label>
<span>
-
<xsl:value-of select="application/description"/>
+
<xsl:value-of select="application/description" disable-output-escaping="yes"/>
</span>
</div>
<div
class="pure-control-group">
@@ -222,7 +228,7 @@
<xsl:value-of select="php:function('lang', 'Extra info')" />
</h4>
</label>
- <xsl:value-of
select="application/equipment"/>
+ <xsl:value-of
select="application/equipment" disable-output-escaping="yes"/>
</div>
</div>
@@ -443,8 +449,8 @@
<xsl:value-of select="php:function('lang', 'organization number')" />
</label>
<span>
-
<xsl:value-of select="application/customer_organization_number"/>
- </span>
+
<xsl:value-of select="application/customer_organization_number"/>
+ </span>
</xsl:if>
<xsl:if
test="application/customer_identifier_type = 'ssn'">
<label>
@@ -451,8 +457,8 @@
<xsl:value-of select="php:function('lang', 'Date of birth or SSN')" />
</label>
<span>
-
<xsl:value-of select="application/customer_ssn"/>
- </span>
+
<xsl:value-of select="application/customer_ssn"/>
+ </span>
</xsl:if>
</div>
</div>
@@ -505,20 +511,21 @@
</h3>
</legend>
</div>
- <form
method="POST">
+ <form
method="POST">
+ <div
class="pure-control-group">
+
<label for="comment">
+
<xsl:value-of select="php:function('lang', 'Add a comment')" />
+
</label>
+
<textarea name="comment" id="comment" style="width: 60%; height:
7em"></textarea>
+
<br/>
+ </div>
+ <div
class="pure-control-group">
+
<label> </label>
+
<input type="submit" value="{php:function('lang', 'Add comment')}" />
+ </div>
+ </form>
+ <br/>
<div
class="pure-control-group">
- <label
for="comment">
-
<xsl:value-of select="php:function('lang', 'Add a comment')" />
- </label>
-
<textarea name="comment" id="comment" style="width: 60%; height:
7em"></textarea>
- <br/>
- </div>
- <div
class="pure-control-group">
-
<label> </label>
- <input
type="submit" value="{php:function('lang', 'Add comment')}" />
- </div>
- </form><br/>
- <div
class="pure-control-group">
<xsl:if
test="application/case_officer/is_current_user">
<form method="POST" style="display:inline">
<input type="hidden" name="unassign_user"/>
Modified: branches/Version-2_0-branch/booking/templates/base/event_edit.xsl
===================================================================
--- branches/Version-2_0-branch/booking/templates/base/event_edit.xsl
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/booking/templates/base/event_edit.xsl
2018-01-15 11:03:23 UTC (rev 17582)
@@ -568,11 +568,17 @@
<div class="form-buttons">
<input type="submit" class="pure-button
pure-button-primary">
<xsl:attribute name="value">
- <xsl:value-of
select="php:function('lang', 'Send')"/>
+ <xsl:value-of
select="php:function('lang', 'approve')"/>
</xsl:attribute>
</input>
<a class="cancel pure-button pure-button-primary">
<xsl:attribute name="href">
+ <xsl:value-of
select="event/application_link"/>
+ </xsl:attribute>
+ <xsl:value-of select="php:function('lang',
'back')" />
+ </a>
+ <a class="cancel pure-button pure-button-primary">
+ <xsl:attribute name="href">
<xsl:value-of
select="event/cancel_link"/>
</xsl:attribute>
<xsl:value-of select="php:function('lang',
'Cancel')" />
Index: branches/Version-2_0-branch/bookingfrontend
===================================================================
--- branches/Version-2_0-branch/bookingfrontend 2018-01-15 09:53:13 UTC (rev
17581)
+++ branches/Version-2_0-branch/bookingfrontend 2018-01-15 11:03:23 UTC (rev
17582)
Property changes on: branches/Version-2_0-branch/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
/branches/dev-syncromind-2/bookingfrontend:14933-16846
/branches/stavangerkommune/bookingfrontend:9468-12740,12986
-/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617,15621-15630,15714-15764,15813-15814,15820-15849,15889-15900,15902-16046,16101-16130,16144-16212,16297-16305,16307-16314,16316-16318,16385,16387,16393-16395,16399-16402,16586-16588,16603-16608,16734-16739,16752-16755,16785-16788,16796-16802,16835-16836,16846-16847,16908-16909,16946,16948,16988-16999,17126-17132,17134-17143,17152-17157,17169-17173,17175-17188,17190-17195,17214,17303-17311,17344-17346,17349-17351,17353-17354,17356-17357,17370,17372-17378,17394-17424,17432-17477,17491,17493-17509
\ No newline at end of property
+/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617,15621-15630,15714-15764,15813-15814,15820-15849,15889-15900,15902-16046,16101-16130,16144-16212,16297-16305,16307-16314,16316-16318,16385,16387,16393-16395,16399-16402,16586-16588,16603-16608,16734-16739,16752-16755,16785-16788,16796-16802,16835-16836,16846-16847,16908-16909,16946,16948,16988-16999,17126-17132,17134-17143,17152-17157,17169-17173,17175-17188,17190-17195,17214,17303-17311,17344-17346,17349-17351,17353-17354,17356-17357,17370,17372-17378,17394-17424,17432-17477,17491,17493-17509,17516-17581
\ No newline at end of property
Modified: branches/Version-2_0-branch/bookingfrontend/inc/class.bosearch.inc.php
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/inc/class.bosearch.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/bookingfrontend/inc/class.bosearch.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -29,7 +29,7 @@
if (!$types)
{
- $types = array('building', 'resource');//default
+ $types = array('building', 'resource',
'organization');//default
}
if ($type = phpgw::get_var('type', 'string', 'REQUEST',
null))
@@ -67,7 +67,7 @@
$_filter_building['id'] = $building_id;
}
-// if(in_array('building', $types))
+ if(in_array('building', $types))
{
$bui_result =
$this->sobuilding->read(array("query" => $searchterm, "sort" => "name",
@@ -90,7 +90,7 @@
}
// _debug_array($bui_result);
-// if (in_array('organization', $types))
+ if (in_array('organization', $types))
{
$org_result =
$this->soorganization->read(array("query" => $searchterm, "sort" => "name",
"dir" => "asc", "filters" =>
array("active" => "1")));
@@ -107,7 +107,7 @@
}
}
-// if(in_array('resource', $types))
+ if(in_array('resource', $types))
{
$_filter_resource = array("active" => "1");
Modified:
branches/Version-2_0-branch/bookingfrontend/inc/class.uiapplication.inc.php
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/inc/class.uiapplication.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/bookingfrontend/inc/class.uiapplication.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -27,12 +27,14 @@
$this->redirect(array('menuaction' =>
'bookingfrontend.uisearch.index'));
}
- if ($_SERVER['REQUEST_METHOD'] == 'POST' &&
$_POST['comment'])
+ $comment = phpgw::get_var('comment', 'string', 'POST');
+
+ if ($_SERVER['REQUEST_METHOD'] == 'POST' && $comment)
{
- $this->add_comment($application,
$_POST['comment']);
+ $this->add_comment($application, $comment);
$this->set_display_in_dashboard($application,
true, array('force' => true));
$application['frontend_modified'] = 'now';
-
$this->bo->send_admin_notification($application, $_POST['comment']);
+
$this->bo->send_admin_notification($application, $comment);
$receipt = $this->bo->update($application);
$this->redirect(array('menuaction' =>
$this->url_prefix . '.show', 'id' => $application['id'],
Modified:
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/application.xsl
===================================================================
---
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/application.xsl
2018-01-15 09:53:13 UTC (rev 17581)
+++
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/application.xsl
2018-01-15 11:03:23 UTC (rev 17582)
@@ -133,7 +133,7 @@
<div class="col-lg-12 application-group bg-light">
<div class="col-lg-12">
- <div class="heading">1. <xsl:value-of
select="php:function('lang', 'History and comments (%1)',
count(application/comments/author))" /></div>
+ <div class="heading"><xsl:value-of
select="php:function('lang', 'History and comments (%1)',
count(application/comments/author))" /></div>
<xsl:for-each select="application/comments[author]">
<xsl:value-of
select="php:function('pretty_timestamp', time)"/>: <xsl:value-of
select="author"/>
@@ -197,7 +197,7 @@
<div class="col-lg-12 application-group bg-light">
- <div class="heading">2. <xsl:value-of
select="php:function('lang', 'Why?')" /></div>
+ <div class="heading"><xsl:value-of
select="php:function('lang', 'Why?')" /></div>
<xsl:value-of select="php:function('lang',
'Activity')" />
@@ -221,7 +221,7 @@
<!-- Steg 3 -->
<div class="col-lg-12 application-group bg-light">
- <div class="heading">3. <xsl:value-of
select="php:function('lang', 'Where?')" /></div>
+ <div class="heading"><xsl:value-of
select="php:function('lang', 'Where?')" /></div>
<xsl:value-of select="php:function('lang',
'Building')" />
<xsl:value-of select="application/building_name"/>
@@ -242,7 +242,7 @@
<!-- Steg 4 -->
<div class="col-lg-12 application-group bg-light">
- <div class="heading">4. <xsl:value-of
select="php:function('lang', 'When?')" /></div>
+ <div class="heading"><xsl:value-of
select="php:function('lang', 'When?')" /></div>
<script type="text/javascript">
var allocationParams = {};
var bookingParams = {};
@@ -300,7 +300,7 @@
<!-- Steg 5 -->
<div class="col-lg-12 application-group bg-light">
- <div class="heading">5. <xsl:value-of
select="php:function('lang', 'Who?')" /></div>
+ <div class="heading"><xsl:value-of
select="php:function('lang', 'Who?')" /></div>
<xsl:value-of select="php:function('lang', 'Target
audience')" />
@@ -357,7 +357,7 @@
<!-- Steg 6 -->
<div class="col-lg-12 application-group bg-light">
<dl class="form-col">
- <div class="heading">6. <xsl:value-of
select="php:function('lang', 'Contact information')" /></div>
+ <div class="heading"><xsl:value-of
select="php:function('lang', 'Contact information')" /></div>
<dt>
<label for="field_contact_name">
<xsl:value-of select="php:function('lang',
'Name')" />
@@ -388,7 +388,7 @@
<!-- Steg 7 -->
<div class="col-lg-12 application-group bg-light">
<dl class="form-col">
- <div class="heading">7. <xsl:value-of
select="php:function('lang', 'responsible applicant')" /> / <xsl:value-of
select="php:function('lang', 'invoice information')" /></div>
+ <div class="heading"><xsl:value-of
select="php:function('lang', 'responsible applicant')" /> / <xsl:value-of
select="php:function('lang', 'invoice information')" /></div>
<xsl:if test="application/customer_identifier_type
= 'organization_number'">
<dt>
<label for="field_organization_number">
@@ -416,7 +416,7 @@
<div class="col-lg-12 application-group bg-light">
<div class="heading">
- <br />8. <xsl:value-of
select="php:function('lang', 'Terms and conditions')" />
+ <br /><xsl:value-of
select="php:function('lang', 'Terms and conditions')" />
</div>
<xsl:if test="config/application_terms">
<p>
Modified:
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/application_new.xsl
===================================================================
---
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/application_new.xsl
2018-01-15 09:53:13 UTC (rev 17581)
+++
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/application_new.xsl
2018-01-15 11:03:23 UTC (rev 17582)
@@ -22,7 +22,9 @@
<!-- Steg 1 -->
<div class="col-lg-12 application-group bg-light">
- <div class="heading">1. <xsl:value-of
select="php:function('lang', 'Why?')" /></div>
+ <div class="heading">
+ <xsl:value-of select="php:function('lang',
'Why?')" />
+ </div>
<div class="form-group">
<label for="field_activity">
@@ -100,7 +102,9 @@
<!-- Steg 2-->
<div class="col-lg-12 application-group bg-light">
- <div class="heading">2. <xsl:value-of
select="php:function('lang', 'How many?')" /></div>
+ <div class="heading">
+ <xsl:value-of select="php:function('lang', 'How
many?')" />
+ </div>
<xsl:if test="config/application_howmany">
<p>
<xsl:value-of
select="config/application_howmany"/>
@@ -171,7 +175,9 @@
<div class="col-lg-12 application-group bg-light">
- <div class="heading">3. <xsl:value-of
select="php:function('lang', 'Where?')" /></div>
+ <div class="heading">
+ <xsl:value-of select="php:function('lang',
'Where?')" />
+ </div>
<xsl:if test="config/application_where">
<p>
<xsl:value-of
select="config/application_where"/>
@@ -234,120 +240,111 @@
<!-- Steg 4-->
<div class="col-lg-12 application-group bg-light">
-
- <div class="heading">4. <xsl:value-of
select="php:function('lang', 'When?')" /></div>
- <xsl:if test="config/application_when">
- <p>
- <xsl:value-of
select="config/application_when"/>
- </p>
- </xsl:if>
- <div class="form-group">
- <input type="hidden" class="form-control col-lg-4
col-md-7 col-sm-12" data-validation="application_dates">
- <xsl:attribute
name="data-validation-error-msg">
- <xsl:value-of select="php:function('lang',
'Invalid date')" />
- </xsl:attribute>
- </input>
- <xsl:for-each select="application/dates">
- <xsl:variable name="index"
select="position()-2" />
- <xsl:choose>
- <xsl:when test="position() > 1">
- <div class="date-container">
- <a href="javascript:void(0);"
class="close-btn btnclose">
- <xsl:value-of
select="php:function('lang', 'remove date')" />
- </a>
-
- <label for="start_date_{$index}">
- <xsl:value-of
select="php:function('lang', 'From')" />
- </label>
-
- <input class="newaddedpicker
form-control col-lg-4 col-md-7 col-sm-12" id="start_date_{$index}" type="text"
name="from_[]">
- <xsl:attribute name="value">
- <xsl:value-of
select="from_" />
- </xsl:attribute>
- <xsl:attribute name="readonly">
-
<xsl:text>readonly</xsl:text>
- </xsl:attribute>
- </input>
-
-
- <label for="end_date_{$index}">
- <xsl:value-of
select="php:function('lang', 'To')" />
- </label>
-
-
- <input class="newaddedpicker
form-control col-lg-4 col-md-7 col-sm-12" id="end_date_{$index}" type="text"
name="to_[]">
- <xsl:attribute name="value">
- <xsl:value-of
select="to_"/>
- </xsl:attribute>
- <xsl:attribute name="readonly">
-
<xsl:text>readonly</xsl:text>
- </xsl:attribute>
- </input>
-
- </div>
- </xsl:when>
-
-
- <xsl:otherwise>
- <div class="form-group">
-
- <a href="javascript:void(0);"
class="">
- <xsl:value-of
select="php:function('lang', 'remove date')" />
- </a>
-
- <br/>
-
-
- <div class="form-group col-lg-4
col-md-7 col-sm-12 no-padding-left">
- <label for="start_date">
- <xsl:value-of
select="php:function('lang', 'From')" />
- </label>
-
-
-
-
- <input class="form-control"
id="start_date" type="text" name="from_[]">
- <xsl:attribute
name="value">
- <xsl:value-of
select="from_" />
- </xsl:attribute>
- <xsl:attribute
name="readonly">
-
<xsl:text>readonly</xsl:text>
- </xsl:attribute>
- </input>
+ <div class="heading"> <xsl:value-of
select="php:function('lang', 'When?')" /></div>
+ <xsl:if test="config/application_when">
+ <p><xsl:value-of
select="config/application_when"/></p>
+ </xsl:if>
+
+ <div class="form-group" id="dates-container">
+ <input type="hidden" class="form-control"
data-validation="application_dates">
+ <xsl:attribute
name="data-validation-error-msg">
+ <xsl:value-of
select="php:function('lang', 'Invalid date')" />
+ </xsl:attribute>
+ </input>
+ <input type="hidden" id="date_format" />
+ <xsl:for-each select="application/dates">
+ <xsl:variable name="index"
select="position()-2"/>
+ <xsl:choose>
+ <xsl:when test="position() > 1">
+ <div class="date-container">
+ <a href="javascript:void(0);"
class="btnclose">
+ <xsl:value-of
select="php:function('lang', 'Remove date')" />
+ </a>
+ <div class="form-group">
+ <label
for="start_date_{$index}">
+ <xsl:value-of
select="php:function('lang', 'From')" />
+ </label>
+ <input
class="newaddedpicker datetime form-control" id="start_date_{$index}"
type="text" name="from_[]">
+ <xsl:attribute
name="value">
+ <xsl:value-of
select="from_" />
+ </xsl:attribute>
+ <xsl:attribute
name="readonly">
+
<xsl:text>readonly</xsl:text>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="form-group">
+ <label
for="end_date_{$index}">
+ <xsl:value-of
select="php:function('lang', 'To')" />
+ </label>
+ <xsl:if
test="activity/error_msg_array/end_date != ''">
+ <xsl:variable
name="error_msg">
+ <xsl:value-of
select="activity/error_msg_array/end_date" />
+ </xsl:variable>
+ <div
class='input_error_msg'>
+ <xsl:value-of
select="php:function('lang', $error_msg)" />
+ </div>
+ </xsl:if>
+ <input
class="newaddedpicker datetime form-control" id="end_date_{$index}" type="text"
name="to_[]">
+ <xsl:attribute
name="value">
+ <xsl:value-of
select="to_"/>
+ </xsl:attribute>
+ <xsl:attribute
name="readonly">
+
<xsl:text>readonly</xsl:text>
+ </xsl:attribute>
+ </input>
+ </div>
</div>
-
- <div class="form-group col-lg-4
col-md-7 col-sm-12 no-padding-left">
- <label for="end_date">
- <xsl:value-of
select="php:function('lang', 'To')" />
- </label>
-
-
- <input class="form-control"
id="end_date" type="text" name="to_[]">
- <xsl:attribute
name="value">
- <xsl:value-of
select="to_"/>
- </xsl:attribute>
- <xsl:attribute
name="readonly">
-
<xsl:text>readonly</xsl:text>
- </xsl:attribute>
-
- </input>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="date-container">
+ <a href="javascript:void(0);"
class="btnclose">
+ <xsl:value-of
select="php:function('lang', 'Remove date')" />
+ </a>
+ <div class="form-group">
+ <label for="start_date">
+ <xsl:value-of
select="php:function('lang', 'From')" />
+ </label>
+ <input class="datetime
form-control" id="start_date" type="text" name="from_[]">
+ <xsl:attribute
name="value">
+ <xsl:value-of
select="from_"/>
+ </xsl:attribute>
+ <xsl:attribute
name="readonly">
+
<xsl:text>readonly</xsl:text>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="form-group">
+ <label for="end_date">
+ <xsl:value-of
select="php:function('lang', 'To')" />
+ </label>
+ <xsl:if
test="activity/error_msg_array/end_date != ''">
+ <xsl:variable
name="error_msg">
+ <xsl:value-of
select="activity/error_msg_array/end_date" />
+ </xsl:variable>
+ <div
class='input_error_msg'>
+ <xsl:value-of
select="php:function('lang', $error_msg)" />
+ </div>
+ </xsl:if>
+ <input class="datetime
form-control" id="end_date" type="text" name="to_[]">
+ <xsl:attribute
name="value">
+ <xsl:value-of
select="to_"/>
+ </xsl:attribute>
+ <xsl:attribute
name="readonly">
+
<xsl:text>readonly</xsl:text>
+ </xsl:attribute>
+ </input>
+ </div>
</div>
- </div>
- <!--div id="dtBox"></div-->
- </xsl:otherwise>
-
-
-
- </xsl:choose>
- </xsl:for-each>
- </div>
-
- <a href="javascript:void(0);" id="add-date-link">
- <xsl:value-of select="php:function('lang', 'Add
another date')" />
- </a>
-
-
-
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </div>
+ <div class="pure-control-group">
+ <a href="javascript:void(0);"
id="add-date-link">
+ <xsl:value-of select="php:function('lang',
'Add another date')" />
+ </a>
+ </div>
</div>
@@ -356,7 +353,9 @@
<div class="col-lg-12 application-group bg-light">
- <div class="heading">5. <xsl:value-of
select="php:function('lang', 'Who?')" /></div>
+ <div class="heading">
+ <xsl:value-of select="php:function('lang',
'Who?')" />
+ </div>
<xsl:if test="config/application_who">
<p>
<xsl:value-of select="config/application_who"/>
@@ -402,7 +401,9 @@
<div class="col-lg-12 application-group bg-light">
- <div class="heading">6. <xsl:value-of
select="php:function('lang', 'Contact information')" /></div>
+ <div class="heading">
+ <xsl:value-of select="php:function('lang',
'Contact information')" />
+ </div>
<xsl:if test="config/application_contact_information">
<p>
<xsl:value-of
select="config/application_contact_information"/>
@@ -491,7 +492,9 @@
<div class="col-lg-12 application-group bg-light">
- <div class="heading">7. <xsl:value-of
select="php:function('lang', 'responsible applicant')" /> / <xsl:value-of
select="php:function('lang', 'invoice information')" /></div>
+ <div class="heading">
+ <xsl:value-of select="php:function('lang',
'responsible applicant')" /> / <xsl:value-of select="php:function('lang',
'invoice information')" />
+ </div>
<xsl:if
test="config/application_responsible_applicant">
<p>
<xsl:value-of
select="config/application_responsible_applicant"/>
@@ -511,7 +514,9 @@
<div class="col-lg-12 application-group bg-light">
- <div class="heading">8. <xsl:value-of
select="php:function('lang', 'Terms and conditions')" /></div>
+ <div class="heading">
+ <xsl:value-of select="php:function('lang', 'Terms
and conditions')" />
+ </div>
<input type="hidden"
data-validation="regulations_documents">
<xsl:attribute name="data-validation-error-msg">
<xsl:value-of select="php:function('lang',
'You must accept to follow all terms and conditions of lease first')" />
@@ -537,7 +542,9 @@
<div class="col-lg-12 application-group bg-light">
- <div class="heading">9. <xsl:value-of
select="php:function('lang', 'Attachment')" /></div>
+ <div class="heading">
+ <xsl:value-of select="php:function('lang',
'Attachment')" />
+ </div>
<label for="field_name">
Modified:
branches/Version-2_0-branch/bookingfrontend/templates/aalesund/search.xsl
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/templates/aalesund/search.xsl
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/bookingfrontend/templates/aalesund/search.xsl
2018-01-15 11:03:23 UTC (rev 17582)
@@ -7,14 +7,17 @@
<a href="#" class="scrollup">
<xsl:value-of select="php:function('lang', 'scroll to top')" />
</a>
- <div class="jumbotron text-center">
+ <div class="jumbotron">
- <div class="container header-text">
- <a href="{site_url}"><p>AKTIV KOMMUNE</p>
- <h2>Ålesund</h2></a>
+ <div class="header-text">
+ <a href="{site_url}">
+ <p class="header-style-m">Din portal til</p>
+ <p class="header-style-l">AKTIVITETER OG LOKALER</p>
+ <p class="header-style-m">Nært deg.</p>
+ </a>
</div>
</div>
- <div class="container-fluid main-container">
+ <div class="container-fluid main-container" id="main-page">
<section class="text-center">
<div class="container-fluid">
@@ -51,7 +54,7 @@
<span class="input-group-btn">
<button class="btn btn-default search-button"
id="submit_searchterm" type="submit">
- <i class="icon ion-search text-primary"/>
+ <i class="icon ion-search"/>
</button>
</span>
@@ -72,7 +75,7 @@
</xsl:attribute>
</input> -->
- <p id="adv-search-toggler" class="adv-search-button
text-right text-primary">Avansert søk</p>
+ <p id="adv-search-toggler" class="adv-search-button
text-right">Avansert søk</p>
</div>
</div>
@@ -188,7 +191,9 @@
</div>
</div>
- <button id="update-search-result" class="btn btn-primary">Oppdater
resultat</button>
+ <button id="update-search-result" class="btn btn-main">
+ <xsl:value-of select="php:function('lang', 'Update results')"
/>
+ </button>
</div>
Modified: branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/controller/inc/class.uicalendar.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -57,13 +57,18 @@
private $so_check_list;
private $so_check_item;
private $location_finder;
+ var $type_id;
+ private $bo;
+ private $bocommon;
public $public_functions = array
(
'view_calendar_for_month' => true,
'view_calendar_for_year' => true,
+ 'view_calendar_for_year2' => true,
'view_calendar_year_for_locations' => true,
'view_calendar_month_for_locations' => true,
- 'update_bookmark' => true
+ 'update_bookmark' => true,
+ 'query' => true
);
public function __construct()
@@ -76,6 +81,10 @@
$delete = $GLOBALS['phpgw']->acl->check('.control',
PHPGW_ACL_DELETE, 'controller'); //8
$manage = $GLOBALS['phpgw']->acl->check('.control', 16,
'controller'); //16
+
+ $this->bo = CreateObject('property.bolocation', true);
+ $this->bocommon = & $this->bo->bocommon;
+ $this->type_id = $this->bo->type_id;
$this->so = CreateObject('controller.socheck_list');
$this->so_control =
CreateObject('controller.socontrol');
@@ -475,7 +484,301 @@
self::render_template_xsl('calendar/calendar_year_no_loc', $data);
}
}
+
+ public function view_calendar_for_year2($location_array = null,
$year = null)
+ {
+ //$location_array = phpgw::get_var('location_array');
+ //_debug_array($location_array['data']);
+// if(!empty($location_array))
+// {
+// _debug_array($location_array['data']);
+//// foreach ($location_array as $loc_no => $currval)
+//// {
+//// var_dump($loc_no);
+//// }
+// }
+//
+ $location_code = phpgw::get_var('location_code');
+ if($year == null)
+ $year = phpgw::get_var('year');
+ $role = phpgw::get_var('role', 'int');
+ $repeat_type = phpgw::get_var('repeat_type');
+
+ //show only controls that are not done
+ $selected_ctrl_status =
phpgw::get_var('current_ctrl_status');
+
+ // Validates year. If year is not set, current year is
chosen
+ $year = $this->validate_year($year);
+
+ // Validates repeat type.
+ $repeat_type =
$this->validate_repeat_type($repeat_type);
+
+ // Validates role.
+// $role = $this->validate_role($role);
+ // Gets timestamp of first day in year
+ $from_date_ts = $this->get_start_date_year_ts($year);
+
+ // Gets timestamp of first day in next year
+ $to_date_ts = $this->get_end_date_year_ts($year);
+
+ // Array that will be populated with controls and
calendar objects that will be sent to view
+ $controls_calendar_array = array();
+
+ // Validates location_code. If not set, first location
among assigned locations
+ $location_code =
$this->validate_location_code($location_code);
+
+// if ($location_code != null && $location_code != "")
+// {
+ if(is_array($location_array))
+ {
+ $locations_with_control = array();
+ foreach ($location_array as $loc_code
=>&$curr_pos)
+ {
+ $curr_pos['location_code'] = $loc_code;
+ //_debug_array($curr_pos);
+ }
+
+ foreach ($location_array as $curr_loc)
+ {
+ //$curr = array();
+ //$curr['location_code'] =
$curr_loc['location_code'];
+ //$curr['controls_calendar_array'] =
$curr_loc['controls_calendar_array'];
+
if(is_array($curr_loc['controls_calendar_array']) &&
!empty($curr_loc['controls_calendar_array']))
+ {
+ $locations_with_control[] =
$curr_loc;
+ }
+ }
+ //_debug_array($locations_with_control);
+
+ $heading_array =
year_calendar::get_heading_array();
+// _debug_array($heading_array);
+
+ $roles_array = $this->so_control->get_roles();
+
+ $repeat_type_array = array(
+ array('id' => "0", 'value' => "Dag"),
+ array('id' => "1", 'value' => "Uke"),
+ array('id' => "2", 'value' => "Måned"),
+ array('id' => "3", 'value' => "År")
+ );
+
+ $ctrl_status_array = array(
+ array('id' => "CONTROL_REGISTERED",
'value' => "CONTROL_REGISTERED"),
+ array('id' => "CONTROL_PLANNED",
'value' => "CONTROL_PLANNED"),
+ array('id' =>
"CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS", 'value' =>
"CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS"),
+ array('id' =>
"CONTROL_DONE_IN_TIME_WITHOUT_ERRORS", 'value' =>
"CONTROL_DONE_IN_TIME_WITHOUT_ERRORS"),
+ array('id' =>
"CONTROL_DONE_WITH_ERRORS", 'value' => "CONTROL_DONE_WITH_ERRORS"),
+ array('id' => "CONTROL_NOT_DONE",
'value' => "CONTROL_NOT_DONE"),
+ //array('id' =>
"CONTROL_NOT_DONE_WITH_PLANNED_DATE", 'value' =>
"CONTROL_NOT_DONE_WITH_PLANNED_DATE"),
+ array('id' => "CONTROL_CANCELED",
'value' => "CONTROL_CANCELED")
+ );
+
+
$GLOBALS['phpgw']->translation->add_app('property');
+
+ $district_list =
$this->bocommon->select_district_list('filter', $this->district_id);
+
+ $part_of_town_list =
execMethod('property.bogeneric.get_list', array('type' => 'part_of_town',
+ 'selected' => $part_of_town_id));
+ $location_type_list =
execMethod('property.soadmin_location.select_location_type');
+
+ array_unshift($district_list, array('id' => '',
'name' => lang('select')));
+ array_unshift($part_of_town_list, array('id' =>
'', 'name' => lang('select')));
+ array_unshift($location_type_list, array('id'
=> '', 'name' => lang('select')));
+
+
+ $data = array
+ (
+ 'heading_array' => $heading_array,
+ 'location_calendar_array' =>
$locations_with_control,
+ 'roles_array' => $roles_array,
+ 'repeat_type_array' =>
$repeat_type_array,
+ 'ctrl_status_array' =>
$ctrl_status_array,
+ 'current_year' => $year,
+ 'multiple_locations' => 'yes',
+ 'filter_form' => array
+ (
+ 'district_list' =>
array('options' => $district_list),
+ 'part_of_town_list' =>
array('options' => $part_of_town_list),
+ 'location_type_list' =>
array('options' => $location_type_list),
+ ),
+ 'update_action' =>
self::link(array('menuaction' => 'controller.uicalendar.query'))
+ );
+
+ phpgwapi_jquery::load_widget('autocomplete');
+ self::add_javascript('controller',
'controller', 'ajax.js');
+ self::add_javascript('controller',
'controller', 'ajax_calendar_for_locations.js');
+
+
self::render_template_xsl(array('calendar/view_calendar_aggregated',
'calendar/check_list_status_manager',
+ 'calendar/icon_color_map',
'calendar/nav_calendar_year',
+ 'calendar/calendar_filters'), $data);
+ }
+ else
+ {
+ $GLOBALS['phpgw_info']['flags']['xslt_app'] =
true;
+ $receipt = array();
+
+ if (phpgw::get_var('phpgw_return_as') == 'json')
+ {
+ return $this->query();
+ }
+
+ $msgbox_data = array();
+ if (phpgw::get_var('phpgw_return_as') != 'json'
&& $receipt = phpgwapi_cache::session_get('phpgwapi', 'phpgw_messages'))
+ {
+
phpgwapi_cache::session_clear('phpgwapi', 'phpgw_messages');
+ $msgbox_data =
$GLOBALS['phpgw']->common->msgbox_data($receipt);
+ $msgbox_data =
$GLOBALS['phpgw']->common->msgbox($msgbox_data);
+ }
+
+
$GLOBALS['phpgw']->translation->add_app('property');
+
+ $district_list =
$this->bocommon->select_district_list('filter', $this->district_id);
+
+ $part_of_town_list =
execMethod('property.bogeneric.get_list', array('type' => 'part_of_town',
+ 'selected' => $part_of_town_id));
+ $location_type_list =
execMethod('property.soadmin_location.select_location_type');
+
+ array_unshift($district_list, array('id' => '',
'name' => lang('select')));
+ array_unshift($part_of_town_list, array('id' =>
'', 'name' => lang('select')));
+ array_unshift($location_type_list, array('id'
=> '', 'name' => lang('select')));
+
+
+ $data = array
+ (
+ 'msgbox_data' => $msgbox_data,
+ 'filter_form' => array
+ (
+ 'district_list' =>
array('options' => $district_list),
+ 'part_of_town_list' =>
array('options' => $part_of_town_list),
+ 'location_type_list' =>
array('options' => $location_type_list),
+ ),
+ 'update_action' =>
self::link(array('menuaction' => 'controller.uicalendar.query'))
+ );
+
+ self::add_javascript('controller',
'controller', 'ajax_calendar_for_locations.js');
+
+
self::render_template_xsl(array('calendar/view_calendar_aggregated'), $data);
+ }
+ }
+
+ public function get_location_calendar_for_year($location_code,
$year = null)
+ {
+ $role = phpgw::get_var('role', 'int');
+ $repeat_type = phpgw::get_var('repeat_type');
+
+ //show only controls that are not done
+ $selected_ctrl_status =
phpgw::get_var('current_ctrl_status');
+
+ // Validates year. If year is not set, current year is
chosen
+ $year = $this->validate_year($year);
+
+ // Validates repeat type.
+ $repeat_type =
$this->validate_repeat_type($repeat_type);
+
+ // Gets timestamp of first day in year
+ $from_date_ts = $this->get_start_date_year_ts($year);
+
+ // Gets timestamp of first day in next year
+ $to_date_ts = $this->get_end_date_year_ts($year);
+
+ // Array that will be populated with controls and
calendar objects that will be sent to view
+ $controls_calendar_array = array();
+
+ // Validates location_code. If not set, first location
among assigned locations
+ $location_code =
$this->validate_location_code($location_code);
+
+ $level =
$this->location_finder->get_location_level($location_code);
+
+ $user_role = true;
+
+ // Fetches buildings on property
+ $buildings_on_property =
$this->location_finder->get_buildings_on_property($user_role, $location_code,
$level);
+
+ // Fetches all controls for the location within time
period
+ $controls_for_location_array =
$this->so_control->get_controls_by_location($location_code, $from_date_ts,
$to_date_ts, $repeat_type, "return_object", $role);
+
+ // Loops through controls with repeat type day or week
+ // and populates array that contains aggregated open
cases pr month.
+ foreach ($controls_for_location_array as $control)
+ {
+ if ($control->get_repeat_type() ==
controller_control::REPEAT_TYPE_DAY | $control->get_repeat_type() ==
controller_control::REPEAT_TYPE_WEEK)
+ {
+ $cl_criteria = new
controller_check_list();
+
$cl_criteria->set_control_id($control->get_id());
+
$cl_criteria->set_location_code($location_code);
+
+ $from_month =
$this->get_start_month_for_control($control);
+ $to_month =
$this->get_end_month_for_control($control);
+
+ // Loops through controls and populates
aggregate open cases pr month array.
+ $agg_open_cases_pr_month_array =
$this->build_agg_open_cases_pr_month_array($cl_criteria, $year, $from_month,
$to_month);
+
+ $year_calendar_agg = new
year_calendar_agg($control, $year, $location_code,
"VIEW_CONTROLS_FOR_LOCATION");
+ $calendar_array =
$year_calendar_agg->build_calendar($agg_open_cases_pr_month_array);
+
+ $controls_calendar_array[] =
array("control" => $control->toArray(), "calendar_array" => $calendar_array);
+ }
+ }
+
+ $repeat_type_expr = ">=2";
+ // Fetches control ids with check lists for specified
time period
+ $control_id_with_check_list_array =
$this->so->get_check_lists_for_location($location_code, $from_date_ts,
$to_date_ts, $repeat_type_expr);
+
+ // Loops through all controls for location and
populates controls with check lists
+ $controls_for_location_array =
$this->populate_controls_with_check_lists($controls_for_location_array,
$control_id_with_check_list_array);
+
+ foreach ($controls_for_location_array as $control)
+ {
+ if ($control->get_repeat_type() ==
controller_control::REPEAT_TYPE_MONTH | $control->get_repeat_type() ==
controller_control::REPEAT_TYPE_YEAR)
+ {
+ $year_calendar = new
year_calendar($control, $year, null, $location_code, "location");
+ $calendar_array =
$year_calendar->build_calendar($control->get_check_lists_array(),
$selected_ctrl_status);
+
+ $controls_calendar_array[] =
array("control" => $control->toArray(), "calendar_array" => $calendar_array);
+ }
+ }
+
+ $location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
+
+ // Gets array of locations assigned to current user
+ $my_locations =
$this->get_my_assigned_locations($location_code);
+
+ $heading_array = year_calendar::get_heading_array();
+
+ $roles_array = $this->so_control->get_roles();
+
+ $repeat_type_array = array(
+ array('id' => "0", 'value' => "Dag"),
+ array('id' => "1", 'value' => "Uke"),
+ array('id' => "2", 'value' => "Måned"),
+ array('id' => "3", 'value' => "År")
+ );
+
+ $ctrl_status_array = array(
+ array('id' => "CONTROL_REGISTERED", 'value' =>
"CONTROL_REGISTERED"),
+ array('id' => "CONTROL_PLANNED", 'value' =>
"CONTROL_PLANNED"),
+ array('id' =>
"CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS", 'value' =>
"CONTROL_DONE_OVER_TIME_WITHOUT_ERRORS"),
+ array('id' =>
"CONTROL_DONE_IN_TIME_WITHOUT_ERRORS", 'value' =>
"CONTROL_DONE_IN_TIME_WITHOUT_ERRORS"),
+ array('id' => "CONTROL_DONE_WITH_ERRORS",
'value' => "CONTROL_DONE_WITH_ERRORS"),
+ array('id' => "CONTROL_NOT_DONE", 'value' =>
"CONTROL_NOT_DONE"),
+ //array('id' =>
"CONTROL_NOT_DONE_WITH_PLANNED_DATE", 'value' =>
"CONTROL_NOT_DONE_WITH_PLANNED_DATE"),
+ array('id' => "CONTROL_CANCELED", 'value' =>
"CONTROL_CANCELED")
+ );
+
+ $data = array
+ (
+ 'heading_array' => $heading_array,
+ 'controls_calendar_array' =>
$controls_calendar_array,
+ 'roles_array' => $roles_array,
+ 'repeat_type_array' => $repeat_type_array,
+ 'ctrl_status_array' => $ctrl_status_array,
+ 'current_year' => $year
+ );
+
+ return $data;
+ }
+
public function view_calendar_year_for_locations()
{
static $_location_name = array();
@@ -1163,7 +1466,64 @@
public function query()
{
+ $year = date('Y');
+ $from_date_ts = mktime(0, 0, 0, 1, 1, $year);
+ $to_date_ts = mktime(0, 0, 0, 1, 1, $year+1);
+ $loc_array = array();
+ $loc_checklist_array = array();
+
+ $params = array(
+ 'start' => phpgw::get_var('start', 'int',
'REQUEST', 0),
+ 'results' => phpgw::get_var('length', 'int',
'REQUEST', 0),
+ 'order' =>
$columns[$order[0]['column']]['data'],
+ 'sort' => $order[0]['dir'],
+ 'allrows' => true,
+ 'district_id' => phpgw::get_var('district_id',
'int'),
+ 'cat_id' => phpgw::get_var('cat_id', 'int'),
+ 'status' => phpgw::get_var('status'),
+ 'part_of_town_id' =>
phpgw::get_var('part_of_town_id', 'int'),
+ 'location_code' =>
phpgw::get_var('location_code'),
+ 'type_id' => phpgw::get_var('location_level',
'int', 'REQUEST', 1)
+ );
+
+ $values = $this->bo->read($params);
+
+ foreach ($values as &$entry)
+ {
+ $loc_array[] = $entry['location_code'];
+ }
+ foreach ($loc_array as $curr_loc)
+ {
+ //get checklists for found locations
+ $loc_checklist_array[$curr_loc] =
$this->get_location_calendar_for_year($curr_loc, $year);
+ $loc_checklist_array[$curr_loc]['loc_name'] =
$this->bo->get_location_name($curr_loc);
+
+ }
+
+ foreach ($loc_checklist_array as &$curr_loc_checklist)
+ {
+
if(empty($curr_loc_checklist['controls_calendar_array']))
+ {
+ $curr_loc_checklist = [];
+ }
+ }
+// _debug_array($loc_checklist_array);
+ //die();
+
+ $result_data = array
+ (
+ 'results' => $loc_checklist_array
+ );
+
+ $this->view_calendar_for_year2($loc_checklist_array,
$year);
+
+ //$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'controller.uicalendar.view_calendar_for_year2',
'location_array' => $loc_checklist_array));
+
+
+
+ //return $this->jquery_results($result_data);
+ //return $this->jquery_results($loc_checklist_array);
}
public function update_bookmark()
Modified: branches/Version-2_0-branch/controller/inc/class.uicheck_list.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.uicheck_list.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/controller/inc/class.uicheck_list.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -2125,7 +2125,7 @@
{
$mail->Send();
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
phpgwapi_cache::message_set($e->getMessage(),
'error');
}
@@ -2139,7 +2139,7 @@
{
$rc = $send->msg('email', $to_address,
$subject, $message, $msgtype = 'Ical', $cc = '', $bcc = '', $from_address,
$from_name, 'html', $mime_boundary);//, array($attachment));
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
phpgwapi_cache::message_set($e->getMessage(), 'error');
}
Modified:
branches/Version-2_0-branch/controller/inc/class.uicontrol_group.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.uicontrol_group.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/controller/inc/class.uicontrol_group.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -209,7 +209,7 @@
public function edit()
{
- //
phpgwapi_jquery::formvalidator_generate(array('location','date', 'security',
'file'));
+ //
phpgwapi_jquery::formvalidator_generate(array('location','date', 'security',
'file')); a
self::add_javascript('controller', 'controller',
'ajax.js');
$tabs = array
Copied:
branches/Version-2_0-branch/controller/js/controller/ajax_calendar_for_locations.js
(from rev 17581, trunk/controller/js/controller/ajax_calendar_for_locations.js)
===================================================================
---
branches/Version-2_0-branch/controller/js/controller/ajax_calendar_for_locations.js
(rev 0)
+++
branches/Version-2_0-branch/controller/js/controller/ajax_calendar_for_locations.js
2018-01-15 11:03:23 UTC (rev 17582)
@@ -0,0 +1,394 @@
+var myColumnDefs = new Array();
+var oTable = null;
+
+$(document).ready(function ()
+{
+ $("#location_type").change(function ()
+ {
+ get_table_def();
+
+ var oArgs = {menuaction:
'controller.uicontrol_register_to_location.get_location_type_category',
location_type: $(this).val()};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ var htmlString = "<option value=''>Velg</option>";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl,
+ success: function (data)
+ {
+ if (data != null)
+ {
+ var obj = data;
+
+ $.each(obj, function (i)
+ {
+ htmlString += "<option value='"
+ obj[i].id + "'>" + obj[i].name + "</option>";
+ });
+
+
$("#location_type_category").html(htmlString);
+ $("#loc1").html("<option
value=''>Velg</option>");
+ $("#loc2").html("<option
value=''>Velg</option>");
+ }
+ else
+ {
+ htmlString += "<option
value=''>Velg</option>";
+ $("#part_of_town_id").html(htmlString);
+ $("#loc1").html(htmlString);
+ $("#loc2").html(htmlString);
+ }
+ }
+ });
+ });
+
+ $("#location_type_category").change(function ()
+ {
+ var level = $("#location_type").val();
+ update_loc(level);
+ });
+
+ var oArgs = {menuaction: 'property.bolocation.get_locations_by_name'};
+ var baseUrl = phpGWLink('index.php', oArgs, true);
+ var location_type = 1;
+
+ //update part of town category based on district
+ $("#district_id").change(function ()
+ {
+ var district_id = $(this).val();
+ var oArgs = {menuaction:
'controller.uicontrol_register_to_location.get_district_part_of_town'};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ var htmlString = "";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl + "&district_id=" + district_id,
+ success: function (data)
+ {
+ if (data != null)
+ {
+ var obj = JSON.parse(data);
+
+ $.each(obj, function (i)
+ {
+ htmlString += "<option value='"
+ obj[i].id + "'>" + obj[i].name + "</option>";
+ });
+
+ $("#part_of_town_id").html(htmlString);
+ $("#loc1").html("<option
value=''>Velg</option>");
+ $("#loc2").html("<option
value=''>Velg</option>");
+ }
+ else
+ {
+ htmlString += "<option
value=''>Velg</option>";
+ $("#part_of_town_id").html(htmlString);
+ $("#loc1").html(htmlString);
+ $("#loc2").html(htmlString);
+ }
+ }
+ });
+
+ $("#search-location_code").val('');
+ });
+
+
+ $("#part_of_town_id").change(function ()
+ {
+ var oArgs = {menuaction:
'controller.uicontrol_register_to_location.get_locations', child_level: 1,
part_of_town_id: $(this).val()};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ var htmlString = "<option value=''>Velg</option>";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl,
+ success: function (data)
+ {
+ if (data != null)
+ {
+ var obj = data;
+
+ $.each(obj, function (i)
+ {
+ htmlString += "<option value='"
+ obj[i].id + "'>" + obj[i].id + " " + obj[i].name + "</option>";
+ });
+
+ $("#loc1").html(htmlString);
+ $("#loc2").html("<option
value=''>Velg</option>");
+ }
+ else
+ {
+ htmlString = "<option>Ingen</option>";
+ $("#loc1").html(htmlString);
+ $("#loc2").html(htmlString);
+ }
+ }
+ });
+
+ $("#search-location_code").val('');
+ });
+
+ $("#loc1").change(function ()
+ {
+ var oArgs = {menuaction:
'controller.uicontrol_register_to_location.get_locations', child_level: 2,
location_code: $(this).val()};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ var htmlString = "<option value=''>Velg</option>";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl,
+ success: function (data)
+ {
+ if (data != null)
+ {
+ var obj = data;
+
+ $.each(obj, function (i)
+ {
+ htmlString += "<option value='"
+ obj[i].id + "'>" + obj[i].id + " " + obj[i].name + "</option>";
+ });
+
+ $("#loc2").html(htmlString);
+ }
+ else
+ {
+ htmlString = "<option>Ingen</option>";
+ $("#loc2").html(htmlString);
+ }
+ }
+ });
+
+ $("#search-location_code").val('');
+
+ });
+
+ $("#loc2").change(function ()
+ {
+ $("#search-location_code").val('');
+ update_location_table();
+ });
+
+
+
+ $("#search").click(function (e)
+ {
+ update_location_table();
+ });
+
+/*
+ * Display calendar based on selection
+ */
+ $("#acl_form").on("submit", function (e)
+ {
+ e.preventDefault();
+ //update_location_table();
+
+ var oArgs = {
+ menuaction: 'controller.uicalendar.query',
+ location_level: $("#location_type").val(),
+ cat_id: $("#location_type_category").val(),
+ district_id: $("#district_id").val(),
+ part_of_town_id: $("#part_of_town_id").val(),
+ //location_code: $("#loc1").val(),
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ window.location.href = requestUrl;
+
+ //alert(requestUrl);
+
+/* $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl,
+ success: function (data)
+ {
+ if (data)
+ {
+ if (data.sessionExpired)
+ {
+ alert('Sesjonen er utløpt - du
må logge inn på nytt');
+ return;
+ }
+ var htmlString = "";
+ var obj = data;
+ //console.log(data);
+ $.each(obj, function (i, val)
+ {
+ if(val !== null)
+ {
+ //console.log(i);
+ //console.log(val);
+ var oArgs2 = {
+ menuaction:
'controller.uicalendar.view_calendar_for_year2',
+ location_level:
$("#location_type").val(),
+ cat_id:
$("#location_type_category").val(),
+ district_id:
$("#district_id").val(),
+
part_of_town_id: $("#part_of_town_id").val(),
+ location_array:
val,
+ }
+ var requestUrl2 =
phpGWLink('index.php', oArgs2, true);
+ window.location.href =
requestUrl2;
+ /*
+ $.each(val, function
(key, value)
+ {
+
if(!$.isEmptyObject(value))
+ {
+
htmlString += key + " " + val[key]['loc_name'] + "<br/>";
+ }
+ })
+ }
+ });
+
+ $("#receipt").html(htmlString);
+ }
+ }
+ });*/
+ });
+});
+
+
+function update_loc(level)
+{
+ var oArgs = {
+ menuaction: 'property.bolocation.read',
+ cat_id: $("#location_type_category").val(),
+ district_id: $("#district_id").val(),
+ part_of_town_id: $("#part_of_town_id").val(),
+ location_code: $("#loc1").val(),
+ type_id: level
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ var htmlString = "<option value=''>Velg</option>";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl,
+ success: function (data)
+ {
+ if (data != null)
+ {
+ var obj = data;
+
+ $.each(obj, function (i)
+ {
+ htmlString += "<option value='" +
obj[i].location_code + "'>" + obj[i].location_code + " " + obj[i]["loc" + level
+ "_name"] + "</option>";
+ });
+
+ $("#loc" + level).html(htmlString);
+ if (level == 1)
+ {
+ $("#loc2").html("<option value=''>Velg
Eiendom først</option>");
+ }
+ if (level == 2)
+ {
+ $("#loc1").html("");
+ }
+ }
+ else
+ {
+ htmlString = "<option>Ingen</option>";
+ $("#loc1").html(htmlString);
+ $("#loc2").html(htmlString);
+ }
+ }
+ });
+
+
+
+}
+
+function get_table_def()
+{
+ var oArgs = {
+ menuaction:
'controller.uicontrol_register_to_location.get_entity_table_def',
+ location_level: $("#location_type").val()
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl,
+ success: function (data)
+ {
+ if (data != null)
+ {
+ myColumnDefs = data;
+ init_component_table();
+ }
+ else
+ {
+ alert('error');
+ }
+ }
+ });
+
+}
+
+
+function init_component_table()
+{
+ var location_type = $("#location_type").val() != null ?
$("#location_type").val() : '';
+
+ if (!location_type)
+ {
+ return false;
+ }
+
+ var cat_id = $("#location_type_category").val() != null ?
$("#location_type_category").val() : '';
+
+ var control_registered = 0;
+ if ($("#control_registered").prop("checked"))
+ {
+ control_registered = 1;
+ }
+
+ var location_code = '';
+
+ if ($("#search-location_code").val() != null &&
$("#search-location_code").val())
+ {
+ location_code = $("#search-location_code").val();
+ }
+ else if ($("#loc2").val() != null && $("#loc2").val())
+ {
+ location_code = $("#loc2").val();
+ }
+ else if ($("#loc1").val() != null && $("#loc1").val())
+ {
+ location_code = $("#loc1").val();
+ }
+
+ var oArgs = {
+ menuaction: 'controller.uicalendar.query',
+ location_level: location_type,
+ district_id: $("#district_id").val(),
+ part_of_town_id: $("#part_of_town_id").val(),
+ cat_id: cat_id,
+ location_code: location_code
+ };
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ if (oTable)
+ {
+ api = oTable.api();
+ api.destroy();
+ }
+ $("#table_def").html('<table cellpadding="0" cellspacing="0" border="0"
id="datatable-container_0"></table>');
+ oTable = JqueryPortico.inlineTableHelper('datatable-container_0',
requestUrl, myColumnDefs);
+
+}
+
+function update_location_table()
+{
+ init_component_table();
+}
+
Copied:
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_aggregated.xsl
(from rev 17581,
trunk/controller/templates/base/calendar/view_calendar_aggregated.xsl)
===================================================================
---
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_aggregated.xsl
(rev 0)
+++
branches/Version-2_0-branch/controller/templates/base/calendar/view_calendar_aggregated.xsl
2018-01-15 11:03:23 UTC (rev 17582)
@@ -0,0 +1,450 @@
+<!--
+ Document : view_calendar_aggregated.xsl
+ Created on : 14. november 2017, 12:13
+ Author : Erik
+ Description:
+ Purpose of transformation follows.
+-->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+<xsl:variable name="session_url"><xsl:text>&</xsl:text><xsl:value-of
select="php:function('get_phpgw_session_url')" /></xsl:variable>
+<xsl:variable name="serie_id"><xsl:value-of select="serie_id" /></xsl:variable>
+
+ <script>
+<xsl:text>
+
+$(document).ready(function(){
+
+ var oArgs = {menuaction:'property.bolocation.get_locations_by_name'};
+ var baseUrl = phpGWLink('index.php', oArgs, false);
+
+ var location_type = $("#loc_type").val();
+
+ $("#search-location-name").autocomplete({
+ source: function( request, response ) {
+ location_type = $("#loc_type").val();
+
+ $.ajax({
+ url: baseUrl,
+ dataType: "json",
+ data: {
+ location_name: request.term,
+ level: location_type,
+ phpgw_return_as: "json"
+ },
+ success: function( data ) {
+ response( $.map( data, function( item )
{
+ return {
+ label: item.name,
+ value:
item.location_code
+ }
+ }));
+ }
+ });
+ },
+ focus: function (event, ui) {
+ $(event.target).val(ui.item.label);
+ return false;
+ },
+ minLength: 1,
+ select: function( event, ui ) {
+ chooseLocation( ui.item.label, ui.item.value);
+ }
+ });
+});
+
+function chooseLocation( label, value ){
+ var currentYear = $("#currentYear").val();
+
+ var oArgs = {menuaction:'controller.uicalendar.view_calendar_for_year'};
+ var baseUrl = phpGWLink('index.php', oArgs, false);
+ var requestUrl = baseUrl + "&location_code=" + value +
"&year=" + currentYear;
+
+ window.location.replace(requestUrl);
+}
+
+</xsl:text>
+
+</script>
+
+<div class="yui-navset yui-navset-top" id="control_calendar_tabview">
+ <xsl:call-template name="view_calendar_for_locations" />
+ <xsl:if test="multiple_locations">
+ <xsl:call-template name="calendar_location" />
+ </xsl:if>
+</div>
+</xsl:template>
+
+
+<xsl:template name="view_calendar_for_locations"
xmlns:php="http://php.net/xsl">
+ <div class="content-wrp">
+ <div>
+ <xsl:choose>
+ <xsl:when test="msgbox_data != ''">
+ <xsl:call-template name="msgbox"/>
+ </xsl:when>
+ </xsl:choose>
+ <div class="body">
+
+ <style type="text/css">
+
+ </style>
+
+ <div id="choose-location">
+ <xsl:apply-templates
select="filter_form" />
+
+ <form action="{update_action}"
name="acl_form" id="acl_form" method="post">
+
<xsl:call-template name="datatable"/>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+</xsl:template>
+
+<xsl:template match="filter_form" xmlns:php="http://php.net/xsl">
+ <xsl:call-template name="filter_list"/>
+</xsl:template>
+
+<xsl:template name="filter_list" xmlns:php="http://php.net/xsl">
+ <h4>Velg lokasjoner som du vil se årsplan for</h4>
+ <fieldset id="comp-filters">
+ <div class="select-box">
+ <div class="filter">
+ <label><xsl:value-of
select="php:function('lang', 'location type')" /></label>
+ <select id="location_type" name="location_type">
+ <xsl:apply-templates
select="location_type_list/options"/>
+ </select>
+ </div>
+ <div class="filter">
+ <label><xsl:value-of
select="php:function('lang', 'location category')" /></label>
+ <select id="location_type_category"
name="location_type_category"></select>
+ </div>
+ </div>
+
+ <div class="select-box">
+ <div class="filter">
+ <label><xsl:value-of select="php:function('lang',
'district')" /></label>
+ <select id="district_id" name="district_id">
+ <xsl:apply-templates
select="district_list/options"/>
+ </select>
+ </div>
+ <div class="filter">
+ <label><xsl:value-of
select="php:function('lang', 'part of town')" /></label>
+ <select id="part_of_town_id"
name="part_of_town_id">
+ <xsl:apply-templates
select="part_of_town_list/options"/>
+ </select>
+ </div>
+ </div>
+ </fieldset>
+</xsl:template>
+
+<xsl:template name="datatable" xmlns:php="http://php.net/xsl">
+ <xsl:variable name="label_show"><xsl:value-of select="php:function('lang',
'show')" /></xsl:variable>
+ <input type="submit" name="update_acl" id="frm_update_acl" class="btn"
value="{$label_show}"/>
+
+ <div id="receipt"></div>
+</xsl:template>
+
+<!-- options for use with select-->
+<xsl:template match="options">
+ <option value="{id}">
+ <xsl:if test="selected != 0">
+ <xsl:attribute name="selected" value="selected"/>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes" select="name"/>
+ </option>
+</xsl:template>
+
+<xsl:template name="calendar_location" xmlns:php="http://php.net/xsl">
+ <div id="main_content">
+ <div id="control_plan">
+ <div class="top">
+
+ <xsl:choose>
+ <xsl:when test="location_level = 1">
+ <h1>Kontrollplan for eiendom:
+ <xsl:value-of
select="current_location/loc1_name"/>
+ </h1>
+ </xsl:when>
+ <xsl:otherwise>
+ <h1>Kontrollplan for bygg:
+ <xsl:value-of
select="current_location/loc2_name"/>
+ </h1>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <h3>Kalenderoversikt for
+ <span class="year">
+ <xsl:value-of
select="current_year"/>
+ </span>
+ </h3>
+
+ <!-- ===================== SEARCH FOR LOCATION
================= -->
+ <div id="search-location" class="select-box">
+ <div id="choose-loc">
+ <input id="loc_type"
type="hidden" name="loc_type" value="2" />
+ <input type="hidden"
id="currentYear">
+ <xsl:attribute
name="value">
+ <xsl:value-of
select="current_year"/>
+ </xsl:attribute>
+ </input>
+ <label>Søk etter</label>
+ <span>
+ <a href="loc_type_2"
class="btn first active">Bygg</a>
+ <a href="loc_type_1"
class="btn">Eiendom</a>
+ </span>
+ </div>
+ <input type="text" value=""
id="search-location-name" />
+ </div>
+ </div>
+
+ <div class="middle">
+
+
+
+ <!-- ===================== COLOR ICON MAP
================= -->
+ <xsl:call-template name="icon_color_map" />
+
+ <!-- ===================== FILTERS
================= -->
+ <xsl:call-template name="calendar_filters" >
+ <xsl:with-param
name="view_period">year</xsl:with-param>
+ </xsl:call-template>
+
+ <!-- ===================== CALENDAR NAVIGATION
================= -->
+ <xsl:call-template name="nav_calendar_year">
+ <xsl:with-param
name="view">VIEW_CONTROLS_FOR_LOCATION</xsl:with-param>
+ </xsl:call-template>
+ </div>
+
+ <div id="cal_wrp">
+ <h2>Bygg/eiendom</h2>
+ <table id="calendar" class="year">
+ <tr class="heading">
+ <th class="title">
+ <span>Tittel</span>
+ </th>
+ <th class="assigned">
+ <span>Tildelt</span>
+ </th>
+ <th class="frequency">
+ <span>Frekvens</span>
+ </th>
+ <xsl:for-each
select="heading_array">
+ <th>
+ <xsl:variable
name="month_str">short_month <xsl:number/> capitalized</xsl:variable>
+ <xsl:value-of
select="php:function('lang', $month_str)" />
+ </th>
+ </xsl:for-each>
+ </tr>
+ <xsl:for-each
select="location_calendar_array">
+ <xsl:choose>
+ <xsl:when
test="controls_calendar_array/child::node()">
+ <xsl:for-each
select="controls_calendar_array">
+
<xsl:variable name="control_id">
+
<xsl:value-of select="control/id"/>
+
</xsl:variable>
+ <tr>
+
<xsl:choose>
+
<xsl:when test="(position() mod 2) != 1">
+
<xsl:attribute name="class">odd</xsl:attribute>
+
</xsl:when>
+
<xsl:otherwise>
+
<xsl:attribute name="class">even</xsl:attribute>
+
</xsl:otherwise>
+
</xsl:choose>
+
<td class="title">
+
<a class="show-control-details">
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicontrol.get_control_details</xsl:text>
+
<xsl:text>&control_id=</xsl:text>
+
<xsl:value-of select="control/id"/>
+
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+
<xsl:value-of
select="php:function('get_phpgw_session_url')" />
+
</xsl:attribute>
+
<xsl:variable name="control_info_params">
+
<!--<xsl:text>index.php?menuaction=controller.uicontrol.get_control_details,
control_id</xsl:text>-->
+
<!--<xsl:value-of select="control/id"/>-->
+
<!--<xsl:text>&phpgw_return_as=stripped_html</xsl:text>-->
+
<!--<xsl:value-of select="$session_url"/>-->
+
</xsl:variable>
+
<xsl:value-of select="control/title"/>
+
</a>
+
</td>
+
<td class="assigned">
+
<span>
+
<xsl:value-of select="control/responsibility_name"/>
+
</span>
+
</td>
+
<td class="frequency">
+
<span>
+
<xsl:choose>
+
<xsl:when test="control/repeat_interval = 1 and
control/repeat_type < 3">
+
<span class="pre">Hver</span>
+
</xsl:when>
+
<xsl:when test="control/repeat_interval = 1 and
control/repeat_type = 3">
+
<span class="pre">Hvert</span>
+
</xsl:when>
+
<xsl:when test="control/repeat_interval = 2">
+
<span class="pre">Annenhver</span>
+
</xsl:when>
+
<xsl:when test="control/repeat_interval > 2">
+
<span class="pre">Hver</span>
+
<span>
+
<xsl:value-of
select="control/repeat_interval"/>.
+
</span>
+
</xsl:when>
+
</xsl:choose>
+
+
<span class="val">
+
<xsl:value-of select="control/repeat_type_label"/>
+
</span>
+
</span>
+
</td>
+
<xsl:for-each select="calendar_array">
+
<td>
+
<xsl:call-template name="check_list_status_manager" >
+
<xsl:with-param name="location_code">
+
<xsl:value-of select="/location_code"/>
+
</xsl:with-param>
+
<xsl:with-param name="serie_id"><xsl:value-of
select="/serie_id" /></xsl:with-param>
+
<xsl:with-param name="session_url"><xsl:value-of
select="php:function('get_phpgw_session_url')" /></xsl:with-param>
+
</xsl:call-template>
+
</td>
+
</xsl:for-each>
+ </tr>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <tr
class="cal_info_msg">
+ <td
colspan="3">
+
<xsl:value-of select="php:function('lang', 'error_msg_no_controls_in_period')"
/>
+ </td>
+ </tr>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </table>
+
+ <h2 class="components">Komponenter</h2>
+ <xsl:choose>
+ <xsl:when
test="components_calendar_array/child::node()">
+ <xsl:for-each
select="components_calendar_array">
+ <h3>
+ <xsl:value-of
select="component/xml_short_desc"/>
+ </h3>
+
+ <table id="calendar"
class="year">
+ <tr
class="heading">
+ <th
class="title">
+
<span>Tittel</span>
+ </th>
+ <th
class="assigned">
+
<span>Tildelt</span>
+ </th>
+ <th
class="frequency">
+
<span>Frekvens</span>
+ </th>
+
<xsl:for-each select="//heading_array">
+
<th>
+
<a>
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicalendar.view_calendar_for_month</xsl:text>
+
<xsl:text>&year=</xsl:text>
+
<xsl:value-of select="//current_year"/>
+
<xsl:text>&location_code=</xsl:text>
+
<xsl:value-of
select="//current_location/location_code"/>
+
<xsl:text>&month=</xsl:text>
+
<xsl:number/>
+
<xsl:value-of select="$session_url"/>
+
</xsl:attribute>
+
+
<xsl:variable name="month_str">short_month <xsl:number/>
capitalized</xsl:variable>
+
<xsl:value-of select="php:function('lang', $month_str)" />
+
</a>
+
</th>
+
</xsl:for-each>
+ </tr>
+
+ <xsl:for-each
select="controls_calendar">
+
<xsl:variable name="control_id">
+
<xsl:value-of select="control/id"/>
+
</xsl:variable>
+
+ <tr>
+
<xsl:choose>
+
<xsl:when test="(position() mod 2) != 1">
+
<xsl:attribute name="class">odd</xsl:attribute>
+
</xsl:when>
+
<xsl:otherwise>
+
<xsl:attribute name="class">even</xsl:attribute>
+
</xsl:otherwise>
+
</xsl:choose>
+
<td class="title">
+
<a class="show-control-details">
+
<xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicontrol.get_control_details</xsl:text>
+
<xsl:text>&control_id=</xsl:text>
+
<xsl:value-of select="control/id"/>
+
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+
<xsl:value-of select="$session_url"/>
+
</xsl:attribute>
+
<xsl:value-of select="control/title"/>
+
</a>
+
</td>
+
<td class="assigned">
+
<span>
+
<xsl:value-of select="control/responsibility_name"/>
+
</span>
+
</td>
+
<td class="frequency">
+
<span>
+
<xsl:choose>
+
<xsl:when test="control/repeat_interval = 1 and
control/repeat_type < 3">
+
<span class="pre">Hver</span>
+
</xsl:when>
+
<xsl:when test="control/repeat_interval = 1 and
control/repeat_type = 3">
+
<span class="pre">Hvert</span>
+
</xsl:when>
+
<xsl:when test="control/repeat_interval = 2">
+
<span class="pre">Annenhver</span>
+
</xsl:when>
+
<xsl:when test="control/repeat_interval > 2">
+
<span class="pre">Hver</span>
+
<span>
+
<xsl:value-of
select="control/repeat_interval"/>.
+
</span>
+
</xsl:when>
+
</xsl:choose>
+
+
<span class="val">
+
<xsl:value-of select="control/repeat_type_label"/>
+
</span>
+
</span>
+
</td>
+
<xsl:for-each select="calendar_array">
+
<td>
+
<xsl:call-template name="check_list_status_manager" >
+
<xsl:with-param name="location_code">
+
<xsl:value-of
select="//current_location/location_code"/>
+
</xsl:with-param>
+
<xsl:with-param name="serie_id"><xsl:value-of
select="$serie_id"/></xsl:with-param>
+
<xsl:with-param name="session_url"><xsl:value-of
select="$session_url"/></xsl:with-param>
+
</xsl:call-template>
+
</td>
+
</xsl:for-each>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <div id="calendar">
+ <p
class="no-comp-msg">Ingen komponenter tilknyttet kontroll</p>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </div>
+ </div>
+</xsl:template>
\ No newline at end of file
Modified: branches/Version-2_0-branch/eventplanner/inc/class.bobooking.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/class.bobooking.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/eventplanner/inc/class.bobooking.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -282,7 +282,7 @@
{
$rcpt = $send->msg('email', $to_email,
$subject, stripslashes($content), '', $cc, $bcc, $from_email, $from_name,
'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
phpgwapi_cache::message_set($e->getMessage(),
'error');
}
Modified: branches/Version-2_0-branch/eventplanner/inc/class.bocalendar.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplanner/inc/class.bocalendar.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/eventplanner/inc/class.bocalendar.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -403,7 +403,7 @@
{
$rcpt = $send->msg('email',
$entry['to_email'], $entry['subject'], $entry['content'], '', $entry['cc'],
$entry['bcc'], $entry['from_email'], $entry['from_name'], 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
phpgwapi_cache::message_set($e->getMessage(), 'error');
}
Modified: branches/Version-2_0-branch/helpdesk/inc/class.botts.inc.php
===================================================================
--- branches/Version-2_0-branch/helpdesk/inc/class.botts.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/helpdesk/inc/class.botts.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -1135,7 +1135,7 @@
{
$rc = $this->send->msg('email',
$to, $subject, $html, '', $cc,
$bcc,$current_user_address,$GLOBALS['phpgw_info']['user']['fullname'],'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$receipt['error'][] =
array('msg' => $e->getMessage());
}
Modified: branches/Version-2_0-branch/helpdesk/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/helpdesk/setup/phpgw_no.lang 2018-01-15
09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/helpdesk/setup/phpgw_no.lang 2018-01-15
11:03:23 UTC (rev 17582)
@@ -220,4 +220,5 @@
ticket is forwarded helpdesk no Melding er videresendt
email_create_account_title helpdesk no LRS systemtilgang
email_create_account_message helpdesk no Systemmelding fra LRS
til %1 %2:<br/>Det er opprettet en tilgang for deg i LRS<br/><br/>Du får
tilgang til systemet via kommunens intranett.<br/>Under verktøy i høyre
kolonne, velg fra LRS listen.<br/>Brukerveiledning finner du i systemet, ved å
velge "Hjelp" i toppmenyen.<br/>Har du spørsmål send en e-post til LRS
brukerstøtte.<br/>
-choose a section from the menu helpdesk no Velg en avdeling fra
menyen
\ No newline at end of file
+choose a section from the menu helpdesk no Velg en avdeling fra
menyen
+please enter value for attribute %1 helpdesk no Venligst angi
verdi for feltet %1
\ No newline at end of file
Modified: branches/Version-2_0-branch/phpgwapi/inc/class.send.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.send.inc.php 2018-01-15
09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.send.inc.php 2018-01-15
11:03:23 UTC (rev 17582)
@@ -60,12 +60,22 @@
}
}
+ $ret = false;
switch( $service )
{
case 'email':
- return $this->send_email($to, $subject,
$body, $msgtype, $cc, $bcc, $from, $sender, $content_type, $boundary,
$attachments, $receive_notification);
- break;
+ try
+ {
+ $ret = $this->send_email($to,
$subject, $body, $msgtype, $cc, $bcc, $from, $sender, $content_type, $boundary,
$attachments, $receive_notification);
+ }
+ catch (Exception $e)
+ {
+ throw $e;
+ return false;
+ }
+ break;
}
+ return $ret;
}
function send_email($to, $subject, $body, $msgtype, $cc, $bcc,
$from, $sender, $content_type, $boundary,$attachments, $receive_notification)
@@ -89,19 +99,27 @@
$delimiter = ';';
$to = explode($delimiter, $to);
- foreach ($to as $entry)
+ try
{
- $entry =
str_replace(array('[',']'),array('<','>'),$entry);
- $to_array = explode('<', $entry);
- if ( count($to_array) == 2 )
+ foreach ($to as $entry)
{
-
$mail->AddAddress(trim($to_array[1],'>'), $to_array[0]);
+ $entry =
str_replace(array('[',']'),array('<','>'),$entry);
+ $to_array = explode('<', $entry);
+ if ( count($to_array) == 2 )
+ {
+
$mail->AddAddress(trim($to_array[1],'>'), $to_array[0]);
+ }
+ else
+ {
+ $mail->AddAddress($to_array[0]);
+ }
}
- else
- {
- $mail->AddAddress($to_array[0]);
- }
}
+ catch (Exception $e)
+ {
+ throw $e;
+ return false;
+ }
if($cc)
{
Modified: branches/Version-2_0-branch/phpgwapi/templates/aalesund/css/sample.css
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/aalesund/css/sample.css
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/phpgwapi/templates/aalesund/css/sample.css
2018-01-15 11:03:23 UTC (rev 17582)
@@ -11,8 +11,8 @@
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
- padding-top: 5%;
- padding-bottom: 5%;
+ padding-top: 3%;
+ padding-bottom: 3%;
border-radius: 0;
margin-bottom: 0;
}
@@ -47,8 +47,9 @@
}
.header-text{
- font-family: Lucida Console;
- font-size: 35pt;
+ max-width: 620px;
+ margin-left: auto;
+ margin-right: auto;
}
.header-text a{
@@ -60,11 +61,11 @@
}
.navbar-nav a:hover{
- background-color: whitesmoke;
+ background-color: #f8f9fa;
}
.navbar-nav a{
- padding: 2.4em;
+ padding: 2.8em;
color: black;
}
@@ -111,7 +112,6 @@
#update-search-result{
margin-top: 1.5em;
- background-color: #428bca;
}
/address@hidden screen and (max-width: 560px) {
@@ -128,6 +128,8 @@
padding-bottom: 4%;
}
+
+
.search-button{
border-right: 2px solid #26348B;
border-top: 2px solid #26348B;
@@ -134,6 +136,10 @@
border-bottom: 2px solid #26348B;
}
+.search-button i{
+ color: #26348B;
+}
+
.adv-search-button:hover{
cursor: pointer;
}
@@ -142,6 +148,7 @@
margin-top: .5em;
display: inline-block;
float: right;
+ color: #26348B;
}
@@ -157,6 +164,10 @@
.card{
margin-top: 30px;
+ border: none;
+ -webkit-box-shadow: 6px 9px 12px -2px rgba(173,173,173,1);
+ -moz-box-shadow: 6px 9px 12px -2px rgba(173,173,173,1);
+ box-shadow: 6px 9px 12px -2px rgba(173,173,173,1);
}
.input-group{
@@ -196,6 +207,11 @@
border: 2px solid #26348B;
}
+.main-search input:hover{
+/* background-color: rgb(221,221,211);*/
+ background-color: #f8f9fa;
+}
+
.control {
display: block;
position: relative;
@@ -203,8 +219,8 @@
margin-bottom: 5px;;
cursor: pointer;
font-size: 18px;
-
}
+
.control input {
position: absolute;
z-index: -1;
@@ -212,6 +228,7 @@
}
.control__indicator {
position: absolute;
+ border-radius: .15rem;
top: 2px;
left: 0;
height: 20px;
@@ -235,11 +252,11 @@
display: block;
}
.control--checkbox .control__indicator:after {
- left: 7px;
- top: 3px;
- width: 3px;
- height: 8px;
- border: solid #428bca;;
+ left: 6px;
+ top: 2px;
+ width: 6px;
+ height: 11px;
+ border: solid #26348B;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
@@ -270,7 +287,7 @@
}
.application-group .heading{
- border-bottom: 2px solid #428bca;
+ border-bottom: 2px solid #26348B;
}
.no-padding-left{
@@ -295,7 +312,7 @@
.btn-main{
color: #fff;
- background-color: #428bca;
+ background-color: #26348B;
border-color: #007bff;
}
@@ -316,5 +333,21 @@
}
.navbar-brand{
- padding: 0;
+ padding-top: 0;
+ padding-bottom: 1rem;
+}
+
+.header-style-m{
+ font-family: Raleway;
+ font-size: 20pt;
+}
+
+.header-style-l{
+ font-family: Raleway;
+ font-size: 35pt;
+ font-weight: bold;
+}
+
+.card dt{
+ display: none;
}
\ No newline at end of file
Modified: branches/Version-2_0-branch/phpgwapi/templates/aalesund/head.tpl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/aalesund/head.tpl
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/phpgwapi/templates/aalesund/head.tpl
2018-01-15 11:03:23 UTC (rev 17582)
@@ -18,6 +18,7 @@
<script type="text/javascript" src="{javascript_uri}"></script>
<!-- END javascript -->
<link rel="stylesheet" type="text/css"
href="//fonts.googleapis.com/css?family=Raleway" />
+
{css}
<script type="text/javascript">
@@ -41,7 +42,7 @@
<body class="">
<nav class="navbar navbar-expand-md">
- <div class="container">
+ <div class="container header-container">
<button class="navbar-toggler mr-auto active"
type="button" data-toggle="collapse" data-target="#Navbar">
<span class="navbar-toggler-icon"></span>
</button>
Modified: branches/Version-2_0-branch/phpgwapi/templates/aalesund/js/sample.js
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/aalesund/js/sample.js
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/phpgwapi/templates/aalesund/js/sample.js
2018-01-15 11:03:23 UTC (rev 17582)
@@ -31,7 +31,14 @@
$('#fullSizeImage').append('<img src="'+ src +'" />');
}
+$(function toogleAdvSearch() {
+ if (!document.getElementById("main-page")) {
+ $(".header-container").css("border-bottom", "1.5px solid #89266a");
+ $(".header-container").css("margin-bottom", "2em");
+ }
+});
+
//$(function checkView() {
//
//$(window).scroll(function() {
Modified: branches/Version-2_0-branch/property/inc/class.boevent.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.boevent.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/inc/class.boevent.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -616,7 +616,7 @@
{
$GLOBALS['phpgw']->send->msg('email',
$_address, $subject, stripslashes($message), '', $cc, $bcc, $coordinator_email,
$coordinator_name, 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$receipt['error'][] = array('msg' =>
$e->getMessage());
$GLOBALS['phpgw']->log->error(array(
Modified: branches/Version-2_0-branch/property/inc/class.botts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.botts.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/inc/class.botts.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -1534,7 +1534,7 @@
{
$rc = $this->send->msg('email',
$to, $subject, $html, '', $cc, $bcc, $current_user_address,
$GLOBALS['phpgw_info']['user']['fullname'], 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$receipt['error'][] =
array('msg' => $e->getMessage());
}
Modified: branches/Version-2_0-branch/property/inc/class.boworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.boworkorder.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/inc/class.boworkorder.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -1001,7 +1001,7 @@
{
$ok =
$GLOBALS['phpgw']->send->msg('email', $to, $subject, $body, false, $cc, $bcc,
$from_email, $from_name, 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
phpgwapi_cache::message_set($e->getMessage(), 'error');
}
Modified: branches/Version-2_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sotts.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/inc/class.sotts.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -897,6 +897,7 @@
$ticket['entry_date'] =
$this->db->f('entry_date');
$ticket['modified_date'] =
$this->db->f('modified_date');
$ticket['order_sent'] =
$this->db->f('order_sent');
+ $ticket['invoice_remark'] =
$this->db->f('invoice_remark', true);
$ticket['order_received'] =
$this->db->f('order_received');
$ticket['order_received_amount'] =
$this->db->f('order_received_amount');
$mail_recipients =
trim($this->db->f('mail_recipients'), ',');
@@ -1291,8 +1292,8 @@
$old_order_cat_id = $this->db->f('order_cat_id');
$old_building_part = $this->db->f('building_part',
true);
$old_order_dim1 = (int)$this->db->f('order_dim1');
+ $order_sent = $this->db->f('order_sent');
-
if ($oldcat_id == 0)
{
$oldcat_id = '';
@@ -1625,6 +1626,8 @@
{
$this->db->query("UPDATE fm_tts_tickets
SET order_id = {$order_id}, ordered_by = {$this->account} WHERE id={$id}",
__LINE__, __FILE__);
$this->db->query("INSERT INTO fm_orders
(id,type) VALUES ({$order_id},'ticket')");
+
+ $ticket['invoice_remark'] =
$ticket['subject'];
}
}
@@ -1748,6 +1751,11 @@
$value_set['order_deadline'] =
$ticket['order_deadline'];// delete value if empty
$value_set['order_deadline2'] =
$ticket['order_deadline2'];// delete value if empty
+ if(!empty($ticket['invoice_remark']) &&
!$order_sent)
+ {
+ $value_set['invoice_remark'] =
$this->db->db_addslashes($ticket['invoice_remark']);
+ }
+
if(!empty($ticket['order_deadline']))
{
$value_set['order_deadline'] =
phpgwapi_datetime::date_to_timestamp($ticket['order_deadline']);
Modified: branches/Version-2_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uitts.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/inc/class.uitts.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -2989,6 +2989,7 @@
'enable_order_service_id' =>
$enable_order_service_id,
'value_order_id' => $ticket['order_id'],
'value_order_descr' => $ticket['order_descr'],
+ 'value_invoice_remark' =>
$ticket['invoice_remark'],
'vendor_data' => $vendor_data,
'b_account_data' => $b_account_data,
'ecodimb_data' => $ecodimb_data,
Modified:
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205.php
===================================================================
---
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205.php
2018-01-15 09:53:13 UTC (rev 17581)
+++
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -267,7 +267,7 @@
{
$rc =
$this->send->msg('email', $prefs['email'], $subject, stripslashes($body), '',
'', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$this->receipt['error'][] = array('msg' => $e->getMessage());
}
@@ -590,7 +590,7 @@
$this->receipt['message'][] = array('msg' => "epost sendt til {$to}");
}
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$this->receipt['error'][] = array('msg' => $e->getMessage());
}
@@ -681,7 +681,7 @@
{
$rc =
$this->send->msg('email', $to, $subject, stripslashes($body), '', $cc, $bcc,
$from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$this->receipt['error'][] = array('msg' => $e->getMessage());
}
Modified:
branches/Version-2_0-branch/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
===================================================================
---
branches/Version-2_0-branch/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
2018-01-15 09:53:13 UTC (rev 17581)
+++
branches/Version-2_0-branch/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -393,7 +393,7 @@
{
$rc = $this->send->msg('email',
$prefs['email'], $subject, stripslashes($body), '', '', '', $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$this->receipt['error'][] = array('msg'
=> $e->getMessage());
}
@@ -424,7 +424,7 @@
{
$rc = $this->send->msg('email', $to,
$subject, $body, '', $cc, $bcc, $from, '', 'html');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$this->receipt['error'][] = array('msg'
=> $e->getMessage());
}
Modified:
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
===================================================================
---
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2018-01-15 09:53:13 UTC (rev 17581)
+++
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_exporter_data_til_Agresso.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -147,6 +147,7 @@
'OrderType]' => 'WB',
'Status' => 'N',
'OrderDate' => date('Y-m-d'),
+ 'HeaderText' =>
$param['invoice_remark'], // Fakturanotat
'Currency' => 'NOK',
'Seller' => array($Seller),
'Buyer' => array($param['buyer']),
Modified:
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
===================================================================
---
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
2018-01-15 09:53:13 UTC (rev 17581)
+++
branches/Version-2_0-branch/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -44,7 +44,7 @@
var $debug = true;
function __construct()
{
-
+
}
public function transfer( $id )
@@ -211,6 +211,7 @@
'order_id' => $_ticket['order_id'],
'tax_code' => $tax_code,
'buyer' => $buyer,
+ 'invoice_remark' => $_ticket['invoice_remark'],
'lines' => array(
array(
'unspsc_code' =>
$_ticket['unspsc_code'] ? $_ticket['unspsc_code'] : 'UN-72000000',
@@ -219,7 +220,7 @@
)
)
);
-
+
$exporter_ordre = new
BkBygg_exporter_data_til_Agresso(array(
'order_id' => $_ticket['order_id'],
'voucher_type' => $voucher_type
Modified:
branches/Version-2_0-branch/property/inc/custom/default/varsle_prosjektoordinator_ved_avsluttet_relatert_melding_BBB.php
===================================================================
---
branches/Version-2_0-branch/property/inc/custom/default/varsle_prosjektoordinator_ved_avsluttet_relatert_melding_BBB.php
2018-01-15 09:53:13 UTC (rev 17581)
+++
branches/Version-2_0-branch/property/inc/custom/default/varsle_prosjektoordinator_ved_avsluttet_relatert_melding_BBB.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -87,7 +87,7 @@
{
$rcpt =
$GLOBALS['phpgw']->send->msg('email', $_to, $subject, stripslashes($body), '',
$cc, $bcc, $from_email, $from_name, 'html', '');
}
- catch (phpmailerException $e)
+ catch (Exception $e)
{
$receipt['error'][] = array('msg' =>
$e->getMessage());
}
Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang 2018-01-15
09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang 2018-01-15
11:03:23 UTC (rev 17582)
@@ -1899,7 +1899,6 @@
view edit the prize for this activity property no Vis/oppdater
pris for denne aktiviteten
view entrance property no Vis inngang
view equipment property no Vis utstyr
-view error log common no Vis feilmeldings log
view gab property no Vis grunneiendom
view gab detail property no Vis grunneiendom-detaljer
view gab-info property no Vis grunneiendom
@@ -2393,4 +2392,5 @@
FM settings property no Innstillinger for eiendomsforvaltning
pending action type property no Handlingstyper
comma separated email addresses to be notified about tenant claim
property no Kommmaseparert liste over hvem som skal ha e-post om
leietakerkrav
-record has been saved property no Posten er lagret
\ No newline at end of file
+record has been saved property no Posten er lagret
+invoice remark property no Fakturanotat
\ No newline at end of file
Modified: branches/Version-2_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/setup.inc.php 2018-01-15
09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/setup/setup.inc.php 2018-01-15
11:03:23 UTC (rev 17582)
@@ -11,7 +11,7 @@
* @version $Id$
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.724';
+ $setup_info['property']['version'] = '0.9.17.725';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: branches/Version-2_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_current.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/setup/tables_current.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -1184,6 +1184,7 @@
'continuous' => array('type' => 'int',
'precision' => 2, 'nullable' => True),
'order_deadline' => array('type' => 'int',
'precision' => 8, 'nullable' => True),
'order_deadline2' => array('type' => 'int',
'precision' => 8, 'nullable' => True),
+ 'invoice_remark' => array('type' => 'text',
'nullable' => True),
),
'pk' => array('id'),
'ix' => array(),
Modified: branches/Version-2_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_update.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/setup/tables_update.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -9946,3 +9946,26 @@
return $GLOBALS['setup_info']['property']['currentver'];
}
}
+
+ /**
+ * Update property version from 0.9.17.724 to 0.9.17.725
+ *
+ */
+ $test[] = '0.9.17.724';
+
+ function property_upgrade0_9_17_724()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_tts_tickets',
'invoice_remark', array(
+ 'type' => 'text',
+ 'nullable' => true
+ )
+ );
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.725';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
Modified: branches/Version-2_0-branch/property/templates/base/tts.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/tts.xsl 2018-01-15
09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/property/templates/base/tts.xsl 2018-01-15
11:03:23 UTC (rev 17582)
@@ -154,7 +154,7 @@
<xsl:value-of
select="php:function('lang', 'subject')"/>
</label>
- <input type="text"
name="values[subject]" value="{value_subject}" class="pure-input-1-2" >
+ <input type="text" id="subject"
name="values[subject]" value="{value_subject}" class="pure-input-1-2" >
<xsl:attribute
name="title">
<xsl:value-of
select="php:function('lang', 'Enter the subject of this ticket')"/>
</xsl:attribute>
@@ -371,7 +371,7 @@
<xsl:text> </xsl:text>
<xsl:value-of
select="value_id"/>
</label>
- <input class="pure-input-1-2"
type="text" name="values[subject]" value="{value_subject}">
+ <input class="pure-input-1-2"
type="text" id="subject" name="values[subject]" value="{value_subject}">
<xsl:attribute
name="title">
<xsl:value-of
select="php:function('lang', 'update subject')"/>
</xsl:attribute>
@@ -993,6 +993,25 @@
</div>
<div
class="pure-control-group">
<label>
+
<xsl:value-of select="php:function('lang', 'invoice remark')"/>
+
</label>
+
<xsl:choose>
+
<xsl:when test="value_order_sent != 1">
+
<textarea class="pure-input-1-2" rows="{textarearows}"
id="invoice_remark" name="values[invoice_remark]" wrap="virtual">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang',
'invoice remark')"/>
+
</xsl:attribute>
+
<xsl:value-of select="value_invoice_remark"/>
+
</textarea>
+
</xsl:when>
+
<xsl:otherwise>
+
<xsl:value-of select="value_invoice_remark"/>
+
+
</xsl:otherwise>
+
</xsl:choose>
+ </div>
+ <div
class="pure-control-group">
+
<label>
<xsl:value-of select="php:function('lang', 'deadline')"/>
</label>
<table class="pure-table pure-u-md-1-2">
Modified:
branches/Version-2_0-branch/rental/inc/model/class.agresso_lg04.inc.php
===================================================================
--- branches/Version-2_0-branch/rental/inc/model/class.agresso_lg04.inc.php
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/rental/inc/model/class.agresso_lg04.inc.php
2018-01-15 11:03:23 UTC (rev 17582)
@@ -86,8 +86,6 @@
*/
protected function run()
{
- $this->batch_id =
execMethod('property.socommon.increment_id', 'Ecobatchid');
-
$this->orders = array();
$decimal_separator =
isset($GLOBALS['phpgw_info']['user']['preferences']['rental']['decimal_separator'])
? $GLOBALS['phpgw_info']['user']['preferences']['rental']['decimal_separator']
: ',';
$thousands_separator =
isset($GLOBALS['phpgw_info']['user']['preferences']['rental']['thousands_separator'])
?
$GLOBALS['phpgw_info']['user']['preferences']['rental']['thousands_separator']
: '.';
@@ -100,6 +98,7 @@
$config->read();
$serial_config_start =
$config->config_data['serial_start'];
$serial_config_stop =
$config->config_data['serial_stop'];
+ $organization =
empty($config->config_data['organization']) ? 'bergen' :
$config->config_data['organization'];
if (isset($serial_config_start) &&
is_numeric($serial_config_start) &&
@@ -163,7 +162,7 @@
$data['article_code'] =
$price_item->get_agresso_id();
$price_item_data[] = $data;
}
- $this->orders[] =
$this->get_order($invoice->get_header(), $invoice->get_party(),
$invoice->get_id(), $this->billing_job->get_year(),
$this->billing_job->get_month(), $invoice->get_account_out(), $price_item_data,
$invoice->get_responsibility_id(), $invoice->get_service_id(),
$building_location_code, $invoice->get_project_id(), $composite_name,
$serial_number, $invoice->get_reference(), $invoice->get_customer_order_id());
+ $this->orders[] =
$this->get_order($invoice->get_header(), $invoice->get_party(),
$invoice->get_id(), $this->billing_job->get_year(),
$this->billing_job->get_month(), $invoice->get_account_out(), $price_item_data,
$invoice->get_responsibility_id(), $invoice->get_service_id(),
$building_location_code, $invoice->get_project_id(), $composite_name,
$serial_number, $invoice->get_reference(), $invoice->get_customer_order_id(),
$organization);
$invoice->set_serial_number($serial_number);
$serial_number++;
}
@@ -310,7 +309,7 @@
* Builds one single order of the Agresso file.
*
*/
- protected function get_order( $header, $party, $order_id,
$bill_year, $bill_month, $account, $product_items, $responsibility, $service,
$building, $project, $text, $serial_number, $client_ref, $customer_order_id )
+ protected function get_order( $header, $party, $order_id,
$bill_year, $bill_month, $account, $product_items, $responsibility, $service,
$building, $project, $text, $serial_number, $client_ref, $customer_order_id,
$organization )
{
$party_id = $party->get_identifier();
@@ -318,8 +317,7 @@
// XXX: Which charsets do Agresso accept/expect? Do we
need to something regarding padding and UTF-8?
$order = array();
- $kem = 'bergen';
- if($kem == 'bergen') //Bergen
+ if(!$organization || $organization == 'bergen')
//Bergen kommune
{
$att_1_id = '';
$dim_value_1 = $account;
@@ -334,18 +332,17 @@
$voucher_type = 'FU';
$apar_id = '';
}
- else if($kem == 'nlsh')
+ else if($organization == 'nlsh')
{
$att_1_id = 'DR';
$dim_value_1 = ''; //endre til k.sted?
$dim_1 = $responsibility; //k.sted
- // $batch_id = "PE{$this->date_str}";// må avklares
- $batch_id = 'PU' .
sprintf("%010s",$this->batch_id);
+ $batch_id = 'PU' .
sprintf("%010s",$this->billing_job->get_id());
$client = '14';
$confirm_date = '';
$pay_method = 'BG';
- $responsible ='BKBPE';// må avklares
- $responsible2 ='BKBPE';// må avklares
+ $responsible ='NLSH';
+ $responsible2 ='NLSH';
$terms_id = '14';
$voucher_type = 'FU'; // må avklares
$apar_id = $party->get_customer_id();//kundenr
fra agresso
@@ -357,7 +354,7 @@
. sprintf("%20s", '') // 3
accountable
. sprintf("%160s", '') // 4 address
. sprintf("%20s", '') // 5-7
just white space..
- . sprintf("%08s", '') // 8 apar_id
+ . sprintf("%08s", $apar_id) // 8
apar_id
. sprintf("%30s", '') // 9
apar_name
. sprintf("%50s", '') // 10-11 just
white space..
. sprintf("%2s", $att_1_id) // 12
att_1_id
@@ -369,7 +366,7 @@
. sprintf("%2s", '') // 18
att_7_id
. sprintf("%35s", '') // 19
bank_account
. sprintf("%-12s", $batch_id) // 20
batch_id DATA
- . $client // 21 client
DATA
+ . sprintf("%2s", $client) // 21
client DATA
. sprintf("%2s", '') // 22
client_ref
. sprintf("%-17s", "{$confirm_date}") //
23 confirm_date DATA
. sprintf("%1s", '') // 24
control
@@ -450,7 +447,7 @@
. sprintf("%-15.15s",
$item['article_code']) // 11 article
DATA
. sprintf("%49s", '') // 12-19
just white space..
. sprintf("%-12s", $batch_id) //
20 batch_id DATA
- . $client // 21 client
DATA
+ . sprintf("%2s", $client) // 21
client DATA
. sprintf("%20s", '') // 22-24
just white space..
. sprintf("%017s", '') // 25
cur_amount
. sprintf("%464s", '') // 26-34
just white space..
@@ -503,7 +500,7 @@
'0' . // 1
sprintf("%345s", '') // 2-19
just white space.. DATA
. sprintf("%-12s", $batch_id) //
20 batch_id DATA
- . 'BY' // 21 client
DATA
+ . sprintf("%2s", $client) // 21
client DATA
. sprintf("%692s", '') // 22-53
just white space..
. sprintf("%04.4s", $item_counter) //
54 line_no DATA
. sprintf("%469s", '') // 55-64
just white space..
Modified: branches/Version-2_0-branch/rental/templates/base/config.tpl
===================================================================
--- branches/Version-2_0-branch/rental/templates/base/config.tpl
2018-01-15 09:53:13 UTC (rev 17581)
+++ branches/Version-2_0-branch/rental/templates/base/config.tpl
2018-01-15 11:03:23 UTC (rev 17582)
@@ -15,7 +15,17 @@
<tr>
<td colspan="2"> <b>{lang_rental}</b></td>
</tr>
+
<tr>
+ <td>{lang_organization_for_billing_config},
(default: Bergen):</td>
+ <td>
+ <select
name="newsettings[organization]">
+ <option value=""
{selected_organization_}>Bergen kommune</option>
+ <option value="nlsh"
{selected_organization_NLSH}>NLSH</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
<td>{lang_area_suffix}:</td>
<td><input name="newsettings[area_suffix]"
value="{value_area_suffix}"></td>
</tr>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17582] Stable: Merge 17515:17581 from trunk,
sigurdne <=