- Timestamp:
- 10/13/08 18:53:41 (2 months ago)
- Files:
-
- trunk/midcom/org.openpsa.calendar/config/config.inc (modified) (1 diff)
- trunk/midcom/org.openpsa.calendar/config/manifest.inc (modified) (1 diff)
- trunk/midcom/org.openpsa.calendar/config/schemadb_config.inc (modified) (4 diffs)
- trunk/midcom/org.openpsa.calendar/config/schemadb_default.inc (modified) (1 diff)
- trunk/midcom/org.openpsa.calendar/handler/admin.php (added)
- trunk/midcom/org.openpsa.calendar/handler/create.php (added)
- trunk/midcom/org.openpsa.calendar/handler/filters.php (modified) (3 diffs)
- trunk/midcom/org.openpsa.calendar/handler/view.php (added)
- trunk/midcom/org.openpsa.calendar/locale/default.en.txt (modified) (5 diffs)
- trunk/midcom/org.openpsa.calendar/locale/default.fi.txt (modified) (5 diffs)
- trunk/midcom/org.openpsa.calendar/midcom/interfaces.php (modified) (3 diffs)
- trunk/midcom/org.openpsa.calendar/style/calendar-filter-chooser.php (added)
- trunk/midcom/org.openpsa.calendar/style/show-event-delete.php (modified) (1 diff)
- trunk/midcom/org.openpsa.calendar/viewer.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/org.openpsa.calendar/config/config.inc
r3853 r18179 1 "schemadb" => "file:/org/openpsa/calendar/config/schemadb_default.inc", 2 "week_slot_length" => 120, // minutes 3 "day_slot_length" => 60, // minutes 4 "day_start_time" => 8, // hour "working day" starts 5 "day_end_time" => 18, // hour "working day" ends 6 "calendar_popup_width" => 500, // width of the popup in pixels 7 "calendar_popup_height" => 550, // height of the popup in pixels 8 "show_group_subscribers" => FALSE, // whether to show members of "subscriber" groups 1 'schemadb' => 'file:/org/openpsa/calendar/config/schemadb_default.inc', 2 'schemadb_filters' => 'file:/org/openpsa/calendar/config/schemadb_filters.inc', 3 4 'week_slot_length' => 120, // minutes 5 'day_slot_length' => 60, // minutes 6 'day_start_time' => 8, // hour 'working day' starts 7 'day_end_time' => 18, // hour 'working day' ends 8 'calendar_popup_width' => 500, // width of the popup in pixels 9 'calendar_popup_height' => 550, // height of the popup in pixels 10 'show_group_subscribers' => FALSE, // whether to show members of 'subscriber' groups 9 11 'start_view' => 'week', // which view to start in 10 12 'wiki_title_skeleton' => 'meeting note for %s on %s by %s', //format of wiki page title created from event trunk/midcom/org.openpsa.calendar/config/manifest.inc
r18004 r18179 31 31 'active' => 'no', 32 32 ), 33 'adrenalin' => array 34 ( 35 'name' => 'Arttu Manninen', 36 'email' => 'arttu@kaktus.cc', 37 'role' => 'developer', 38 ), 33 39 ), 34 40 'dependencies' => array 35 41 ( 36 'midcom.helper.datamanager ' => array(),42 'midcom.helper.datamanager2' => array(), 37 43 'org.openpsa.core' => array(), 38 44 'org.openpsa.mail' => array(), trunk/midcom/org.openpsa.calendar/config/schemadb_config.inc
r3799 r18179 1 1 'config' => array 2 2 ( 3 'name' => 'config',4 ' description' => 'Default Configuration Schema', /* This is a topic */3 'name' => 'config', 4 'title' => 'Default Configuration Schema', /* This is a topic */ 5 5 'locktimeout' => 0, /* Don't lock this, we display the edit view always */ 6 'fields' => array6 'fields' => array 7 7 ( 8 8 /* view settings */ 9 9 'start_view' => array 10 10 ( 11 'description' => 'which view to start in', 12 'datatype' => 'text', 13 'default' => 'week', 14 'location' => 'config', 15 'config_domain' => 'org.openpsa.calendar', 16 'config_key' => 'start_view', 17 'start_fieldgroup' => array 11 'title' => 'which view to start in', 12 'type' => 'text', 13 'default' => 'week', 14 'storage' => array 15 ( 16 'location' => 'configuration', 17 'domain' => 'org.openpsa.calendar', 18 'name' => 'start_view' 19 ), 20 'start_fieldset' => array 18 21 ( 19 22 'title' => 'view settings', … … 22 25 'calendar_popup_height' => array 23 26 ( 24 'description' => 'height of the event popup window (px)', 25 'datatype' => 'integer', 26 'default' => 450, 27 'location' => 'config', 28 'config_domain' => 'org.openpsa.calendar', 29 'config_key' => 'calendar_popup_height', 27 'title' => 'height of the event popup window (px)', 28 'type' => 'integer', 29 'default' => 450, 30 'storage' => array 31 ( 32 'location' => 'configuration', 33 'domain' => 'org.openpsa.calendar', 34 'name' => 'calendar_popup_height' 35 ), 30 36 ), 31 37 'calendar_popup_width' => array 32 38 ( 33 'description' => 'width of the event popup window (px)', 34 'datatype' => 'integer', 35 'default' => 300, 36 'location' => 'config', 37 'config_domain' => 'org.openpsa.calendar', 38 'config_key' => 'calendar_popup_width', 39 'end_fieldgroup' => '', 39 'title' => 'width of the event popup window (px)', 40 'type' => 'integer', 41 'default' => 300, 42 'storage' => array 43 ( 44 'location' => 'configuration', 45 'domain' => 'org.openpsa.calendar', 46 'name' => 'calendar_popup_width' 47 ), 48 'end_fieldset' => '', 40 49 ), 41 50 /* time settings */ 42 51 'day_start_time' => array 43 52 ( 44 ' description'=> 'hour "working day" starts',45 ' datatype'=> 'integer',46 ' location'=> 'config',47 'default' => 8,53 'title' => 'hour "working day" starts', 54 'type' => 'integer', 55 'storage' => 'config', 56 'default' => 8, 48 57 'config_domain' => 'org.openpsa.calendar', 49 'config_key' => 'day_start_time',50 'start_field group' => array58 'config_key' => 'day_start_time', 59 'start_fieldset' => array 51 60 ( 52 61 'title' => 'time settings', … … 55 64 'day_end_time' => array 56 65 ( 57 ' description'=> 'hour "working day" ends',58 ' datatype'=> 'integer',59 ' location'=> 'config',60 'default' => 18,66 'title' => 'hour "working day" ends', 67 'type' => 'integer', 68 'storage' => 'config', 69 'default' => 18, 61 70 'config_domain' => 'org.openpsa.calendar', 62 'config_key' => 'day_end_time',71 'config_key' => 'day_end_time', 63 72 ), 64 73 'day_slot_length' => array 65 74 ( 66 ' description'=> 'size of week day slot (minutes)',67 ' datatype'=> 'integer',68 ' location'=> 'config',69 'default' => 60,75 'title' => 'size of week day slot (minutes)', 76 'type' => 'integer', 77 'storage' => 'config', 78 'default' => 60, 70 79 'config_domain' => 'org.openpsa.calendar', 71 'config_key' => 'day_slot_length',80 'config_key' => 'day_slot_length', 72 81 ), 73 82 'week_slot_length' => array 74 83 ( 75 ' description'=> 'size of week view slot (minutes)',76 ' datatype'=> 'integer',77 ' location'=> 'config',78 'default' => 120,84 'title' => 'size of week view slot (minutes)', 85 'type' => 'integer', 86 'storage' => 'config', 87 'default' => 120, 79 88 'config_domain' => 'org.openpsa.calendar', 80 'config_key' => 'week_slot_length',81 'end_field group' => '',89 'config_key' => 'week_slot_length', 90 'end_fieldset' => '', 82 91 ), 83 92 … … 85 94 'schemadb' => array 86 95 ( 87 'description' => 'schema database', 88 'datatype' => 'text', 89 'location' => 'config', 90 'config_domain' => 'org.openpsa.calendar', 91 'config_key' => 'schemadb', 92 'start_fieldgroup' => array 96 'title' => 'schema database', 97 'type' => 'text', 98 'storage' => array 99 ( 100 'location' => 'configuration', 101 'domain' => 'org.openpsa.calendar', 102 'name' => 'schemadb' 103 ), 104 'start_fieldset' => array 93 105 ( 94 106 'title' => 'advanced schema and data settings', 95 107 ), 96 108 ), 97 'always_show_group' => array109 'always_show_group' => array 98 110 ( 99 'description' => 'always display group', 100 'datatype' => 'text', 101 'location' => 'config', 102 'config_domain' => 'org.openpsa.calendar', 103 'config_key' => 'always_show_group', 111 'title' => 'always display group', 112 'type' => 'text', 113 'storage' => array 114 ( 115 'location' => 'configuration', 116 'domain' => 'org.openpsa.calendar', 117 'name' => 'always_show_group' 118 ), 104 119 ), 105 'always_show_self' => array120 'always_show_self' => array 106 121 ( 107 'description' => 'always display self', 108 'datatype' => 'text', 109 'location' => 'config', 110 'config_domain' => 'org.openpsa.calendar', 111 'config_key' => 'always_show_self', 112 'widget' => 'select', 113 'widget_select_choices' => array( 122 'title' => 'always display self', 123 'type' => 'text', 124 'storage' => array 125 ( 126 'location' => 'configuration', 127 'domain' => 'org.openpsa.calendar', 128 'name' => 'always_show_self' 129 ), 130 'widget' => 'select', 131 'widget_select_choices' => array 132 ( 114 133 1 => 'yes', 115 134 0 => 'no', 116 135 ), 117 136 ), 118 'event_label' => array137 'event_label' => array 119 138 ( 120 'description' => 'event label field', 121 'datatype' => 'text', 122 'location' => 'config', 123 'config_domain' => 'org.openpsa.calendar', 124 'config_key' => 'event_label', 125 'end_fieldgroup' => '', 139 'title' => 'event label field', 140 'type' => 'text', 141 'storage' => array 142 ( 143 'location' => 'configuration', 144 'domain' => 'org.openpsa.calendar', 145 'name' => 'event_label' 146 ), 147 'end_fieldset' => '', 126 148 ), 127 149 ), trunk/midcom/org.openpsa.calendar/config/schemadb_default.inc
r4794 r18179 1 'default' => array (2 3 'name' => 'default',1 'default' => array 2 ( 3 'name' => 'default', 4 4 'description' => 'event', 5 'fields' => array ( 5 'fields' => array 6 ( 6 7 //Hidden field for orgOpenpsaObtype 7 'object_type' => array( 8 'default' => ORG_OPENPSA_OBTYPE_EVENT, 9 'hidden' => true, 10 'location' => 'orgOpenpsaObtype', 11 'datatype' => 'integer', 8 'object_type' => array 9 ( 10 'title' => 'OpenPSA type', 11 'type' => 'number', 12 'storage' => 'orgOpenpsaObtype', 13 'widget' => 'text', 14 'default' => ORG_OPENPSA_OBTYPE_EVENT, 15 'hidden' => true, 12 16 ), 13 'title' => array ( 14 'description' => 'title', 15 'datatype' => 'text', 16 'location' => 'title', 17 'start_fieldgroup' => array ( 17 'title' => array 18 ( 19 'title' => 'title', 20 'storage' => 'title', 21 'type' => 'text', 22 'widget' => 'text', 23 'start_fieldset' => array 24 ( 18 25 'title' => 'event information', 19 26 'css_group' => 'area', 20 27 ), 21 'required' => true,28 'required' => true, 22 29 ), 23 'location' => array ( 24 'description' => 'location', 25 'datatype' => 'text', 26 'location' => 'location', 30 'location' => array 31 ( 32 'title' => 'location', 33 'storage' => 'location', 34 'type' => 'text', 35 'widget' => 'text', 27 36 ), 28 'start' => array ( 29 'description' => 'start time', 30 'datatype' => 'unixdate', 31 'location' => 'start', 32 'date_withtime' => true, 33 'widget_date_enable_outside_ais' => true, 37 'start' => array 38 ( 39 'title' => 'start time', 40 'storage' => 'start', 41 'type' => 'date', 42 'type_config' => array 43 ( 44 'storage_type' => 'UNIXTIME', 45 ), 46 'widget' => 'jsdate', 34 47 ), 35 'end' => array ( 36 'description' => 'end time', 37 'datatype' => 'unixdate', 38 'location' => 'end', 39 'date_withtime' => true, 40 'widget_date_enable_outside_ais' => true, 48 'end' => array 49 ( 50 'title' => 'end time', 51 'storage' => 'end', 52 'type' => 'date', 53 'type_config' => array 54 ( 55 'storage_type' => 'UNIXTIME', 56 ), 57 'widget' => 'jsdate', 41 58 ), 42 'description' => array ( 43 'description' => 'description', 44 'datatype' => 'markdown', 45 'location' => 'description', 46 'widget_text_inputstyle' => 'longtext', 47 'end_fieldgroup' => '', 59 'description' => array 60 ( 61 'title' => 'title', 62 'storage' => 'description', 63 'type' => 'text', 64 'type_config' => array 65 ( 66 'output_mode' => 'markdown', 67 ), 68 'widget' => 'textarea', 69 'end_fieldset' => '', 48 70 ), 49 'participants' => array ( 50 'description' => 'participants', 51 'datatype' => 'array', 52 'location' => 'participants', 53 'widget' => 'contactchooser', 54 'default' => org_openpsa_helpers_resources(), 55 'start_fieldgroup' => array ( 71 'participants' => array 72 ( 73 'title' => 'participants', 74 'storage' => 'participants', 75 'type' => 'mnrelation', 76 'type_config' => array 77 ( 78 'mapping_class_name' => 'midcom_db_eventmember', 79 'master_fieldname' => 'eid', 80 'member_fieldname' => 'uid', 81 'master_is_id' => true, 82 ), 83 'widget' => 'chooser', 84 'widget_config' => array 85 ( 86 'clever_class' => 'contact', 87 'id_field' => 'id', 88 ), 89 'start_fieldset' => array 90 ( 56 91 'title' => 'participants', 57 92 'css_group' => 'area', 58 93 ), 59 94 ), 60 'orgOpenpsaAccesstype' => array ( 61 'description' => 'access type', 62 'location' => 'orgOpenpsaAccesstype', 63 'datatype' => 'integer', 64 'widget' => 'select', 65 'widget_select_choices' => array( 66 ORG_OPENPSA_ACCESSTYPE_PUBLIC => 'public', 67 ORG_OPENPSA_ACCESSTYPE_PRIVATE => 'private', 95 'orgOpenpsaAccesstype' => array 96 ( 97 'title' => 'access type', 98 'storage' => 'orgOpenpsaAccesstype', 99 'type' => 'select', 100 'type_config' => array 101 ( 102 'options' => array 103 ( 104 ORG_OPENPSA_ACCESSTYPE_PUBLIC => 'public', 105 ORG_OPENPSA_ACCESSTYPE_PRIVATE => 'private', 106 ), 68 107 ), 108 'widget' => 'select', 69 109 ), 70 'busy' => array ( 71 'description' => 'dont allow overlapping', 72 'datatype' => 'integer', 73 'widget' => 'checkbox', 74 'location' => 'busy', 75 'default' => 1, 76 'end_fieldgroup' => '', 110 'busy' => array 111 ( 112 'title' => 'dont allow overlapping', 113 'storage' => 'busy', 114 'type' => 'boolean', 115 'widget' => 'checkbox', 116 'default' => 1, 117 'end_fieldset' => '', 77 118 ), 78 119 ), trunk/midcom/org.openpsa.calendar/handler/filters.php
r17350 r18179 19 19 parent::__construct(); 20 20 } 21 21 22 /** 23 * Handle the AJAX request 24 */ 22 25 function _handle_ajax() 23 26 { … … 50 53 51 54 /** 52 * @param mixed $handler_id The ID of the handler. 53 * @param Array $args The argument list. 54 * @param Array &$data The local request data. 55 * @return boolean Indicating success. 55 * Handle the request for editing contact list 56 * 57 * @access public 58 * @param String $handler_id Name of the request handler 59 * @param array $args Variable arguments 60 * @param array &$data Public request data, passed by reference 61 * @return boolean Indicating success 56 62 */ 57 63 function _handler_edit($handler_id, $args, &$data) 58 64 { 59 65 $_MIDCOM->auth->require_valid_user(); 60 61 $this->_request_data['user'] = $_MIDCOM->auth->user->get_storage(); 62 63 if ( array_key_exists('org_openpsa_calendar_filters_add', $_POST) 64 || array_key_exists('org_openpsa_calendar_filters_remove', $_POST)) 66 67 // Get the current user 68 $this->_person = new midcom_db_person($_MIDGARD['user']); 69 $this->_person->require_do('midgard:update'); 70 71 // Load the schema database 72 $this->_schemadb = midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_filters')); 73 74 // Load the controller 75 $this->_controller = midcom_helper_datamanager2_controller::create('simple'); 76 $this->_controller->schemadb =& $this->_schemadb; 77 $this->_controller->set_storage($this->_person); 78 if (! $this->_controller->initialize()) 65 79 { 66 $this->_handle_ajax(); 80 $_MIDCOM->generate_error(MIDCOM_ERRCRIT, "Failed to initialize a DM2 controller instance for article {$this->_article->id}."); 81 // This will exit. 67 82 } 68 69 // Debug helpers 70 $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL."/org.openpsa.helpers/messages.js"); 71 $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL."/org.openpsa.helpers/ajaxutils.js"); 72 73 $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL."/org.openpsa.calendar/filters.js"); 74 $_MIDCOM->add_jsonload("org_openpsa_calendar_filters_makeEditable();"); 75 76 $this->_request_data['buddylist'] = array(); 77 78 $qb = org_openpsa_contacts_buddy::new_query_builder(); 79 $qb->add_constraint('account', '=', $this->_request_data['user']->guid); 80 $qb->add_constraint('blacklisted', '=', false); 81 $buddies = $qb->execute(); 82 83 foreach ($buddies as $buddy) 83 84 // Process the form 85 switch ($this->_controller->process_form()) 84 86 { 85 $person = new org_openpsa_contacts_person($buddy->buddy); 86 if ($person) 87 { 88 $this->_request_data['buddylist'][$person->id] = $person; 89 } 87 case 'save': 88 case 'cancel': 89 if (isset($_GET['org_openpsa_calendar_returnurl'])) 90 { 91 $url = $_GET['org_openpsa_calendar_returnurl']; 92 } 93 else 94 { 95 $url = ''; 96 } 97 $_MIDCOM->relocate($url); 98 // This will exit 90 99 } 91 92 // Add user to the filter list if needed 93 if ( !array_key_exists($this->_request_data['user']->id, $this->_request_data['buddylist']) 94 && $_MIDCOM->auth->can_do('midgard:create', $GLOBALS['midcom_component_data']['org.openpsa.calendar']['calendar_root_event'])) 100 101 // Add the breadcrumb pieces 102 $tmp = array(); 103 104 if (isset($_GET['org_openpsa_calendar_returnurl'])) 95 105 { 96 $this->_request_data['buddylist'][$this->_request_data['user']->id] = $this->_request_data['user']; 97 } 98 99 if (array_key_exists('org_openpsa_calendar_returnurl', $_GET)) 100 { 101 $this->_view_toolbar->add_item( 102 Array( 103 MIDCOM_TOOLBAR_URL => $_GET['org_openpsa_calendar_returnurl'], 104 MIDCOM_TOOLBAR_LABEL => $this->_request_data['l10n']->get('back to calendar'), 105 MIDCOM_TOOLBAR_HELPTEXT => null, 106 MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_left.png', 107 MIDCOM_TOOLBAR_ENABLED => true, 108 ) 106 $tmp[] = array 107 ( 108 MIDCOM_NAV_URL => $_GET['org_openpsa_calendar_returnurl'], 109 MIDCOM_NAV_NAME => $this->_l10n->get('calendar'), 109 110 ); 110 111 } 111 112 $_MIDCOM->set_pagetitle($this->_request_data['l10n']->get('choose calendars')); 112 113 $tmp[] = array 114 ( 115 MIDCOM_NAV_URL => 'filters/', 116 MIDCOM_NAV_NAME => $this->_l10n->get('choose calendars'), 117 ); 118 $_MIDCOM->set_custom_context_data('midcom.helper.nav.breadcrumb', $tmp); 113 119 114 120 return true; … … 116 122 117 123 /** 118 * 119 * @param mixed $handler_id The ID of the handler. 120 * @param mixed &$data The local request data. 124 * Show the contact editing interface 125 * 126 * @access public 127 * @param String $handler_id Name of the request handler 128 * @param array &$data Public request data, passed by reference 121 129 */ 122 130 function _show_edit($handler_id, &$data) 123 131 { 124 if (count($this->_request_data['buddylist']) > 0) 125 { 126 midcom_show_style("show-filters-header"); 127 foreach ($this->_request_data['buddylist'] as $person) 128 { 129 $this->_request_data['person'] =& $person; 130 if ($this->_request_data['user']->parameter('org_openpsa_calendar_show', $person->guid)) 131 { 132 $this->_request_data['subscribed'] = true; 133 } 134 else 135 { 136 $this->_request_data['subscribed'] = false; 137 } 138 midcom_show_style("show-filters-item"); 139 } 140 midcom_show_style("show-filters-footer"); 141 } 132 $data['controller'] =& $this->_controller; 133 $data['person'] =& $this->_person; 134 135 midcom_show_style('calendar-filter-chooser'); 142 136 } 143 137 } trunk/midcom/org.openpsa.calendar/locale/default.en.txt
r4574 r18179 10 10 ---STRING back to calendar 11 11 Back to calendar 12 ---STRINGEND 13 14 ---STRING calendar 15 Calendar 12 16 ---STRINGEND 13 17 … … 80 84 ---STRINGEND 81 85 86 ---STRING groups 87 Groups 88 ---STRINGEND 89 82 90 ---STRING location 83 91 Location … … 112 120 ---STRINGEND 113 121 122 ---STRING people 123 People 124 ---STRINGEND 125 114 126 ---STRING popup 115 127 Pop-Up … … 136 148 ---STRINGEND 137 149 150 ---STRING resources 151 Resources 152 ---STRINGEND 153 138 154 ---STRING start time 139 155 Start time … … 156 172 ---STRINGEND 157 173 174 ---STRING week %s 175 Week %s 176 ---STRINGEND 177 trunk/midcom/org.openpsa.calendar/locale/default.fi.txt
r4574 r18179 10 10 ---STRING back to calendar 11 11 Takaisin kalenteriin 12 ---STRINGEND 13 14 ---STRING calendar 15 Kalenteri 12 16 ---STRINGEND 13 17 … … 80 84 ---STRINGEND 81 85 86 ---STRING groups 87 RyhmÀt 88 ---STRINGEND 89 82 90 ---STRING location 83 91 Paikka … … 112 120 ---STRINGEND 113 121 122 ---STRING people 123 Henkilöt 124 ---STRINGEND 125 114 126 ---STRING popup 115 127 Pop-up -ikkuna … … 136 148 ---STRINGEND 137 149 150 ---STRING resources 151 Resurssit 152 ---STRINGEND 153 138 154 ---STRING start time 139 155 Alkaa … … 156 172 ---STRINGEND 157 173 174 ---STRING week %s 175 Viikko %s 176 ---STRINGEND 177 trunk/midcom/org.openpsa.calendar/midcom/interfaces.php
r18177 r18179 22 22 $this->_component = 'org.openpsa.calendar'; 23 23 $this->_autoload_class_definitions = array('midcom_dba_classes.inc'); 24 $this->_autoload_files = array( 24 $this->_autoload_files = array 25 ( 25 26 'event_resource.php', 26 27 ); 27 $this->_autoload_libraries = Array( 28 $this->_autoload_libraries = array 29 ( 28 30 'midcom.helper.datamanager', 29 31 'org.openpsa.core', … … 323 325 324 326 // Transfer metadata dependencies from classes that we drive 325 $classes = array( 327 $classes = array 328 ( 326 329 'org_openpsa_calendar_event', 327 330 'org_openpsa_calendar_eventmember', … … 334 337 { 335 338 default: 336 $metadata_fields = array( 339 $metadata_fields = array 340 ( 337 341 'creator' => 'id', 338 342 'revisor' => 'id' // Though this will probably get touched on update we need to check it anyways to avoid invalid links trunk/midcom/org.openpsa.calendar/style/show-event-delete.php
r5048 r18179 17 17 <?php echo $data['l10n']->get('really delete event'); ?> 18 18 <input type="submit" id="org_openpsa_calendar_deleteok" name="org_openpsa_calendar_deleteok" value="<?php echo $data['l10n_midcom']->get('yes'); ?>" /> 19 <input type="submit" id="org_openpsa_calendar_delete_cancel" name="org_openpsa_calendar_delete_cancel" value="<?php echo $data['l10n_midcom']->get('no'); ?>" /> 19 20 </label> 20 21 </fieldset> trunk/midcom/org.openpsa.calendar/viewer.php
r18160 r18179 31 31 $this->_selected_time = time(); 32 32 33 // Load schema database snippet or file 34 debug_add("Loading Schema Database", MIDCOM_LOG_DEBUG); 35 $schemadb_contents = midcom_get_snippet_content($this->_config->get('schemadb')); 36 eval("\$schemadb = Array ( {$schemadb_contents} );"); 37 38 // Initialize the datamanager with the schema 39 $this->_datamanager = new midcom_helper_datamanager($schemadb); 40 41 if (!$this->_datamanager) { 42 $_MIDCOM->generate_error(MIDCOM_ERRCRIT, "Datamanager could not be instantiated."); 43 // This will exit. 44 } 33 // Load schema database 34 $this->_schemadb = midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb')); 35 $this->_datamanager = new midcom_helper_datamanager2_datamanager($this->_schemadb); 36 37 $this->_request_data['schemadb'] =& $this->_schemadb; 38 $this->_request_data['datamanager'] =& $this->_datamanager; 45 39 46 40 // Always run in uncached mode 47 41 $_MIDCOM->cache->content->no_cache(); 48 42 49 if ( !isset($GLOBALS['midcom_component_data']['org.openpsa.calendar']['calendar_root_event']) 50 || !is_object($GLOBALS['midcom_component_data']['org.openpsa.calendar']['calendar_root_event'])) 43 if (!$this->_config->get('calendar_root_event')) 51 44 { 52 45 // Match / 53 $this->_request_switch[] = array( 54 'handler' => 'notinitialized' 46 $this->_request_switch['not_initialized'] = array 47 ( 48 'handler' => 'notinitialized', 55 49 ); 56 50 } … … 58 52 { 59 53 // Match /month/<date> 60 $this->_request_switch[] = array( 54 $this->_request_switch['month_view_with_date'] = array 55 ( 56 'handler' => array 57 ( 58 'org_openpsa_calendar_handler_view', 59 'month', 60 ), 61 61 'fixed_args' => 'month', 62 62 'variable_args' => 1, 63 'handler' => 'month'64 63 ); 65 64 // Match /month/ 66 $this->_request_switch[] = array( 65 $this->_request_switch['month_view'] = array 66 ( 67 'handler' => array 68 ( 69 'org_openpsa_calendar_handler_view', 70 'month', 71 ), 67 72 'fixed_args' => 'month', 68 'handler' => 'month'69 73 ); 70 74 // Match /week/<date> 71 $this->_request_switch[] = array( 75 $this->_request_switch['week_view_with_date'] = array 76 ( 77 'handler' => array 78 ( 79 'org_openpsa_calendar_handler_view', 80 'week', 81 ), 72 82 'fixed_args' => 'week', 73 83 'variable_args' => 1, 74 'handler' => 'week'75 84 ); 76 85 // Match /week/ 77 $this->_request_switch[] = array( 86 $this->_request_switch['week_view'] = array 87 ( 88 'handler' => array 89 ( 90 'org_openpsa_calendar_handler_view', 91 'week', 92 ), 78 93 'fixed_args' => 'week', 79 'handler' => 'week'80 94 ); 81 95 // Match /day/<date> 82 $this->_request_switch[] = array( 96 $this->_request_switch['day_view_with_date'] = array 97 ( 98 'handler' => array 99 ( 100 'org_openpsa_calendar_handler_view', 101 'day', 102 ), 83 103 'fixed_args' => 'day', 84 104 'variable_args' => 1, 85 'handler' => 'day'86 105 ); 87 106 // Match /day/ 88 $this->_request_switch[] = array( 107 $this->_request_switch['day_view'] = array 108 ( 109 'handler' => array 110 ( 111 'org_openpsa_calendar_handler_view', 112 'day', 113 ), 89 114 'fixed_args' => 'day', 90 'handler' => 'day'91 115 ); 92 116 // Match /event/new/<person_guid>/<timestamp> 93 $this->_request_switch[] = array( 94 'fixed_args' => array('event', 'new'), 117 $this->_request_switch['new_event_for_person_with_time'] = array 118 ( 119 'handler' => array 120 ( 121 'org_openpsa_calendar_handler_create', 122 'create' 123 ), 124 'fixed_args' => array 125 ( 126 'event', 127 'new' 128 ), 95 129 'variable_args' => 2, 96 'handler' => 'event_new'97 130 ); 98 131 // Match /event/new/<person_guid> 99 $this->_request_switch[] = array( 100 'fixed_args' => array('event', 'new'), 101 'variable_args' => 1, 102 'handler' => 'event_new' 132 $this->_request_switch['new_event_for_person'] = array 133 ( 134
