[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16049] more on eventplanner
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16049] more on eventplanner |
Date: |
Tue, 6 Dec 2016 14:52:15 +0000 (UTC) |
Revision: 16049
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16049
Author: sigurdne
Date: 2016-12-06 14:52:15 +0000 (Tue, 06 Dec 2016)
Log Message:
-----------
more on eventplanner
Modified Paths:
--------------
trunk/eventplanner/inc/class.bocommon.inc.php
trunk/eventplanner/inc/class.bovendor_report.inc.php
trunk/eventplanner/inc/class.sovendor_report.inc.php
trunk/eventplanner/inc/class.uiapplication.inc.php
trunk/eventplanner/inc/class.uivendor_report.inc.php
trunk/eventplanner/inc/model/class.booking.inc.php
trunk/eventplanner/inc/model/class.customer.inc.php
trunk/eventplanner/inc/model/class.vendor.inc.php
trunk/eventplanner/inc/model/class.vendor_report.inc.php
Modified: trunk/eventplanner/inc/class.bocommon.inc.php
===================================================================
--- trunk/eventplanner/inc/class.bocommon.inc.php 2016-12-05 15:47:43 UTC
(rev 16048)
+++ trunk/eventplanner/inc/class.bocommon.inc.php 2016-12-06 14:52:15 UTC
(rev 16049)
@@ -86,7 +86,7 @@
{
if(($field_info['action'] & PHPGW_ACL_ADD) ||
($field_info['action'] & PHPGW_ACL_EDIT))
{
- if($field_info['type'] == 'jsonb')
+ if($field_info['type'] == 'json')
{
$values = array();
$custom_fields =
$object->get_custom_fields();
Modified: trunk/eventplanner/inc/class.bovendor_report.inc.php
===================================================================
--- trunk/eventplanner/inc/class.bovendor_report.inc.php 2016-12-05
15:47:43 UTC (rev 16048)
+++ trunk/eventplanner/inc/class.bovendor_report.inc.php 2016-12-06
14:52:15 UTC (rev 16049)
@@ -85,16 +85,13 @@
}
$values =
eventplanner_sovendor_report::get_instance()->read($params);
- $status_text =
eventplanner_vendor_report::get_status_list();
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
foreach ($values['results'] as &$entry)
{
- $entry['status'] =
$status_text[$entry['status']];
$entry['created'] =
$GLOBALS['phpgw']->common->show_date($entry['created']);
$entry['modified'] =
$GLOBALS['phpgw']->common->show_date($entry['modified']);
$entry['date_start'] =
$GLOBALS['phpgw']->common->show_date($entry['date_start'], $dateformat);
$entry['date_end'] =
$GLOBALS['phpgw']->common->show_date($entry['date_end'], $dateformat);
- $entry['case_officer_id'] =
$entry['case_officer_id'] ?
$GLOBALS['phpgw']->accounts->get($entry['case_officer_id'])->__toString() : '';
}
return $values;
}
Modified: trunk/eventplanner/inc/class.sovendor_report.inc.php
===================================================================
--- trunk/eventplanner/inc/class.sovendor_report.inc.php 2016-12-05
15:47:43 UTC (rev 16048)
+++ trunk/eventplanner/inc/class.sovendor_report.inc.php 2016-12-06
14:52:15 UTC (rev 16049)
@@ -82,7 +82,6 @@
protected function update( $object )
{
$this->db->transaction_begin();
- $status_text =
eventplanner_vendor_report::get_status_list();
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
$original =
$this->read_single($object->get_id());//returned as array()
Modified: trunk/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uiapplication.inc.php 2016-12-05 15:47:43 UTC
(rev 16048)
+++ trunk/eventplanner/inc/class.uiapplication.inc.php 2016-12-06 14:52:15 UTC
(rev 16049)
@@ -339,7 +339,7 @@
);
$GLOBALS['phpgw']->jqcal->add_listener('date_start');
$GLOBALS['phpgw']->jqcal->add_listener('date_end');
- $GLOBALS['phpgw']->jqcal2->add_listener('from_',
'datetime', '', array(
+ $GLOBALS['phpgw']->jqcal2->add_listener('from_',
'datetime', $application->date_start, array(
'min_date' => date('Y/m/d',
$application->date_start),
'max_date' => date('Y/m/d',
$application->date_end)
)
Modified: trunk/eventplanner/inc/class.uivendor_report.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uivendor_report.inc.php 2016-12-05
15:47:43 UTC (rev 16048)
+++ trunk/eventplanner/inc/class.uivendor_report.inc.php 2016-12-06
14:52:15 UTC (rev 16049)
@@ -59,22 +59,7 @@
$this->custom_fields =
eventplanner_vendor_report::get_instance()->get_custom_fields();
}
- private function get_status_options( $selected = 0 )
- {
- $status_options = array();
- $status_list =
eventplanner_vendor_report::get_status_list();
- foreach ($status_list as $_key => $_value)
- {
- $status_options[] = array(
- 'id' => $_key,
- 'name' => $_value,
- 'selected' => $_key == $selected ? 1 : 0
- );
- }
- return $status_options;
- }
-
private function _get_filters()
{
$combos = array();
@@ -88,35 +73,6 @@
'requestGenerator' => 'requestWithVendorFilter'
);
- $status_options = $this->get_status_options();
- array_unshift($status_options, array('id' => '','name'
=> lang('all')));
-
- $combos[] = array(
- 'type' => 'filter',
- 'name' => 'filter_status',
- 'extra' => '',
- 'text' => lang('status'),
- 'list' => $status_options
- );
-
- $categories =
$this->cats->formatted_xslt_list(array('format' => 'filter',
- 'selected' => $this->cat_id, 'globals'
=> true, 'use_acl' => $this->_category_acl));
- $default_value = array('cat_id' => '', 'name' =>
lang('no category'));
- array_unshift($categories['cat_list'], $default_value);
-
- $_categories = array();
- foreach ($categories['cat_list'] as $_category)
- {
- $_categories[] = array('id' =>
$_category['cat_id'], 'name' => $_category['name']);
- }
-
- $combos[] = array('type' => 'filter',
- 'name' => 'filter_category_id',
- 'extra' => '',
- 'text' => lang('category'),
- 'list' => $_categories
- );
-
return $combos;
}
@@ -150,7 +106,7 @@
'phpgw_return_as' => 'json'
)),
'allrows' => true,
- 'new_item' =>
self::link(array('menuaction' => 'eventplanner.uivendor_report.add')),
+ // 'new_item' =>
self::link(array('menuaction' => 'eventplanner.uivendor_report.add')),
'editor_action' => '',
'field' => parent::_get_fields()
)
@@ -244,7 +200,7 @@
}
}
- $custom_values = $vendor_report->json_representation ?
json_decode($vendor_report->json_representation, true) : array();
+ $custom_values = $vendor_report->json_representation ?
$vendor_report->json_representation : array();
$custom_fields =
createObject('booking.custom_fields','eventplanner');
$fields = $this->custom_fields;
foreach ($fields as $attrib_id => &$attrib)
Modified: trunk/eventplanner/inc/model/class.booking.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.booking.inc.php 2016-12-05 15:47:43 UTC
(rev 16048)
+++ trunk/eventplanner/inc/model/class.booking.inc.php 2016-12-06 14:52:15 UTC
(rev 16049)
@@ -156,7 +156,7 @@
'customer_contact_name' => array(
'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
- 'required' => true,
+ 'required' => false,
'query' => true,
'label' => 'customer contact name',
'history' => true,
@@ -164,7 +164,7 @@
'customer_contact_email' => array(
'action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
'type' => 'string',
- 'required' => true,
+ 'required' => false,
'query' => true,
'sf_validator' =>
createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field%
is invalid')),
'label' => 'customer contact email',
@@ -173,7 +173,7 @@
'customer_contact_phone' => array(
'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
- 'required' => true,
+ 'required' => false,
'query' => true,
'label' => 'customer contact phone',
'history' => true,
@@ -181,7 +181,7 @@
'location' => array(
'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
- 'required' => true,
+ 'required' => false,
'query' => true,
'label' => 'location',
'history' => true,
Modified: trunk/eventplanner/inc/model/class.customer.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.customer.inc.php 2016-12-05 15:47:43 UTC
(rev 16048)
+++ trunk/eventplanner/inc/model/class.customer.inc.php 2016-12-06 14:52:15 UTC
(rev 16049)
@@ -125,7 +125,7 @@
'sortable' => false,
),
'name' => array(
- 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
'type' => 'string',
'label' => 'name',
'required' => true,
Modified: trunk/eventplanner/inc/model/class.vendor.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.vendor.inc.php 2016-12-05 15:47:43 UTC
(rev 16048)
+++ trunk/eventplanner/inc/model/class.vendor.inc.php 2016-12-06 14:52:15 UTC
(rev 16049)
@@ -125,7 +125,7 @@
'sortable' => false,
),
'name' => array(
- 'action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
+ 'action'=> PHPGW_ACL_READ |
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
'type' => 'string',
'label' => 'name',
'required' => true,
Modified: trunk/eventplanner/inc/model/class.vendor_report.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.vendor_report.inc.php 2016-12-05
15:47:43 UTC (rev 16048)
+++ trunk/eventplanner/inc/model/class.vendor_report.inc.php 2016-12-06
14:52:15 UTC (rev 16049)
@@ -33,10 +33,6 @@
class eventplanner_vendor_report extends phpgwapi_model
{
- const STATUS_REGISTERED = 1;
- const STATUS_PENDING = 2;
- const STATUS_REJECTED = 3;
- const STATUS_APPROVED = 4;
const acl_location = '.vendor_report';
protected
@@ -64,16 +60,6 @@
return new eventplanner_vendor_report();
}
- 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 function set_custom_fields()
{
$this->custom_fields =
$GLOBALS['phpgw']->custom_fields->find('eventplanner', self::acl_location, 0,
'', 'ASC', 'attrib_sort', true, true);
@@ -129,7 +115,7 @@
'sortable' => true,
),
'json_representation' => array('action' =>
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
- 'type' => 'jsonb',
+ 'type' => 'json',
'sortable' => false,
),
);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16049] more on eventplanner,
sigurdne <=