[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16587] Syncromind: Merge 16395:16586 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16587] Syncromind: Merge 16395:16586 from trunk |
Date: |
Tue, 18 Apr 2017 06:50:36 -0400 (EDT) |
Revision: 16587
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16587
Author: sigurdne
Date: 2017-04-18 06:50:35 -0400 (Tue, 18 Apr 2017)
Log Message:
-----------
Syncromind: Merge 16395:16586 from trunk
Modified Paths:
--------------
branches/dev-syncromind-2/admin/inc/class.uiconfig.inc.php
branches/dev-syncromind-2/admin/templates/base/config.tpl
branches/dev-syncromind-2/booking/inc/class.menu.inc.php
branches/dev-syncromind-2/booking/inc/class.socommon.inc.php
branches/dev-syncromind-2/booking/inc/class.uiallocation.inc.php
branches/dev-syncromind-2/booking/inc/class.uiseason.inc.php
branches/dev-syncromind-2/booking/js/booking/schedule.js
branches/dev-syncromind-2/bookingfrontend/inc/custom/default/MinId.php
branches/dev-syncromind-2/eventplanner/inc/class.boapplication.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.bocustomer.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.bopermission.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.soapplication.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.sobooking.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.socustomer.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.sogeneric.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.sopermission.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uicustomer_report.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uipermission.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
branches/dev-syncromind-2/eventplanner/js/portico/application.edit.js
branches/dev-syncromind-2/eventplanner/setup/default_records.inc.php
branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang
branches/dev-syncromind-2/eventplanner/setup/setup.inc.php
branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
branches/dev-syncromind-2/eventplanner/templates/base/booking.xsl
branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
branches/dev-syncromind-2/eventplanner/templates/base/events.xsl
branches/dev-syncromind-2/eventplanner/templates/base/vendor.xsl
branches/dev-syncromind-2/eventplannerfrontend/inc/class.hook_helper.inc.php
branches/dev-syncromind-2/eventplannerfrontend/js/portico/application.edit.js
branches/dev-syncromind-2/eventplannerfrontend/logout.php
branches/dev-syncromind-2/eventplannerfrontend/setup/default_records.inc.php
branches/dev-syncromind-2/eventplannerfrontend/templates/base/application.xsl
branches/dev-syncromind-2/eventplannerfrontend/templates/base/booking.xsl
branches/dev-syncromind-2/eventplannerfrontend/templates/base/customer.xsl
branches/dev-syncromind-2/eventplannerfrontend/templates/base/events.xsl
branches/dev-syncromind-2/eventplannerfrontend/templates/base/vendor.xsl
branches/dev-syncromind-2/header.inc.php.template
branches/dev-syncromind-2/helpdesk/inc/class.botts.inc.php
branches/dev-syncromind-2/helpdesk/inc/class.menu.inc.php
branches/dev-syncromind-2/helpdesk/inc/class.sogeneric.inc.php
branches/dev-syncromind-2/helpdesk/inc/class.uilookup.inc.php
branches/dev-syncromind-2/helpdesk/inc/class.uitts.inc.php
branches/dev-syncromind-2/helpdesk/js/portico/tts.add.js
branches/dev-syncromind-2/helpdesk/setup/phpgw_no.lang
branches/dev-syncromind-2/helpdesk/setup/setup.inc.php
branches/dev-syncromind-2/helpdesk/setup/tables_current.inc.php
branches/dev-syncromind-2/helpdesk/setup/tables_update.inc.php
branches/dev-syncromind-2/helpdesk/templates/base/config.tpl
branches/dev-syncromind-2/helpdesk/templates/base/tts.xsl
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-active-record.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-active-recordx.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-csvlib.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-datadict.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-error.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-errorhandler.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-errorpear.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-exceptions.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-iterator.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-lib.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-memcache.lib.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-pager.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-pear.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-perf.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-php4.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-time.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-xmlschema.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb-xmlschema03.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/adodb.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/composer.json
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-access.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-db2.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-firebird.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-generic.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-ibase.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-informix.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-mssql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-mssqlnative.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-mysql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-oci8.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-postgres.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-sapdb.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-sqlite.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/datadict/datadict-sybase.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/docs/changelog.md
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-access.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-ado.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-ado5.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-ado_access.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-ado_mssql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-borland_ibase.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-csv.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-db2.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-db2oci.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-db2ora.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-fbsql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-firebird.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-ibase.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-informix.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-informix72.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-ldap.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-mssql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-mssqlnative.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-mssqlpo.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-mysql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-mysqli.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-mysqlpo.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-mysqlt.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-netezza.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-oci8.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-oci805.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-oci8po.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-oci8quercus.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-odbc.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-odbc_db2.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-odbc_mssql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-odbc_oracle.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-odbtp.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-odbtp_unicode.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-oracle.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-pdo.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-pdo_mssql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-pdo_mysql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-pdo_oci.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-pdo_pgsql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-pdo_sqlite.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-postgres.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-postgres64.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-postgres7.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-postgres8.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-postgres9.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-proxy.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-sapdb.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-sqlanywhere.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-sqlite.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-sqlite3.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-sqlitepo.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-sybase.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-sybase_ase.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/drivers/adodb-vfp.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/pear/Auth/Container/ADOdb.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/perf/perf-db2.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/perf/perf-informix.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/perf/perf-mssql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/perf/perf-mssqlnative.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/perf/perf-mysql.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/perf/perf-oci8.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/perf/perf-postgres.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/pivottable.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/rsfilter.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/server.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-compress-bzip2.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-compress-gzip.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-cryptsession.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-cryptsession2.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-encrypt-mcrypt.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-encrypt-md5.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-encrypt-secret.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-session-clob.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-session-clob2.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-session.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/adodb-session2.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/old/adodb-cryptsession.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/old/adodb-session-clob.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/session/old/adodb-session.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/toexport.inc.php
branches/dev-syncromind-2/phpgwapi/inc/adodb/tohtml.inc.php
branches/dev-syncromind-2/phpgwapi/inc/auth/class.auth_.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.cache.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.common.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.crypto.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.css.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.historylog.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.jqcal2.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.jquery.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.js.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.login.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.mailer_smtp.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.sessions.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.setup.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.setup_detection.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.setup_html.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.socommon.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.uicommon.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.uicommon_jquery.inc.php
branches/dev-syncromind-2/phpgwapi/inc/functions.inc.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/VERSION
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/class.phpmailer.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/class.pop3.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/class.smtp.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/composer.json
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/code_generator.phps
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/contentsutf8.html
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/scripts/XRegExp.js
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/scripts/shLegacy.js
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/send_file_upload.phps
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/smtp_check.phps
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/extras/EasyPeasyICS.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/extras/htmlfilter.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/extras/ntlm_sasl_client.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-ar.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-bg.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-ca.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-ch.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-de.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-el.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-es.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-et.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-fi.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-fo.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-fr.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-gl.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-he.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-hr.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-ja.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-ka.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-ko.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-lt.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-lv.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-ms.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-nl.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-pl.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-pt.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-ro.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-ru.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-sl.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-sr.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-vi.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-zh_cn.php
branches/dev-syncromind-2/phpgwapi/js/jquery/common.js
branches/dev-syncromind-2/phpgwapi/templates/activitycalendar/head.inc.php
branches/dev-syncromind-2/phpgwapi/templates/base/attributes_form.xsl
branches/dev-syncromind-2/phpgwapi/templates/base/datatable_inline.xsl
branches/dev-syncromind-2/phpgwapi/templates/bkbooking/head.inc.php
branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/footer.tpl
branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/head.inc.php
branches/dev-syncromind-2/phpgwapi/templates/bookingfrontend/head.tpl
branches/dev-syncromind-2/phpgwapi/templates/frontend/head.inc.php
branches/dev-syncromind-2/phpgwapi/templates/mobilefrontend/head.inc.php
branches/dev-syncromind-2/phpgwapi/templates/portico/head.inc.php
branches/dev-syncromind-2/phpgwapi/templates/pure/head.inc.php
branches/dev-syncromind-2/phpgwapi/templates/simple/head.inc.php
branches/dev-syncromind-2/property/inc/class.boentity.inc.php
branches/dev-syncromind-2/property/inc/class.boworkorder.inc.php
branches/dev-syncromind-2/property/inc/class.historylog.inc.php
branches/dev-syncromind-2/property/inc/class.menu.inc.php
branches/dev-syncromind-2/property/inc/class.soentity.inc.php
branches/dev-syncromind-2/property/inc/class.sogeneric.inc.php
branches/dev-syncromind-2/property/inc/class.sogeneric_.inc.php
branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php
branches/dev-syncromind-2/property/inc/class.soproject.inc.php
branches/dev-syncromind-2/property/inc/class.soworkorder.inc.php
branches/dev-syncromind-2/property/inc/class.uibudget.inc.php
branches/dev-syncromind-2/property/inc/class.uigallery.inc.php
branches/dev-syncromind-2/property/inc/class.uigeneric.inc.php
branches/dev-syncromind-2/property/inc/class.uiproject.inc.php
branches/dev-syncromind-2/property/inc/class.uitts.inc.php
branches/dev-syncromind-2/property/inc/class.uiwo_hour.inc.php
branches/dev-syncromind-2/property/inc/class.uiworkorder.inc.php
branches/dev-syncromind-2/property/inc/cron/default/Import_fra_agresso_X205_BK.php
branches/dev-syncromind-2/property/inc/cron/default/synkroniser_med_boei.php
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_exporter_varemottak_til_Agresso.php
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_melding.php
branches/dev-syncromind-2/property/inc/custom/default/BkBygg_lag_Agresso_ordre_fra_workorder.php
branches/dev-syncromind-2/property/inc/custom/default/LRS_oppdater_el_anlegg.php
branches/dev-syncromind-2/property/js/portico/project.edit.js
branches/dev-syncromind-2/property/setup/default_records.inc.php
branches/dev-syncromind-2/property/setup/phpgw_no.lang
branches/dev-syncromind-2/property/setup/setup.inc.php
branches/dev-syncromind-2/property/setup/tables_current.inc.php
branches/dev-syncromind-2/property/setup/tables_update.inc.php
branches/dev-syncromind-2/property/templates/base/columns.xsl
branches/dev-syncromind-2/property/templates/base/generic.xsl
branches/dev-syncromind-2/property/templates/base/tts_report.xsl
branches/dev-syncromind-2/property/templates/base/wo_hour.index.xsl
branches/dev-syncromind-2/rental/inc/class.sobilling.inc.php
branches/dev-syncromind-2/rental/inc/class.socontract_price_item.inc.php
branches/dev-syncromind-2/rental/inc/class.sogeneric.inc.php
branches/dev-syncromind-2/rental/inc/class.uibilling.inc.php
branches/dev-syncromind-2/rental/inc/class.uicomposite.inc.php
branches/dev-syncromind-2/rental/inc/class.uiinvoice_price_item.inc.php
branches/dev-syncromind-2/rental/inc/class.uiparty.inc.php
branches/dev-syncromind-2/rental/inc/model/class.agresso_lg04.inc.php
branches/dev-syncromind-2/rental/inc/model/class.contract_price_item.inc.php
branches/dev-syncromind-2/rental/inc/model/class.invoice.inc.php
branches/dev-syncromind-2/rental/js/rental/composite.edit.js
branches/dev-syncromind-2/rental/js/rental/composite.view.js
branches/dev-syncromind-2/rental/setup/phpgw_no.lang
branches/dev-syncromind-2/rental/setup/setup.inc.php
branches/dev-syncromind-2/rental/setup/tables_current.inc.php
branches/dev-syncromind-2/rental/setup/tables_update.inc.php
branches/dev-syncromind-2/setup/inc/functions.inc.php
branches/dev-syncromind-2/setup/inc/hook_config.inc.php
branches/dev-syncromind-2/setup/lang/phpgw_de.lang
branches/dev-syncromind-2/setup/lang/phpgw_en.lang
branches/dev-syncromind-2/setup/lang/phpgw_fr.lang
branches/dev-syncromind-2/setup/lang/phpgw_no.lang
branches/dev-syncromind-2/setup/lang/phpgw_tr.lang
branches/dev-syncromind-2/setup/manageheader.php
branches/dev-syncromind-2/setup/templates/base/manageheader.tpl
Added Paths:
-----------
branches/dev-syncromind-2/booking/inc/class.bogeneric.inc.php
branches/dev-syncromind-2/booking/inc/class.sogeneric.inc.php
branches/dev-syncromind-2/booking/inc/class.uigeneric.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.bocalendar.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.socalendar.inc.php
branches/dev-syncromind-2/eventplanner/inc/class.uicalendar.inc.php
branches/dev-syncromind-2/eventplanner/inc/model/class.calendar.inc.php
branches/dev-syncromind-2/eventplanner/js/portico/vendor.edit.js
branches/dev-syncromind-2/eventplannerfrontend/inc/class.uicalendar.inc.php
branches/dev-syncromind-2/eventplannerfrontend/js/portico/vendor.edit.js
branches/dev-syncromind-2/helpdesk/inc/class.boemail_out.inc.php
branches/dev-syncromind-2/helpdesk/inc/class.soemail_out.inc.php
branches/dev-syncromind-2/helpdesk/inc/class.uiemail_out.inc.php
branches/dev-syncromind-2/helpdesk/inc/model/
branches/dev-syncromind-2/helpdesk/js/portico/email_out.edit.js
branches/dev-syncromind-2/helpdesk/templates/base/email_out.xsl
branches/dev-syncromind-2/phpgwapi/inc/class.crypto_libsodium.inc.php
branches/dev-syncromind-2/phpgwapi/inc/class.crypto_mcrypt.inc.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/class.phpmaileroauth.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/class.phpmaileroauthgoogle.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/composer.lock
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/DKIM.phps
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/contactform.phps
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/gmail_xoauth.phps
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/send_multiple_file_upload.phps
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/examples/signed-mail.phps
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/get_oauth_token.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-cs.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-da.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-nb.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-pt_br.php
branches/dev-syncromind-2/phpgwapi/inc/phpmailer/language/phpmailer.lang-sv.php
branches/dev-syncromind-2/property/inc/cron/default/oppdater_betalte_faktura_BK.php
branches/dev-syncromind-2/property/inc/cron/default/synkroniser_med_boei_old.php
branches/dev-syncromind-2/property/inc/import/default/import_faktura_LRS_manglende_varemottak
Removed Paths:
-------------
branches/dev-syncromind-2/phpgwapi/inc/adodb/nbproject/
branches/dev-syncromind-2/phpgwapi/inc/adodb/tests/
branches/dev-syncromind-2/phpgwapi/inc/adodb/x.php
Property Changed:
----------------
branches/dev-syncromind-2/
branches/dev-syncromind-2/booking/
branches/dev-syncromind-2/bookingfrontend/
Index: branches/dev-syncromind-2
===================================================================
--- branches/dev-syncromind-2 2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2 2017-04-18 10:50:35 UTC (rev 16587)
Property changes on: branches/dev-syncromind-2
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
/branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
-/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746,15750-15770,15772-15775,15777-15795,15797-15798,15800-15812,15814-15838,15840,15842-15888,15890,15892-15997,15999-16097,16103-16128,16131-16187,16190-16299,16301-16393
\ No newline at end of property
+/trunk:14934-14935,15165-15215,15218-15220,15222-15304,15306-15337,15339,15341-15398,15400-15421,15423-15474,15476-15607,15609,15611,15613-15652,15654-15732,15734,15736-15746,15750-15770,15772-15775,15777-15795,15797-15798,15800-15812,15814-15838,15840,15842-15888,15890,15892-15997,15999-16097,16103-16128,16131-16187,16190-16299,16301-16393,16396-16586
\ No newline at end of property
Modified: branches/dev-syncromind-2/admin/inc/class.uiconfig.inc.php
===================================================================
--- branches/dev-syncromind-2/admin/inc/class.uiconfig.inc.php 2017-04-18
09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/admin/inc/class.uiconfig.inc.php 2017-04-18
10:50:35 UTC (rev 16587)
@@ -184,7 +184,8 @@
{
$valarray = explode('_', $value);
$type = $valarray[0];
- $new = $newval = '';
+ $new = array();
+ $newval = '';
while($chunk = next($valarray))
{
Modified: branches/dev-syncromind-2/admin/templates/base/config.tpl
===================================================================
--- branches/dev-syncromind-2/admin/templates/base/config.tpl 2017-04-18
09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/admin/templates/base/config.tpl 2017-04-18
10:50:35 UTC (rev 16587)
@@ -131,6 +131,8 @@
<option
value="0">{lang_No}</option>
<option
value="1"{selected_SMTPDebug_1}>commands</option>
<option
value="2"{selected_SMTPDebug_2}>commands and data</option>
+ <option
value="1"{selected_SMTPDebug_3}>plus connection status</option>
+ <option
value="2"{selected_SMTPDebug_4}>Low-level data output, all messages</option>
</select>
</td>
</tr>
Index: branches/dev-syncromind-2/booking
===================================================================
--- branches/dev-syncromind-2/booking 2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/booking 2017-04-18 10:50:35 UTC (rev 16587)
Property changes on: branches/dev-syncromind-2/booking
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
/branches/stavangerkommune/booking:9468-12740,12743-12875,12986
-/trunk/booking:14937-15027,15165-15215,15253-15304,15306-15337,15341-15398,15476-15607,15613-15652,15654-15732,15814-15838,15892-15997,15999-16097,16131-16187,16301-16393
\ No newline at end of property
+/trunk/booking:14937-15027,15165-15215,15253-15304,15306-15337,15341-15398,15476-15607,15613-15652,15654-15732,15814-15838,15892-15997,15999-16097,16131-16187,16301-16393,16396-16586
\ No newline at end of property
Copied: branches/dev-syncromind-2/booking/inc/class.bogeneric.inc.php (from rev
16586, trunk/booking/inc/class.bogeneric.inc.php)
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.bogeneric.inc.php
(rev 0)
+++ branches/dev-syncromind-2/booking/inc/class.bogeneric.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,37 @@
+<?php
+/**
+ * phpGroupWare - booking: a part of a Facilities Management System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2016 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/ and Nordlandssykehuset
+ * @package booking
+ * @subpackage generic
+ * @version $Id: $
+ */
+ phpgw::import_class('property.bogeneric');
+
+ class booking_bogeneric extends property_bogeneric
+ {
+ public function __construct()
+ {
+ parent::__construct();
+ }
+ }
\ No newline at end of file
Modified: branches/dev-syncromind-2/booking/inc/class.menu.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.menu.inc.php 2017-04-18
09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/booking/inc/class.menu.inc.php 2017-04-18
10:50:35 UTC (rev 16587)
@@ -317,7 +317,7 @@
'office' => array
(
'text' =>
lang('office'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uigeneric.index',
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'booking.uigeneric.index',
'type' =>
'bb_office')),
'children' => array
(
@@ -324,7 +324,7 @@
'office_user'
=> array
(
'text'
=> lang('office user'),
- 'url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uigeneric.index',
+ 'url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'booking.uigeneric.index',
'type' => 'bb_office_user'))
)
)
Modified: branches/dev-syncromind-2/booking/inc/class.socommon.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.socommon.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/booking/inc/class.socommon.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -559,6 +559,7 @@
{
if ($params['manytomany'])
{
+ $row[$field] = array();
$table =
$params['manytomany']['table'];
$key =
$params['manytomany']['key'];
$ids = join(',',
array_keys($id_map));
@@ -572,10 +573,10 @@
$colnames = join(',',
$colnames);
$this->db->query("SELECT $colnames, $key FROM $table WHERE $key IN($ids)",
__LINE__, __FILE__);
- $row[$field] = array();
while
($this->db->next_record())
{
$id =
$this->_unmarshal($this->db->f($key, false), 'int');
+
$results[$id_map[$id]][$field] = array();
$data = array();
foreach
($params['manytomany']['column'] as $intOrCol => $paramsOrCol)
{
@@ -600,10 +601,13 @@
{
$column =
$params['manytomany']['column'];
$this->db->query("SELECT $column, $key FROM $table WHERE $key IN($ids)",
__LINE__, __FILE__);
- $row[$field] = array();
while
($this->db->next_record())
{
$id =
$this->_unmarshal($this->db->f($key, false), 'int');
+
if(!isset($results[$id_map[$id]][$field]))
+ {
+
$results[$id_map[$id]][$field] = array();
+ }
$results[$id_map[$id]][$field][] = $this->_unmarshal($this->db->f($column,
false), $params['type']);
}
}
Copied: branches/dev-syncromind-2/booking/inc/class.sogeneric.inc.php (from rev
16586, trunk/booking/inc/class.sogeneric.inc.php)
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.sogeneric.inc.php
(rev 0)
+++ branches/dev-syncromind-2/booking/inc/class.sogeneric.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,141 @@
+<?php
+ /**
+ * phpGroupWare - booking: a part of a Facilities Management System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2016 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/ and Nordlandssykehuset
+ * @package booking
+ * @subpackage generic
+ * @version $Id: $
+ */
+ phpgw::import_class('property.sogeneric_');
+
+ class booking_sogeneric extends property_sogeneric_
+ {
+
+ var $appname = 'booking';
+
+ function __construct( $type = '', $type_id = 0 )
+ {
+ parent::__construct($type, $type_id);
+ }
+
+ public function get_location_info( $type, $type_id = 0 )
+ {
+
+ $type_id = (int)$type_id;
+ $this->type = $type;
+ $this->type_id = $type_id;
+ $info = array();
+
+ if (!$type)
+ {
+ return $info;
+ }
+
+ switch ($type)
+ {
+// START BOOKING TABLES
+ case 'bb_office':
+ $info = array
+ (
+ 'table' => 'bb_office',
+ 'id' => array('name' => 'id',
'type' => 'auto'),
+ 'fields' => array
+ (
+ array
+ (
+ 'name' =>
'name',
+ 'descr' =>
lang('name'),
+ 'type' =>
'varchar'
+ ),
+ array
+ (
+ 'name' =>
'description',
+ 'descr' =>
lang('description'),
+ 'type' => 'text'
+ )
+ ),
+ 'edit_msg' => lang('edit'),
+ 'add_msg' => lang('add'),
+ 'name' =>
$GLOBALS['phpgw']->translation->translate('office', array(), false, 'booking'),
+ 'acl_app' => 'booking',
+ 'acl_location' => '.office',
+ 'system_location' => '.office',
+ 'menu_selection' =>
'booking::settings::office',
+ 'default' => array
+ (
+ 'user_id' =>
array('add' => '$this->account'),
+ 'entry_date' =>
array('add' => 'time()'),
+ 'modified_date' =>
array('edit' => 'time()'),
+ ),
+ 'check_grant' => false
+ );
+
+ break;
+ case 'bb_office_user':
+ $info = array
+ (
+ 'table' => 'bb_office_user',
+ 'id' => array('name' => 'id',
'type' => 'auto'),
+ 'fields' => array(
+ array(
+ 'name' =>
'office',
+ 'descr' =>
$GLOBALS['phpgw']->translation->translate('office', array(), false, 'booking'),
+ 'type' =>
'select',
+ 'filter' =>
true,
+ 'values_def' =>
array(
+
'valueset' => false,
+
'method' => 'booking.bogeneric.get_list',
+
'get_single_value' => 'booking.sogeneric.get_name',
+
'method_input' => array('type' => 'bb_office', 'selected' => '##office##')
+ )
+ )
+ ),
+ 'edit_msg' => lang('edit'),
+ 'add_msg' => lang('add'),
+ 'name' =>
$GLOBALS['phpgw']->translation->translate('office user', array(), false,
'booking'),
+ 'acl_app' => 'booking',
+ 'acl_location' =>
'.office.user',
+ 'system_location' =>
'.office.user',
+ 'menu_selection' =>
'booking::settings::office::office_user',
+ 'default' => array
+ (
+ 'user_id' =>
array('add' => '$this->account'),
+ 'entry_date' =>
array('add' => 'time()'),
+ 'modified_date' =>
array('edit' => 'time()'),
+ ),
+ 'check_grant' => false
+ );
+
+ break;
+
+// END BOOKING TABLES
+ default:
+ $message = lang('ERROR: illegal type
%1', $type);
+ phpgwapi_cache::message_set($message,
'error');
+// throw new Exception(lang('ERROR: illegal type
%1', $type));
+ }
+
+ $this->location_info = $info;
+ return $info;
+ }
+ }
\ No newline at end of file
Modified: branches/dev-syncromind-2/booking/inc/class.uiallocation.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.uiallocation.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/booking/inc/class.uiallocation.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -297,6 +297,15 @@
$allocation['active'] = '1';
$allocation['completed'] = '0';
+ $weekday = phpgw::get_var('weekday', 'string',
'POST');
+
+ if(!$weekday)
+ {
+ $weekday = strtolower (date('l',
phpgwapi_datetime::date_to_timestamp($_POST['from_'])));
+ }
+
+ $_POST['weekday'] = $weekday;
+
$from_date = $_POST['from_'];
$to_date = $_POST['to_'];
$from_date_arr = explode(' ', $_POST['from_']);
@@ -304,34 +313,35 @@
if(count($from_date_arr) == 2)
{
$from_time = $from_date_arr[1];
- $to_time = $to_date_arr[1];
+ if(count($to_date_arr) == 2)
+ {
+ $to_time = $to_date_arr[1];
+ }
+ else
+ {
+ $to_time = $to_date_arr[0];
+ }
+
+ $allocation['from_'] =
strftime("%Y-%m-%d %H:%M",
phpgwapi_datetime::date_to_timestamp($from_date_arr[0] . " " . $from_time));
+ $allocation['to_'] = strftime("%Y-%m-%d
%H:%M", phpgwapi_datetime::date_to_timestamp($from_date_arr[0] . " " .
$to_time));
}
else
{
$from_time = $_POST['from_'];
$to_time = $_POST['to_'];
- }
+ $allocation['from_'] =
strftime("%Y-%m-%d %H:%M", strtotime($weekday . " " . $from_time));
+ $allocation['to_'] = strftime("%Y-%m-%d
%H:%M", strtotime($weekday . " " . $to_time));
- if(!isset($_POST['weekday']))
- {
- $_POST['weekday'] = strtolower
(date('l', phpgwapi_datetime::date_to_timestamp($_POST['from_'])));
- }
-
- $weekday = $_POST['weekday'];
-
-// $allocation['from_'] = strftime("%Y-%m-%d
%H:%M", strtotime($_POST['weekday'] . " " . $_POST['from_']));
-// $allocation['to_'] = strftime("%Y-%m-%d %H:%M",
strtotime($_POST['weekday'] . " " . $_POST['to_']));
- $allocation['from_'] = strftime("%Y-%m-%d
%H:%M", strtotime($_POST['weekday'] . " " . $from_time));
- $allocation['to_'] = strftime("%Y-%m-%d %H:%M",
strtotime($_POST['weekday'] . " " . $to_time));
-
- if (($_POST['weekday'] != 'sunday' && date('w')
> date('w', strtotime($_POST['weekday']))) || (date('w') == '0' && date('w') <
date('w', strtotime($_POST['weekday']))))
- {
- if (!phpgw::get_var('weekday',
'string', 'POST'))
+ if (($weekday != 'sunday' && date('w')
> date('w', strtotime($weekday))) || (date('w') == '0' && date('w') < date('w',
strtotime($weekday))))
{
- $allocation['from_'] =
strftime("%Y-%m-%d %H:%M", strtotime($_POST['weekday'] . " " .
$from_date_arr[1]) - 60 * 60 * 24 * 7);
- $allocation['to_'] =
strftime("%Y-%m-%d %H:%M", strtotime($_POST['weekday'] . " " . $to_date_arr[1])
- 60 * 60 * 24 * 7);
+ if (!phpgw::get_var('weekday',
'string', 'POST'))
+ {
+ $allocation['from_'] =
strftime("%Y-%m-%d %H:%M", strtotime($weekday . " " . $from_date_arr[1]) - 60 *
60 * 24 * 7);
+ $allocation['to_'] =
strftime("%Y-%m-%d %H:%M", strtotime($weekday . " " . $to_date_arr[1]) - 60 *
60 * 24 * 7);
+ }
}
}
+
$_POST['from_'] = $allocation['from_'];
$_POST['to_'] = $allocation['to_'];
@@ -409,19 +419,25 @@
}
else
{
- $dateTimeFrom = phpgw::get_var('from_',
'string', 'POST');
- $dateTimeTo = phpgw::get_var('to_', 'string',
'POST');
- $dateTimeFromE = explode(" ", $dateTimeFrom[0]);
- $dateTimeToE = explode(" ", $dateTimeTo[0]);
- if (phpgw::get_var('from_', 'string') < 14)
+ $dateformat = phpgw::get_var('dateformat',
'string');
+ $dateTimeFrom = phpgw::get_var('from_',
'string');
+ $dateTimeTo = phpgw::get_var('to_', 'string');
+ if(is_array($dateTimeFrom))
{
- $timeFrom[] = phpgw::get_var('from_',
'string', 'POST');
- $timeTo[] = phpgw::get_var('to_',
'string', 'POST');
+ $dateTimeFrom = $dateTimeFrom[0];
+ $dateTimeTo = $dateTimeTo[0];
}
+ $dateTimeFromE = explode(" ", $dateTimeFrom);
+ $dateTimeToE = explode(" ", $dateTimeTo);
+ if ($dateTimeFrom < 14)
+ {
+ $timeFrom = $dateTimeFrom;
+ $timeTo = $dateTimeTo;
+ }
else
{
- $timeFrom[] = $dateTimeFromE[1];
- $timeTo[] = $dateTimeToE[1];
+ $timeFrom = $dateTimeFromE[1];
+ $timeTo = $dateTimeToE[1];
}
array_set_default($allocation, 'resources',
array(phpgw::get_var('resource', 'int')));
@@ -429,7 +445,7 @@
array_set_default($allocation, 'building_name',
phpgw::get_var('building_name', 'string'));
array_set_default($allocation, 'from_',
$timeFrom);
array_set_default($allocation, 'to_', $timeTo);
- $weekday = phpgw::get_var('weekday', 'string',
'POST');
+ $weekday = phpgw::get_var('weekday', 'string');
}
$this->flash_form_errors($errors);
@@ -438,8 +454,8 @@
$allocation['cancel_link'] =
self::link(array('menuaction' => 'booking.uiallocation.index'));
array_set_default($allocation, 'cost', '0');
- $GLOBALS['phpgw']->jqcal2->add_listener('field_from',
'time');
- $GLOBALS['phpgw']->jqcal2->add_listener('field_to',
'time');
+// $_timeFrom = $timeFrom ? $timeFrom : '';
+ $_timeTo = $timeTo ? $timeTo : '';
$tabs = array();
$tabs['generic'] = array('label' => lang('Allocation
New'), 'link' => '#allocation_new');
@@ -446,16 +462,31 @@
$active_tab = 'generic';
$allocation['tabs'] =
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
- $allocation['validator'] =
phpgwapi_jquery::formvalidator_generate(array('location',
- 'date', 'security', 'file'));
+ $allocation['validator'] =
phpgwapi_jquery::formvalidator_generate(array('date', 'security'));
if ($step < 2)
{
+ if($dateformat == 'Y-m-d' &&
$_SERVER['REQUEST_METHOD'] == 'GET')
+ {
+ $allocation['from_'] =
date("{$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']}
H:i",strtotime($dateTimeFrom));
+ $_timeFrom = strtotime($dateTimeFrom);
+ }
+ else
+ {
+ $allocation['from_'] = $dateTimeFrom;
+ $_timeFrom =
phpgwapi_datetime::date_to_timestamp($dateTimeFrom);
+ }
if ($_SERVER['REQUEST_METHOD'] == 'POST' &&
$errors)
{
- $allocation['from_'] =
strftime("%H:%M", strtotime($_POST['weekday'] . " " . $_POST['from_']));
- $allocation['to_'] = strftime("%H:%M",
strtotime($_POST['weekday'] . " " . $_POST['to_']));
+ // $allocation['from_'] =
strftime("%H:%M", strtotime($_POST['weekday'] . " " . $_POST['from_']));
+ // $allocation['to_'] = strftime("%H:%M",
strtotime($_POST['weekday'] . " " . $_POST['to_']));
+ // $_timeFrom = $allocation['from_'];
+ // $_timeTo = $allocation['to_'];
}
+
+
$GLOBALS['phpgw']->jqcal2->add_listener('field_from', 'datetime', $_timeFrom);
+
$GLOBALS['phpgw']->jqcal2->add_listener('field_to', 'time', $_timeTo);
+
self::render_template_xsl('allocation_new',
array('allocation' => $allocation,
'step' => $step,
'interval' => $_POST['field_interval'],
Copied: branches/dev-syncromind-2/booking/inc/class.uigeneric.inc.php (from rev
16586, trunk/booking/inc/class.uigeneric.inc.php)
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.uigeneric.inc.php
(rev 0)
+++ branches/dev-syncromind-2/booking/inc/class.uigeneric.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,37 @@
+<?php
+/**
+ * phpGroupWare - booking: a part of a Facilities Management System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2016 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/ and Nordlandssykehuset
+ * @package booking
+ * @subpackage generic
+ * @version $Id: $
+ */
+ phpgw::import_class('property.uigeneric');
+
+ class booking_uigeneric extends property_uigeneric
+ {
+ public function __construct()
+ {
+ parent::__construct();
+ }
+ }
\ No newline at end of file
Modified: branches/dev-syncromind-2/booking/inc/class.uiseason.inc.php
===================================================================
--- branches/dev-syncromind-2/booking/inc/class.uiseason.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/booking/inc/class.uiseason.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -244,8 +244,8 @@
$season['cancel_link'] = self::link(array('menuaction'
=> 'booking.uiseason.show',
'id' => $season['id']));
- $GLOBALS['phpgw']->jqcal2->add_listener('from_',
'date');
- $GLOBALS['phpgw']->jqcal2->add_listener('to_', 'date');
+ $GLOBALS['phpgw']->jqcal2->add_listener('from_',
'date',phpgwapi_datetime::date_to_timestamp($season['from_']));
+ $GLOBALS['phpgw']->jqcal2->add_listener('to_', 'date',
phpgwapi_datetime::date_to_timestamp($season['to_']));
$tabs = array();
$tabs['generic'] = array('label' => lang('Season
Edit'), 'link' => '#season_new');
@@ -349,8 +349,8 @@
$boundary['to_'] = "{$to_arr[0]}:{$to_arr[1]}";
}
- $GLOBALS['phpgw']->jqcal2->add_listener('field_from',
'time');
- $GLOBALS['phpgw']->jqcal2->add_listener('field_to',
'time');
+ $GLOBALS['phpgw']->jqcal2->add_listener('field_from',
'time', $boundary['from_']);
+ $GLOBALS['phpgw']->jqcal2->add_listener('field_to',
'time', $boundary['to_']);
self::render_template('season_boundaries',
array('boundary' => $boundary, 'boundaries' => $boundaries,
'season' => $season));
Modified: branches/dev-syncromind-2/booking/js/booking/schedule.js
===================================================================
--- branches/dev-syncromind-2/booking/js/booking/schedule.js 2017-04-18
09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/booking/js/booking/schedule.js 2017-04-18
10:50:35 UTC (rev 16587)
@@ -161,7 +161,7 @@
weekday[4] = "thursday";
weekday[5] = "friday";
weekday[6] = "saturday";
- url += '&from_[]=' + state + _from + '&to_[]=' + state + _to +
'&weekday=' + weekday[day];
+ url += '&from_[]=' + state + _from + '&to_[]=' + state + _to +
'&weekday=' + weekday[day] + '&dateformat=Y-m-d';
if (resource)
{
url += '&resource=' + resource;
Index: branches/dev-syncromind-2/bookingfrontend
===================================================================
--- branches/dev-syncromind-2/bookingfrontend 2017-04-18 09:22:12 UTC (rev
16586)
+++ branches/dev-syncromind-2/bookingfrontend 2017-04-18 10:50:35 UTC (rev
16587)
Property changes on: branches/dev-syncromind-2/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
/branches/stavangerkommune/bookingfrontend:9468-12740,12986
-/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607,15613-15652,15814-15838,15892-15997,16131-16187,16190-16299,16301-16393
\ No newline at end of property
+/trunk/bookingfrontend:14937-15027,15253-15304,15306-15337,15476-15607,15613-15652,15814-15838,15892-15997,16131-16187,16190-16299,16301-16393,16396-16586
\ No newline at end of property
Modified: branches/dev-syncromind-2/bookingfrontend/inc/custom/default/MinId.php
===================================================================
--- branches/dev-syncromind-2/bookingfrontend/inc/custom/default/MinId.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/bookingfrontend/inc/custom/default/MinId.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -130,7 +130,18 @@
'orgnr' => $db->f('orgnr', true)
);
}
-
+
+ //Testvalues
+ /*
+ $results[] = array
+ (
+ 'orgnr' => 980016080
+ );
+ $results[] = array
+ (
+ 'orgnr' => 996277267
+ );
+ */
return $results;
}
Modified: branches/dev-syncromind-2/eventplanner/inc/class.boapplication.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.boapplication.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.boapplication.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -99,11 +99,11 @@
return $values;
}
- public function read_single($id, $return_object = true)
+ public function read_single($id, $return_object = true,
$relaxe_acl = false)
{
if ($id)
{
- $values =
eventplanner_soapplication::get_instance()->read_single($id, $return_object);
+ $values =
eventplanner_soapplication::get_instance()->read_single($id, $return_object,
$relaxe_acl);
}
else
{
Modified: branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.bobooking.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -60,8 +60,19 @@
public function store($object)
{
+ $save_last_booking = false;
+ if(!$object->get_id())
+ {
+ $save_last_booking = true;
+ }
+
$this->store_pre_commit($object);
$ret =
eventplanner_sobooking::get_instance()->store($object);
+ if($ret && $save_last_booking)
+ {
+ phpgwapi_cache::system_set('eventplanner',
"last_booking{$object->customer_id}", time());
+ }
+
$this->store_post_commit($object);
return $ret;
}
@@ -104,8 +115,13 @@
return $values;
}
- public function update_active_status( $ids, $action )
+ public function get_booking_id_from_calendar( $calendar_id )
{
+ return
eventplanner_sobooking::get_instance()->get_booking_id_from_calendar($calendar_id);
+ }
+
+/* public function update_active_status( $ids, $action )
+ {
if($action == 'enable' && $ids)
{
$_ids = array();
@@ -118,12 +134,22 @@
$bookings =
eventplanner_sobooking::get_instance()->read($params);
+ $existing_booking_ids = array();
+ foreach ($bookings['results'] as $booking)
+ {
+ $existing_booking_ids[] =
$booking['id'];
+ }
+
$number_of_active =
(int)$bookings['total_records'];
$limit = (int)$application->num_granted_events;
-
+ $error = false;
foreach ($ids as $id)
{
+ if(in_array($id, $existing_booking_ids)
)
+ {
+ continue;
+ }
if($limit > $number_of_active)
{
$_ids[] = $id;
@@ -131,11 +157,16 @@
}
else
{
+ $error = true;
$message = lang('maximum of
granted events are reached');
phpgwapi_cache::message_set($message, 'error');
break;
}
}
+ if($ids && !$_ids && !$error)
+ {
+ return true;
+ }
}
else if ($action == 'delete' && $ids)
{
@@ -160,21 +191,5 @@
return
eventplanner_sobooking::get_instance()->update_active_status($_ids, $action);
}
-
- public function update_schedule( $id, $from_ )
- {
- $booking =
eventplanner_sobooking::get_instance()->read_single($id, true);
- $booking->from_ = $from_;
-// $application =
createObject('eventplanner.boapplication')->read_single($entity->application_id);
-// $booking->to_ = $booking->from_ +
((int)$application->timespan * 60);
- $booking->customer_id = $booking->customer_id ?
$booking->customer_id : '';//foreigns key
-
- if($booking->validate())
- {
- return $booking->store();
- }
-// return
eventplanner_sobooking::get_instance()->update($booking);
- }
-
-
+*/
}
\ No newline at end of file
Copied: branches/dev-syncromind-2/eventplanner/inc/class.bocalendar.inc.php
(from rev 16586, trunk/eventplanner/inc/class.bocalendar.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.bocalendar.inc.php
(rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.bocalendar.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,192 @@
+<?php
+ /**
+ * phpGroupWare
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2016 Free Software Foundation
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License v2 or later
+ * @internal
+ * @package eventplanner
+ * @subpackage calendar
+ * @version $Id:$
+ */
+
+ /*
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ phpgw::import_class('phpgwapi.bocommon');
+ phpgw::import_class('eventplanner.socalendar');
+
+ include_class('eventplanner', 'calendar', 'inc/model/');
+
+ class eventplanner_bocalendar extends phpgwapi_bocommon
+ {
+ protected static
+ $bo,
+ $fields,
+ $acl_location;
+
+ public function __construct()
+ {
+ $this->fields = eventplanner_calendar::get_fields();
+ $this->acl_location =
eventplanner_calendar::acl_location;
+ }
+
+ /**
+ * Implementing classes must return an instance of itself.
+ *
+ * @return the class instance.
+ */
+ public static function get_instance()
+ {
+ if (self::$bo == null)
+ {
+ self::$bo = new eventplanner_bocalendar();
+ }
+ return self::$bo;
+ }
+
+ public function store($object)
+ {
+ $this->store_pre_commit($object);
+ $ret =
eventplanner_socalendar::get_instance()->store($object);
+ $this->store_post_commit($object);
+ return $ret;
+ }
+
+ public function read($params)
+ {
+ $status_text = array(lang('inactive'), lang('active'));
+ if(empty($params['filters']['active']))
+ {
+ $params['filters']['active'] = 1;
+ }
+ else
+ {
+ unset($params['filters']['active']);
+ }
+ $values =
eventplanner_socalendar::get_instance()->read($params);
+ $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+ foreach ($values['results'] as &$entry)
+ {
+ $entry['created'] =
$GLOBALS['phpgw']->common->show_date($entry['created']);
+ $entry['modified'] =
$GLOBALS['phpgw']->common->show_date($entry['modified']);
+ $entry['from_'] =
$GLOBALS['phpgw']->common->show_date($entry['from_']);
+ $entry['to_'] =
$GLOBALS['phpgw']->common->show_date($entry['to_']);
+ $entry['status'] =
$status_text[$entry['active']];
+ }
+ return $values;
+ }
+
+ public function read_single($id, $return_object = true)
+ {
+ if ($id)
+ {
+ $values =
eventplanner_socalendar::get_instance()->read_single($id, $return_object);
+ }
+ else
+ {
+ $values = new eventplanner_calendar();
+ }
+
+ return $values;
+ }
+
+ public function update_active_status( $ids, $action )
+ {
+ if($action == 'enable' && $ids)
+ {
+ $_ids = array();
+ $application_id =
eventplanner_socalendar::get_instance()->read_single($ids[0],
true)->application_id;
+
+ $application =
createObject('eventplanner.boapplication')->read_single($application_id);
+ $params = array();
+ $params['filters']['active'] = 1;
+ $params['filters']['application_id'] =
$application_id;
+
+ $calendars =
eventplanner_socalendar::get_instance()->read($params);
+
+ $existing_calendar_ids = array();
+ foreach ($calendars['results'] as $calendar)
+ {
+ $existing_calendar_ids[] =
$calendar['id'];
+ }
+
+ $number_of_active =
(int)$calendars['total_records'];
+ $limit = (int)$application->num_granted_events;
+
+ $error = false;
+ foreach ($ids as $id)
+ {
+ if(in_array($id,
$existing_calendar_ids) )
+ {
+ continue;
+ }
+ if($limit > $number_of_active)
+ {
+ $_ids[] = $id;
+ $number_of_active ++;
+ }
+ else
+ {
+ $error = true;
+ $message = lang('maximum of
granted events are reached');
+
phpgwapi_cache::message_set($message, 'error');
+ break;
+ }
+ }
+ if($ids && !$_ids && !$error)
+ {
+ return true;
+ }
+ }
+ else if ($action == 'delete' && $ids)
+ {
+ foreach ($ids as $id)
+ {
+ $booking_id =
createObject('eventplanner.bobooking')->get_booking_id_from_calendar($id);
+ $booking =
eventplanner_sobooking::get_instance()->read_single($booking_id, true);
+ if(!$booking->customer_id)
+ {
+ $_ids[] = $id;
+ }
+ else
+ {
+ $message = lang('can not delete
calendar with customer');
+
phpgwapi_cache::message_set($message, 'error');
+ }
+ }
+ }
+ else
+ {
+ $_ids = $ids;
+ }
+
+ return
eventplanner_socalendar::get_instance()->update_active_status($_ids, $action);
+ }
+
+ public function update_schedule( $id, $from_ )
+ {
+ $calendar =
eventplanner_socalendar::get_instance()->read_single($id, true);
+ $calendar->from_ = $from_;
+ $calendar->process_update = true;
+
+ if($calendar->validate())
+ {
+ return $calendar->store();
+ }
+ return false;
+ }
+ }
\ No newline at end of file
Modified: branches/dev-syncromind-2/eventplanner/inc/class.bocustomer.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.bocustomer.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.bocustomer.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -88,11 +88,11 @@
return $values;
}
- public function read_single($id, $return_object = true)
+ public function read_single($id, $return_object = true,
$relaxe_acl = false)
{
if ($id)
{
- $values =
eventplanner_socustomer::get_instance()->read_single($id, $return_object);
+ $values =
eventplanner_socustomer::get_instance()->read_single($id, $return_object,
$relaxe_acl);
}
else
{
Modified: branches/dev-syncromind-2/eventplanner/inc/class.bopermission.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.bopermission.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.bopermission.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -120,4 +120,9 @@
return $values;
}
+
+ public function delete( $id )
+ {
+ return
eventplanner_sopermission::get_instance()->delete($id);
+ }
}
\ No newline at end of file
Modified: branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.menu.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -78,11 +78,6 @@
'text' => lang('permission'),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'eventplanner.uipermission.index') )
),
- 'list_atrribs' => array(
- 'text' =>
$GLOBALS['phpgw']->translation->translate('custom fields', array(), true),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'admin.ui_custom.list_attribute',
- 'appname' =>
'eventplanner'))
- ),
'list_functions' => array(
'text' =>
$GLOBALS['phpgw']->translation->translate('custom functions', array(), true),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'admin.ui_custom.list_custom_function',
Modified: branches/dev-syncromind-2/eventplanner/inc/class.soapplication.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.soapplication.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.soapplication.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -73,7 +73,7 @@
{
$clause = '';
- if($this->use_acl && $this->currentapp &&
$this->acl_location)
+ if(!$this->relaxe_acl && ($this->use_acl &&
$this->currentapp && $this->acl_location))
{
$paranthesis = false;
Modified: branches/dev-syncromind-2/eventplanner/inc/class.sobooking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.sobooking.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.sobooking.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -36,6 +36,8 @@
public function __construct()
{
parent::__construct('eventplanner_booking',
eventplanner_booking::get_fields());
+ $this->acl_location =
eventplanner_booking::acl_location;
+ $this->use_acl = true;
}
/**
@@ -52,7 +54,38 @@
return self::$so;
}
+ function get_acl_condition( )
+ {
+ if($this->relaxe_acl)
+ {
+ return;
+ }
+ $acl_condition = parent::get_acl_condition();
+
+ $sql = "SELECT object_id, permission FROM
eventplanner_permission WHERE subject_id = {$this->account}";
+ $this->db->query($sql,__LINE__,__FILE__);
+ $object_ids = array(-1);
+ while ($this->db->next_record())
+ {
+ $permission = $this->db->f('permission');
+ if($permission & PHPGW_ACL_READ)
+ {
+ $object_ids[] =
$this->db->f('object_id');
+ }
+ }
+
+ if($acl_condition)
+ {
+ return '(' . $acl_condition . ' OR
eventplanner_booking.customer_id IN (' . implode(',', $object_ids) . '))';
+ }
+ else
+ {
+ return 'eventplanner_booking.customer_id IN ('
. implode(',', $object_ids) . ')';
+ }
+
+ }
+
protected function populate( array $data )
{
$object = new eventplanner_booking();
@@ -76,11 +109,6 @@
protected function update_history( $object, $fields )
{
- // $status_text = eventplanner_booking::get_status_list();
- $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
- $lang_active = lang('active');
- $lang_inactive = lang('inactive');
-
$original =
$this->read_single($object->get_id());//returned as array()
foreach ($fields as $field => $params)
{
@@ -89,29 +117,6 @@
if (!empty($params['history']) && $new_value &&
$old_value && ($new_value != $old_value))
{
$label = !empty($params['label']) ?
lang($params['label']) : $field;
- switch ($field)
- {
- case 'status':
- $old_value =
$status_text[$old_value];
- $new_value =
$status_text[$new_value];
- break;
- case 'active':
- $old_value = $old_value
? $lang_active : $lang_inactive;
- $new_value = $new_value
? $lang_active : $lang_inactive;
- break;
- case 'from_':
- case 'to_':
- if(($old_value +
phpgwapi_datetime::user_timezone()) == $new_value)
- {
- continue;
- }
-
- $old_value =
$GLOBALS['phpgw']->common->show_date($old_value);
- $new_value =
$GLOBALS['phpgw']->common->show_date($new_value);
- break;
- default:
- break;
- }
$value_set = array
(
'booking_id' =>
$object->get_id(),
@@ -128,41 +133,11 @@
}
}
- public function update_active_status($ids, $action )
+ public function get_booking_id_from_calendar( $calendar_id )
{
- if(!$ids || !is_array($ids))
- {
- return;
- }
-
- switch ($action)
- {
- case 'disable':
- $sql = "UPDATE eventplanner_booking SET
active = 0";
- $where = 'WHERE';
-
- break;
- case 'enable':
- $sql = "UPDATE eventplanner_booking SET
active = 1";
- $where = 'WHERE';
- break;
-
- case 'delete':
- $sql = "DELETE FROM
eventplanner_booking WHERE customer_id IS NULL";
- $where = 'AND';
- break;
-
- default:
- throw new Exception("action {$action}
not supported");
- break;
- }
-
- $sql .= " {$where} id IN(". implode(',', $ids) . ')';
- $this->db->transaction_begin();
-
+ $sql = "SELECT id FROM eventplanner_booking WHERE
calendar_id = " . (int) $calendar_id;
$this->db->query($sql,__LINE__,__FILE__);
-
-
- return $this->db->transaction_commit();
+ $this->db->next_record();
+ return (int) $this->db->f('id');
}
}
\ No newline at end of file
Copied: branches/dev-syncromind-2/eventplanner/inc/class.socalendar.inc.php
(from rev 16586, trunk/eventplanner/inc/class.socalendar.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.socalendar.inc.php
(rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.socalendar.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,172 @@
+<?php
+ /**
+ * phpGroupWare - property: a part of a Facilities Management System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2016 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package eventplanner
+ * @subpackage calendar
+ * @version $Id: $
+ */
+ phpgw::import_class('phpgwapi.socommon');
+
+ class eventplanner_socalendar extends phpgwapi_socommon
+ {
+
+ protected static $so;
+
+ public function __construct()
+ {
+ parent::__construct('eventplanner_calendar',
eventplanner_calendar::get_fields());
+ }
+
+ /**
+ * Implementing classes must return an instance of itself.
+ *
+ * @return the class instance.
+ */
+ public static function get_instance()
+ {
+ if (self::$so == null)
+ {
+ self::$so =
CreateObject('eventplanner.socalendar');
+ }
+ return self::$so;
+ }
+
+
+ protected function populate( array $data )
+ {
+ $object = new eventplanner_calendar();
+ foreach ($this->fields as $field => $field_info)
+ {
+ $object->set_field($field, $data[$field]);
+ }
+
+ return $object;
+ }
+
+ protected function update( $object )
+ {
+ $this->db->transaction_begin();
+ $this->update_history($object, $this->fields);
+
+ parent::update($object);
+
+ return $this->db->transaction_commit();
+ }
+
+ protected function update_history( $object, $fields )
+ {
+ // $status_text = eventplanner_calendar::get_status_list();
+ $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+ $lang_active = lang('active');
+ $lang_inactive = lang('inactive');
+
+ $original =
$this->read_single($object->get_id());//returned as array()
+ foreach ($fields as $field => $params)
+ {
+ $new_value = $object->$field;
+ $old_value = $original[$field];
+ if (!empty($params['history']) && $new_value &&
$old_value && ($new_value != $old_value))
+ {
+ $label = !empty($params['label']) ?
lang($params['label']) : $field;
+ switch ($field)
+ {
+ case 'status':
+ $old_value =
$status_text[$old_value];
+ $new_value =
$status_text[$new_value];
+ break;
+ case 'active':
+ $old_value = $old_value
? $lang_active : $lang_inactive;
+ $new_value = $new_value
? $lang_active : $lang_inactive;
+ break;
+ case 'from_':
+ case 'to_':
+ if(($old_value +
phpgwapi_datetime::user_timezone()) == $new_value)
+ {
+ continue;
+ }
+
+ $old_value =
$GLOBALS['phpgw']->common->show_date($old_value);
+ $new_value =
$GLOBALS['phpgw']->common->show_date($new_value);
+ break;
+ default:
+ break;
+ }
+ $value_set = array
+ (
+ 'calendar_id' =>
$object->get_id(),
+ 'time' => time(),
+ 'author' =>
$GLOBALS['phpgw_info']['user']['fullname'],
+ 'comment' => $label . '::
' . lang('old value') . ': ' . $this->db->db_addslashes($old_value) . ', '
.lang('new value') . ': ' . $this->db->db_addslashes($new_value),
+ 'type' => 'history',
+ );
+
+ $this->db->query( 'INSERT INTO
eventplanner_calendar_comment (' . implode( ',', array_keys( $value_set ) )
. ') VALUES ('
+ . $this->db->validate_insert(
array_values( $value_set ) ) . ')',__LINE__,__FILE__);
+ }
+
+ }
+ }
+
+ public function update_active_status($ids, $action )
+ {
+ if(!$ids || !is_array($ids))
+ {
+ return;
+ }
+
+ switch ($action)
+ {
+ case 'disable':
+ $sql = "UPDATE eventplanner_calendar
SET active = 0";
+ $where = 'WHERE';
+
+ break;
+ case 'enable':
+ $sql = "UPDATE eventplanner_calendar
SET active = 1";
+ $where = 'WHERE';
+ break;
+
+ case 'delete':
+ $sql = "DELETE FROM
eventplanner_calendar WHERE customer_id IS NULL";
+ $where = 'AND';
+ break;
+
+ case 'disconnect':
+ $sql = "DELETE FROM
eventplanner_booking WHERE calendar_id IN(". implode(',', $ids) . ')';
+ return
$this->db->query($sql,__LINE__,__FILE__);
+
+ default:
+ throw new Exception("action {$action}
not supported");
+ break;
+ }
+
+ $sql .= " {$where} id IN(". implode(',', $ids) . ')';
+ $this->db->transaction_begin();
+
+ $this->db->query($sql,__LINE__,__FILE__);
+
+
+ return $this->db->transaction_commit();
+ }
+ }
\ No newline at end of file
Modified: branches/dev-syncromind-2/eventplanner/inc/class.socustomer.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.socustomer.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.socustomer.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -55,7 +55,33 @@
return self::$so;
}
+ function get_acl_condition( )
+ {
+ $acl_condition = parent::get_acl_condition();
+
+ $sql = "SELECT object_id, permission FROM
eventplanner_permission WHERE subject_id = {$this->account}";
+ $this->db->query($sql,__LINE__,__FILE__);
+ $object_ids = array(-1);
+ while ($this->db->next_record())
+ {
+ $permission = $this->db->f('permission');
+ if($permission & PHPGW_ACL_READ)
+ {
+ $object_ids[] =
$this->db->f('object_id');
+ }
+ }
+ if($acl_condition)
+ {
+ return '(' . $acl_condition . ' OR
eventplanner_customer.id IN (' . implode(',', $object_ids) . '))';
+ }
+ else
+ {
+ return 'eventplanner_customer.id IN (' .
implode(',', $object_ids) . ')';
+ }
+
+ }
+
protected function populate( array $data )
{
$object = new eventplanner_customer();
Modified: branches/dev-syncromind-2/eventplanner/inc/class.sogeneric.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.sogeneric.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.sogeneric.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -35,7 +35,7 @@
parent::__construct($type, $type_id);
}
- public function get_location_info( $type, $type_id )
+ public function get_location_info( $type, $type_id = 0 )
{
$type_id = (int)$type_id;
Modified: branches/dev-syncromind-2/eventplanner/inc/class.sopermission.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.sopermission.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.sopermission.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -66,51 +66,12 @@
protected function update( $object )
{
- $this->db->transaction_begin();
- // $status_text =
eventplanner_permission::get_status_list();
- $dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
- $lang_active = lang('active');
- $lang_inactive = lang('inactive');
+ return parent::update($object);
+ }
- $original =
$this->read_single($object->get_id());//returned as array()
- foreach ($this->fields as $field => $params)
- {
- $new_value = $object->$field;
- $old_value = $original[$field];
- if (!empty($params['history']) && ($new_value
!= $old_value))
- {
- $label = !empty($params['label']) ?
lang($params['label']) : $field;
- switch ($field)
- {
- case 'status':
- $old_value =
$status_text[$old_value];
- $new_value =
$status_text[$new_value];
- break;
- case 'active':
- $old_value = $old_value
? $lang_active : $lang_inactive;
- $new_value = $new_value
? $lang_active : $lang_inactive;
- break;
- default:
- break;
- }
- $value_set = array
- (
- 'permission_id' =>
$object->get_id(),
- 'time' => time(),
- 'author' =>
$GLOBALS['phpgw_info']['user']['fullname'],
- 'comment' => $label . '::
' . lang('old value') . ': ' . $this->db->db_addslashes($old_value) . ', '
.lang('new value') . ': ' . $this->db->db_addslashes($new_value),
- 'type' => 'history',
- );
-
- $this->db->query( 'INSERT INTO
eventplanner_permission_comment (' . implode( ',', array_keys( $value_set ) )
. ') VALUES ('
- . $this->db->validate_insert(
array_values( $value_set ) ) . ')',__LINE__,__FILE__);
- }
-
- }
-
- parent::update($object);
-
- return $this->db->transaction_commit();
+ public function delete( $id )
+ {
+ return $this->db->query( 'DELETE FROM
eventplanner_permission WHERE id=' . (int) $id ,__LINE__,__FILE__);
}
}
\ No newline at end of file
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uiapplication.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -175,7 +175,7 @@
)
);
- $data['datatable']['actions'][] = array
+/* $data['datatable']['actions'][] = array
(
'my_name' => 'view',
'text' => lang('show'),
@@ -185,7 +185,7 @@
)),
'parameters' => json_encode($parameters)
);
-
+*/
$data['datatable']['actions'][] = array
(
'my_name' => 'edit',
@@ -197,7 +197,7 @@
'parameters' => json_encode($parameters)
);
- self::add_javascript('eventplannerfrontend', 'portico',
'application.index.js');
+ self::add_javascript($this->currentapp, 'portico',
'application.index.js');
phpgwapi_jquery::load_widget('numberformat');
self::render_template_xsl('datatable_jquery', $data);
@@ -225,6 +225,20 @@
$id = !empty($values['id']) ? $values['id'] :
phpgw::get_var('id', 'int');
$application = $this->bo->read_single($id);
}
+
+
+ $vendor_id = phpgw::get_var('vendor_id', 'int');
+
+ if($vendor_id && !$application->vendor_id)
+ {
+ $vendor =
createObject('eventplanner.bovendor')->read_single($vendor_id);
+ $application->vendor_id = $vendor_id;
+ $application->vendor_name = $vendor->name;
+ $application->contact_name =
$vendor->contact_name;
+ $application->contact_email =
$vendor->contact_email;
+ $application->contact_phone =
$vendor->contact_phone;
+ }
+
$config = CreateObject('phpgwapi.config',
'eventplanner')->read();
$default_category =
!empty($config['default_application_category']) ?
$config['default_application_category'] : null;
@@ -301,7 +315,7 @@
'type' => 'custom',
'className' => 'add',
'custom_code' => "
- add_booking();"
+ add_schedule();"
),
array('my_name' => 'select_all'),
array('my_name' => 'select_none'),
@@ -332,14 +346,22 @@
'type' => 'custom',
'custom_code' => "
onActionsClick('edit');"
+ ),
+ array(
+ 'my_name' => 'disconnect',
+ 'text' => lang('disconnect'),
+ 'type' => 'custom',
+ 'custom_code' => "
+
onActionsClick('disconnect');"
)
);
$datatable_def[] = array(
'container' => 'datatable-container_1',
- 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uibooking.query_relaxed",
+ 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uicalendar.query_relaxed",
'filter_application_id' => $id,
'filter_active' => 1,
+ 'redirect' => 'booking',
'phpgw_return_as' => 'json'))),
'tabletools' => $tabletools,
'ColumnDefs' => $dates_def,
@@ -406,7 +428,7 @@
);
phpgwapi_jquery::formvalidator_generate(array('date',
'security', 'file'));
phpgwapi_jquery::load_widget('autocomplete');
- self::add_javascript('eventplanner', 'portico',
'application.edit.js');
+ self::add_javascript($this->currentapp, 'portico',
'application.edit.js');
self::render_template_xsl(array('application',
'datatable_inline'), array($mode => $data));
}
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uibooking.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -44,8 +44,6 @@
'edit' => true,
'save' => true,
'save_ajax' => true,
- 'update_active_status' => true,
- 'update_schedule' => true
);
protected
$fields,
@@ -125,7 +123,7 @@
)
);
- $data['datatable']['actions'][] = array
+/* $data['datatable']['actions'][] = array
(
'my_name' => 'view',
'text' => lang('show'),
@@ -135,7 +133,7 @@
)),
'parameters' => json_encode($parameters)
);
-
+*/
$data['datatable']['actions'][] = array
(
'my_name' => 'edit',
@@ -147,7 +145,7 @@
'parameters' => json_encode($parameters)
);
- self::add_javascript('eventplanner', 'portico',
'booking.index.js');
+ self::add_javascript($this->currentapp, 'portico',
'booking.index.js');
phpgwapi_jquery::load_widget('numberformat');
self::render_template_xsl('datatable_jquery', $data);
@@ -172,9 +170,19 @@
else
{
$id = !empty($values['id']) ? $values['id'] :
phpgw::get_var('id', 'int');
+ $calendar_id = phpgw::get_var('calendar_id',
'int');
+ if(!$id && $calendar_id)
+ {
+ $id =
$this->bo->get_booking_id_from_calendar($calendar_id);
+ }
$booking = $this->bo->read_single($id);
}
+ if(!$calendar_id)
+ {
+ $calendar_id = $booking->calendar_id;
+ }
+
$tabs = array();
$tabs['first_tab'] = array(
'label' => lang('booking'),
@@ -279,13 +287,9 @@
)
);
- $application =
createObject('eventplanner.boapplication')->read_single($booking->application_id);
+ $calendar =
createObject('eventplanner.bocalendar')->read_single($calendar_id, true,
$relaxe_acl = true);
-// $GLOBALS['phpgw']->jqcal2->add_listener('from_',
'datetime', $booking->from_, array(
-// 'min_date' => date('Y/m/d',
$application->date_start),
-// 'max_date' => date('Y/m/d',
$application->date_end)
-// )
-// );
+ $application =
createObject('eventplanner.boapplication')->read_single($calendar->application_id,
true, $relaxe_acl = true);
$application_type_list =
execMethod('eventplanner.bogeneric.get_list', array('type' =>
'application_type'));
$types = (array)$application->types;
@@ -304,22 +308,24 @@
}
}
-
-
-
- $application_url = self::link(array('menuaction' =>
"{$this->currentapp}.uiapplication.edit", 'id' => $booking->application_id));
+ $application_url = self::link(array('menuaction' =>
"{$this->currentapp}.uiapplication.edit", 'id' => $calendar->application_id));
$lang_application = lang('application');
if($this->currentapp == 'eventplannerfrontend')
{
- $application_url =
self::link(array('menuaction' => "{$this->currentapp}.uievents.edit", 'id' =>
$booking->application_id));
+ $application_url =
self::link(array('menuaction' => "{$this->currentapp}.uievents.edit", 'id' =>
$calendar->application_id));
$lang_application = lang('event');
}
+ if($booking->customer_id && !$booking->customer_name)
+ {
+ $booking->customer_name =
createObject('eventplanner.bocustomer')->read_single($booking->customer_id)->name;
+ }
$data = array(
'datatable_def' => $datatable_def,
- 'form_action' => self::link(array('menuaction'
=> "{$this->currentapp}.uibooking.save")),
+ 'form_action' => self::link(array('menuaction'
=> "{$this->currentapp}.uibooking.save", 'calendar_id' => $calendar_id)),
'cancel_url' => self::link(array('menuaction'
=> "{$this->currentapp}.uibooking.index",)),
+ 'calendar' =>$calendar,
'booking' => $booking,
'application' => $application,
'application_type_list' =>
$application_type_list,
@@ -346,52 +352,4 @@
{
return parent::save(true);
}
-
- public function update_active_status()
- {
- $ids = phpgw::get_var('ids', 'int');
- $action = phpgw::get_var('action', 'string');
-
- if ($this->bo->update_active_status($ids, $action))
- {
- return array(
- 'status_kode' => 'ok',
- 'status' => lang('ok'),
- 'msg' => lang('messages_saved_form')
- );
- }
- else
- {
- $messages = phpgwapi_cache::message_get(true);
- return array(
- 'status_kode' => 'error',
- 'status' => lang('error'),
- 'msg' => $messages ? $messages :
lang('did not validate')
- );
- }
- }
-
- public function update_schedule( )
- {
- $id = phpgw::get_var('id', 'int');
- $from_ = phpgw::get_var('from_', 'date');
- if ($this->bo->update_schedule($id, $from_))
- {
- return array(
- 'status_kode' => 'ok',
- 'status' => lang('ok'),
- 'msg' => lang('messages_saved_form')
- );
- }
- else
- {
- return array
- (
- 'status_kode' => 'error',
- 'status' => lang('error'),
- 'msg' => lang('messages_form_error')
- );
- }
-
- }
}
\ No newline at end of file
Copied: branches/dev-syncromind-2/eventplanner/inc/class.uicalendar.inc.php
(from rev 16586, trunk/eventplanner/inc/class.uicalendar.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uicalendar.inc.php
(rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uicalendar.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,420 @@
+<?php
+ /**
+ * phpGroupWare - eventplanner: a part of a Facilities Management
System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2016 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this calendar was funded by
http://www.bergen.kommune.no/
+ * @package eventplanner
+ * @subpackage calendar
+ * @version $Id: $
+ */
+ phpgw::import_class('phpgwapi.uicommon');
+ phpgw::import_class('phpgwapi.datetime');
+
+ include_class('eventplanner', 'calendar', 'inc/model/');
+
+ class eventplanner_uicalendar extends phpgwapi_uicommon
+ {
+
+ public $public_functions = array(
+ 'add' => true,
+ 'index' => true,
+ 'query' => true,
+ 'query_relaxed'=> true,
+ 'get_list'=> true,
+ 'view' => true,
+ 'edit' => true,
+ 'save' => true,
+ 'save_ajax' => true,
+ 'update_active_status' => true,
+ 'update_schedule' => true
+ );
+ protected
+ $fields,
+ $permissions,
+ $currentapp;
+
+ public function __construct()
+ {
+ parent::__construct();
+ $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('calendar');
+ $this->bo = createObject('eventplanner.bocalendar');
+ $this->fields = eventplanner_calendar::get_fields();
+ $this->permissions =
eventplanner_calendar::get_instance()->get_permission_array();
+ $this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ self::set_active_menu("{$this->currentapp}::calendar");
+ }
+
+ public function index()
+ {
+ if (empty($this->permissions[PHPGW_ACL_READ]))
+ {
+ phpgw::no_access();
+ }
+
+ if (phpgw::get_var('phpgw_return_as') == 'json')
+ {
+ return $this->query();
+ }
+
+ phpgwapi_jquery::load_widget('autocomplete');
+
+ $function_msg = lang('calendar');
+
+ $data = array(
+ 'datatable_name' => $function_msg,
+ 'form' => array(
+ 'toolbar' => array(
+ 'item' => array(
+ array(
+ 'type' =>
'autocomplete',
+ 'name' =>
'application',
+ 'app' =>
$this->currentapp,
+ 'ui' =>
'application',
+ 'function' =>
'get_list',
+ 'label_attr' =>
'title',
+ 'text' =>
lang('application') . ':',
+
'requestGenerator' => 'requestWithApplicationFilter'
+ ),
+ array(
+ 'type' =>
'checkbox',
+ 'name' =>
'filter_active',
+ 'text' =>
lang('showall'),
+ 'value' => 1,
+ 'checked' => 1,
+ )
+ )
+ )
+ ),
+ 'datatable' => array(
+ 'source' => self::link(array(
+ 'menuaction' =>
"{$this->currentapp}.uicalendar.index",
+ 'phpgw_return_as' => 'json'
+ )),
+ 'allrows' => true,
+ // 'new_item' =>
self::link(array('menuaction' => 'eventplanner.uicalendar.add')),
+ 'editor_action' => '',
+ 'field' => parent::_get_fields()
+ )
+ );
+
+ $parameters = array(
+ 'parameter' => array(
+ array(
+ 'name' => 'id',
+ 'source' => 'id'
+ )
+ )
+ );
+
+/* $data['datatable']['actions'][] = array
+ (
+ 'my_name' => 'view',
+ 'text' => lang('show'),
+ 'action' => self::link(array
+ (
+ 'menuaction' =>
"{$this->currentapp}.uicalendar.view"
+ )),
+ 'parameters' => json_encode($parameters)
+ );
+*/
+ $data['datatable']['actions'][] = array
+ (
+ 'my_name' => 'edit',
+ 'text' => lang('edit'),
+ 'action' => self::link(array
+ (
+ 'menuaction' =>
"{$this->currentapp}.uicalendar.edit"
+ )),
+ 'parameters' => json_encode($parameters)
+ );
+
+ self::add_javascript($this->currentapp, 'portico',
'calendar.index.js');
+ phpgwapi_jquery::load_widget('numberformat');
+
+ self::render_template_xsl('datatable_jquery', $data);
+ }
+ /*
+ * Edit the price item with the id given in the http variable
'id'
+ */
+
+ public function edit( $values = array(), $mode = 'edit' )
+ {
+ $active_tab = !empty($values['active_tab']) ?
$values['active_tab'] : phpgw::get_var('active_tab', 'string', 'REQUEST',
'first_tab');
+ $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('edit');
+ if (empty($this->permissions[PHPGW_ACL_ADD]))
+ {
+ phpgw::no_access();
+ }
+
+ if (!empty($values['object']))
+ {
+ $calendar = $values['object'];
+ }
+ else
+ {
+ $id = !empty($values['id']) ? $values['id'] :
phpgw::get_var('id', 'int');
+ $calendar = $this->bo->read_single($id);
+ }
+
+ $tabs = array();
+ $tabs['first_tab'] = array(
+ 'label' => lang('calendar'),
+ 'link' => '#first_tab',
+ 'function' => "set_tab('first_tab')"
+ );
+ $tabs['reports'] = array(
+ 'label' => lang('reports'),
+ 'link' => '#reports',
+ 'function' => "set_tab('reports')"
+ );
+
+ $bocommon = CreateObject('property.bocommon');
+
+ $comments = (array)$calendar->comments;
+ foreach ($comments as $key => &$comment)
+ {
+ $comment['value_count'] = $key +1;
+ $comment['value_date'] =
$GLOBALS['phpgw']->common->show_date($comment['time']);
+ }
+
+ $comments_def = array(
+ array('key' => 'value_count', 'label' => '#',
'sortable' => true, 'resizeable' => true),
+ array('key' => 'value_date', 'label' =>
lang('Date'), 'sortable' => true, 'resizeable' => true),
+ array('key' => 'author', 'label' =>
lang('User'), 'sortable' => true, 'resizeable' => true),
+ array('key' => 'comment', 'label' =>
lang('Note'), 'sortable' => true, 'resizeable' => true)
+ );
+
+ $datatable_def[] = array(
+ 'container' => 'datatable-container_0',
+ 'requestUrl' => "''",
+ 'ColumnDefs' => $comments_def,
+ 'data' => json_encode($comments),
+ 'config' => array(
+ array('disableFilter' => true),
+ array('disablePagination' => true)
+ )
+ );
+
+ $vendor_report_def = array(
+ array('key' => 'id', 'label' => lang('id'),
'sortable' => true, 'resizeable' => true,'formatter' =>
'JqueryPortico.formatLink'),
+ array('key' => 'created', 'label' =>
lang('Date'), 'sortable' => true, 'resizeable' => true),
+ );
+
+ $vendor_report = array();
+
+ $tabletools = array(
+ array(
+ 'my_name' => 'add',
+ 'text' => lang('add'),
+ 'type' => 'custom',
+ 'className' => 'add',
+ 'custom_code' => "
+
add_report('vendor');"
+ )
+ );
+
+ $datatable_def[] = array(
+ 'container' => 'datatable-container_1',
+ 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uivendor_report.query",
+ 'filter_calendar_id' => $id,
+ 'filter_active' => 1,
+ 'phpgw_return_as' => 'json'))),
+ 'ColumnDefs' => $vendor_report_def,
+ 'data' => json_encode($vendor_report),
+ 'tabletools' => $tabletools,
+ 'config' => array(
+ array('disableFilter' => true),
+ array('disablePagination' => true)
+ )
+ );
+
+ $customer_report_def = array(
+ array('key' => 'id', 'label' => lang('id'),
'sortable' => true, 'resizeable' => true,'formatter' =>
'JqueryPortico.formatLink'),
+ array('key' => 'created', 'label' =>
lang('Date'), 'sortable' => true, 'resizeable' => true),
+ );
+
+ $customer_report = array();
+ $tabletools = array(
+ array(
+ 'my_name' => 'add',
+ 'text' => lang('add'),
+ 'type' => 'custom',
+ 'className' => 'add',
+ 'custom_code' => "
+
add_report('customer');"
+ )
+ );
+ $datatable_def[] = array(
+ 'container' => 'datatable-container_2',
+// 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uicustomer_report.query",
+// 'filter_calendar_id' => $id,
+// 'filter_active' => 1,
+// 'phpgw_return_as' => 'json'))),
+ 'requestUrl' => "''",
+ 'ColumnDefs' => $customer_report_def,
+ 'data' => json_encode($customer_report),
+ 'tabletools' => $tabletools,
+ 'config' => array(
+ array('disableFilter' => true),
+ array('disablePagination' => true)
+ )
+ );
+
+ $application =
createObject('eventplanner.boapplication')->read_single($calendar->application_id,
true, $relaxe_acl = true);
+
+// $GLOBALS['phpgw']->jqcal2->add_listener('from_',
'datetime', $calendar->from_, array(
+// 'min_date' => date('Y/m/d',
$application->date_start),
+// 'max_date' => date('Y/m/d',
$application->date_end)
+// )
+// );
+
+ $application_type_list =
execMethod('eventplanner.bogeneric.get_list', array('type' =>
'application_type'));
+ $types = (array)$application->types;
+ if($types)
+ {
+ foreach ($application_type_list as
&$application_type)
+ {
+ foreach ($types as $type)
+ {
+ if((!empty($type['type_id']) &&
$type['type_id'] == $application_type['id']) || ($type ==
$application_type['id']))
+ {
+
$application_type['selected'] = 1;
+ break;
+ }
+ }
+ }
+ }
+
+
+
+
+ $application_url = self::link(array('menuaction' =>
"{$this->currentapp}.uiapplication.edit", 'id' => $calendar->application_id));
+ $lang_application = lang('application');
+ if($this->currentapp == 'eventplannerfrontend')
+ {
+ $application_url =
self::link(array('menuaction' => "{$this->currentapp}.uievents.edit", 'id' =>
$calendar->application_id));
+ $lang_application = lang('event');
+ }
+
+
+ $data = array(
+ 'datatable_def' => $datatable_def,
+ 'form_action' => self::link(array('menuaction'
=> "{$this->currentapp}.uicalendar.save")),
+ 'cancel_url' => self::link(array('menuaction'
=> "{$this->currentapp}.uicalendar.index",)),
+ 'calendar' => $calendar,
+ 'application' => $application,
+ 'application_type_list' =>
$application_type_list,
+ 'new_customer_url' =>
self::link(array('menuaction' => "{$this->currentapp}.uicustomer.add")),
+ 'application_url' => $application_url,
+ 'lang_application' => $lang_application,
+ 'customer_url' => self::link(array('menuaction'
=> "{$this->currentapp}.uicustomer.edit", 'id' => $calendar->customer_id)),
+ 'mode' => $mode,
+ 'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+ 'value_active_tab' => $active_tab
+ );
+ phpgwapi_jquery::formvalidator_generate(array());
+ self::add_javascript($this->currentapp, 'portico',
'calendar.edit.js');
+ phpgwapi_jquery::load_widget('autocomplete');
+ self::render_template_xsl(array('calendar',
'datatable_inline'), array($mode => $data));
+ }
+
+ public function save()
+ {
+ parent::save();
+ }
+
+ public function save_ajax()
+ {
+ return parent::save(true);
+ }
+
+ public function update_active_status()
+ {
+ $ids = phpgw::get_var('ids', 'int');
+ $action = phpgw::get_var('action', 'string');
+
+ if ($this->bo->update_active_status($ids, $action))
+ {
+ return array(
+ 'status_kode' => 'ok',
+ 'status' => lang('ok'),
+ 'msg' => lang('messages_saved_form')
+ );
+ }
+ else
+ {
+ $messages = phpgwapi_cache::message_get(true);
+ return array(
+ 'status_kode' => 'error',
+ 'status' => lang('error'),
+ 'msg' => $messages ? $messages :
lang('did not validate')
+ );
+ }
+ }
+
+ public function update_schedule( )
+ {
+ $id = phpgw::get_var('id', 'int');
+ $from_ = phpgw::get_var('from_', 'date');
+ if ($this->bo->update_schedule($id, $from_))
+ {
+ return array(
+ 'status_kode' => 'ok',
+ 'status' => lang('ok'),
+ 'msg' => lang('messages_saved_form')
+ );
+ }
+ else
+ {
+ $messages = phpgwapi_cache::message_get(true);
+ return array
+ (
+ 'status_kode' => 'error',
+ 'status' => lang('error'),
+ 'msg' => $messages ? $messages :
lang('did not validate')
+ );
+ }
+
+ }
+
+ public function query()
+ {
+ $params = $this->bo->build_default_read_params();
+ $values = $this->bo->read($params);
+ $redirect = phpgw::get_var('redirect');
+ if($redirect == 'booking')
+ {
+ array_walk($values["results"], array($this,
"_add_links2"), "{$this->currentapp}.uibooking.edit");
+ }
+ else
+ {
+ array_walk($values["results"], array($this,
"_add_links"), "{$this->currentapp}.uicalendar.edit");
+ }
+ return $this->jquery_results($values);
+ }
+
+ public function _add_links2( &$value, $key, $data )
+ {
+ $link_array = array('menuaction' => $data,
'calendar_id' => $value['id']);
+ $value['link'] = self::link($link_array);
+ }
+ }
\ No newline at end of file
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uicustomer.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -139,7 +139,7 @@
)
);
- $data['datatable']['actions'][] = array
+/* $data['datatable']['actions'][] = array
(
'my_name' => 'view',
'text' => lang('show'),
@@ -149,7 +149,7 @@
)),
'parameters' => json_encode($parameters)
);
-
+*/
$data['datatable']['actions'][] = array
(
'my_name' => 'edit',
@@ -161,7 +161,7 @@
'parameters' => json_encode($parameters)
);
- self::add_javascript('eventplanner', 'portico',
'customer.index.js');
+ self::add_javascript($this->currentapp, 'portico',
'customer.index.js');
phpgwapi_jquery::load_widget('numberformat');
self::render_template_xsl('datatable_jquery', $data);
@@ -194,8 +194,11 @@
$tabs['first_tab'] = array(
'label' => lang('customer'),
'link' => '#first_tab',
- 'function' => "set_tab('first_tab')"
);
+ $tabs['booking'] = array(
+ 'label' => lang('booking'),
+ 'link' => '#booking',
+ );
$bocommon = CreateObject('property.bocommon');
@@ -224,6 +227,31 @@
)
);
+ $dates_def = array(
+ array('key' => 'id', 'label' => lang('id'),
'sortable' => true, 'resizeable' => true,'formatter' =>
'JqueryPortico.formatLink'),
+ array('key' => 'from_', 'label' =>
lang('From'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'to_', 'label' => lang('To'),
'sortable' => false, 'resizeable' => true),
+ array('key' => 'status', 'label' =>
lang('status'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'vendor_name', 'label' =>
lang('vendor'), 'sortable' => true, 'resizeable' => true),
+ array('key' => 'location', 'label' =>
lang('location'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'comment', 'label' =>
lang('Note'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'application_id', 'hidden' =>
true),
+ );
+
+ $datatable_def[] = array(
+ 'container' => 'datatable-container_1',
+ 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uibooking.query_relaxed",
+ 'filter_customer_id' => $id,
+ 'filter_active' => 1,
+ 'phpgw_return_as' => 'json'))),
+ 'ColumnDefs' => $dates_def,
+ 'data' => json_encode(array()),
+ 'config' => array(
+ array('disableFilter' => true),
+ array('disablePagination' => true)
+ )
+ );
+
$data = array(
'datatable_def' => $datatable_def,
'form_action' => self::link(array('menuaction'
=> "{$this->currentapp}.uicustomer.save")),
Modified:
branches/dev-syncromind-2/eventplanner/inc/class.uicustomer_report.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uicustomer_report.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uicustomer_report.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -131,7 +131,7 @@
)
);
- $data['datatable']['actions'][] = array
+/* $data['datatable']['actions'][] = array
(
'my_name' => 'view',
'text' => lang('show'),
@@ -141,7 +141,7 @@
)),
'parameters' => json_encode($parameters)
);
-
+*/
$data['datatable']['actions'][] = array
(
'my_name' => 'edit',
@@ -153,7 +153,7 @@
'parameters' => json_encode($parameters)
);
- self::add_javascript('eventplanner', 'portico',
'customer_report.index.js');
+ self::add_javascript($this->currentapp, 'portico',
'customer_report.index.js');
phpgwapi_jquery::load_widget('numberformat');
self::render_template_xsl('datatable_jquery', $data);
@@ -250,7 +250,7 @@
);
phpgwapi_jquery::formvalidator_generate(array('date',
'security', 'file'));
phpgwapi_jquery::load_widget('autocomplete');
- // self::add_javascript('eventplanner', 'portico',
'customer_report.edit.js');
+ // self::add_javascript($this->currentapp, 'portico',
'customer_report.edit.js');
self::render_template_xsl(array('report','application_info',
'datatable_inline', 'attributes_form'), array($mode => $data));
}
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uievents.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -173,7 +173,7 @@
'parameters' => json_encode($parameters)
);
- self::add_javascript('eventplanner', 'portico',
'events.index.js');
+ self::add_javascript($this->currentapp, 'portico',
'events.index.js');
phpgwapi_jquery::load_widget('numberformat');
self::render_template_xsl('datatable_jquery', $data);
@@ -195,8 +195,7 @@
$tabs = array();
$tabs['first_tab'] = array(
'label' => lang('event'),
- 'link' => '#first_tab',
- 'function' => "set_tab('first_tab')"
+ 'link' => '#first_tab'
);
@@ -211,13 +210,13 @@
array('key' => 'application_id', 'hidden' =>
true),
);
-
$datatable_def[] = array(
'container' => 'datatable-container_0',
- 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uibooking.query",
+ 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uicalendar.query_relaxed",
'filter_application_id' => $id,
- // 'filter_active' => 1,
+ 'filter_active' => 1,
+ 'redirect' => 'booking',
'phpgw_return_as' => 'json'))),
'ColumnDefs' => $dates_def,
'data' => json_encode(array()),
@@ -245,6 +244,8 @@
}
$category =
$this->cats->return_single($application->category_id);
+ $config = CreateObject('phpgwapi.config',
'eventplanner')->read();
+ $booking_interval = !empty($config['booking_interval'])
? $config['booking_interval'] : null;
$data = array(
'datatable_def' => $datatable_def,
@@ -251,6 +252,7 @@
'cancel_url' => self::link(array('menuaction'
=> "{$this->currentapp}.uievents.index",)),
'application' => $application,
'category_name' => $category[0]['name'],
+ 'booking_interval' => $booking_interval,
'status_list' => array('options' =>
$this->get_status_options($application->status)),
'application_type_list' =>
$application_type_list,
'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
@@ -259,7 +261,7 @@
self::render_template_xsl(array('events',
'application_info', 'datatable_inline'), array('edit' => $data));
}
-
+
public function save()
{
//Nothing to do here
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uipermission.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uipermission.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uipermission.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -41,7 +41,8 @@
'view' => true,
'edit' => true,
'save' => true,
- 'object' => true
+ 'object' => true,
+ 'delete' => true
);
protected
@@ -136,6 +137,23 @@
'parameters' => json_encode($parameters)
);
+ if (!empty($this->permissions[PHPGW_ACL_ADD]))
+ {
+ $data['datatable']['actions'][] = array
+ (
+ 'my_name' => 'delete',
+ 'statustext' => lang('delete entry'),
+ 'text' => lang('delete'),
+ 'confirm_msg' => lang('do you really
want to delete this entry'),
+ 'action' =>
$GLOBALS['phpgw']->link('/index.php', array
+ (
+ 'menuaction' =>
'eventplanner.uipermission.delete'
+ )),
+ 'parameters' => json_encode($parameters)
+ );
+
+ }
+
self::add_javascript('eventplanner', 'portico',
'permission.index.js');
phpgwapi_jquery::load_widget('numberformat');
@@ -142,6 +160,23 @@
self::render_template_xsl('datatable_jquery', $data);
}
+ function delete()
+ {
+ if (empty($this->permissions[PHPGW_ACL_DELETE]))
+ {
+ phpgw::no_access();
+ }
+
+ $id = phpgw::get_var('id', 'int');
+ if ($this->bo->delete($id))
+ {
+ return lang('entry %1 has been deleted', $id);
+ }
+ else
+ {
+ return lang('delete failed');
+ }
+ }
/*
* Edit the price item with the id given in the http variable
'id'
*/
@@ -214,13 +249,28 @@
public function get_subjet($selected = 0)
{
- $users =
(array)$GLOBALS['phpgw']->acl->get_user_list_right(PHPGW_ACL_READ, 'run',
'eventplanner');
+ $users_frontend =
(array)$GLOBALS['phpgw']->acl->get_user_list_right(PHPGW_ACL_READ, 'run',
'eventplannerfrontend');
+ $users_backend =
(array)$GLOBALS['phpgw']->acl->get_user_list_right(PHPGW_ACL_READ, 'run',
'eventplanner');
+ $users = array();
+ foreach ($users_frontend as $user)
+ {
+ $users[$user['account_id']] = $user;
+ }
+ unset($user);
+
+ foreach ($users_backend as $user)
+ {
+ $users[$user['account_id']] = $user;
+ }
+ unset($user);
+
$user_list = array();
- $user_list[] = array('id' => '','name' =>
lang('select'));
+ $account_name = array();
foreach ($users as $user)
{
$name = (isset($user['account_lastname']) ?
$user['account_lastname'] . ' ' : '') . $user['account_firstname'];
+ $account_name[] = $name;
$user_list[] = array
(
'id' => $user['account_id'],
@@ -228,6 +278,11 @@
'selected' => $user['account_id'] ==
$selected ? 1 : 0
);
}
+
+ array_multisort($account_name, SORT_ASC, $user_list);
+
+ array_unshift($user_list, array('id' => '','name' =>
lang('select')));
+
return $user_list;
}
}
\ No newline at end of file
Modified: branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uivendor.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -140,7 +140,7 @@
)
);
- $data['datatable']['actions'][] = array
+/* $data['datatable']['actions'][] = array
(
'my_name' => 'view',
'text' => lang('show'),
@@ -150,7 +150,7 @@
)),
'parameters' => json_encode($parameters)
);
-
+*/
$data['datatable']['actions'][] = array
(
'my_name' => 'edit',
@@ -162,7 +162,7 @@
'parameters' => json_encode($parameters)
);
- self::add_javascript('eventplanner', 'portico',
'vendor.index.js');
+ self::add_javascript('eventplannerfrontend', 'portico',
'vendor.index.js');
phpgwapi_jquery::load_widget('numberformat');
self::render_template_xsl('datatable_jquery', $data);
@@ -195,9 +195,16 @@
$tabs['first_tab'] = array(
'label' => lang('vendor'),
'link' => '#first_tab',
- 'function' => "set_tab('first_tab')"
+ // 'function' => "set_tab('first_tab')"
);
+ $tabs['application'] = array(
+ 'label' => lang('application'),
+ 'link' => '#application',
+ 'disable' => $id ? false : true,
+ // 'function' => "set_tab('application')"
+ );
+
$bocommon = CreateObject('property.bocommon');
$comments = (array)$vendor->comments;
@@ -225,6 +232,40 @@
)
);
+ $application_def = array(
+ array('key' => 'id', 'label' => lang('id'),
'sortable' => true, 'resizeable' => true,'formatter' =>
'JqueryPortico.formatLink'),
+ array('key' => 'title', 'label' =>
lang('title'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'date_start', 'label' =>
lang('date start'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'date_end', 'label' =>
lang('date end'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'number_of_units', 'label' =>
lang('number of units'), 'sortable' => true, 'resizeable' => true),
+ array('key' => 'timespan', 'label' =>
lang('event timespan'), 'sortable' => false, 'resizeable' => true),
+ );
+
+ $tabletools = array(
+ array(
+ 'my_name' => 'add',
+ 'text' => lang('add'),
+ 'type' => 'custom',
+ 'className' => 'add',
+ 'custom_code' => "
+
add_application('{$this->currentapp}',
'{$this->currentapp}.uiapplication.edit', {$id});"
+ )
+ );
+
+ $datatable_def[] = array(
+ 'container' => 'datatable-container_1',
+ 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
"{$this->currentapp}.uiapplication.query",
+ 'filter_vendor_id' => $id,
+ 'phpgw_return_as' => 'json'))),
+ 'tabletools' => $tabletools,
+ 'ColumnDefs' => $application_def,
+ 'data' => json_encode(array()),
+ 'config' => array(
+ array('disableFilter' => true),
+ array('disablePagination' => true)
+ )
+ );
+
$data = array(
'datatable_def' => $datatable_def,
'form_action' => self::link(array('menuaction'
=> "{$this->currentapp}.uivendor.save")),
@@ -237,6 +278,7 @@
);
phpgwapi_jquery::formvalidator_generate(array());
self::add_javascript('eventplannerfrontend', 'portico',
'validate.js');
+ self::add_javascript($this->currentapp, 'portico',
'vendor.edit.js');
self::render_template_xsl(array('vendor',
'datatable_inline'), array($mode => $data));
}
Modified:
branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/class.uivendor_report.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -153,7 +153,7 @@
'parameters' => json_encode($parameters)
);
- self::add_javascript('eventplanner', 'portico',
'vendor_report.index.js');
+ self::add_javascript($this->currentapp, 'portico',
'vendor_report.index.js');
phpgwapi_jquery::load_widget('numberformat');
self::render_template_xsl('datatable_jquery', $data);
@@ -250,7 +250,7 @@
);
phpgwapi_jquery::formvalidator_generate(array('date',
'security', 'file'));
phpgwapi_jquery::load_widget('autocomplete');
- // self::add_javascript('eventplanner', 'portico',
'vendor_report.edit.js');
+ // self::add_javascript($this->currentapp, 'portico',
'vendor_report.edit.js');
self::render_template_xsl(array('report','application_info',
'datatable_inline', 'attributes_form'), array($mode => $data));
}
Modified:
branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.application.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -170,6 +170,7 @@
'type' => 'string',
'label' => 'title',
'sortable' => false,
+ 'query' => true,
),
'description' => array('action'=> PHPGW_ACL_ADD
| PHPGW_ACL_EDIT,
'type' => 'string',
@@ -395,6 +396,10 @@
$fields[$key] = $field_info;
}
}
+ else
+ {
+ $fields['status'] = true;
+ }
if($debug)
@@ -416,6 +421,13 @@
*/
protected function preValidate( &$entity )
{
+
+ if($entity->date_start && $entity->date_start >
$entity->date_end)
+ {
+ $entity->date_end = $entity->date_start;
+ phpgwapi_cache::message_set(lang('End date
cannot be before start date'), 'error');
+ }
+
if (!empty($entity->comment))
{
$entity->comment_input = array(
Modified: branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.booking.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -26,7 +26,6 @@
* @subpackage booking
* @version $Id: $
*/
-
phpgw::import_class('eventplanner.bobooking');
include_class('phpgwapi', 'model', 'inc/model/');
@@ -38,7 +37,7 @@
const STATUS_PENDING = 2;
const STATUS_REJECTED = 3;
const STATUS_APPROVED = 4;
- const acl_location = '.booking';
+ const acl_location = '.customer';
protected
$id,
@@ -48,8 +47,8 @@
$cost,
$from_,
$to_,
- $application_id,
- $application_name,
+ $calendar_id,
+ $vendor_name,
$customer_id,
$customer_name,
$customer_contact_name,
@@ -57,11 +56,12 @@
$customer_contact_phone,
$location,
$comments,
+ $comment,
$created,
- $secret;
+ $secret,
+ $process_update;
+ protected $field_of_responsibility_name = '.customer';
- protected $field_of_responsibility_name = '.booking';
-
public function __construct( int $id = null )
{
parent::__construct((int)$id);
@@ -82,99 +82,111 @@
{
return array(
self::STATUS_REGISTERED => lang('registered'),
- self::STATUS_PENDING => lang('pending'),
+ self::STATUS_PENDING => lang('pending'),
self::STATUS_REJECTED => lang('rejected'),
- self::STATUS_APPROVED => lang('approved')
+ self::STATUS_APPROVED => lang('approved')
);
}
- public static function get_fields($debug = true)
+ public static function get_fields( $debug = true )
{
- $fields = array(
- 'id' => array('action'=> PHPGW_ACL_READ,
+ $fields = array(
+ 'id' => array('action' => PHPGW_ACL_READ,
'type' => 'int',
'label' => 'id',
- 'sortable'=> true,
+ 'sortable' => true,
'formatter' =>
'JqueryPortico.formatLink',
- 'public' => true
- ),
- 'owner_id' => array('action'=> PHPGW_ACL_ADD,
+ 'public' => true
+ ),
+ 'calendar_id' => array('action' =>
PHPGW_ACL_ADD,
'type' => 'int',
'required' => false
- ),
- 'active' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ ),
+ 'owner_id' => array('action' => PHPGW_ACL_ADD,
'type' => 'int',
- 'history' => true
- ),
- 'completed' => array('action'=> PHPGW_ACL_EDIT,
- 'type' => 'int',
- 'history' => true
- ),
- 'cost' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
- 'type' => 'decimal'
- ),
- 'from_' => array('action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
- 'type' => 'date',
- 'label' => 'from',
- 'history' => true,
- 'required' => true,
- 'public' => true
- ),
- 'to_' => array('action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
- 'type' => 'date',
- 'label' => 'to',
- 'history' => true,
- 'required' => true,
- 'public' => true
+ 'required' => false
),
- 'application_id' => array('action'=>
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
- 'type' => 'int',
- 'label' => 'application',
- 'sortable' => true,
- 'required' => true,
- 'public' => true
- ),
- 'application_name' => array('action'=>
PHPGW_ACL_READ,
+ 'from_' => array('action' => PHPGW_ACL_READ,
'type' => 'string',
'query' => true,
- 'label' => 'application',
- 'public' => true,
+ 'label' => 'from',
+ 'public' => true,
'join' => array(
- 'table' =>
'eventplanner_application',
- 'fkey' => 'application_id',
+ 'table' =>
'eventplanner_calendar',
+ 'fkey' => 'calendar_id',
'key' => 'id',
- 'column' => 'title'
- )
- ),
- 'customer_id' => array('action'=> PHPGW_ACL_ADD
| PHPGW_ACL_EDIT,
+ 'column' => 'from_'
+ )
+ ),
+ 'to_' => array('action' => PHPGW_ACL_READ,
+ 'type' => 'string',
+ 'query' => true,
+ 'label' => 'to',
+ 'public' => true,
+ 'join' => array(
+ 'table' =>
'eventplanner_calendar',
+ 'fkey' => 'calendar_id',
+ 'key' => 'id',
+ 'column' => 'to_'
+ )
+ ),
+ 'active' => array('action' => PHPGW_ACL_READ,
+ 'type' => 'string',
+ 'query' => true,
+ 'label' => 'active',
+ 'public' => true,
+ 'join' => array(
+ 'table' =>
'eventplanner_calendar',
+ 'fkey' => 'calendar_id',
+ 'key' => 'id',
+ 'column' => 'active'
+ )
+ ),
+ 'completed' => array('action' => PHPGW_ACL_EDIT,
'type' => 'int',
+ 'history' => true
+ ),
+ 'vendor_name' => array('action' =>
PHPGW_ACL_READ,
+ 'type' => 'string',
+ 'query' => true,
+ 'label' => 'vendor',
+ 'public' => true,
+ 'multiple_join' => array(
+ 'statement' => ' JOIN
eventplanner_calendar ON eventplanner_calendar.id =
eventplanner_booking.calendar_id'
+ . ' JOIN
eventplanner_application ON eventplanner_application.id =
eventplanner_calendar.application_id'
+ . ' JOIN eventplanner_vendor ON
eventplanner_application.vendor_id = eventplanner_vendor.id',
+ 'column' =>
'eventplanner_vendor.name'
+ )
+ ),
+ 'customer_id' => array('action' =>
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+ 'type' => 'int',
'label' => 'customer',
'sortable' => true,
'history' => true,
- 'public' => true
- ),
- 'customer_name' => array('action'=>
PHPGW_ACL_READ,
+ 'public' => true
+ ),
+ 'customer_name' => array('action' =>
PHPGW_ACL_READ,
'type' => 'string',
'query' => true,
'label' => 'customer',
- 'public' => true,
+ 'public' => true,
'join' => array(
'table' =>
'eventplanner_customer',
'fkey' => 'customer_id',
'key' => 'id',
'column' => 'name'
- )
- ),
+ )
+ ),
'customer_contact_name' => array(
- 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'action' => PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
'required' => false,
'query' => true,
'label' => 'customer contact name',
'history' => true,
- ),
+ ),
'customer_contact_email' => array(
- 'action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+ 'action' => PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
'type' => 'string',
'required' => false,
'query' => true,
@@ -181,26 +193,26 @@
'sf_validator' =>
createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field%
is invalid')),
'label' => 'customer contact email',
'history' => true,
- ),
+ ),
'customer_contact_phone' => array(
- 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'action' => PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
'required' => false,
'query' => true,
'label' => 'customer contact phone',
'history' => true,
- ),
+ ),
'location' => array(
- 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'action' => PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
'required' => false,
'query' => true,
'label' => 'location',
'history' => true,
- 'public' => true
- ),
+ 'public' => true
+ ),
'comments' => array(
- 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'action' => PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
'manytomany' => array(
'input_field' =>
'comment_input',
@@ -209,27 +221,31 @@
'column' => array('time',
'author', 'comment', 'type'),
'order' => array('sort' =>
'time', 'dir' => 'ASC')
)),
- 'created' => array('action'=> PHPGW_ACL_READ,
+ 'comment' => array(
+ 'action' => PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'type' => 'string',
+ 'related' => true,
+ ),
+ 'created' => array('action' => PHPGW_ACL_READ,
'type' => 'date',
'label' => 'created',
'sortable' => true,
- ),
- 'secret' => array('action'=> PHPGW_ACL_ADD,
+ ),
+ 'secret' => array('action' => PHPGW_ACL_ADD,
'type' => 'string',
'label' => 'secret',
'sortable' => false,
- ),
- );
+ ),
+ );
- if($debug)
+ if ($debug)
{
foreach ($fields as $field => $field_info)
{
-
if(!property_exists('eventplanner_booking', $field))
+ if
(!property_exists('eventplanner_booking', $field))
{
-
phpgwapi_cache::message_set('$'."{$field},", 'error');
+ phpgwapi_cache::message_set('$'
. "{$field},", 'error');
}
-
}
}
return $fields;
@@ -250,7 +266,7 @@
);
}
- if(!$entity->get_id())
+ if (!$entity->get_id())
{
$entity->status =
eventplanner_booking::STATUS_REGISTERED;
$entity->secret = self::generate_secret();
@@ -264,45 +280,68 @@
if (!empty($entity->application_id))
{
- $application =
createObject('eventplanner.boapplication')->read_single($entity->application_id);
+ $application =
createObject('eventplanner.boapplication')->read_single($entity->application_id,
true, $relaxe_acl = true);
$entity->to_ = $entity->from_ +
((int)$application->timespan * 60);
}
$entity->modified = time();
$entity->active = (int)$entity->active;
-
}
protected function doValidate( $entity, &$errors )
{
- $application =
createObject('eventplanner.boapplication')->read_single($entity->application_id);
$params = array();
$params['filters']['active'] = 1;
- $params['filters']['application_id'] =
$entity->application_id;
+ $params['filters']['customer_id'] =
$entity->customer_id;
- $bookings =
eventplanner_sobooking::get_instance()->read($params);
+ $bookings =
eventplanner_sobooking::get_instance()->read($params);
- if($entity->customer_id) // update
+ $orig_customer_id = 0;
+ if ($entity->get_id())
{
- $test_total_tecords =
(int)$bookings['total_records'];
+ $orig_booking =
createObject('eventplanner.bobooking')->read_single($entity->get_id());
+ $orig_customer_id = $orig_booking->customer_id;
}
- else // new entry
- {
- $test_total_tecords =
(int)$bookings['total_records'] + 1;
- }
- if($test_total_tecords >
(int)$application->num_granted_events)
+ $test_total_tecords = 0;
+ if ($entity->customer_id && $entity->customer_id !=
$orig_customer_id)
{
- $errors['num_granted_events'] = lang('maximum
of granted events are reached');
- }
+ $last_booking =
(int)phpgwapi_cache::system_get('eventplanner',
"last_booking{$entity->customer_id}");
+ $config = CreateObject('phpgwapi.config',
'eventplanner')->read();
+ $booking_interval =
!empty($config['booking_interval']) ? (int)$config['booking_interval'] : 0;
- $date_start = date('Ymd',$application->date_start);
- $date_end = date('Ymd',$application->date_end);
- $from_ = date('Ymd',$entity->from_);
+ $current_interval = floor((time() -
$last_booking ) / (60 * 60));
- if($from_ < $date_start || $from_ > $date_end)
- {
- $errors['from_'] = lang('date is outside the
scope');
+ if ($last_booking && $booking_interval &&
$current_interval < $booking_interval)
+ {
+ $errors['booking_interval'] =
lang('There is a minimum interval of %1 hours', $booking_interval);
+ }
+
+ $customer =
createObject('eventplanner.bocustomer')->read_single($entity->customer_id);
+ $max_events = (int)$customer->max_events;
+ foreach ($bookings['results'] as $booking)
+ {
+ $booking_year = date('Y',
$booking['from_']);
+
+ if ($booking_year != date('Y',
$entity->from_))
+ {
+ continue;
+ }
+ $test_total_tecords ++;
+ }
+
+ if ($entity->customer_id ||
$entity->process_update) // update
+ {
+ }
+ else // new entry
+ {
+ $test_total_tecords ++;
+ }
+
+ if ($test_total_tecords > (int)$max_events)
+ {
+ $errors['num_granted_events_year'] =
lang('maximum of granted events per year (%1) are reached', $max_events);
+ }
}
}
@@ -321,8 +360,8 @@
return
eventplanner_bobooking::get_instance()->store($this);
}
- public function read_single($id)
+ public function read_single( $id )
{
return
eventplanner_bobooking::get_instance()->read_single($id, true);
}
- }
+ }
\ No newline at end of file
Copied: branches/dev-syncromind-2/eventplanner/inc/model/class.calendar.inc.php
(from rev 16586, trunk/eventplanner/inc/model/class.calendar.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.calendar.inc.php
(rev 0)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.calendar.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,308 @@
+<?php
+ /**
+ * phpGroupWare - eventplanner: a part of a Facilities Management
System.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2016 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package eventplanner
+ * @subpackage calendar
+ * @version $Id: $
+ */
+ phpgw::import_class('eventplanner.bocalendar');
+
+ include_class('phpgwapi', 'model', 'inc/model/');
+
+ class eventplanner_calendar extends phpgwapi_model
+ {
+
+ const STATUS_REGISTERED = 1;
+ const STATUS_PENDING = 2;
+ const STATUS_REJECTED = 3;
+ const STATUS_APPROVED = 4;
+ const acl_location = '.calendar';
+
+ protected
+ $id,
+ $owner_id,
+ $active,
+ $completed,
+ $cost,
+ $from_,
+ $to_,
+ $application_id,
+ $application_name,
+ $vendor_name,
+ $customer_id,
+ $customer_name,
+ $customer_contact_name,
+ $customer_contact_email,
+ $customer_contact_phone,
+ $location,
+ $comments,
+ $comment,
+ $created,
+ $secret,
+ $process_update;
+ protected $field_of_responsibility_name = '.calendar';
+
+ public function __construct( int $id = null )
+ {
+ parent::__construct((int)$id);
+ $this->field_of_responsibility_name =
self::acl_location;
+ }
+
+ /**
+ * Implementing classes must return an instance of itself.
+ *
+ * @return the class instance.
+ */
+ public static function get_instance()
+ {
+ return new eventplanner_calendar();
+ }
+
+ public static function get_status_list()
+ {
+ return array(
+ self::STATUS_REGISTERED => lang('registered'),
+ self::STATUS_PENDING => lang('pending'),
+ self::STATUS_REJECTED => lang('rejected'),
+ self::STATUS_APPROVED => lang('approved')
+ );
+ }
+
+ public static function get_fields( $debug = true )
+ {
+ $fields = array(
+ 'id' => array('action' => PHPGW_ACL_READ,
+ 'type' => 'int',
+ 'label' => 'id',
+ 'sortable' => true,
+ 'formatter' =>
'JqueryPortico.formatLink',
+ 'public' => true
+ ),
+ 'owner_id' => array('action' => PHPGW_ACL_ADD,
+ 'type' => 'int',
+ 'required' => false
+ ),
+ 'active' => array('action' => PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'type' => 'int',
+ 'public' => true,
+ 'history' => true
+ ),
+ 'completed' => array('action' => PHPGW_ACL_EDIT,
+ 'type' => 'int',
+ 'history' => true
+ ),
+ 'cost' => array('action' => PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'type' => 'decimal'
+ ),
+ 'from_' => array('action' => PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+ 'type' => 'date',
+ 'label' => 'from',
+ 'history' => true,
+ 'required' => true,
+ 'public' => true
+ ),
+ 'to_' => array('action' => PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+ 'type' => 'date',
+ 'label' => 'to',
+ 'history' => true,
+ 'required' => true,
+ 'public' => true
+ ),
+ 'application_id' => array('action' =>
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+ 'type' => 'int',
+ 'label' => 'application',
+ 'sortable' => true,
+ 'required' => true,
+ 'public' => true
+ ),
+ 'application_name' => array('action' =>
PHPGW_ACL_READ,
+ 'type' => 'string',
+ 'query' => true,
+ 'label' => 'application',
+ 'public' => true,
+ 'join' => array(
+ 'table' =>
'eventplanner_application',
+ 'fkey' => 'application_id',
+ 'key' => 'id',
+ 'column' => 'title'
+ )
+ ),
+ 'location' => array('action' => PHPGW_ACL_READ,
+ 'type' => 'string',
+ 'query' => true,
+ 'label' => 'location',
+ 'public' => true,
+ 'join' => array(
+ 'table' =>
'eventplanner_booking',
+ 'fkey' => 'id',
+ 'key' => 'calendar_id',
+ 'column' => 'location'
+ )
+ ),
+ 'vendor_name' => array('action' =>
PHPGW_ACL_READ,
+ 'type' => 'string',
+ 'query' => true,
+ 'label' => 'vendor',
+ 'public' => true,
+ 'multiple_join' => array(
+ 'statement' => 'LEFT JOIN
eventplanner_application ON eventplanner_application.id =
eventplanner_calendar.application_id'
+ . ' LEFT JOIN
eventplanner_vendor ON eventplanner_application.vendor_id =
eventplanner_vendor.id',
+ 'column' =>
'eventplanner_vendor.name'
+ )
+ ),
+ 'customer_name' => array('action' =>
PHPGW_ACL_READ,
+ 'type' => 'string',
+ 'query' => true,
+ 'label' => 'customer',
+ 'public' => true,
+ 'multiple_join' => array(
+ 'statement' => 'LEFT JOIN
eventplanner_booking ON eventplanner_booking.calendar_id =
eventplanner_calendar.id'
+ . ' LEFT JOIN
eventplanner_customer ON eventplanner_booking.customer_id =
eventplanner_customer.id',
+ 'column' =>
'eventplanner_customer.name'
+ )
+ ),
+ 'created' => array('action' => PHPGW_ACL_READ,
+ 'type' => 'date',
+ 'label' => 'created',
+ 'sortable' => true,
+ )
+ );
+
+ if ($debug)
+ {
+ foreach ($fields as $field => $field_info)
+ {
+ if
(!property_exists('eventplanner_calendar', $field))
+ {
+ phpgwapi_cache::message_set('$'
. "{$field},", 'error');
+ }
+ }
+ }
+ return $fields;
+ }
+
+ /**
+ * Implement in subclasses to perform actions on entity before
validation
+ */
+ protected function preValidate( &$entity )
+ {
+ if (!empty($entity->comment))
+ {
+ $entity->comment_input = array(
+ 'time' => time(),
+ 'author' =>
$GLOBALS['phpgw_info']['user']['fullname'],
+ 'comment' => $entity->comment,
+ 'type' => 'comment'
+ );
+ }
+
+ if (!$entity->get_id())
+ {
+ $entity->status =
eventplanner_calendar::STATUS_REGISTERED;
+ $entity->secret = self::generate_secret();
+ $entity->owner_id =
$GLOBALS['phpgw_info']['user']['account_id'];
+ }
+
+ if (empty($entity->completed))
+ {
+ $entity->completed = 0;
+ }
+
+ if (!empty($entity->application_id))
+ {
+ $application =
createObject('eventplanner.boapplication')->read_single($entity->application_id,
true, $relaxe_acl = true);
+ $entity->to_ = $entity->from_ +
((int)$application->timespan * 60);
+ }
+
+ $entity->modified = time();
+ $entity->active = (int)$entity->active;
+ }
+
+ protected function doValidate( $entity, &$errors )
+ {
+ $application =
createObject('eventplanner.boapplication')->read_single($entity->application_id);
+ $params = array();
+ $params['filters']['active'] = 1;
+ $params['filters']['application_id'] =
$entity->application_id;
+
+ $calendars =
eventplanner_socalendar::get_instance()->read($params);
+
+ foreach ($calendars['results'] as $calendar)
+ {
+ if ($calendar['id'] == $entity->get_id())
+ {
+ continue;
+ }
+
+ if (($entity->from_ > $calendar['from_'] &&
$entity->from_ < $calendar['to_']) || ($entity->to_ > $calendar['from_'] &&
$entity->to_ < $calendar['to_']))
+ {
+ $errors['from_'] = lang('Time is
already booked');
+ }
+ }
+
+
+ if ($entity->get_id()) // update
+ {
+ $test_total_tecords =
(int)$calendars['total_records'];
+ }
+ else // new entry
+ {
+ $test_total_tecords =
(int)$calendars['total_records'] + 1;
+ }
+
+ if ($test_total_tecords >
(int)$application->num_granted_events)
+ {
+ $errors['num_granted_events'] = lang('maximum
of granted events are reached');
+ }
+
+ $date_start = date('Ymd', $application->date_start);
+ $date_end = date('Ymd', $application->date_end);
+ $from_ = date('Ymd', $entity->from_);
+
+ if ($from_ < $date_start || $from_ > $date_end)
+ {
+ $errors['from_'] = lang('date is outside the
scope');
+ }
+ }
+
+ protected function generate_secret( $length = 10 )
+ {
+ return substr(base64_encode(rand(1000000000,
9999999999)), 0, $length);
+ }
+
+ public function serialize()
+ {
+ return self::toArray();
+ }
+
+ public function store()
+ {
+ return
eventplanner_bocalendar::get_instance()->store($this);
+ }
+
+ public function read_single( $id )
+ {
+ return
eventplanner_bocalendar::get_instance()->read_single($id, true);
+ }
+ }
\ No newline at end of file
Modified:
branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.customer.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -114,12 +114,12 @@
'category_id' => array('action'=>
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
'type' => 'int'
),
- 'created' => array('action'=> PHPGW_ACL_READ,
+/* 'created' => array('action'=> PHPGW_ACL_READ,
'type' => 'date',
'label' => 'created',
'sortable' => true,
- ),
- 'modified' => array('action'=> PHPGW_ACL_READ |
PHPGW_ACL_EDIT,
+ ),*/
+ 'modified' => array('action'=> PHPGW_ACL_EDIT,
'type' => 'date',
'label' => 'modified',
'sortable' => true,
@@ -221,6 +221,13 @@
'query' => true,
'sf_validator' =>
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(),
array('invalid' => '%field% is invalid')),
'label' => 'organization number'
+ ),
+ 'max_events' => array(
+ 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'type' => 'int',
+ 'required' => true,
+ 'query' => false,
+ 'label' => 'maximum number of
events',
)
);
@@ -245,14 +252,7 @@
'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
'related' => true,
- ),
- 'max_events' => array(
- 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
- 'type' => 'int',
- 'required' => true,
- 'query' => false,
- 'label' => 'maximum number of
events',
- ),
+ )
);
foreach ($backend_fields as $key => $field_info)
Modified: branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/inc/model/class.vendor.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -101,6 +101,7 @@
'label' => 'id',
'sortable'=> true,
'formatter' =>
'JqueryPortico.formatLink',
+ 'public' => true
),
'owner_id' => array('action'=> PHPGW_ACL_ADD,
'type' => 'int',
@@ -130,6 +131,7 @@
'label' => 'name',
'required' => true,
'query' => true,
+ 'public' => true
),
'address_1' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
@@ -186,7 +188,8 @@
'required' => true,
'query' => true,
'sf_validator' =>
createObject('booking.sfValidatorNorwegianOrganizationNumber', array(),
array('invalid' => '%field% is invalid')),
- 'label' => 'organization number'
+ 'label' => 'organization number',
+ 'public' => true
),
);
Modified: branches/dev-syncromind-2/eventplanner/js/portico/application.edit.js
===================================================================
--- branches/dev-syncromind-2/eventplanner/js/portico/application.edit.js
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/js/portico/application.edit.js
2017-04-18 10:50:35 UTC (rev 16587)
@@ -260,7 +260,7 @@
$("#stage_size").val(total_size);
}
-add_booking = function ()
+add_schedule = function ()
{
var from_ = $("#from_").val();
if (!from_)
@@ -269,7 +269,7 @@
}
oArgs = {
- menuaction: 'eventplanner.uibooking.save_ajax',
+ menuaction: 'eventplanner.uicalendar.save_ajax',
application_id: $("#application_id").val()
};
@@ -319,7 +319,7 @@
{
return;
}
- oArgs = {menuaction: 'eventplanner.uibooking.update_schedule'};
+ oArgs = {menuaction: 'eventplanner.uicalendar.update_schedule'};
var requestUrl = phpGWLink('index.php', oArgs, true);
var htmlString = '';
@@ -334,12 +334,21 @@
{
$("#from_").val('');
htmlString += "<div class=\"msg_good\">";
+ htmlString += result.msg;
}
else
{
htmlString += "<div class=\"error\">";
+ var msg = result.msg;
+ if (typeof (msg) == 'object')
+ {
+ htmlString += msg['error'][0]['msg'];
+ }
+ else
+ {
+ htmlString += result.msg;
+ }
}
- htmlString += result.msg;
htmlString += '</div>';
$("#receipt").html(htmlString);
@@ -355,7 +364,7 @@
$("#receipt").html("");
if (action === 'add')
{
- add_booking();
+ add_schedule();
return;
}
@@ -391,7 +400,7 @@
{
var data = {"ids": ids, "action": action, from_:
$("#from_").val()};
- oArgs = {menuaction:
'eventplanner.uibooking.update_active_status'};
+ oArgs = {menuaction:
'eventplanner.uicalendar.update_active_status'};
var requestUrl = phpGWLink('index.php', oArgs, true);
Copied: branches/dev-syncromind-2/eventplanner/js/portico/vendor.edit.js (from
rev 16586, trunk/eventplanner/js/portico/vendor.edit.js)
===================================================================
--- branches/dev-syncromind-2/eventplanner/js/portico/vendor.edit.js
(rev 0)
+++ branches/dev-syncromind-2/eventplanner/js/portico/vendor.edit.js
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,36 @@
+function set_tab(tab)
+{
+ $("#active_tab").val(tab);
+ if (tab === 'application')
+ {
+ $("#submit_group_bottom").hide();
+ }
+ else
+ {
+ $("#submit_group_bottom").show();
+ }
+}
+
+add_application = function (app, menuaction, vendor_id)
+{
+ if (!vendor_id)
+ {
+ return;
+ }
+
+ oArgs = {
+ menuaction: menuaction,
+ vendor_id: vendor_id
+ };
+
+ var requestUrl;
+ if (app === 'eventplannerfrontend')
+ {
+ requestUrl = phpGWLink('eventplannerfrontend/', oArgs);
+ }
+ else
+ {
+ requestUrl = phpGWLink('index.php', oArgs);
+ }
+ window.location = requestUrl;
+};
Modified: branches/dev-syncromind-2/eventplanner/setup/default_records.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/default_records.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/setup/default_records.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -20,6 +20,7 @@
$GLOBALS['phpgw']->locations->add('.events', 'events', 'eventplanner',
$allow_grant = true, $custom_tbl = '', $c_function = true);
$GLOBALS['phpgw']->locations->add('.customer', 'customer',
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true);
$GLOBALS['phpgw']->locations->add('.vendor', 'vendor', 'eventplanner',
$allow_grant = true, $custom_tbl = '', $c_function = true);
+ $GLOBALS['phpgw']->locations->add('.calendar', 'calendar',
'eventplanner', $allow_grant = true);
$GLOBALS['phpgw']->locations->add('.booking', 'booking',
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true);
$GLOBALS['phpgw']->locations->add('.vendor_report', 'vendor_report',
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true,
$c_attrib = true);
$GLOBALS['phpgw']->locations->add('.customer_report',
'customer_report', 'eventplanner', $allow_grant = true, $custom_tbl = '',
$c_function = true, $c_attrib = true);
Modified: branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang 2017-04-18
09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/setup/phpgw_no.lang 2017-04-18
10:50:35 UTC (rev 16587)
@@ -32,6 +32,7 @@
contact name eventplanner no Navn kontaktperson
contact email eventplanner no Epost kontaktperson
contact phone eventplanner no Tlf. kontaktperson
+contact email 2 eventplanner no Epost 2
case officer eventplanner no Saksbehandler
active eventplanner no Aktiv
inactive eventplanner no Inaktiv
@@ -111,4 +112,11 @@
read eventplanner no Les
permission eventplanner no Rettighet
maximum number of events eventplanner no Maksimum antall
arrangement
-number of users eventplanner no Ca. antall brukere
\ No newline at end of file
+maximum of granted events per year (%1) are reached eventplanner no
Maksimum antall arrangementer (%1) pr år er nådd
+number of users eventplanner no Ca. antall brukere
+disconnect eventplanner no Kople fra
+end date cannot be before start date eventplanner no Siste dato kan
ikke være før første dato
+Time is already booked eventplanner no Tiden er allerede booking
+booking interval eventplanner no Booking intervall
+days eventplanner no dager
+there is a minimum interval of %1 hours eventplanner no Det er
et minimumsintervall på %1 time(r)
\ No newline at end of file
Modified: branches/dev-syncromind-2/eventplanner/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/setup.inc.php 2017-04-18
09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/setup/setup.inc.php 2017-04-18
10:50:35 UTC (rev 16587)
@@ -11,7 +11,7 @@
* @version $Id: setup.inc.php 14728 2016-02-11 22:28:46Z sigurdne $
*/
$setup_info['eventplanner']['name'] = 'eventplanner';
- $setup_info['eventplanner']['version'] = '0.9.18.007';
+ $setup_info['eventplanner']['version'] = '0.9.18.008';
$setup_info['eventplanner']['app_order'] = 20;
$setup_info['eventplanner']['enable'] = 1;
$setup_info['eventplanner']['app_group'] = 'office';
@@ -55,6 +55,8 @@
'eventplanner_application_type',
'eventplanner_application',
'eventplanner_application_comment',
+ 'eventplanner_calendar',
+ 'eventplanner_calendar_comment',
'eventplanner_booking',
'eventplanner_booking_comment',
'eventplanner_booking_cost',
Modified: branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/setup/tables_current.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -50,7 +50,7 @@
'eventplanner_vendor_category' =>
array('category_id' => 'id'),
),
'ix' => array(),
- 'uc' => array()
+ 'uc' => array('organization_number')
),
'eventplanner_vendor_comment' => array(
'fd' => array(
@@ -229,16 +229,61 @@
'ix' => array(),
'uc' => array()
),
- 'eventplanner_booking' => array(
+ 'eventplanner_calendar' => array(
'fd' => array(
'id' => array('type' => 'auto', 'nullable' =>
False),
- 'customer_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
+ 'application_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
+ // 'customer_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
'from_' => array('type' => 'int', 'precision'
=> '8', 'nullable' => False),
'to_' => array('type' => 'int', 'precision' =>
'8', 'nullable' => False),
'active' => array('type' => 'int', 'precision'
=> 4, 'nullable' => False, 'default' => '1'),
'completed' => array('type' => 'int',
'precision' => 4, 'nullable' => False,'default' => '0'),
'cost' => array('type' => 'decimal',
'precision' => 20, 'scale' => 2, 'nullable' => True,'default' => '0.00'),
- 'application_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
+ // 'customer_contact_name' => array('type' =>
'text', 'nullable' => True),
+ // 'customer_contact_email' => array('type' =>
'text', 'nullable' => True),
+ // 'customer_contact_phone' => array('type' =>
'text', 'nullable' => True),
+ // 'location' => array('type' => 'text',
'nullable' => True),
+ // 'reminder' => array('type' => 'int',
'precision' => 4, 'nullable' => False, 'default' => '0'),
+ // 'secret' => array('type' => 'text', 'nullable'
=> False),
+ // 'sms_total' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
+ 'owner_id' => array('type' => 'int',
'precision' => '4', 'nullable' => False),
+ 'public' => array('type' => 'int', 'precision'
=> '2', 'nullable' => True),
+ 'created' => array('type' => 'int', 'precision'
=> '8', 'nullable' => False, 'default' => 'current_timestamp'),
+ ),
+ 'pk' => array('id'),
+ 'fk' => array(
+ // 'eventplanner_customer' => array('customer_id'
=> 'id'),
+ 'eventplanner_application' =>
array('application_id' => 'id'),
+ ),
+ 'ix' => array(),
+ 'uc' => array()
+ ),
+ 'eventplanner_calendar_comment' => array(
+ 'fd' => array(
+ 'id' => array('type' => 'auto', 'nullable' =>
False),
+ 'calendar_id' => array('type' => 'int',
'precision' => '4', 'nullable' => False),
+ 'time' => array('type' => 'int', 'precision' =>
'8', 'nullable' => False),
+ 'author' => array('type' => 'text', 'nullable'
=> False),
+ 'comment' => array('type' => 'text', 'nullable'
=> False),
+ 'type' => array('type' => 'varchar',
'precision' => '20', 'nullable' => false,'default' => 'comment'),
+ ),
+ 'pk' => array('id'),
+ 'fk' => array(
+ 'eventplanner_calendar' => array('calendar_id'
=> 'id')),
+ 'ix' => array(),
+ 'uc' => array()
+ ),
+ 'eventplanner_booking' => array(
+ 'fd' => array(
+ 'id' => array('type' => 'auto', 'nullable' =>
False),
+ 'calendar_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
+ 'customer_id' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
+// 'from_' => array('type' => 'int', 'precision'
=> '8', 'nullable' => False),
+// 'to_' => array('type' => 'int', 'precision' =>
'8', 'nullable' => False),
+// 'active' => array('type' => 'int', 'precision'
=> 4, 'nullable' => False, 'default' => '1'),
+ 'completed' => array('type' => 'int',
'precision' => 4, 'nullable' => False,'default' => '0'),
+// 'cost' => array('type' => 'decimal',
'precision' => 20, 'scale' => 2, 'nullable' => True,'default' => '0.00'),
+// 'application_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
'customer_contact_name' => array('type' =>
'text', 'nullable' => True),
'customer_contact_email' => array('type' =>
'text', 'nullable' => True),
'customer_contact_phone' => array('type' =>
'text', 'nullable' => True),
@@ -252,8 +297,8 @@
),
'pk' => array('id'),
'fk' => array(
+ 'eventplanner_calendar' => array('calendar_id'
=> 'id'),
'eventplanner_customer' => array('customer_id'
=> 'id'),
- 'eventplanner_application' =>
array('application_id' => 'id'),
),
'ix' => array(),
'uc' => array()
Modified: branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/setup/tables_update.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -224,3 +224,134 @@
}
return $GLOBALS['setup_info']['eventplanner']['currentver'];
}
+
+ $test[] = '0.9.18.007';
+ function eventplanner_upgrade0_9_18_007()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw']->locations->add('.calendar', 'calendar',
'eventplanner', $allow_grant = true);
+ $GLOBALS['phpgw']->locations->add('.calendar', 'calendar',
'eventplannerfrontend', $allow_grant = true);
+
+ $GLOBALS['phpgw_setup']->oProc->CreateTable(
+ 'eventplanner_calendar', array(
+ 'fd' => array(
+ 'id' => array('type' => 'auto',
'nullable' => False),
+ 'application_id' => array('type' =>
'int', 'precision' => 4, 'nullable' => True),
+ 'from_' => array('type' => 'int',
'precision' => '8', 'nullable' => False),
+ 'to_' => array('type' => 'int',
'precision' => '8', 'nullable' => False),
+ 'active' => array('type' => 'int',
'precision' => 4, 'nullable' => False, 'default' => '1'),
+ 'completed' => array('type' => 'int',
'precision' => 4, 'nullable' => False,'default' => '0'),
+ 'cost' => array('type' => 'decimal',
'precision' => 20, 'scale' => 2, 'nullable' => True,'default' => '0.00'),
+ 'owner_id' => array('type' => 'int',
'precision' => '4', 'nullable' => False),
+ 'public' => array('type' => 'int',
'precision' => '2', 'nullable' => True),
+ 'created' => array('type' => 'int',
'precision' => '8', 'nullable' => False, 'default' => 'current_timestamp'),
+ ),
+ 'pk' => array('id'),
+ 'fk' => array(
+ 'eventplanner_application' =>
array('application_id' => 'id'),
+ ),
+ 'ix' => array(),
+ 'uc' => array()
+ )
+ );
+
+ $GLOBALS['phpgw_setup']->oProc->CreateTable(
+ 'eventplanner_calendar_comment', array(
+ 'fd' => array(
+ 'id' => array('type' => 'auto',
'nullable' => False),
+ 'calendar_id' => array('type' => 'int',
'precision' => '4', 'nullable' => False),
+ 'time' => array('type' => 'int',
'precision' => '8', 'nullable' => False),
+ 'author' => array('type' => 'text',
'nullable' => False),
+ 'comment' => array('type' => 'text',
'nullable' => False),
+ 'type' => array('type' => 'varchar',
'precision' => '20', 'nullable' => false,'default' => 'comment'),
+ ),
+ 'pk' => array('id'),
+ 'fk' => array(
+ 'eventplanner_calendar' =>
array('calendar_id' => 'id')),
+ 'ix' => array(),
+ 'uc' => array()
+ ));
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('eventplanner_booking', 'calendar_id',
+ array
+ (
+ 'type' => 'int',
+ 'precision' => 4,
+ 'nullable' => true
+ )
+ );
+
+ $sql = "SELECT * FROM eventplanner_booking";
+ $GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
+
+ $calendars = array();
+ while($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $calendars[] = array(
+ 'id' =>
$GLOBALS['phpgw_setup']->oProc->f('id'),
+ 'application_id' =>
$GLOBALS['phpgw_setup']->oProc->f('application_id'),
+ 'customer_id' =>
$GLOBALS['phpgw_setup']->oProc->f('customer_id'),
+ 'from_' =>
$GLOBALS['phpgw_setup']->oProc->f('from_'),
+ 'to_' =>
$GLOBALS['phpgw_setup']->oProc->f('to_'),
+ 'active' =>
$GLOBALS['phpgw_setup']->oProc->f('active'),
+ 'completed' =>
$GLOBALS['phpgw_setup']->oProc->f('completed'),
+ 'cost' =>
$GLOBALS['phpgw_setup']->oProc->f('cost'),
+ 'customer_contact_name' =>
$GLOBALS['phpgw_setup']->oProc->f('customer_contact_name'),
+ 'customer_contact_email' =>
$GLOBALS['phpgw_setup']->oProc->f('customer_contact_email'),
+ 'customer_contact_phone' =>
$GLOBALS['phpgw_setup']->oProc->f('customer_contact_phone'),
+ 'location' =>
$GLOBALS['phpgw_setup']->oProc->f('location'),
+ 'reminder' =>
$GLOBALS['phpgw_setup']->oProc->f('reminder'),
+ 'secret' =>
$GLOBALS['phpgw_setup']->oProc->f('secret'),
+ 'sms_total' =>
$GLOBALS['phpgw_setup']->oProc->f('sms_total'),
+ 'owner_id' =>
$GLOBALS['phpgw_setup']->oProc->f('owner_id'),
+ 'public' =>
$GLOBALS['phpgw_setup']->oProc->f('public'),
+ 'created' =>
$GLOBALS['phpgw_setup']->oProc->f('created')
+ );
+ }
+
+ $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM
eventplanner_booking WHERE customer_id IS NULL", __LINE__, __FILE__);
+
+ foreach ($calendars as $calendar)
+ {
+ $value_set = array(
+ 'application_id' => $calendar['application_id'],
+ 'from_' => $calendar['from_'],
+ 'to_' => $calendar['to_'],
+ 'active' => $calendar['active'],
+ 'completed' => $calendar['completed'],
+ 'cost' => $calendar['cost'],
+ 'owner_id' => $calendar['owner_id'],
+ 'public' => $calendar['public'],
+ 'created' => $calendar['created'],
+ );
+
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
eventplanner_calendar (' . implode(',', array_keys($value_set)) . ') VALUES ('
. $GLOBALS['phpgw_setup']->oProc->validate_insert(array_values($value_set)) .
')');
+ $calendar_id =
(int)$GLOBALS['phpgw_setup']->oProc->m_odb->get_last_insert_id('eventplanner_calendar',
'id');
+ $GLOBALS['phpgw_setup']->oProc->query("UPDATE
eventplanner_booking SET calendar_id = {$calendar_id}"
+ . " WHERE id = {$calendar['id']}", __LINE__, __FILE__);
+
+ }
+
+ $GLOBALS['phpgw_setup']->oProc->query("ALTER TABLE
eventplanner_booking DROP CONSTRAINT eventplanner_booking_application_id_fkey",
__LINE__, __FILE__);
+
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('eventplanner_booking', array(),
'from_');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('eventplanner_booking', array(),
'to_');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('eventplanner_booking', array(),
'cost');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('eventplanner_booking', array(),
'application_id');
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('eventplanner_booking', array(),
'active');
+
+
+ $sql = "ALTER TABLE public.eventplanner_booking"
+ . " ADD CONSTRAINT
eventplanner_booking_calendar_id_fkey FOREIGN KEY (calendar_id)"
+ . " REFERENCES eventplanner_calendar (id) MATCH SIMPLE"
+ . " ON UPDATE NO ACTION ON DELETE NO ACTION";
+
+ $GLOBALS['phpgw_setup']->oProc->query($sql, __LINE__, __FILE__);
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['eventplanner']['currentver'] =
'0.9.18.008';
+ }
+ return $GLOBALS['setup_info']['eventplanner']['currentver'];
+ }
Modified: branches/dev-syncromind-2/eventplanner/templates/base/booking.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/booking.xsl
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/templates/base/booking.xsl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -76,6 +76,7 @@
</div>
<input type="hidden" id="active_tab"
name="active_tab" value="{value_active_tab}"/>
<div id="first_tab">
+ <input type="hidden" name="calendar_id"
value="{calendar/id}"/>
<xsl:if test="booking/id > 0">
<div class="pure-control-group">
<label>
@@ -82,7 +83,6 @@
<xsl:value-of
select="php:function('lang', 'id')"/>
</label>
<input type="hidden"
id="booking_id" name="id" value="{booking/id}"/>
- <input type="hidden"
name="application_id" value="{booking/application_id}"/>
<xsl:value-of
select="booking/id"/>
</div>
</xsl:if>
@@ -103,7 +103,7 @@
</a>
</label>
- <xsl:value-of
select="booking/application_name"/>
+ <xsl:value-of
select="calendar/application_name"/>
</div>
<div class="pure-control-group">
@@ -274,7 +274,7 @@
<xsl:value-of
select="php:function('lang', 'active')"/>
</label>
<input type="checkbox"
name="active" id="active" value="1" readonly="readonly">
- <xsl:if
test="booking/active = 1">
+ <xsl:if
test="calendar/active = 1">
<xsl:attribute name="checked" value="checked"/>
</xsl:if>
</input>
@@ -284,7 +284,7 @@
<xsl:value-of
select="php:function('lang', 'completed')"/>
</label>
<input type="checkbox"
name="completed" id="completed" value="1">
- <xsl:if
test="booking/completed = 1">
+ <xsl:if
test="calendar/completed = 1">
<xsl:attribute name="checked" value="checked"/>
</xsl:if>
</input>
@@ -298,9 +298,9 @@
<xsl:value-of
select="$lang_from"/>
</label>
<input type="text"
id="from_" name="from_" size="16" readonly="readonly">
- <xsl:if
test="booking/from_ != 0 and booking/from_ != ''">
+ <xsl:if
test="calendar/from_ != 0 and calendar/from_ != ''">
<xsl:attribute name="value">
-
<xsl:value-of select="php:function('show_date', number(booking/from_),
$date_format)"/>
+
<xsl:value-of select="php:function('show_date', number(calendar/from_),
$date_format)"/>
</xsl:attribute>
</xsl:if>
<xsl:attribute
name="data-validation">
@@ -322,7 +322,7 @@
<label>
<xsl:value-of
select="php:function('lang', 'to')"/>
</label>
- <xsl:value-of
select="php:function('show_date', number(booking/to_), $date_format)"/>
+ <xsl:value-of
select="php:function('show_date', number(calendar/to_), $date_format)"/>
</div>
<div class="pure-control-group">
@@ -336,7 +336,7 @@
<xsl:value-of
select="booking/location"/>
</textarea>
</div>
- <div class="pure-control-group">
+ <!--div
class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'remark')"/>
</label>
@@ -343,7 +343,7 @@
<textarea cols="47"
rows="7" name="remark">
<xsl:value-of
select="booking/remark"/>
</textarea>
- </div>
+ </div-->
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'comment')"/>
@@ -463,7 +463,7 @@
<xsl:variable name="cancel_url">
<xsl:value-of select="cancel_url"/>
</xsl:variable>
- <input type="button" class="pure-button
pure-button-primary" name="cancel" value="{lang_cancel}"
onMouseout="window.status='';return true;" onClick="window.location =
'{cancel_url}';"/>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" value="{lang_cancel}"
onClick="window.location = '{cancel_url}';"/>
</div>
</form>
</div>
Modified: branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/templates/base/config.tpl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -14,6 +14,12 @@
</select>
</td>
</tr>
+ <tr>
+ <td>{lang_booking_interval}:</td>
+ <td>
+ <input type="number"
name="newsettings[booking_interval]" value="{value_booking_interval}">
+ </td>
+ </tr>
<!-- END body -->
<!-- BEGIN footer -->
Modified: branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/templates/base/customer.xsl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -348,6 +348,28 @@
</div>
</fieldset>
</div>
+ <div id="booking">
+ <fieldset>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'booking')"/>
+ </label>
+ <div
class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_1'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl'/>
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+
<xsl:with-param name="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+
</xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+ </fieldset>
+ </div>
</div>
<div class="proplist-col">
<input type="submit" class="pure-button
pure-button-primary" name="save">
Modified: branches/dev-syncromind-2/eventplanner/templates/base/events.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/events.xsl
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/templates/base/events.xsl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -66,6 +66,16 @@
<xsl:value-of
select="category_name"/>
</div>
+ <xsl:if test="booking_interval != ''">
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'booking interval')"/>
+ </label>
+ <xsl:value-of
select="booking_interval"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of
select="php:function('lang', 'days')"/>
+ </div>
+ </xsl:if>
<div class="pure-control-group">
<label>
Modified: branches/dev-syncromind-2/eventplanner/templates/base/vendor.xsl
===================================================================
--- branches/dev-syncromind-2/eventplanner/templates/base/vendor.xsl
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplanner/templates/base/vendor.xsl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -204,6 +204,9 @@
<xsl:value-of
select="php:function('lang', 'vendor description')"/>
</label>
<textarea cols="47"
rows="7" name="description">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
<xsl:value-of
select="vendor/description"/>
</textarea>
</div>
@@ -212,9 +215,6 @@
<xsl:value-of
select="php:function('lang', 'remark')"/>
</label>
<textarea cols="47"
rows="7" name="remark">
- <xsl:attribute
name="data-validation">
-
<xsl:text>required</xsl:text>
- </xsl:attribute>
<xsl:value-of
select="vendor/remark"/>
</textarea>
</div>
@@ -246,8 +246,32 @@
</div>
</fieldset>
</div>
+ <div id="application">
+ <fieldset>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'application')"/>
+ </label>
+ <div
class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_1'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl'/>
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+
<xsl:with-param name="tabletools" select ='tabletools'/>
+
<xsl:with-param name="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+
</xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+ </fieldset>
+ </div>
</div>
- <div class="proplist-col">
+ <div id="submit_group_bottom" class="proplist-col">
<input type="submit" class="pure-button
pure-button-primary" name="save">
<xsl:attribute name="value">
<xsl:value-of
select="php:function('lang', 'save')"/>
Modified:
branches/dev-syncromind-2/eventplannerfrontend/inc/class.hook_helper.inc.php
===================================================================
---
branches/dev-syncromind-2/eventplannerfrontend/inc/class.hook_helper.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++
branches/dev-syncromind-2/eventplannerfrontend/inc/class.hook_helper.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -124,7 +124,6 @@
{
return;
}
-
$session_org_id = phpgw::get_var('session_org_id','int'
, 'POST');
if($session_org_id)
{
@@ -137,7 +136,15 @@
$_SESSION['org_id'] = '';
}
}
+ else if ($_POST['session_org_id'])
+ {
+ $_SESSION['org_id'] = '';
+ }
+ /**
+ * $_SESSION['orgs'] is set in
eventplannerfrontend_external_user::get_user_org_id()
+ */
+
if(!empty($_SESSION['orgs']) &&
is_array($_SESSION['orgs']))
{
$orgs = phpgw::get_var('orgs', 'string',
'SESSION');
@@ -167,7 +174,20 @@
if ($orgs)
{
- $action =
"{$_SERVER['REQUEST_SCHEME']}://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}";
+ if(!empty($_GET['menuaction']))
+ {
+ $action =
$GLOBALS['phpgw']->link('/eventplannerfrontend/',
+ array
+ (
+ 'menuaction' =>
phpgw::get_var('menuaction')
+ )
+ );
+ }
+ else
+ {
+ $action =
$GLOBALS['phpgw']->link('/eventplannerfrontend/home.php');
+ }
+
$message = 'Velg organisasjon';
$org_select = <<<HTML
Copied:
branches/dev-syncromind-2/eventplannerfrontend/inc/class.uicalendar.inc.php
(from rev 16586, trunk/eventplannerfrontend/inc/class.uicalendar.inc.php)
===================================================================
--- branches/dev-syncromind-2/eventplannerfrontend/inc/class.uicalendar.inc.php
(rev 0)
+++ branches/dev-syncromind-2/eventplannerfrontend/inc/class.uicalendar.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,47 @@
+<?php
+ phpgw::import_class('eventplanner.uicalendar');
+ include_class('eventplanner', 'application', 'inc/model/');
+ class eventplannerfrontend_uicalendar extends eventplanner_uicalendar
+ {
+
+ public function __construct()
+ {
+ $GLOBALS['phpgw']->translation->add_app('eventplanner');
+ parent::__construct();
+ }
+
+ public function query()
+ {
+ $params = $this->bo->build_default_read_params();
+ $params['filters']['status'] =
eventplanner_application::STATUS_APPROVED;
+ $values = $this->bo->read($params);
+ array_walk($values["results"], array($this,
"_add_links"), "eventplannerfrontend.uicalendar.edit");
+
+ return $this->jquery_results($values);
+ }
+
+ public function query_relaxed()
+ {
+ $params = $this->bo->build_default_read_params();
+ $params['relaxe_acl'] = true;
+ $params['filters']['status'] =
eventplanner_application::STATUS_APPROVED;
+ $values = $this->bo->read($params);
+ $redirect = phpgw::get_var('redirect');
+ if($redirect == 'booking')
+ {
+ array_walk($values["results"], array($this,
"_add_links2"), "{$this->currentapp}.uibooking.edit");
+ }
+ else
+ {
+ array_walk($values["results"], array($this,
"_add_links"), "{$this->currentapp}.uicalendar.edit");
+ }
+
+ return $this->jquery_results($values);
+ }
+
+ public function edit()
+ {
+ parent::edit();
+ }
+
+ }
Modified:
branches/dev-syncromind-2/eventplannerfrontend/js/portico/application.edit.js
===================================================================
---
branches/dev-syncromind-2/eventplannerfrontend/js/portico/application.edit.js
2017-04-18 09:22:12 UTC (rev 16586)
+++
branches/dev-syncromind-2/eventplannerfrontend/js/portico/application.edit.js
2017-04-18 10:50:35 UTC (rev 16587)
@@ -1,8 +1,8 @@
var vendor_id_selection;
var lang;
-var oArgs = {menuaction: 'eventplanner.uivendor.index', organization_number:
true};
-var strURL = phpGWLink('index.php', oArgs, true);
+var oArgs = {menuaction: 'eventplannerfrontend.uivendor.index',
organization_number: true};
+var strURL = phpGWLink('eventplannerfrontend/', oArgs, true);
JqueryPortico.autocompleteHelper(strURL, 'vendor_name', 'vendor_id',
'vendor_container', 'name');
$(window).on('load', function ()
@@ -31,11 +31,11 @@
return;
}
oArgs = {
- menuaction: 'eventplanner.uivendor.get',
+ menuaction: 'eventplannerfrontend.uivendor.get',
id: vendor_id
};
- var requestUrl = phpGWLink('index.php', oArgs, true);
+ var requestUrl = phpGWLink('eventplannerfrontend/', oArgs, true);
var data = {};
JqueryPortico.execute_ajax(requestUrl,
@@ -260,7 +260,7 @@
$("#stage_size").val(total_size);
}
-add_booking = function ()
+add_schedule = function ()
{
var from_ = $("#from_").val();
if (!from_)
@@ -269,11 +269,11 @@
}
oArgs = {
- menuaction: 'eventplanner.uibooking.save_ajax',
+ menuaction: 'eventplannerfrontend.uicalendar.save_ajax',
application_id: $("#application_id").val()
};
- var requestUrl = phpGWLink('index.php', oArgs, true);
+ var requestUrl = phpGWLink('eventplannerfrontend/', oArgs, true);
var htmlString = '';
$("#receipt").html("");
var data = {from_: from_, active: 1};
@@ -319,9 +319,9 @@
{
return;
}
- oArgs = {menuaction: 'eventplanner.uibooking.update_schedule'};
+ oArgs = {menuaction: 'eventplannerfrontend.uicalendar.update_schedule'};
- var requestUrl = phpGWLink('index.php', oArgs, true);
+ var requestUrl = phpGWLink('eventplannerfrontend/', oArgs, true);
var htmlString = '';
$("#receipt").html("");
@@ -355,7 +355,7 @@
$("#receipt").html("");
if (action === 'add')
{
- add_booking();
+ add_schedule();
return;
}
@@ -391,9 +391,9 @@
{
var data = {"ids": ids, "action": action, from_:
$("#from_").val()};
- oArgs = {menuaction:
'eventplanner.uibooking.update_active_status'};
+ oArgs = {menuaction:
'eventplannerfrontend.uicalendar.update_active_status'};
- var requestUrl = phpGWLink('index.php', oArgs, true);
+ var requestUrl = phpGWLink('eventplannerfrontend/', oArgs,
true);
var htmlString = '';
$("#receipt").html("");
Copied:
branches/dev-syncromind-2/eventplannerfrontend/js/portico/vendor.edit.js (from
rev 16586, trunk/eventplannerfrontend/js/portico/vendor.edit.js)
===================================================================
--- branches/dev-syncromind-2/eventplannerfrontend/js/portico/vendor.edit.js
(rev 0)
+++ branches/dev-syncromind-2/eventplannerfrontend/js/portico/vendor.edit.js
2017-04-18 10:50:35 UTC (rev 16587)
@@ -0,0 +1,36 @@
+function set_tab(tab)
+{
+ $("#active_tab").val(tab);
+ if (tab === 'application')
+ {
+ $("#submit_group_bottom").hide();
+ }
+ else
+ {
+ $("#submit_group_bottom").show();
+ }
+}
+
+add_application = function (app, menuaction, vendor_id)
+{
+ if (!vendor_id)
+ {
+ return;
+ }
+
+ oArgs = {
+ menuaction: menuaction,
+ vendor_id: vendor_id
+ };
+
+ var requestUrl;
+ if (app === 'eventplannerfrontend')
+ {
+ requestUrl = phpGWLink('eventplannerfrontend/', oArgs);
+ }
+ else
+ {
+ requestUrl = phpGWLink('index.php', oArgs);
+ }
+ window.location = requestUrl;
+};
Modified: branches/dev-syncromind-2/eventplannerfrontend/logout.php
===================================================================
--- branches/dev-syncromind-2/eventplannerfrontend/logout.php 2017-04-18
09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplannerfrontend/logout.php 2017-04-18
10:50:35 UTC (rev 16587)
@@ -68,4 +68,12 @@
$GLOBALS['phpgw']->session->phpgw_setcookie('domain');
}
+ $login = phpgw::get_var('login', 'bool');
+
+ if($login)
+ {
+
$GLOBALS['phpgw']->redirect_link('/eventplannerfrontend/login.php',
array('after' => phpgw::get_var('after', 'raw')));
+
+ }
+
$GLOBALS['phpgw']->redirect_link('/eventplannerfrontend/', array('cd'
=> 1, 'logout' => true));
Modified:
branches/dev-syncromind-2/eventplannerfrontend/setup/default_records.inc.php
===================================================================
---
branches/dev-syncromind-2/eventplannerfrontend/setup/default_records.inc.php
2017-04-18 09:22:12 UTC (rev 16586)
+++
branches/dev-syncromind-2/eventplannerfrontend/setup/default_records.inc.php
2017-04-18 10:50:35 UTC (rev 16587)
@@ -5,6 +5,7 @@
$GLOBALS['phpgw']->locations->add('.events', 'events',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
$GLOBALS['phpgw']->locations->add('.customer', 'customer',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
$GLOBALS['phpgw']->locations->add('.vendor', 'vendor',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
+ $GLOBALS['phpgw']->locations->add('.calendar', 'calendar',
'eventplannerfrontend', $allow_grant = true);
$GLOBALS['phpgw']->locations->add('.booking', 'booking',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
$GLOBALS['phpgw']->locations->add('.vendor_report', 'vendor_report',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
$GLOBALS['phpgw']->locations->add('.customer_report',
'customer_report', 'eventplannerfrontend', $allow_grant = true, $custom_tbl =
'', $c_function = true);
Modified:
branches/dev-syncromind-2/eventplannerfrontend/templates/base/application.xsl
===================================================================
---
branches/dev-syncromind-2/eventplannerfrontend/templates/base/application.xsl
2017-04-18 09:22:12 UTC (rev 16586)
+++
branches/dev-syncromind-2/eventplannerfrontend/templates/base/application.xsl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -137,12 +137,13 @@
<xsl:text>required</xsl:text>
</xsl:attribute>
</input>
+ <!--
<xsl:text>
</xsl:text>
<a
href="{new_vendor_url}" target="_blank">
<xsl:value-of select="php:function('lang', 'new')"/>
<xsl:text> </xsl:text>
<xsl:value-of select="php:function('lang', 'vendor')"/>
- </a>
+ </a>-->
<div
id="vendor_container"/>
</div>
<div
class="pure-control-group">
Modified:
branches/dev-syncromind-2/eventplannerfrontend/templates/base/booking.xsl
===================================================================
--- branches/dev-syncromind-2/eventplannerfrontend/templates/base/booking.xsl
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplannerfrontend/templates/base/booking.xsl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -103,7 +103,7 @@
</a>
</label>
- <xsl:value-of
select="booking/application_name"/>
+ <xsl:value-of
select="calendar/application_name"/>
</div>
<div class="pure-control-group">
@@ -274,7 +274,7 @@
<xsl:value-of
select="php:function('lang', 'active')"/>
</label>
<input type="checkbox"
name="active" id="active" value="1" readonly="readonly">
- <xsl:if
test="booking/active = 1">
+ <xsl:if
test="calendar/active = 1">
<xsl:attribute name="checked" value="checked"/>
</xsl:if>
</input>
@@ -284,7 +284,7 @@
<xsl:value-of
select="php:function('lang', 'completed')"/>
</label>
<input type="checkbox"
name="completed" id="completed" value="1">
- <xsl:if
test="booking/completed = 1">
+ <xsl:if
test="calendar/completed = 1">
<xsl:attribute name="checked" value="checked"/>
</xsl:if>
</input>
@@ -298,9 +298,9 @@
<xsl:value-of
select="$lang_from"/>
</label>
<input type="text"
id="from_" name="from_" size="16" readonly="readonly">
- <xsl:if
test="booking/from_ != 0 and booking/from_ != ''">
+ <xsl:if
test="calendar/from_ != 0 and calendar/from_ != ''">
<xsl:attribute name="value">
-
<xsl:value-of select="php:function('show_date', number(booking/from_),
$date_format)"/>
+
<xsl:value-of select="php:function('show_date', number(calendar/from_),
$date_format)"/>
</xsl:attribute>
</xsl:if>
<xsl:attribute
name="data-validation">
@@ -322,7 +322,7 @@
<label>
<xsl:value-of
select="php:function('lang', 'to')"/>
</label>
- <xsl:value-of
select="php:function('show_date', number(booking/to_), $date_format)"/>
+ <xsl:value-of
select="php:function('show_date', number(calendar/to_), $date_format)"/>
</div>
<div class="pure-control-group">
@@ -336,7 +336,7 @@
<xsl:value-of
select="booking/location"/>
</textarea>
</div>
- <div class="pure-control-group">
+ <!--div
class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'remark')"/>
</label>
@@ -369,7 +369,7 @@
</xsl:if>
</xsl:for-each>
</div>
- </div>
+ </div-->
</fieldset>
</div>
<div id="reports">
@@ -463,7 +463,7 @@
<xsl:variable name="cancel_url">
<xsl:value-of select="cancel_url"/>
</xsl:variable>
- <input type="button" class="pure-button
pure-button-primary" name="cancel" value="{lang_cancel}"
onMouseout="window.status='';return true;" onClick="window.location =
'{cancel_url}';"/>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" value="{lang_cancel}"
onClick="window.location = '{cancel_url}';"/>
</div>
</form>
</div>
Modified:
branches/dev-syncromind-2/eventplannerfrontend/templates/base/customer.xsl
===================================================================
--- branches/dev-syncromind-2/eventplannerfrontend/templates/base/customer.xsl
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplannerfrontend/templates/base/customer.xsl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -274,6 +274,29 @@
</div>
</fieldset>
</div>
+ <div id="booking">
+ <fieldset>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'booking')"/>
+ </label>
+ <div
class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_1'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl'/>
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+
<xsl:with-param name="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+
</xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+
</div>
<div class="proplist-col">
<input type="submit" class="pure-button
pure-button-primary" name="save">
Modified:
branches/dev-syncromind-2/eventplannerfrontend/templates/base/events.xsl
===================================================================
--- branches/dev-syncromind-2/eventplannerfrontend/templates/base/events.xsl
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplannerfrontend/templates/base/events.xsl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -66,6 +66,16 @@
<xsl:value-of
select="category_name"/>
</div>
+ <xsl:if test="booking_interval != ''">
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'booking interval')"/>
+ </label>
+ <xsl:value-of
select="booking_interval"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of
select="php:function('lang', 'days')"/>
+ </div>
+ </xsl:if>
<div class="pure-control-group">
<label>
Modified:
branches/dev-syncromind-2/eventplannerfrontend/templates/base/vendor.xsl
===================================================================
--- branches/dev-syncromind-2/eventplannerfrontend/templates/base/vendor.xsl
2017-04-18 09:22:12 UTC (rev 16586)
+++ branches/dev-syncromind-2/eventplannerfrontend/templates/base/vendor.xsl
2017-04-18 10:50:35 UTC (rev 16587)
@@ -194,6 +194,9 @@
<xsl:value-of
select="php:function('lang', 'vendor description')"/>
</label>
@@ Diff output truncated at 153600 characters. @@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16587] Syncromind: Merge 16395:16586 from trunk,
sigurdne <=