-
-
-
-
-
diff --git a/README.md b/README.md index ddd526e2..5b8d793c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,44 @@ Culturefeed [![Build Status](https://travis-ci.org/cultuurnet/culturefeed.svg?branch=master)](https://api.travis-ci.org/cultuurnet/culturefeed.svg?branch=master) +## Important note +In november 2019, publiq vzw (formerly known as CultuurNet) starts the End of Support phase of the Culturefeed Drupal 7 module suite. This means that you can continue to use Culturefeed, but publiq vzw will not invest anymore in this Drupal 7 module suite. + +As an exception, critical security updates will still be provided if needed. + +The End of Life (EOL) date of the module suite is set to the same date as the EOL of Drupal 7 core, ie. November 2021 (https://www.drupal.org/psa-2019-02-25). + +We built this final 4.0 release, which contains a major security update, and some incompatible changes compared to the latest 3.10.2 release. Some less used modules are moved to a separate repository. If you update to this version please check & should you use one of these modules, reinstall them from a separate repository. After that all things should work as usual. +- https://github.com/cultuurnet/culturefeed_pages [DEPRECATED] + +- https://github.com/cultuurnet/culturefeed_roles [DEPRECATED] + +- https://github.com/cultuurnet/culturefeed_messages [DEPRECATED] + +- https://github.com/cultuurnet/culturefeed_calendar [DEPRECATED] + +- https://github.com/cultuurnet/culturefeed_uitpas + +- https://github.com/cultuurnet/culturefeed_social + +- https://github.com/cultuurnet/culturefeed_userpoints_ui [DEPRECATED] + +- https://github.com/cultuurnet/culturefeed_entry_ui [DEPRECATED] + +### Alternatives + +As an alternative for the Culturefeed Drupal 7 module suite, publiq vzw focused on: + +- A new, easy to use API in a developer-friendly Json format: https://projectaanvraag.uitdatabank.be/#!/integrations#api + +- An even easier to use widget platform: https://projectaanvraag.uitdatabank.be/#!/integrations#widgets + +We also have a Drupal 8 version on https://github.com/cultuurnet/culturefeed_d8 with the most commonly used modules culturefeed_agenda, culturefeed_content, culturefeed_search, culturefeed_search_api and culturefeed_user. + +However, these modules will not contain the full functionality as was provided in the Drupal 7 edition, and it will not be heavily extended by publiq the same way we did this for the Drupal 7 edition. We are still happy to review and accept pull requests from external developers or partners, though. + +## Info + Drupal module suite for building an event site based on events gathered in an external backoffice "outdatabase" (UiTdatabank), but with the extra tools you can do a lot more. For this version you can only use it __having a key and secret from the UiTdatabank__ or use the demo key from [this page](http://tools.uitdatabank.be/docs/search-api-v2-getting-started). __[Live demo connecting production API](https://www.culturefeed.be/) only available from 7:00 till 20:00 (Brussels timezone)__ diff --git a/culturefeed.helpers.inc b/culturefeed.helpers.inc index 2f6aa7be..3bbfcfbe 100644 --- a/culturefeed.helpers.inc +++ b/culturefeed.helpers.inc @@ -226,16 +226,6 @@ function culturefeed_get_consumer_shared_secret($application_key) { return NULL; } -function culturefeed_is_connected($application_key = NULL) { - if (!isset($application_key)) { - $application_key = variable_get('culturefeed_api_application_key', ''); - } - - $account = DrupalCultureFeed::getLoggedInAccount(); - - return $account && isset($account->tokens) && !empty($account->tokens[$application_key]); -} - /** * * @param String $type diff --git a/culturefeed.install b/culturefeed.install index 4cda985b..881ee918 100644 --- a/culturefeed.install +++ b/culturefeed.install @@ -278,3 +278,10 @@ function cuturefeed_update_7002() { function culturefeed_update_7003() { db_drop_table('culturefeed_token'); } + +/** + * Logout all users, as the uitid session will be gone. + */ +function culturefeed_update_7005() { + db_delete('sessions')->condition('uid', 0, '!=')->execute(); +} diff --git a/culturefeed_calendar/css/culturefeed_calendar_anonymous.css b/culturefeed_calendar/css/culturefeed_calendar_anonymous.css deleted file mode 100644 index 34ac2801..00000000 --- a/culturefeed_calendar/css/culturefeed_calendar_anonymous.css +++ /dev/null @@ -1,3 +0,0 @@ -.calendar-button { - display: none -} \ No newline at end of file diff --git a/culturefeed_calendar/culturefeed_calendar.info b/culturefeed_calendar/culturefeed_calendar.info deleted file mode 100644 index 74492d17..00000000 --- a/culturefeed_calendar/culturefeed_calendar.info +++ /dev/null @@ -1,8 +0,0 @@ -name = CultureFeed Calendar -description = CultureFeed Calendar allows users to manage their own events in a calendar. -package = CultureFeed -version = VERSION -core = 7.x - -dependencies[] = culturefeed -dependencies[] = date_popup \ No newline at end of file diff --git a/culturefeed_calendar/culturefeed_calendar.module b/culturefeed_calendar/culturefeed_calendar.module deleted file mode 100644 index 296a4079..00000000 --- a/culturefeed_calendar/culturefeed_calendar.module +++ /dev/null @@ -1,368 +0,0 @@ - 'CultureFeed Calendar', - 'description' => 'Change CultureFeed Calendar Settings', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('culturefeed_calendar_admin_settings'), - 'access arguments' => array('administer site configuration'), - 'file' => 'includes/admin.inc', - ); - $items['culturefeed/calendar'] = array( - 'page callback' => 'culturefeed_calendar_page_my_activities', - 'access arguments' => array('access content'), - 'file' => 'includes/pages.inc', - 'type' => MENU_CALLBACK, - ); - $items['culturefeed/calendar/share'] = array( - 'title' => t('Share your calendar'), - 'page callback' => 'culturefeed_calendar_page_share_my_calendar', - 'access arguments' => array('access content'), - 'file' => 'includes/pages.inc', - 'type' => MENU_CALLBACK, - ); - $items['culturefeed/calendar/settings'] = array( - 'title' => t('Calendar Settings'), - 'page callback' => 'culturefeed_calendar_page_settings', - 'access arguments' => array('access content'), - 'file' => 'includes/pages.inc', - 'type' => MENU_CALLBACK, - ); - $items['culturefeed/calendar/%'] = array( - 'page callback' => 'culturefeed_calendar_page_user_activities', - 'page arguments' => array(2), - 'access arguments' => array('access content'), - 'file' => 'includes/pages.inc', - 'type' => MENU_CALLBACK, - ); - $items['culturefeed/calendar/add/%culturefeed_agenda_event/%'] = array( - 'title' => t('Add to calendar'), - 'page callback' => 'culturefeed_calendar_add_to_calendar', - 'page arguments' => array(3, 4), - 'access arguments' => array('access content'), - 'file' => 'includes/pages.inc', - 'type' => MENU_CALLBACK, - ); - $items['culturefeed/calendar/like/%culturefeed_agenda_event/%'] = array( - 'title' => t('I\'m interested'), - 'page callback' => 'culturefeed_calendar_like', - 'page arguments' => array(3, 4), - 'access arguments' => array('access content'), - 'file' => 'includes/pages.inc', - 'type' => MENU_CALLBACK, - ); - $items['culturefeed/calendar/edit/%culturefeed_calendar_activity/%'] = array( - 'title' => t('Edit event in calendar'), - 'page callback' => 'culturefeed_calendar_edit_calendar_event', - 'page arguments' => array(3, 4), - 'access arguments' => array('access content'), - 'file' => 'includes/pages.inc', - 'type' => MENU_CALLBACK, - ); - $items['culturefeed/calendar/delete/%culturefeed_calendar_activity/%'] = array( - 'title' => t('Delete event from calendar'), - 'page callback' => 'culturefeed_calendar_delete_calendar_event', - 'page arguments' => array(3, 4), - 'access arguments' => array('access content'), - 'file' => 'includes/pages.inc', - 'type' => MENU_CALLBACK, - ); - - return $items; -} - -/** - * Implements hook_theme(). - */ -function culturefeed_calendar_theme() { - - $items = array(); - - $path = drupal_get_path('module', 'culturefeed_calendar') . '/theme'; - - $items['culturefeed_calendar_button'] = array( - 'path' => $path, - 'file' => 'theme.inc', - 'template' => 'culturefeed-calendar-button', - 'variables' => array( - 'button' => array(), - 'authenticated' => FALSE, - 'status' => CULTUREFEED_CALENDAR_EVENT_PLANNABLE, - ), - ); - $items['culturefeed_calendar_profile_box_item'] = array( - 'variables' => array(), - 'path' => $path, - 'file' => 'theme.inc', - ); - $items['culturefeed_calendar_page'] = array( - 'variables' => array( - 'activities' => NULL - ), - 'template' => 'culturefeed-calendar-page', - 'path' => $path, - 'file' => 'theme.inc', - ); - $items['culturefeed_calendar_activity_summary'] = array( - 'path' => $path, - 'file' => 'theme.inc', - 'template' => 'culturefeed-calendar-activity-summary', - 'variables' => array( - 'activity' => NULL - ), - ); - $items['culturefeed_calendar_activity_mini'] = array( - 'path' => $path, - 'file' => 'theme.inc', - 'template' => 'culturefeed-calendar-activity-mini', - 'variables' => array( - 'activity' => NULL - ), - ); - $items['culturefeed_calendar_activities_going'] = array( - 'path' => $path, - 'file' => 'theme.inc', - 'template' => 'culturefeed-calendar-activities-going', - 'variables' => array( - 'activities' => NULL, - 'month_names' => array(), - ), - ); - $items['culturefeed_calendar_activities_liked'] = array( - 'path' => $path, - 'file' => 'theme.inc', - 'template' => 'culturefeed-calendar-activities-liked', - 'variables' => array( - 'activities' => NULL - ), - ); - $items['culturefeed_calendar_nav_months'] = array( - 'path' => $path, - 'file' => 'theme.inc', - 'template' => 'culturefeed-calendar-nav-months', - 'variables' => array( - 'activities' => NULL - ), - ); - $items['culturefeed_calendar_button_hover'] = array( - 'path' => $path, - 'file' => 'theme.inc', - 'template' => 'culturefeed-calendar-button-hover', - 'variables' => array(), - ); - $items['culturefeed_calendar_share_page'] = array( - 'path' => $path, - 'file' => 'theme.inc', - 'variables' => array(), - 'template' => 'culturefeed-calendar-share-page', - ); - $items['culturefeed_calendar_settings_page'] = array( - 'path' => $path, - 'file' => 'theme.inc', - 'variables' => array( - 'settings_form' => array(), - ), - 'template' => 'culturefeed-calendar-settings-page', - ); - - return $items; - -} - -/** - * Implements hook_user_login(). - */ -function culturefeed_calendar_user_login(&$edit, $account) { - - $user_id = DrupalCultureFeed::getLoggedInUserId(); - // Stop if we don't have a user id. - if (empty($user_id)) { - return; - } - - //Get activities from cookie - $cookie_activities = array(); - if (isset($_COOKIE['Drupal_visitor_calendar'])) { - $cookie_activities = json_decode($_COOKIE['Drupal_visitor_calendar']); - if (!is_array($cookie_activities)) { - return; - } - } - else { - return; - } - - // Get activities from calendar. - $calendar_ids = array(); - $calendar_activities = culturefeed_calendar_get_user_activities(); - foreach ($calendar_activities->objects as $calendar_activity) { - $calendar_ids[] = $calendar_activity->nodeId; - } - - // Create a culturefeed activity (CultureFeed_Activity()) for each cookie activity (stdClass). - $added = 0; - foreach ($cookie_activities as $key => $cookie_activity) { - // Only create activities that don't already exist. - if (!in_array($cookie_activity->nodeId, $calendar_ids)) { - $activity = new CultureFeed_Activity(); - if (isset($cookie_activity->value)) { - $activity->value = $cookie_activity->value; - } - // Add planned activity's' date. - if (isset($cookie_activity->calendarDate)) { - $activity->calendarDate = $cookie_activity->calendarDate; - } - $activity->type = $cookie_activity->type; - $activity->contentType = 'event'; - $activity->nodeId = $cookie_activity->nodeId; - $activity->nodeTitle = culturefeed_search_item_load($activity->nodeId, 'event')->getTitle(culturefeed_search_get_preferred_language()); - $activity->userId = $user_id; - - DrupalCultureFeed::createActivity($activity); - - $added++; - } - } - - // Delete the cookie. - user_cookie_delete('calendar'); - - // Add a timeout of 2 second, this gives index the time to place the new activity into the search index. - // sleep(2); - - if ($added > 0) { - sleep(2); - drupal_set_message(t('The items are saved to your calendar.'), 'status'); - } - - -} - -/** - * Implements hook_culturefeed_ui_profile_menu(). - */ -function culturefeed_calendar_culturefeed_ui_profile_menu() { - return array( - 'calendar' => array( - 'title' => t('My calendar'), - 'url' => 'culturefeed/calendar', - 'description' => t('Manage your favorite events in your personal calendar'), - 'weight' => 5, - ), - ); -} - -/** - * Implements hook_culturefeed_ui_profile_box_dropdown_items(). - */ -function culturefeed_calendar_culturefeed_ui_profile_box_dropdown_items() { - $items = array(); - - if (culturefeed_calendar_enabled()) { - $items['calendar'] = array( - 'data' => l(t('My calendar'), 'culturefeed/calendar'), - 'class' => 'calendar', - 'weight' => -16, - ); - } - - return $items; -} - -/** - * Implements hook_culturefeed_ui_profile_box_main_items(). - */ -function culturefeed_calendar_culturefeed_ui_profile_box_main_items() { - - $items = array(); - - $items['activities'] = array( - 'data' => theme('culturefeed_calendar_profile_box_item', array( - 'total' => 0, - )), - 'class' => 'activities', - 'weight' => -10, - ); - - return $items; - -} - -/** - * Implements hook_culturefeed_ui_anonymous_profile_box_main_items(). - */ -function culturefeed_calendar_culturefeed_ui_anonymous_profile_box_main_items() { - - $items = array(); - - // JS sets the real value, don't add total. - $items['activities'] = array( - 'data' => theme('culturefeed_calendar_profile_box_item'), - 'class' => 'activities', - 'weight' => -10, - ); - - return $items; - -} - -/** - * Load the calendar activity. - */ -function culturefeed_calendar_activity_load($activity_id) { - - // No uuid = anonymous user. Get it in the cookie. - if (is_numeric($activity_id)) { - - if (isset($_COOKIE['Drupal_visitor_calendar'])) { - $calendar = json_decode($_COOKIE['Drupal_visitor_calendar']); - if (is_array($calendar) && isset($calendar[$activity_id])) { - return $calendar[$activity_id]; - } - } - - } - // Uuid = load with API. - else { - try { - return DrupalCultureFeed::loadActivity($activity_id); - } - catch (Exception $e) { - watchdog_exception('culturefeed_calendar', $e); - } - - } - - return FALSE; - -} diff --git a/culturefeed_calendar/includes/admin.inc b/culturefeed_calendar/includes/admin.inc deleted file mode 100644 index 48fa38f8..00000000 --- a/culturefeed_calendar/includes/admin.inc +++ /dev/null @@ -1,22 +0,0 @@ - 'checkbox', - '#title' => t('Enable calendar only for beta users'), - '#description' => t('If enabled, the calendar will only be visible for beta users based on cookie'), - '#default_value' => variable_get('culturefeed_calendar_beta', FALSE), - ); - - return system_settings_form($form); - -} diff --git a/culturefeed_calendar/includes/helpers.inc b/culturefeed_calendar/includes/helpers.inc deleted file mode 100644 index d7979463..00000000 --- a/culturefeed_calendar/includes/helpers.inc +++ /dev/null @@ -1,632 +0,0 @@ -objects = array(); - $activities->total = 0; - - // Only search for activities with type_like or type_ik_ga. - $activity_options = array( - CultureFeed_Activity::TYPE_LIKE, - CultureFeed_Activity::TYPE_IK_GA, - ); - - $query = new CultureFeed_SearchActivitiesQuery(); - $query->max = 500; - $query->type = $activity_options; - $query->contentType = 'event'; - $query->userId = $user_id; - - // Use search for facet support. - if ($use_search) { - - // No search cache for the calendar page. - global $conf; - $conf['culturefeed_search_cache_enabled'] = FALSE; - - $service = culturefeed_get_search_service(); - $parameters[] = new CultuurNet\Search\Parameter\Group(); - $parameters[] = new CultuurNet\Search\Parameter\Rows(500); - $parameters[] = new CultuurNet\Search\Parameter\FilterQuery('type:event'); - $parameters[] = new CultuurNet\Search\Parameter\Query('*:*'); - $parameters[] = new CultuurNet\Search\Parameter\FilterQuery('attend_users:' . $user_id . ' OR like_users:' . $user_id); - - $result = $service->search($parameters); - // No likes / attends for this user on future events, don't do an activity search. - if ($result->getTotalCount() == 0) { - return $activities; - } - - $items = $result->getItems(); - $content_ids = array(); - foreach ($items as $item) { - $content_ids[] = $item->getId(); - } - - // Only search on found events. This way, we only see events in the future. - $query->nodeId = $content_ids; - - } - - try { - $activities = DrupalCultureFeed::searchActivities($query); - } - catch (Exception $e) { - watchdog_exception('culturefeed_calendar', $e); - } - - // Filter activities to make sure there are no duplicates. - $activities->objects = culturefeed_calendar_filter_duplicate_activities($activities->objects); - - return $activities; - -} - -/** - * Get the calendar activities for an anonymous user. - */ -function culturefeed_calendar_get_anonymous_user_activities($use_search) { - - $activities = new stdClass(); - $activities->objects = array(); - $activities->total = 0; - - // No cookie = no activities - if (isset($_COOKIE['Drupal_visitor_calendar'])) { - - $calendar = json_decode($_COOKIE['Drupal_visitor_calendar']); - - // Parse calendarDate back to time - $calendar_to_time = array(); - foreach ($calendar as $calendar_item) { - $calendar_item->calendarDate = strtotime(culturefeed_calendar_get_selected_date($calendar_item)); - $calendar_to_time[] = $calendar_item; - } - $calendar = $calendar_to_time; - - // Check if cookie is valid. - if (is_array($calendar)) { - - // Use search for facet support. - if ($use_search) { - - $eventids = array(); - $filterids = array(); - foreach ($calendar as $key => $event) { - $eventids[] = $event->nodeId; - $filterids[] = '"' . $event->nodeId . '"'; - } - - $service = culturefeed_get_search_service(); - $parameters[] = new CultuurNet\Search\Parameter\Group(); - $parameters[] = new CultuurNet\Search\Parameter\Rows(500); - $parameters[] = new CultuurNet\Search\Parameter\FilterQuery('type:event'); - $parameters[] = new CultuurNet\Search\Parameter\Query('cdbid IN(' . implode(',', $eventids) . ')'); - - try { - - $result = $service->search($parameters); - // No future events in the cookie. - if ($result->getTotalCount() == 0) { - return $activities; - } - - $activities->objects = array(); - $items = $result->getItems(); - // Set only the events that are found on search api (=future events). - foreach ($items as $item) { - $key = array_search($item->getId(), $eventids); - if ($key !== FALSE) { - unset($eventids[$key]); - $activities->objects[] = $calendar[$key]; - } - } - - // All remaining eventids don't exist in future, remove them of cookie. - foreach ($eventids as $key => $id) { - culturefeed_calendar_delete_calendar_event_cookie($calendar[$key]); - } - - - } - catch (Exception $e) { - watchdog_exception('culturefeed_calendar', $e); - } - - } - else { - $activities->objects = $calendar; - } - - $activities->total = count($activities->objects); - - } - - } - - return $activities; - -} - -/** - * Render the buttons to go to the calendar page or add item form. - */ -function culturefeed_calendar_render_calendar_buttons($item) { - - $authenticated = DrupalCultureFeed::isCultureFeedUser(); - $id = $item->getId(); - $actions = array('view', 'like', 'add'); - $buttons = array(); - $button = array(); - - $button['item_id'] = $id; - - $ids_to_check = array(); - $activities = NULL; - if ($authenticated) { - $activities = culturefeed_calendar_get_user_activities(); - if (isset($activities->objects)) { - foreach($activities->objects as $key => $activity) { - $ids_to_check[] = $activity->nodeId; - } - } - } - - $event_status = culturefeed_calendar_get_event_status($item); - - // When event is passed or started, show only a message aside. - if ($event_status !== CULTUREFEED_CALENDAR_EVENT_PLANNABLE) { - $locations = array('aside'); - } - else { - // else show message in content and aside - $locations = array('content', 'aside'); - } - - // locations = aside and/or content - foreach ($locations as $location) { - $button['location'] = $location; - // Show the correct button for authenticated users. - if ($authenticated) { - if (in_array($id, $ids_to_check)) { - $actions = array('view'); - } - else { - $actions = array('like', 'add'); - } - - foreach($actions as $action) { - $button['action'] = $action; - $buttons[$location][$action] = theme('culturefeed_calendar_button', array('button' => $button, 'authenticated' => $authenticated, 'status' => $event_status)); - } - } - // Show all buttons for anonymous users. JS will show the correct one. - else { - foreach ($actions as $action) { - $button['action'] = $action; - $buttons[$location][$action] = theme('culturefeed_calendar_button', array('button' => $button, 'authenticated' => $authenticated, 'status' => $event_status)); - } - } - } - return $buttons; -} - -/** - * Helper function to add an activity to the calendar. - */ -function culturefeed_calendar_add_activity($node_id, $node_title, $date = '') { - - $authenticated = DrupalCultureFeed::isCultureFeedUser(); - - if ($authenticated) { - $activity = new CultureFeed_Activity(); - if (!empty($date)) { - $activity->calendarDate = gmdate('c', strtotime($date)); - $activity->type = CultureFeed_Activity::TYPE_IK_GA; - } - else { - $activity->type = CultureFeed_Activity::TYPE_LIKE; - } - - $activity->contentType = 'event'; - $activity->nodeId = $node_id; - $activity->nodeTitle = $node_title; - $activity->userId = DrupalCultureFeed::getLoggedInUserId(); - - DrupalCultureFeed::createActivity($activity); - } - else { - $activity = new stdClass(); - - if (!empty($date)) { - $activity->calendarDate = gmdate('c', strtotime($date)); - $activity->type = CultureFeed_Activity::TYPE_IK_GA; - } - else { - $activity->type = CultureFeed_Activity::TYPE_LIKE; - } - $activity->nodeId = $node_id; - - $calendar = array(); - - if (isset($_COOKIE['Drupal_visitor_calendar'])) { - $calendar = json_decode($_COOKIE['Drupal_visitor_calendar']); - // Invalid cookie value, reset again. - if (!is_array($calendar)) { - $calendar = array(); - } - } - - $calendar[] = $activity; - end($calendar); - $last_key = key($calendar); - $calendar[$last_key]->id = $last_key; - $values = array( - 'calendar' => json_encode($calendar), - ); - - user_cookie_save($values); - - } - -} - -/** - * Checks wether an event has multiple dates. - */ -function culturefeed_calendar_event_has_multiple_dates($dates_array) { - - switch ($dates_array['type']) { - - case 'period': - return ($dates_array['period_start'] == $dates_array['period_end']) ? FALSE : TRUE; - - case 'permanent': - return TRUE; - - case 'timestamps': - return (count($dates_array['timestamps']) > 1) ? TRUE : FALSE; - - } - -} - -/** - * Updates a calendar event in the cookie for anonymous users. - * - * @param CultureFeed_Activity $activity - * @param string $date String version of the date to save. - */ -function culturefeed_calendar_update_calendar_event_cookie($activity, $date) { - - if (isset($_COOKIE['Drupal_visitor_calendar'])) { - - $calendar = json_decode($_COOKIE['Drupal_visitor_calendar']); - if (is_array($calendar) && isset($calendar[$activity->id])) { - $calendar[$activity->id]->calendarDate = gmdate('c', strtotime($date));; - $calendar[$activity->id]->type = CultureFeed_Activity::TYPE_IK_GA; - } - else { - return FALSE; - } - - $values = array( - 'calendar' => json_encode($calendar), - ); - - user_cookie_save($values); - - return TRUE; - } - - return FALSE; - -} - -/** - * deletes a calendar event from the cookie for anon users. - * - * @param CultureFeed_Activity $activity - */ -function culturefeed_calendar_delete_calendar_event_cookie($activity) { - if (isset($_COOKIE['Drupal_visitor_calendar'])) { - - $calendar = json_decode($_COOKIE['Drupal_visitor_calendar']); - if (is_array($calendar) && isset($calendar[$activity->id])) { - unset($calendar[$activity->id]); - } - else { - return FALSE; - } - - // Reset the keys to become numeric again. - $calendar = array_values($calendar); - // Also reset the ids. - foreach ($calendar as $key => $calendar_item) { - $calendar[$key]->id = $key; - } - - - $values = array( - 'calendar' => json_encode($calendar), - ); - - user_cookie_save($values); - - return TRUE; - } - - return FALSE; -} - -/** - * Get the calendar date that is selected for an activity. - */ -function culturefeed_calendar_get_selected_date($activity) { - - if (!empty($activity->calendarDate)) { - return $activity->calendarDate; - } - else if (!empty($activity->value) ) { - $calendar_info = json_decode($activity->value); - if ($calendar_info && !empty($calendar_info->calendar_date)) { - return $calendar_info->calendar_date; - } - } -} - -/** - * Helper function to sort activities by date. - */ -function culturefeed_calendar_sort_by_date($a, $b) { - - $calendar_date_a = 0; - $calendar_date_b = 0; - - // Calendar date property of a exists. - if (!empty($a->calendarDate)) { - $calendar_date_a = $a->calendarDate; - } - // Calendar date a is stored in value. - elseif (!empty($calendar_date_a->value)) { - $json_value_a = json_decode($a->value); - if ($json_value_a && !empty($json_value_a->calendar_date)) { - $calendar_date_a = $json_value_a->calendar_date; - } - } - - // Calendar date property of b exists. - if (!empty($b->calendarDate)) { - $calendar_date_b = $b->calendarDate; - } - // Calendar date b is stored in value. - elseif (!empty($calendar_date_b->value)) { - $json_value_b = json_decode($b->value); - if ($json_value_b && !empty($json_value_b->calendar_date)) { - $calendar_date_b = $json_value_b->calendar_date; - } - } - - return $calendar_date_a - $calendar_date_b; - -} - -/** - * Helper function to filter out duplicate activities. - */ -function culturefeed_calendar_filter_duplicate_activities($activities) { - $filtered_activities = array(); - - foreach ($activities as $key => $activity) { - - // First time this activity is found. - if (empty($filtered_activities[$activity->nodeId])) { - $filtered_activities[$activity->nodeId] = $activity; - } - - // go's are more important then like's - else if ($activity->type == CultureFeed_Activity::TYPE_IK_GA && $filtered_activities[$activity->nodeId]->type == CultureFeed_Activity::TYPE_LIKE) { - $filtered_activities[$activity->nodeId] = $activity; - } - - // When type is go. Activities with a date are more important. - else if ($activity->type == CultureFeed_Activity::TYPE_IK_GA && (!empty($activity->calendarDate) || !empty($activity->value))) { - $filtered_activities[$activity->nodeId] = $activity; - } - } - - return $filtered_activities; -} - -/** - * Helper function to read cookie betaCalendar (in progress) - */ -function culturefeed_calendar_enabled() { - if (variable_get('culturefeed_calendar_beta', FALSE)) { - - // Check if the user has opted in for the beta program - if (isset($_COOKIE['betaCalendar']) && $_COOKIE['betaCalendar'] == 'true') { - return TRUE; - } - else { - return FALSE; - } - - } - - return TRUE; - -} - -/** - * Helper function to get the url of the calendar - */ -function culturefeed_calendar_get_url() { - global $base_url; - return $base_url . '/culturefeed/calendar'; -} - -/** - * Helper function to check if an activity is finished (date not between now and now + 11 months) - */ -function culturefeed_calendar_activity_is_finished($activity) { - if ($selected_date = culturefeed_calendar_get_selected_date($activity)) { - - // Only show activities between current month and 11 months in the future - $activity_month = format_date($selected_date, 'custom', 'Ym'); - $current_month = format_date(REQUEST_TIME, 'custom', 'Ym'); - - if ($activity_month < $current_month || $activity_month > date('Ym', strtotime("11 months"))) { - return TRUE; - } - - } - else { - return TRUE; - } - - return FALSE; - -} - -/** - * Helper function to get the event status. - */ -function culturefeed_calendar_get_event_status($item) { - - $event_status = CULTUREFEED_CALENDAR_EVENT_FINISHED; - - if ($item->getType() == 'event') { - $event = $item->getEntity(); - if ($event instanceof CultureFeed_Cdb_Item_Event) { - $objDateTime = new DateTime('NOW'); - $calendar = $event->getCalendar(); - - if ($calendar instanceof CultureFeed_Cdb_Data_Calendar_TimestampList || $calendar instanceof CultureFeed_Cdb_Data_Calendar_PeriodList) { - - // Check if 1 of the items is still in the future. - foreach ($calendar as $calendar_item) { - - if ($calendar_item instanceof CultureFeed_Cdb_Data_Calendar_Period) { - - $dateToStart = DateTime::createFromFormat('Y-m-d H:i:s', $calendar_item->getDateTo() . ' 00:00:00'); - $dateToEnd = DateTime::createFromFormat('Y-m-d H:i:s', $calendar_item->getDateTo() . ' 23:59:59'); - // End date is in the future, so plannable - if ($objDateTime->getTimestamp() < $dateToStart->getTimestamp()) { - return CULTUREFEED_CALENDAR_EVENT_PLANNABLE; - } - // End date is busy so event started. - elseif ($objDateTime->getTimestamp() >= $dateToStart->getTimestamp() && $objDateTime->getTimestamp() <= $dateToEnd->getTimestamp()) { - $event_status = CULTUREFEED_CALENDAR_EVENT_STARTED; - } - - } - elseif ($calendar_item instanceof CultureFeed_Cdb_Data_Calendar_Timestamp) { - - // Get start time. - if ($calendar_item->getStartTime()) { - $starttime = DateTime::createFromFormat('Y-m-d H:i:s', $calendar_item->getDate() . ' ' . $calendar_item->getStartTime()); - } - else { - $starttime = DateTime::createFromFormat('Y-m-d H:i:s', $calendar_item->getDate() . ' 00:00:00'); - } - - // Get end time. - if ($calendar_item->getEndTime() && $calendar_item->getEndTime() !== "00:00:00") { - $endtime = DateTime::createFromFormat('Y-m-d H:i:s', $calendar_item->getDate() . ' ' . $calendar_item->getEndTime()); - } - else { - $endtime = DateTime::createFromFormat('Y-m-d H:i:s', $calendar_item->getDate() . ' 23:59:59'); - } - - // Start time still to come? - if ($starttime->getTimestamp() > $objDateTime->getTimestamp()) { - return CULTUREFEED_CALENDAR_EVENT_PLANNABLE; - } - elseif ($endtime->getTimestamp() > $objDateTime->getTimestamp()) { - $event_status = CULTUREFEED_CALENDAR_EVENT_STARTED; - } - } - } - } - elseif ($calendar instanceof CultureFeed_Cdb_Data_Calendar_Permanent) { - $event_status = CULTUREFEED_CALENDAR_EVENT_PLANNABLE; - } - } - } - - return $event_status; -} - -/** - * Helper function to update a calendar event. - * @param $activity - * @param $date - */ -function culturefeed_calendar_update_calendar_event($activity, $date) { - // Not numeric id = activity on service. - $success = TRUE; - if (!is_numeric($activity->id) != 0) { - try { - - DrupalCultureFeed::deleteActivity($activity->id); - - $activity->value = ''; - $activity->calendarDate = gmdate('c', strtotime($date)); - $new_activity = $activity; - $new_activity->type = CultureFeed_Activity::TYPE_IK_GA; - - DrupalCultureFeed::createActivity($new_activity); - - // Add a timeout of 2 second, this gives index the time to place the new activity into the search index. - // sleep(2); - - } - catch (Exception $e) { - $success = FALSE; - watchdog_exception('culturefeed_calendar', $e); - } - } - // No uuid = anonymous user. Update in cookie. - else { - $success = culturefeed_calendar_update_calendar_event_cookie($activity, $date); - } - - if ($success) { - drupal_set_message(t('Your calendar event was updated.')); - } - else { - drupal_set_message(t('An error occured while saving your calendar'), 'error'); - } -} - diff --git a/culturefeed_calendar/includes/pages.inc b/culturefeed_calendar/includes/pages.inc deleted file mode 100644 index 3e7fbfe6..00000000 --- a/culturefeed_calendar/includes/pages.inc +++ /dev/null @@ -1,786 +0,0 @@ - $activities)); - -} - -/** - * Page callback to show a users shared calendar page. - */ -function culturefeed_calendar_page_user_activities($user_id) { - - $activities = culturefeed_calendar_get_user_activities(TRUE, $user_id); - return theme('culturefeed_calendar_page', array('activities' => $activities, 'user_id' => $user_id)); - -} - -/** - * Page callback to show the calendar share page. - */ -function culturefeed_calendar_page_share_my_calendar() { - - return theme('culturefeed_calendar_share_page'); - -} - -/** - * Page callback to show the calendar settings page. - */ -function culturefeed_calendar_page_settings() { - - $form = drupal_get_form('culturefeed_calendar_settings_form'); - - return theme('culturefeed_calendar_settings_page', array('settings_form' => $form)); - -} - -/** - * Page callback to like items - */ -function culturefeed_calendar_like(CultuurNet\Search\ActivityStatsExtendedEntity $event, $request_type = 'ajax') { - - $params = _culturefeed_calendar_get_event_params($event); - $params['title'] = t('Add !title to your calendar', array('!title' => $params['node_title'])); - $params['button_text'] = t('Add'); - $params['use_ajax'] = $request_type == 'ajax'; - - culturefeed_calendar_add_activity($params['node_id'], $params['node_title']); - - if ($request_type == 'ajax') { - - // No form should be shown, redirect to the detailpage. - $commands = array(); - - if (isset($_GET['destination'])) { - $url = url($_GET['destination']); - } - else { - $url = culturefeed_search_detail_url('event', $event->getId(), $event->getTitle(culturefeed_get_preferred_language())); - } - $commands[] = culturefeed_ajax_command_goto($url); - - - ajax_deliver(array('#type' => 'ajax', '#commands' => $commands)); - exit; - - } -} - - -/** - * Page callback to add items to the calendar. - */ -function culturefeed_calendar_add_to_calendar(CultuurNet\Search\ActivityStatsExtendedEntity $event, $request_type = 'ajax') { - - $params = _culturefeed_calendar_get_event_params($event); - $params['title'] = t('When do you want to go?'); - $params['button_text'] = t('Add'); - $params['use_ajax'] = $request_type == 'ajax'; - - // If no form should be shown, we can create the activity. - if ($params['get_form']) { - $form = drupal_get_form('culturefeed_calendar_form', $params); - } - else { - try { - if (!empty($params['dates'][0]['date'])) { - $date = $params['dates'][0]['date']; - if (!empty($params['dates'][0]['start'])) { - $date .= ' ' . $params['dates'][0]['start']; - } - } - - culturefeed_calendar_add_activity($params['node_id'], $params['node_title'], $date); - //drupal_set_message(t('The event has been added to your calendar.')); - } - catch (Exception $e) { - drupal_set_message(t('There was an error while adding to your calendar'), 'error'); - } - } - - if ($request_type == 'ajax') { - - // No form should be shown, redirect to the detailpage. - $commands = array(); - if ($params['get_form']) { - $commands[] = culturefeed_ajax_command_modal('#calendar-form', drupal_render($form)); - } - else { - if (isset($_GET['destination'])) { - $url = url($_GET['destination']); - } - else { - $url = culturefeed_search_detail_url('event', $event->getId(), $event->getTitle(culturefeed_get_preferred_language())); - } - $commands[] = culturefeed_ajax_command_goto($url); - } - - ajax_deliver(array('#type' => 'ajax', '#commands' => $commands)); - exit; - - } - else { - if ($params['get_form']) { - return $form; - } - else { - drupal_goto(culturefeed_search_detail_path('event', $event->getId(), $event->getTitle(culturefeed_get_preferred_language()))); - } - - } -} - -/** - * Page callback to edit events in the calendar. - */ -function culturefeed_calendar_edit_calendar_event($activity, $request_type = 'ajax') { - - $event = culturefeed_agenda_event_load($activity->nodeId); - - $params = _culturefeed_calendar_get_event_params($event); - $params['title'] = t('When do you want to go?'); - $params['button_text'] = t('Update event'); - $params['use_ajax'] = $request_type == 'ajax'; - $params['activity'] = $activity; - - if ($params['get_form']) { - $form = drupal_get_form('culturefeed_calendar_form', $params); - - if ($request_type == 'ajax') { - $commands = array(); - $commands[] = culturefeed_ajax_command_modal('#calendar-form', drupal_render($form)); - print ajax_render($commands); - exit; - } - else { - return $form; - } - } - else { - - if (!empty($params['dates'][0]['date'])) { - $date = $params['dates'][0]['date']; - if (!empty($params['dates'][0]['start'])) { - $date .= ' ' . $params['dates'][0]['start']; - } - } - - culturefeed_calendar_update_calendar_event($activity, $date); - - if ($request_type == 'ajax') { - $commands = array(); - $commands[] = culturefeed_ajax_command_goto(url(culturefeed_calendar_get_url())); - ajax_deliver(array('#type' => 'ajax', '#commands' => $commands)); - exit; - } - else { - drupal_goto(url(culturefeed_calendar_get_url())); - } - } -} - -/** - * Form edit/add an event to the calendar. - */ -function culturefeed_calendar_form($form, &$form_state, $params) { - - $submit_function = isset($params['activity']) ? 'culturefeed_calendar_edit_calendar_event_form_submit' : 'culturefeed_calendar_add_to_calendar_form_submit'; - - // Activity is passed when editing. - if (!empty($params['activity'])) { - $selected_date = strtotime(culturefeed_calendar_get_selected_date($params['activity'])); - $edit = !empty($selected_date) ? TRUE : FALSE; - } - else { - $edit = FALSE; - } - - drupal_set_title($params['title']); - - // Only show possible dates for periods where calendar summary is available - /*$possible_dates = ''; - if (($params['type'] == 'period') && $params['calendar_summary']) { - $info = '
' . $params['calendar_summary'] . '
'; - } - - $form['info'] = array( - '#type' => 'markup', - '#markup' => $possible_dates, - );*/ - - // periode of permanent - if (($params['type'] == 'period') || ($params['type'] == 'permanent')) { - - $help = t('Choose a date'); - - if ($params['type'] == 'period') { - // Don't add if date is in the past. - $timestamp = strtotime($params['date_from']); - if ($timestamp < $_SERVER['REQUEST_TIME']) { - $start_date = format_date($_SERVER['REQUEST_TIME'], 'custom', 'Y-m-d'); - } - else { - $start_date = $params['date_from']; - } - - $help = t('Choose a date between ') . " " . format_date(strtotime($start_date), 'custom', 'd/m/Y') . " ". t('and') . " " . format_date(strtotime($params['date_to']), 'custom', 'd/m/Y') . "."; - - if($params['when_lg'] !== '') { - $help .= " " . $params['when_lg'] ; - } - } - elseif ($params['type'] == 'permanent') { - $start_date = format_date($_SERVER['REQUEST_TIME'], 'custom', 'Y-m-d'); - } - - $form['date'] = array( - '#title' => $help, - '#type' => 'date_popup', - '#date_format' => 'd/m/Y', - '#datepicker_options' => array( - 'minDate' => format_date(strtotime($start_date), 'custom', 'd/m/Y'), - 'maxDate' => format_date(strtotime($params['date_to']), 'custom', 'd/m/Y'), - ), - '#default_value' => $edit ? format_date($selected_date, 'custom', 'Y-m-d H:i') : $start_date, - ); - } - // timestamps. - elseif ($params['type'] == 'timestamps') { - $dates = array(); - - foreach ($params['dates'] as $key => $date) { - - $full_date = $date['date']; - if (!empty($date['start'])) { - $full_date .= ' ' . $date['start']; - } - - // Don't add if date is in the past. - $timestamp = strtotime($full_date); - if ($timestamp < $_SERVER['REQUEST_TIME']) { - continue; - } - - if (!empty($date['start'])) { - $starthour = format_date($timestamp, 'custom', 'H:i'); - if (!empty($date['end'])) { - $endhour = format_date(strtotime($date['date'] . ' ' . $date['end']), 'custom', 'H:i'); - $dates[$date['date'] . ' ' . $starthour] = t('!date from !starthour to !endhour', array('!date' => format_date(strtotime($date['date']), 'custom', 'd/m/Y'), '!starthour' => $starthour, '!endhour' => $endhour)); - } - else { - $dates[$date['date'] . ' ' . $starthour] = t('!date from !starthour', array('!date' => format_date(strtotime($date['date']), 'custom', 'd/m/Y'), '!starthour' => $starthour)); - } - } - else { - $dates[$date['date']] = t('!date', array('!date' => format_date(strtotime($date['date']), 'custom', 'd/m/Y'))); - } - - } - - $form['date'] = array( - '#title' => t('When do you want to go?'), - '#type' => 'radios', - '#options' => $dates, - '#default_value' => $edit ? format_date($selected_date, 'custom', 'd/m/Y') : '', - ); - } - - // Removed actions ($form['actions']['submit']) because that didn't work, we have to investigate - $form['submit'] = array( - '#type' => 'submit', - '#value' => $params['button_text'], - '#name' => 'add', - '#submit' => array($submit_function), - '#validate' => array('culturefeed_calendar_form_validate'), - ); - - if (!$edit) { - $form['no_date'] = array( - '#type' => 'submit', - '#value' => t("I don't know yet"), - '#name' => 'no_idea_yet', - '#submit' => array($submit_function), - '#validate' => array('culturefeed_calendar_form_validate'), - '#attributes' => array( - 'class' => array('btn', 'btn-link') - ), - ); - } - - $form['errors'] = array( - '#type' => 'markup', - '#markup' => '', - '#weight' => -20, - ); - - $form['actions'] = array( - '#type' => 'actions', - ); - - - - $form['actions']['cancel'] = array( - '#type' => 'submit', - '#value' => t("Cancel"), - '#name' => 'cancel', - '#submit' => array($submit_function), - '#limit_validation_errors' => array(), - ); - - if ($params['use_ajax']) { - // Removed actions ($form['actions']['submit']['#ajax']) because that didn't work, we have to investigate - $form['submit']['#ajax'] = array( - 'callback' => 'culturefeed_calendar_form_ajax', - 'wrapper' => 'calendar-form', - ); - $form['actions']['cancel']['#ajax'] = array( - 'callback' => 'culturefeed_calendar_form_ajax', - 'wrapper' => 'calendar-form', - ); - } - - $form_state['params'] = $params; - - return $form; -} - -/** - * Ajax callback for the calendar form. - */ -function culturefeed_calendar_form_ajax($form, $form_state) { - - // When editing, activity is passed; after edit, return to the calendar page. - if (isset($_GET['destination'])) { - $url = url($_GET['destination']); - } - elseif (isset($form_state['params']['activity'])) { - $url = url('culturefeed/calendar'); - } - // After adding, return to event detail. - else { - $url = culturefeed_search_detail_url('event', $form_state['params']['node_id'], $form_state['params']['node_title']); - } - - $commands = array(); - if (empty($form_state['params']['validation_error'])) { - $commands[] = culturefeed_ajax_command_goto($url); - } - else { - $commands[] = ajax_command_html('#calendar-form', drupal_render($form)); - $commands[] = ajax_command_html('#add-to-calendar-errors', theme('status_messages')); - } - - return array('#type' => 'ajax', '#commands' => $commands); - -} - -/** - * Validate the add to calendar form. - */ -function culturefeed_calendar_form_validate(&$form, &$form_state) { - - $form_state['params']['validation_error'] = FALSE; - - // No idea yet => reset date. - if ($form_state['clicked_button']['#name'] == 'no_idea_yet') { - $form_state['values']['date'] = ''; - } - - if ($form_state['params']['type'] == 'period' && !empty($form_state['values']['date'])) { - $date = strtotime($form_state['values']['date']); - $date_from = strtotime($form_state['params']['date_from']); - $date_to = strtotime($form_state['params']['date_to']); - $today = mktime(0, 0, 0); - - if ($date < $today) { - form_set_error('date', t('You selected a date in the past. Please select a date in the future.')); - $form_state['params']['validation_error'] = TRUE; - } - // Check if the chosen date is between the start and end date of the event. - elseif (($date < $date_from) || ($date > $date_to)) { - if ($date_from < $today) { - $date_start = $_SERVER['REQUEST_TIME']; - } - else { - $date_start = $date_from; - } - - form_set_error('date', t('Enter a date between ') . date('d/m/Y', $date_start) . t(' and ') . date('d/m/Y', $date_to) . '.'); - $form_state['params']['validation_error'] = TRUE; - } - // Check if the event is opened on the chosen day. - elseif (!empty($form_state['params']['week_scheme'])) { - $week_scheme = $form_state['params']['week_scheme']; - $day = strtolower(date('l', $date)); - $day_allowed = $week_scheme->getDay($day)->getopenType() == 'closed' ? FALSE : TRUE; - - if (!$day_allowed) { - $form_state['params']['validation_error'] = TRUE; - form_set_error('date', t('The event is closed on ') . t($day) . '. ' . t('Please choose another day') . '.'); - } - } - } -} - -/** - * Submit the add to calendar form. - */ -function culturefeed_calendar_add_to_calendar_form_submit($form, &$form_state) { - - $node_title = $form_state['params']['node_title']; - $node_id = $form_state['params']['node_id']; - $form_state['redirect'] = culturefeed_search_detail_path('event', $node_id, $node_title); - - if ($form_state['triggering_element']['#name'] == 'cancel') { - return; - } - - $date = $form_state['values']['date']; - - try { - culturefeed_calendar_add_activity($node_id, $node_title, $date); - //drupal_set_message(t('The event has been added to your calendar.')); - } - catch (Exception $e) { - drupal_set_message(t('There was an error while adding to your calendar'), 'error'); - } - -} - -/** - * Submit handler for editing calendar events. - */ -function culturefeed_calendar_edit_calendar_event_form_submit($form, &$form_state) { - - $form_state['redirect'] = 'culturefeed/calendar'; - if ($form_state['triggering_element']['#name'] == 'cancel' || empty($form_state['values']['date'])) { - return; - } - - $activity = $form_state['params']['activity']; - $date = $form_state['values']['date']; - - culturefeed_calendar_update_calendar_event($activity, $date); -} - -/** - * Page callback to delete events from the calendar. - */ -function culturefeed_calendar_delete_calendar_event($activity, $request_type = 'ajax') { - - $event = culturefeed_agenda_event_load($activity->nodeId); - $params = _culturefeed_calendar_get_event_params($event); - $params['title'] = t('Remove event'); - $params['activity'] = $activity; - $params['use_ajax'] = $request_type == 'ajax'; - - $form = drupal_get_form('culturefeed_calendar_delete_form', $params); - - if ($request_type == 'ajax') { - $commands = array(); - $commands[] = culturefeed_ajax_command_modal('#calendar-form', drupal_render($form)); - - print ajax_render($commands); - exit; - } - else { - return $form; - } - -} - -/** - * Form to delete a calendar event. - */ -function culturefeed_calendar_delete_form($form, &$form_state, $params) { - - drupal_set_title($params['title']); - - $form['info'] = array( - '#type' => 'markup', - '#markup' => '', - ); - - $form['actions'] = array( - '#type' => 'actions', - ); - - $form['actions']['submit'] = array( - '#type' => 'submit', - '#value' => t('Remove'), - '#name' => 'delete', - '#submit' => array('culturefeed_calendar_delete_form_submit'), - ); - - if ($params['use_ajax']) { - $form['actions']['submit']['#ajax'] = array( - 'callback' => 'culturefeed_calendar_delete_form_ajax', - 'wrapper' => 'calendar-form', - ); - } - - $form['actions']['cancel'] = array( - '#type' => 'submit', - '#value' => t("Cancel"), - '#name' => 'cancel', - '#submit' => array('culturefeed_calendar_delete_form_submit'), - ); - - $form_state['params'] = $params; - - return $form; - -} - -/** - * Ajax callback for the calendar delete form. - */ -function culturefeed_calendar_delete_form_ajax($form, $form_state) { - - $commands = array(); - $commands[] = culturefeed_ajax_command_goto(url('culturefeed/calendar')); - - print ajax_render($commands); - exit; - -} - -/** - * Submit handler for deleting calendar events. - */ -function culturefeed_calendar_delete_form_submit($form, &$form_state) { - - $form_state['redirect'] = 'culturefeed/calendar'; - - if ($form_state['triggering_element']['#name'] == 'cancel') { - return; - } - - $activity = $form_state['params']['activity']; - - // Not numeric id = activity on service. - $success = TRUE; - if (!is_numeric($activity->id) != 0) { - try { - DrupalCultureFeed::deleteActivity($activity->id); - } - catch (Exception $e) { - $success = FALSE; - watchdog_exception('culturefeed_calendar', $e); - } - } - // No uuid = anonymous user. Update in cookie. - else { - $success = culturefeed_calendar_delete_calendar_event_cookie($activity); - } - - if ($success) { - drupal_set_message(t('Your calendar event was deleted.')); - } - else { - drupal_set_message(t('An error occured while deleting the event from your calendar'), 'error'); - } - -} - -/** - * Helper function that get form parameters for edit/add/delete activity-forms. - * - * @param type $event - * @return type - */ -function _culturefeed_calendar_get_event_params($event) { - - $entity = $event->getEntity(); - $node_id = $entity->getCdbId(); - - $event_detail = $entity->getDetails() - ->getDetailByLanguage(culturefeed_search_get_preferred_language()); - $calendar_summary = check_plain($event_detail->getCalendarSummary()); - - $calendar = $entity->getCalendar(); - $calendar_type = get_class($calendar); - - $lang_code = $GLOBALS['language']->language; - $title = $event->getTitle($lang_code); - - $params = array(); - $params['node_id'] = $node_id; - $params['node_title'] = $title; - $params['calendar_summary'] = $calendar_summary; - $params['get_form'] = TRUE; - $params['type'] = ''; - - if ($calendar_type == 'CultureFeed_Cdb_Data_Calendar_Permanent') { - $params['type'] = 'permanent'; - } - elseif ($calendar_type == 'CultureFeed_Cdb_Data_Calendar_PeriodList') { - $params['date_from'] = $calendar->current()->getDateFrom(); - $params['date_to'] = $calendar->current()->getDateTo(); - $params['type'] = 'period'; - $params['week_scheme'] = $calendar->current()->getWeekScheme(); - // Format Calendar details to readable & themable HTML. - $html_formatter = culturefeed_agenda_get_html_calendar_formatter(); - $variables['when_lg'] = ''; - try { - $params['when_lg'] = $html_formatter->format($calendar, 'lg'); - } - catch (Exception $e) { - } - - // if date-to = today, pass modal-form and direct - if ($calendar->current()->getDateTo() == date('Y-m-d', $_SERVER['REQUEST_TIME'])) { - $params['dates'][]['date'] = $params['date_to']; - $params['get_form'] = FALSE; - } - - } - elseif ($calendar_type == 'CultureFeed_Cdb_Data_Calendar_TimestampList') { - - $params['type'] = 'timestamps'; - $params['dates'] = array(); - - $i = 0; - $dates = array(); - while ($calendar->valid()) { - $endtime = $calendar->current()->getEndTime(); - if ($endtime == NULL || $endtime == "00:00:00") { - $endtime = "23:59:59"; - } - if (DateTime::createFromFormat('Y-m-d H:i:s', $calendar->current()->getDate() . " " . $endtime)->getTimestamp() > $_SERVER['REQUEST_TIME']) { - $dates[$i]['date'] = $calendar->current()->getDate(); - $dates[$i]['start'] = $calendar->current()->getStartTime(); - $dates[$i]['end'] = $calendar->current()->getEndTime(); - } - $calendar->next(); - $i++; - } - - if (count($dates) == 1) { - /* don't show a modal */ - $params['get_form'] = FALSE; - /* reindex dates */ - $dates = array_values($dates); - $params['dates'] = $dates; - return $params; - } - else { - $params['dates'] = $dates; - $params['type'] = 'timestamps'; - } - } - - return $params; -} - -/** - * Helper function that gets the current and next twelve months for nav links. - * @return array - * - full month name - * - short month name - * - year - */ -function _culturefeed_calendar_get_nav_months() { - - $months = array(); - $month = date('n'); // Current month. - for ($x = 0; $x < 12; $x++) { - $time = mktime(0, 0, 0, $month + $x, 1); - $item = array( - 'full_month' => format_date($time, 'custom', 'F'), - 'month' => format_date($time, 'custom', 'M'), - 'year' => format_date($time, 'custom', 'Y'), - 'first_day' => format_date($time, 'custom', '1/m/Y'), - 'last_day' => format_date($time, 'custom', 't/m/Y'), - ); - $months[] = $item; - - } - - return $months; -} - -/** - * Form to delete a calendar event. - */ -function culturefeed_calendar_settings_form($form, &$form_state) { - - try { - $cf_user = DrupalCultureFeed::getLoggedInUser(); - } - catch (Exception $ex) { - drupal_set_message(t('There was an error while loading the user information'), 'error'); - return $form; - } - - $form['visibility'] = array( - '#type' => 'radios', - '#title' => t('Who can see your calendar'), - '#default_value' => !empty($cf_user->privacyConfig->calendarId) ? $cf_user->privacyConfig->calendarId : CultureFeed_UserPrivacyConfig::PRIVACY_PUBLIC, - '#options' => array( - CultureFeed_UserPrivacyConfig::PRIVACY_PRIVATE => t('Only me'), - CultureFeed_UserPrivacyConfig::PRIVACY_PUBLIC => t('Everyone'), - ), - ); - - $form['actions']['submit'] = array( - '#type' => 'submit', - '#value' => t('Save'), - '#name' => 'save', - '#submit' => array('culturefeed_calendar_settings_form_submit'), - ); - - $form['actions']['cancel'] = array( - '#markup' => l(t('Cancel'), 'culturefeed/calendar', array('attributes' => array('class' => array('btn', 'btn-link')))) - ); - - return $form; - -} - - -/** - * Submit handler for the calendar settings form. - */ -function culturefeed_calendar_settings_form_submit($form, &$form_state) { - try { - $cf_user = DrupalCultureFeed::getLoggedInUser(); - - // Update the user privacy. - $cf_user->privacyConfig->calendarId = $form_state['values']['visibility']; - DrupalCultureFeed::updateUserPrivacy($cf_user->id, $cf_user->privacyConfig); - - // If the privacy is set to not published, unset the calenderId. - if ($cf_user->privacyConfig->calendarId == CultureFeed_UserPrivacyConfig::PRIVACY_PUBLIC) { - $cf_user->calendarId = $cf_user->id; - } - else { - $cf_user->calendarId = ''; - } - DrupalCultureFeed::updateUser($cf_user, array('calendarId')); - - if ($cf_user->privacyConfig->calendarId == CultureFeed_UserPrivacyConfig::PRIVACY_PUBLIC) { - drupal_set_message(t('Changes succesfully saved.') . ' ' . l(t('Go to your calendar'), culturefeed_calendar_get_url()) . ' ' . t('or') . ' ' . l(t('share it with your friends'), 'culturefeed/calendar/share') . '.'); - } - else { - drupal_set_message(t('Changes succesfully saved.') . ' ' . l(t('Go to your calendar'), culturefeed_calendar_get_url())); - } - - } - catch (Exception $ex) { - drupal_set_message(t('There was an error while saving the form'), 'error'); - } - - -} diff --git a/culturefeed_calendar/js/clipboard.min.js b/culturefeed_calendar/js/clipboard.min.js deleted file mode 100644 index 000e4b48..00000000 --- a/culturefeed_calendar/js/clipboard.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * clipboard.js v1.5.5 - * https://zenorocha.github.io/clipboard.js - * - * Licensed MIT © Zeno Rocha - */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,r){function o(a,c){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!c&&s)return s(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a- - -
-- -
- - - - - - - diff --git a/culturefeed_calendar/theme/theme.inc b/culturefeed_calendar/theme/theme.inc deleted file mode 100644 index d3f59446..00000000 --- a/culturefeed_calendar/theme/theme.inc +++ /dev/null @@ -1,408 +0,0 @@ -calendarId)) { - $variables['deny_access'] = TRUE; - } - else { - $variables['deny_access'] = FALSE; - } - - $variables['sidebar'] = 'empty'; - - // Top nav with month names. - $months = _culturefeed_calendar_get_nav_months(); - $variables['nav_months'] = theme('culturefeed_calendar_nav_months', array('months' => $months)); - - // Sort activities by type. - $activities = $variables['activities']; - $activities_by_type = array(); - if (!empty($activities->objects)) { - foreach($activities->objects as $activity) { - $activity_type = $activity->type; - if (!culturefeed_calendar_get_selected_date($activity)) { - $activity_type = CultureFeed_Activity::TYPE_LIKE; - } - $activities_by_type[$activity_type][] = $activity; - } - } - - $variables['not_yet_planned'] = ''; - $variables['planned'] = ''; - if (!empty($activities_by_type)) { - // Print the 'LIKED' activities. - if (isset($activities_by_type[CultureFeed_Activity::TYPE_LIKE]) && $my_calendar) { - - //Remove activities that are already started. - foreach ($activities_by_type[CultureFeed_Activity::TYPE_LIKE] as $key => $activity_liked) { - $event = culturefeed_agenda_event_load($activity_liked->nodeId); - if (culturefeed_calendar_get_event_status($event) !== CULTUREFEED_CALENDAR_EVENT_PLANNABLE) { - unset($activities_by_type[CultureFeed_Activity::TYPE_LIKE][$key]); - } - } - - $variables['not_yet_planned'] = theme('culturefeed_calendar_activities_liked', - array('activities' => $activities_by_type[CultureFeed_Activity::TYPE_LIKE])); - } - // Print the 'IK GA' activities. - if (isset($activities_by_type[CultureFeed_Activity::TYPE_IK_GA])) { - $variables['planned'] = theme('culturefeed_calendar_activities_going', - array('activities' => $activities_by_type[CultureFeed_Activity::TYPE_IK_GA], 'month_names' => $months, 'my_calendar' => $my_calendar)); - } - // Print the save cookie button. - if (!$loggedin_cf_uid && !empty($activities->objects) && $my_calendar) { - $variables['login_url'] = url('culturefeed/oauth/connect', array('query' => drupal_get_destination())); - } - } - - if ($loggedin_cf_uid || (!$loggedin_cf_uid && !$my_calendar)) { - // Set username. - if (empty($cf_user->givenName)) { - $name = $cf_user->nick; - } - else { - $name = $cf_user->givenName . ' ' . $cf_user->familyName; - } - $variables['user_name'] = $name; - } - - if ($loggedin_cf_uid && $my_calendar) { - $variables['share_calendar_path'] = 'culturefeed/calendar/share'; - $variables['calendar_settings_path'] = 'culturefeed/calendar/settings'; - - if ($cf_user->privacyConfig->calendarId == CultureFeed_UserPrivacyConfig::PRIVACY_PUBLIC) { - $variables['shared'] = TRUE; - $variables['data_content'] = theme('culturefeed_calendar_share_page'); - $variables['calendar_share_path'] = 'culturefeed/calendar/' . $cf_user->id; - $variables['calendar_share_url'] = url($variables['calendar_share_path'], array('absolute' => TRUE)); - } - else { - $variables['shared'] = FALSE; - $variables['data_content'] = theme('culturefeed_calendar_share_page'); - } - } - - culturefeed_calendar_preprocess_culturefeed_calendar_share_page($variables); - culturefeed_calendar_preprocess_culturefeed_calendar_metatags($variables); -} - -/** - * Preprocess the variables for the calendar buttons. - * @see culturefeed-calendar-button.tpl.php - */ -function culturefeed_calendar_preprocess_culturefeed_calendar_button(&$variables) { - - drupal_add_library('system', 'drupal.ajax'); - drupal_add_library('system', 'jquery.cookie'); - - if (!culturefeed_is_culturefeed_user()) { - drupal_add_css(drupal_get_path('module', 'culturefeed_calendar') . '/css/culturefeed_calendar_anonymous.css'); - } - - $variables['classes_array'] = array( - 'calendar-button', - 'calendar-button-' . $variables['button']['location'], - ); - $variables['finished'] = $variables['status'] == CULTUREFEED_CALENDAR_EVENT_FINISHED; - $variables['started'] = $variables['status'] == CULTUREFEED_CALENDAR_EVENT_STARTED; - - if (!$variables['finished'] && $variables['button']['action'] == 'view') { - - $variables['classes_array'][] = 'btn-view-calendar'; - - $variables['button']['options'] = array(); - $variables['button']['path'] = 'culturefeed/calendar'; - if ($variables['button']['location'] == 'content') { - $variables['button']['description'] = t('This event is added to your calendar.'); - $variables['button']['text'] = t('View calendar'); - } - elseif ($variables['button']['location'] == 'aside') { - $variables['button']['text'] = t('to your calendar'); - } - - } - elseif ($variables['button']['action'] == 'add') { - - $variables['classes_array'][] = 'btn-add-calendar'; - - $variables['button']['options'] = array( - 'query' => drupal_get_destination(), - ); - - $variables['button']['path'] = 'culturefeed/calendar/add/' . $variables['button']['item_id'] . '/nojs'; - if ($variables['button']['location'] == 'content') { - $variables['button']['text'] = t('Going'); - } - elseif ($variables['button']['location'] == 'aside') { - $variables['button']['text'] = t('Going'); - } - - } - elseif ($variables['button']['action'] == 'like'){ - - $variables['classes_array'][] = 'btn-like-calendar'; - - $variables['button']['options'] = array( - 'query' => drupal_get_destination(), - ); - - $variables['button']['path'] = 'culturefeed/calendar/like/' . $variables['button']['item_id'] . '/nojs'; - if ($variables['button']['location'] == 'content') { - $variables['button']['text'] = t('Interested'); - } - elseif ($variables['button']['location'] == 'aside') { - $variables['button']['text'] = t('Interested'); - } - - } - - $variables['event_id'] = $variables['button']['item_id']; - $variables['classes'] = implode(' ', $variables['classes_array']); - -} - -/** - * Theme the profile box item for calendar. - */ -function theme_culturefeed_calendar_profile_box_item($variables) { - - if (culturefeed_is_culturefeed_user()) { - return l(t('Go to your calendar'), 'culturefeed/calendar'); - } - else { - return l(t('unsaved events: 0'), 'culturefeed/calendar', array('html' => TRUE)); - } - -} - -/** - * Preprocess activities 'going'. - */ -function culturefeed_calendar_preprocess_culturefeed_calendar_activities_going(&$variables) { - - // Get activities and sort them by date to add them to the calendar in the right order. - $activities = $variables['activities']; - usort($activities, "culturefeed_calendar_sort_by_date"); - - $months = $variables['month_names']; - - $variables['months'] = array_fill_keys(array_map(function($element){return $element['full_month'];}, $months), array()); - - foreach ($activities as $activity) { - if (culturefeed_calendar_activity_is_finished($activity)) { - continue; - } - - if ($selected_date = culturefeed_calendar_get_selected_date($activity)) { - $month = format_date($selected_date, 'custom', 'F'); - $variables['months'][$month][] = $activity; - } - } -} - -/** - * Preprocess activity mini summary. - */ -function culturefeed_calendar_preprocess_culturefeed_calendar_activity_mini(&$variables) { - - $activity = $variables['activity']; - $node_id = $activity->nodeId; - - $activity_id = $activity->id; - $item = culturefeed_search_item_load($node_id, 'event'); - $variables['item'] = $item; - - module_load_include('inc', 'culturefeed_agenda', 'theme/theme'); - culturefeed_agenda_preprocess_culturefeed_event_summary($variables); - - // Plan link. - $variables['edit_link']['url'] = url('culturefeed/calendar/edit/'. $activity_id . '/nojs'); - $variables['edit_link']['text'] = t('Schedule'); - // Remove link. - $variables['delete_link']['url'] = url('culturefeed/calendar/delete/'. $activity_id . '/nojs'); - $variables['delete_link']['text'] = t('Remove'); - -} - -/** - * Preprocess activity summary. - * - * @param type $variables - */ -function culturefeed_calendar_preprocess_culturefeed_calendar_activity_summary(&$variables) { - - $activity = $variables['activity']; - $item = culturefeed_search_item_load($activity->nodeId, 'event'); - $variables['item'] = $item; - - module_load_include('inc', 'culturefeed_agenda', 'theme/theme'); - $function = 'culturefeed_agenda_preprocess_culturefeed_event_summary'; - if (function_exists($function)) { - $function($variables); - } - - // Activity details. - if ($selected_date = culturefeed_calendar_get_selected_date($activity)) { - if (format_date($selected_date, 'custom', 'H:i') == '00:00') { - $variables['date'] = format_date($selected_date, 'custom', 'l j F Y'); - } - else { - $variables['date'] = format_date($selected_date, 'custom', 'l j F Y H:i'); - } - } - - $activity_id = $activity->id; - - // Edit link. - $variables['edit_link']['url'] = url('culturefeed/calendar/edit/'. $activity_id . '/nojs'); - $variables['edit_link']['text'] = t('Reschedule'); - $variables['edit_link']['show'] = culturefeed_calendar_event_has_multiple_dates($variables['calendar']); - // Remove link. - $variables['delete_link']['url'] = url('culturefeed/calendar/delete/'. $activity_id . '/nojs'); - $variables['delete_link']['text'] = t('Remove'); - -} - -/** - * Preprocess for add button tootlip. - * - * @param type $variables - */ -function culturefeed_calendar_preprocess_culturefeed_calendar_button_hover(&$variables) { - - $variables['url'] = 'culturefeed/oauth/connect'; - $variables['options'] = array( - 'query' => array( - 'destination' => 'culturefeed/calendar', - ), - ); -} - -/** - * Preprocess the share calendar page. - * - * @param type $variables - */ -function culturefeed_calendar_preprocess_culturefeed_calendar_share_page(&$variables) { - - try { - $cf_user = DrupalCultureFeed::getLoggedInUser(); - } - catch (Exception $e) { - drupal_set_message(t('There was an error while searching the user'), 'error'); - } - - $variables['back_to_calendar_path'] = 'culturefeed/calendar'; - $variables['shared'] = FALSE; - // Calendar is public. - if ($cf_user && $cf_user->privacyConfig->calendarId == CultureFeed_UserPrivacyConfig::PRIVACY_PUBLIC) { - - $variables['shared'] = TRUE; - $variables['calendar_share_path'] = 'culturefeed/calendar/' . $cf_user->id; - $variables['calendar_share_url'] = url($variables['calendar_share_path'], array('absolute' => TRUE)); - - culturefeed_search_ui_add_facebook_share(); - - $variables['facebook']['url'] = 'https://www.facebook.com/sharer/sharer.php'; - $variables['facebook']['attr'] = array( - 'query' => array('u' => $variables['calendar_share_url']), - 'attributes' => array('class' => 'facebook-share'), - ); - - $variables['facebook_url'] = 'https://www.facebook.com/sharer/sharer.php?u=' . urlencode($variables['calendar_share_url']); - $variables['messenger_url'] = 'fb-messenger://share/?link=' . urlencode($variables['calendar_share_url']); - $variables['twitter_url'] = 'https://twitter.com/intent/tweet?text=' . urlencode($variables['calendar_share_url']); - - if (module_exists('forward')) { - $variables['mail_url'] = url('forward', array('query' => array('path' => $variables['calendar_share_path']))); - } - - } -} - - -/** - * Helper function to create a meta description tag for calendarpages - * @param type $variables - */ -function culturefeed_calendar_preprocess_culturefeed_calendar_metatags(&$variables) { - - $title_parts = array(); - $title_parts[] = t('Calendar'); - $title_parts[] = variable_get('site_name', ''); - $description = ""; - $og_tags = array(); - - // Add meta title tag. - drupal_set_title(implode(' | ', $title_parts), PASS_THROUGH); - - // Add meta description tag. - drupal_add_html_head(array( - '#tag' => 'meta', - '#attributes' => array( - 'name' => 'description', - 'content' => $description, - ), - ), 'meta_description'); - - // Add open graph meta tags. - $fb_app_id = variable_get('culturefeed_search_ui_fb_app_id', ''); - if (!empty($fb_app_id)) { - $og_tags['fb:app_id'] = $fb_app_id; - } - - $og_tags['og:site_name'] = variable_get('site_name', ''); - - if($variables['shared']) { - $og_tags['og:title'] = t('Calendar of ') . $variables['user_name']; - $og_tags['og:url'] = $variables['calendar_share_url']; - $og_tags['og:description'] = t('Discover the calendar of ') . $variables['user_name'] ; - } - else { - $og_tags['og:title'] = t('Make your own calendar'); - $og_tags['og:url'] = url('culturefeed/calendar', array('absolute' => TRUE)); - $og_tags['og:description'] = t('Put activities from ') . variable_get('site_name', '') . t(' in your personal calendar.'); - } - - foreach ($og_tags as $property => $content) { - drupal_add_html_head(array( - '#tag' => 'meta', - '#attributes' => array( - 'property' => $property, - 'content' => $content, - ), - ), $property); - } - - -} diff --git a/culturefeed_calendar/translations/culturefeed_calendar.nl.po b/culturefeed_calendar/translations/culturefeed_calendar.nl.po deleted file mode 100644 index 857f59cd..00000000 --- a/culturefeed_calendar/translations/culturefeed_calendar.nl.po +++ /dev/null @@ -1,388 +0,0 @@ -# $Id$ -# -# Dutch translation of Drupal (general) -# Copyright YEAR NAME and
.
- $value = _filter_autop($value);
-
- // Put the altered value back in the form state array.
- drupal_array_set_nested_value($form_state['values'], $element['#parents'], $value);
- }
-}
diff --git a/culturefeed_entry_ui/includes/culturefeed_entry_ui.admin.inc b/culturefeed_entry_ui/includes/culturefeed_entry_ui.admin.inc
deleted file mode 100644
index dd1d3165..00000000
--- a/culturefeed_entry_ui/includes/culturefeed_entry_ui.admin.inc
+++ /dev/null
@@ -1,103 +0,0 @@
-enabled !== '1') {
- continue;
- }
- $language_options[$language->language] = $language->name;
- }
-
- $cdb_version = variable_get('culturefeed_cdb_version', CULTUREFEED_CDB_DEFAULT_VERSION);
-
- $form['culturefeed_entry_ui_preferred_language'] = array(
- '#title' => t('Preferred language'),
- '#type' => 'select',
- '#empty_option' => t('Use the preferred language of the UiTID user, with the Drupal UI language as fallback'),
- '#options' => $language_options,
- '#default_value' => variable_get('culturefeed_entry_ui_preferred_language', ''),
- );
-
- if (version_compare($cdb_version, '3.3', '>=')) {
-
- $form['culturefeed_entry_ui_custom_tags'] = array(
- '#default_value' => variable_get('culturefeed_entry_ui_custom_tags'),
- '#description' => t('Custom tags specific for this site.'),
- '#title' => t('Custom options on the /tags page'),
- '#type' => 'culturefeed_tags_element',
- '#visible_default' => FALSE,
- );
-
- }
- else {
-
- $form['culturefeed_entry_ui_custom_tags'] = array(
- '#default_value' => variable_get('culturefeed_entry_ui_custom_tags'),
- '#description' => t('Custom tags specific for this site. Use a new line for each tag.'),
- '#title' => t('Custom options on the /tags page'),
- '#type' => 'textarea',
- );
-
- }
-
- if (version_compare($cdb_version, '3.3', '>=')) {
-
- $form['culturefeed_entry_ui_custom_entry_api_tags'] = array(
- '#default_value' => variable_get('culturefeed_entry_ui_custom_entry_api_tags'),
- '#description' => t('Tags pushed under the hood to Entry API.'),
- '#title' => t('Custom tags to push to entry API'),
- '#type' => 'culturefeed_tags_element',
- '#visible_default' => FALSE,
- );
-
- }
- else {
-
- $form['culturefeed_entry_ui_custom_entry_api_tags'] = array(
- '#default_value' => variable_get('culturefeed_entry_ui_custom_entry_api_tags'),
- '#description' => t('Tags pushed under the hood to Entry API. Use a new line for each tag.'),
- '#title' => t('Custom tags to push to entry API'),
- '#type' => 'textarea',
- );
-
- }
-
- if (version_compare($cdb_version, '3.3', '>=')) {
-
- $form['culturefeed_entry_ui_custom_collaboration_tags'] = array(
- '#default_value' => variable_get('culturefeed_entry_ui_custom_collaboration_tags'),
- '#description' => t('Tags used for the collaboration tab.'),
- '#title' => t('Custom tags to use as collaboration data'),
- '#type' => 'culturefeed_tags_element',
- '#visible_default' => FALSE,
- );
-
- }
-
- $form['culturefeed_entry_ui_default_country'] = array(
- '#type' => 'select',
- '#options' => country_get_list(),
- '#title' => t('Default country'),
- '#default_value' => variable_get('culturefeed_entry_ui_default_country') ? variable_get('culturefeed_entry_ui_default_country') : 'BE',
- '#description' => t('Select the default country for the entry form.'),
- );
-
- $form['culturefeed_entry_ui_sync_max_duration'] = array(
- '#type' => 'textfield',
- '#title' => t('Maximum duration for syncing an event with the search api'),
- '#default_value' => variable_get('culturefeed_entry_ui_sync_max_duration', CULTUREFEED_ENTRY_UI_SYNC_MAX_DURATION_DEFAULT),
- '#description' => t('After saving an event a batch wil run until the event is synced with the search api. When the maximum duration is reached, the batch will terminate with a warning message if the event was not synced.'),
- );
-
- return system_settings_form($form);
-
-}
diff --git a/culturefeed_entry_ui/includes/culturefeed_entry_ui.pages.inc b/culturefeed_entry_ui/includes/culturefeed_entry_ui.pages.inc
deleted file mode 100644
index f5402975..00000000
--- a/culturefeed_entry_ui/includes/culturefeed_entry_ui.pages.inc
+++ /dev/null
@@ -1,2442 +0,0 @@
-getEntity();
- /** @var CultureFeed_Cdb_Item_Event $event */
- $form['#event'] = $event;
- $event_details = $event->getDetails()->current();
-
- // Default categories.
- if ($event && ($categories = $event->getCategories())) {
-
- /** @var CultureFeed_Cdb_Data_Category $category */
- foreach ($categories as $category) {
- $category_defaults[] = $category->getId();
- if ($category->getType() == 'eventtype') {
- $eventtype_default = $category->getId();
- }
-
- if ($category->getType() == 'theme') {
- $themetype_default = $category->getId();
- }
-
- }
- }
-
- // Default organiser.
- if ($organiser = $event->getOrganiser()) {
- $default_organiser_label = $organiser->getLabel();
- $default_organiser_id = $organiser->getCdbId();
- }
-
- // Default calendar type, start / end date, weekscheme data.
- if ($calendar = $event->getCalendar()) {
-
- $calendar_class = get_class($calendar);
- $calendar->rewind();
- $today = strtotime(date('Y-m-d') . ' 00:00:00');
-
- if ($calendar_class == 'CultureFeed_Cdb_Data_Calendar_PeriodList') {
- $period_start = $calendar->current()->getDateFrom();
- $period_end = $calendar->current()->getDateTo();
- $weekscheme = $calendar->current()->getWeekScheme();
- }
- elseif ($calendar_class == 'CultureFeed_Cdb_Data_Calendar_Permanent') {
- $permanent = TRUE;
- $weekscheme = $calendar->getWeekScheme();
- }
- elseif ($calendar_class == 'CultureFeed_Cdb_Data_Calendar_TimestampList') {
-
- $timestamps_count = iterator_count($calendar);
- $calendar->rewind();
- $current_timestamp = 0;
- for ($i = 0; $i < $timestamps_count; $i++) {
-
- $timestamp = $calendar->current();
- $date = $timestamp->getDate();
-
- if (strtotime($date) >= $today) {
- $timestamps[$current_timestamp] = array(
- 'date' => $date,
- 'start_time' => $timestamp->getStartTime(),
- 'end_time' => $timestamp->getEndTime(),
- );
- $current_timestamp++;
- }
-
- $calendar->next();
-
- }
- }
- }
-
- // Set the total opening times needed. This need to be equal for every day.
- if (!isset($form_state['#opening_times_needed'])) {
- $opening_times_needed = 1;
- foreach (CultureFeed_Cdb_Data_Calendar_SchemeDay::$allowedDays as $day) {
- /** @var CultureFeed_Cdb_Data_Calendar_Weekscheme $weekscheme */
- if ($weekscheme && $data = $weekscheme->getDay($day)) {
- $opening_times = $data->getOpeningTimes();
- if (count($opening_times) > $opening_times_needed) {
- $opening_times_needed = count($opening_times);
- }
- }
- }
- $form_state['#opening_times_needed'] = $opening_times_needed;
- }
-
- // Default short description
- if ($event_details->getShortDescription()) {
- $default_short_description = $event_details->getShortDescription();
- }
-
- // Default long description
- if ($event_details->getLongDescription()) {
- $default_long_description = $event_details->getLongDescription();
- $source_text = '/
(.*)<\/p>/'; - $default_long_description = preg_replace($source_text, '', $default_long_description); - $allowed_tags = array('a', 'em', 'strong', 'ul', 'ol', 'li', 'hr'); - $default_long_description = filter_xss($default_long_description, $allowed_tags); - //$default_long_description = substr($default_long_description, 0, -169); - $form_state['#ld_needed'] = TRUE; - } - - // Default mails, phones, urls - if ($info = $event->getContactInfo()) { - foreach ($info->getUrls() as $default_link) { - $default_links[$default_link->getUrl()] = $default_link->getUrl(); - $default_links_reservation[$default_link->getUrl()] = $default_link->isForReservations(); - } - } - - // Add links form media - $media_links = - $event_details->getMedia() - ->byMediaTypes( - array( - CultureFeed_Cdb_Data_File::MEDIA_TYPE_WEBRESOURCE, - CultureFeed_Cdb_Data_File::MEDIA_TYPE_RESERVATIONS, - CultureFeed_Cdb_Data_File::MEDIA_TYPE_FACEBOOK, - CultureFeed_Cdb_Data_File::MEDIA_TYPE_YOUTUBE, - CultureFeed_Cdb_Data_File::MEDIA_TYPE_GOOGLEPLUS, - CultureFeed_Cdb_Data_File::MEDIA_TYPE_TWITTER, - CultureFeed_Cdb_Data_File::MEDIA_TYPE_WEBSITE, - ) - ); - - foreach ($media_links as $media_link) { - $default_links[$media_link->getHLink()] = $media_link->getHLink(); - if ($media_link->getMediaType() == 'reservations') { - $default_links_reservation[$media_link->getHLink()] = TRUE; - } - else { - $default_links_reservation[$media_link->getHLink()] = FALSE; - } - } - - // Default image - $photo_media = $event_details->getMedia() - ->byMediaTypes(array( - CultureFeed_Cdb_Data_File::MEDIA_TYPE_IMAGEWEB, - CultureFeed_Cdb_Data_File::MEDIA_TYPE_PHOTO, - ) - ); - - if (count($photo_media) > 0) { - $main_image = array(); - foreach ($photo_media as $picture) { - - $pictures[] = $picture; - if ($picture->isMain()) { - $main_image = $picture; - } - } - // If no main use first image - if (empty($main_image)) { - $main_image = $pictures[0]; - } - - try { - $pattern = '#^(https?:)?//#'; - $image_link = preg_replace($pattern, '', $main_image->getHLink()); - $default_image = system_retrieve_file('http://' . $image_link, 'public://uploads/', TRUE); - - if ($default_image) { - file_usage_add($default_image, 'culturefeed_entry_ui', 'event', $default_image->fid); - $default_image_hlink = $main_image->getHLink(); - $default_copyright = $main_image->getCopyright(); - } - } catch (Exception $e) { - watchdog_exception('culturefeed_entry_ui', $e); - } - - } - - // Default price - if ($info = $event_details->getPrice()) { - $default_price = str_replace('.',',', $info->getValue()); - $default_free_price = 0; - $default_price_description = $info->getDescription(); - if ($default_price == '0.00') { - $default_price = '0'; - $default_free_price = 1; - } - if ($default_price_description != '') { - $form_state['#price_needed'] = TRUE; - } - } - - // Default age - $age = $event->getAgeFrom(); - if ($age) { - - if ($age < 12) { - $age_category = '1-12'; - } - elseif ($age < 18) { - $age_category = '12-18'; - } - else { - $age_category = '18+'; - } - - } - - // Default contact info - if ($info = $event->getContactInfo()) { - $phone_info = $info->getPhones(); - $mail_info = $info->getMails(); - foreach ($phone_info as $phone_contact) { - $phone_contacts[] = array('phone', $phone_contact->getNumber()); - } - - foreach ($mail_info as $mail_contact) { - $mail_contacts[] = array('E-mail', $mail_contact->getMailAddress()); - } - $default_contacts = array_merge($phone_contacts, $mail_contacts); - } - - // Default performers - if ($info = $event_details->getPerformers()) { - foreach ($info as $performer) { - $performers_info[] = array( - $performer->getRole(), - $performer->getLabel() - ); - } - } - - if ($info = $event->getLanguages()) { - foreach ($info as $language) { - $languages_info[] = array( - $language->getType(), - $language->getLanguage(), - ); - } - } - - // Default target group - if ($info = $event->isPrivate()) { - $is_private = $event->isPrivate(); - } - - // Default languages - if ($fr_info = $event->getDetails()->getDetailByLanguage('fr')) { - $fr_title = $fr_info->getTitle(); - $fr_short_description = $fr_info->getShortDescription(); - $fr_long_description = $fr_info->getLongDescription(); - } - - if ($en_info = $event->getDetails()->getDetailByLanguage('en')) { - $en_title = $en_info->getTitle(); - $en_short_description = $en_info->getShortDescription(); - $en_long_description = $en_info->getLongDescription(); - } - - if ($de_info = $event->getDetails()->getDetailByLanguage('de')) { - $de_title = $de_info->getTitle(); - $de_short_description = $de_info->getShortDescription(); - $de_long_description = $de_info->getLongDescription(); - } - - // Default publication - /*if ($info = $event->getAvailableFrom()) { - $publication_date = $event->getAvailableFrom(); - } - */ - } - - // Build the form. - - // Basic. - $form['basic'] = array( - '#type' => 'fieldset', - ); - - $form['basic']['title'] = array( - '#type' => 'textfield', - '#title' => t('Event title'), - '#default_value' => ($event) ? $event->getDetails() - ->getDetailByLanguage(culturefeed_search_get_preferred_language()) - ->getTitle() : NULL, - '#required' => TRUE, - ); - - // Eventtypes - $form['basic']['what'] = array( - '#type' => 'container', - '#prefix' => '
Sets a textarea to limit the number of characters that may be entered.
-Expects HTML like:
-<textarea> -' : '' ?> -Provide inline configuration like:
-<textarea data-maxlength="name: 'value'"></textarea>- @module MaxLength - @augments JQPlugin - @example $(selector).maxlength() */ - $.JQPlugin.createPlugin({ - - /** The name of the plugin. */ - name: pluginName, - - /** Maxlength full callback. - Triggered when the text area is full or overflowing. - @callback fullCallback - @param overflowing {boolean} True if overflowing, false if not. - @example onFull: function(overflowing) { - $(this).addClass(overflowing ? 'overflow' : 'full'); -} */ - - /** Default settings for the plugin. - @property [max=200] {number} Maximum length. - @property [truncate=true] {boolean} True to disallow further input, false to highlight only. - @property [showFeedback=true] {boolean} True to always show user feedback, 'active' for hover/focus only. - @property [feedbackTarget=null] {string|Element|jQuery|function} jQuery selector, element, - or jQuery object, or function for element to fill with feedback. - @property [onFull=null] {fullCallback} Callback when full or overflowing. */ - defaultOptions: { - max: 200, - truncate: true, - showFeedback: true, - feedbackTarget: null, - onFull: null - }, - - /** Localisations for the plugin. - Entries are objects indexed by the language code ('' being the default US/English). - Each object has the following attributes. - @property [feedbackText='{r} characters remaining ({m} maximum)'] {string} - Display text for feedback message, use {r} for remaining characters, - {c} for characters entered, {m} for maximum. - @property [overflowText='{o} characters too many ({m} maximum)'] {string} - Display text when past maximum, use substitutions above and {o} for characters past maximum. */ - regionalOptions: { // Available regional settings, indexed by language/country code - '': { // Default regional settings - English/US - feedbackText: '{r} characters remaining ({m} maximum)', - overflowText: '{o} characters too many ({m} maximum)' - } - }, - - /** Names of getter methods - those that can't be chained. */ - _getters: ['curLength'], - - _feedbackClass: pluginName + '-feedback', //Class name for the feedback section - _fullClass: pluginName + '-full', // Class name for indicating the textarea is full - _overflowClass: pluginName + '-overflow', // Class name for indicating the textarea is overflowing - _disabledClass: pluginName + '-disabled', // Class name for indicating the textarea is disabled - - _instSettings: function(elem, options) { - return {feedbackTarget: $([])}; - }, - - _postAttach: function(elem, inst) { - elem.on('keypress.' + inst.name, function(event) { - if (!inst.options.truncate) { - return true; - } - var ch = String.fromCharCode( - event.charCode == undefined ? event.keyCode : event.charCode); - return (event.ctrlKey || event.metaKey || ch == '\u0000' || - $(this).val().length < inst.options.max); - }). - on('keyup.' + inst.name, function() { $.maxlength._checkLength(elem); }); - }, - - _optionsChanged: function(elem, inst, options) { - $.extend(inst.options, options); - if (inst.feedbackTarget.length > 0) { // Remove old feedback element - if (inst.hadFeedbackTarget) { - inst.feedbackTarget.empty().val(''). - removeClass(this._feedbackClass + ' ' + this._fullClass + ' ' + this._overflowClass); - } - else { - inst.feedbackTarget.remove(); - } - inst.feedbackTarget = $([]); - } - if (inst.options.showFeedback) { // Add new feedback element - inst.hadFeedbackTarget = !!inst.options.feedbackTarget; - if ($.isFunction(inst.options.feedbackTarget)) { - inst.feedbackTarget = inst.options.feedbackTarget.apply(elem[0], []); - } - else if (inst.options.feedbackTarget) { - inst.feedbackTarget = $(inst.options.feedbackTarget); - } - else { - inst.feedbackTarget = $('').insertAfter(elem); - } - inst.feedbackTarget.addClass(this._feedbackClass); - } - elem.off('mouseover.' + inst.name + ' focus.' + inst.name + - 'mouseout.' + inst.name + ' blur.' + inst.name); - if (inst.options.showFeedback == 'active') { // Additional event handlers - elem.on('mouseover.' + inst.name, function() { - inst.feedbackTarget.css('visibility', 'visible'); - }).on('mouseout.' + inst.name, function() { - if (!inst.focussed) { - inst.feedbackTarget.css('visibility', 'hidden'); - } - }).on('focus.' + inst.name, function() { - inst.focussed = true; - inst.feedbackTarget.css('visibility', 'visible'); - }).on('blur.' + inst.name, function() { - inst.focussed = false; - inst.feedbackTarget.css('visibility', 'hidden'); - }); - inst.feedbackTarget.css('visibility', 'hidden'); - } - this._checkLength(elem); - }, - - /** Retrieve the counts of characters used and remaining. - @param elem {jQuery} The control to check. - @return {object} The current counts with attributes used and remaining. - @example var lengths = $(selector).maxlength('curLength'); */ - curLength: function(elem) { - var inst = this._getInst(elem); - var value = elem.val(); - var len = value.replace(/\r\n/g, '~~').replace(/\n/g, '~~').length; - return {used: len, remaining: inst.options.max - len}; - }, - - /** Check the length of the text and notify accordingly. - @private - @param elem {jQuery} The control to check. */ - _checkLength: function(elem) { - var inst = this._getInst(elem); - var value = elem.val(); - var len = value.replace(/\r\n/g, '~~').replace(/\n/g, '~~').length; - elem.toggleClass(this._fullClass, len >= inst.options.max). - toggleClass(this._overflowClass, len > inst.options.max); - if (len > inst.options.max && inst.options.truncate) { // Truncation - var lines = elem.val().split(/\r\n|\n/); - value = ''; - var i = 0; - while (value.length < inst.options.max && i < lines.length) { - value += lines[i].substring(0, inst.options.max - value.length) + '\r\n'; - i++; - } - elem.val(value.substring(0, inst.options.max)); - elem[0].scrollTop = elem[0].scrollHeight; // Scroll to bottom - len = inst.options.max; - } - inst.feedbackTarget.toggleClass(this._fullClass, len >= inst.options.max). - toggleClass(this._overflowClass, len > inst.options.max); - var feedback = (len > inst.options.max ? // Feedback - inst.options.overflowText : inst.options.feedbackText). - replace(/\{c\}/, len).replace(/\{m\}/, inst.options.max). - replace(/\{r\}/, inst.options.max - len). - replace(/\{o\}/, len - inst.options.max); - try { - inst.feedbackTarget.text(feedback); - } - catch(e) { - // Ignore - } - try { - inst.feedbackTarget.val(feedback); - } - catch(e) { - // Ignore - } - if (len >= inst.options.max && $.isFunction(inst.options.onFull)) { - inst.options.onFull.apply(elem, [len > inst.options.max]); - } - }, - - /** Enable the control. - @param elem {Element} The control to affect. - @example $(selector).maxlength('enable'); */ - enable: function(elem) { - elem = $(elem); - if (!elem.hasClass(this._getMarker())) { - return; - } - var inst = this._getInst(elem); - elem.prop('disabled', false).removeClass(inst.name + '-disabled'); - inst.feedbackTarget.removeClass(inst.name + '-disabled'); - }, - - /** Disable the control. - @param elem {Element} The control to affect. - @example $(selector).maxlength('disable'); */ - disable: function(elem) { - elem = $(elem); - if (!elem.hasClass(this._getMarker())) { - return; - } - var inst = this._getInst(elem); - elem.prop('disabled', true).addClass(inst.name + '-disabled'); - inst.feedbackTarget.addClass(inst.name + '-disabled'); - }, - - _preDestroy: function(elem, inst) { - if (inst.feedbackTarget.length > 0) { - if (inst.hadFeedbackTarget) { - inst.feedbackTarget.empty().val('').css('visibility', 'visible'). - removeClass(this._feedbackClass + ' ' + this._fullClass + ' ' + this._overflowClass); - } - else { - inst.feedbackTarget.remove(); - } - } - elem.removeClass(this._fullClass + ' ' + this._overflowClass).off('.' + inst.name); - } - }); - -})(jQuery); diff --git a/culturefeed_entry_ui/js/maxlength/jquery.maxlength.min.js b/culturefeed_entry_ui/js/maxlength/jquery.maxlength.min.js deleted file mode 100644 index 584a87e6..00000000 --- a/culturefeed_entry_ui/js/maxlength/jquery.maxlength.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* http://keith-wood.name/maxlength.html - Textarea Max Length for jQuery v2.0.0. - Written by Keith Wood (kwood{at}iinet.com.au) May 2009. - Licensed under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. - Please attribute the author if you use it. */ -(function($){var h='maxlength';$.JQPlugin.createPlugin({name:h,defaultOptions:{max:200,truncate:true,showFeedback:true,feedbackTarget:null,onFull:null},regionalOptions:{'':{feedbackText:'{r} characters remaining ({m} maximum)',overflowText:'{o} characters too many ({m} maximum)'}},_getters:['curLength'],_feedbackClass:h+'-feedback',_fullClass:h+'-full',_overflowClass:h+'-overflow',_disabledClass:h+'-disabled',_instSettings:function(a,b){return{feedbackTarget:$([])}},_postAttach:function(c,d){c.on('keypress.'+d.name,function(a){if(!d.options.truncate){return true}var b=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return(a.ctrlKey||a.metaKey||b=='\u0000'||$(this).val().length0){if(b.hadFeedbackTarget){b.feedbackTarget.empty().val('').removeClass(this._feedbackClass+' '+this._fullClass+' '+this._overflowClass)}else{b.feedbackTarget.remove()}b.feedbackTarget=$([])}if(b.options.showFeedback){b.hadFeedbackTarget=!!b.options.feedbackTarget;if($.isFunction(b.options.feedbackTarget)){b.feedbackTarget=b.options.feedbackTarget.apply(a[0],[])}else if(b.options.feedbackTarget){b.feedbackTarget=$(b.options.feedbackTarget)}else{b.feedbackTarget=$('').insertAfter(a)}b.feedbackTarget.addClass(this._feedbackClass)}a.off('mouseover.'+b.name+' focus.'+b.name+'mouseout.'+b.name+' blur.'+b.name);if(b.options.showFeedback=='active'){a.on('mouseover.'+b.name,function(){b.feedbackTarget.css('visibility','visible')}).on('mouseout.'+b.name,function(){if(!b.focussed){b.feedbackTarget.css('visibility','hidden')}}).on('focus.'+b.name,function(){b.focussed=true;b.feedbackTarget.css('visibility','visible')}).on('blur.'+b.name,function(){b.focussed=false;b.feedbackTarget.css('visibility','hidden')});b.feedbackTarget.css('visibility','hidden')}this._checkLength(a)},curLength:function(a){var b=this._getInst(a);var c=a.val();var d=c.replace(/\r\n/g,'~~').replace(/\n/g,'~~').length;return{used:d,remaining:b.options.max-d}},_checkLength:function(a){var b=this._getInst(a);var c=a.val();var d=c.replace(/\r\n/g,'~~').replace(/\n/g,'~~').length;a.toggleClass(this._fullClass,d>=b.options.max).toggleClass(this._overflowClass,d>b.options.max);if(d>b.options.max&&b.options.truncate){var f=a.val().split(/\r\n|\n/);c='';var i=0;while(c.length =b.options.max).toggleClass(this._overflowClass,d>b.options.max);var g=(d>b.options.max?b.options.overflowText:b.options.feedbackText).replace(/\{c\}/,d).replace(/\{m\}/,b.options.max).replace(/\{r\}/,b.options.max-d).replace(/\{o\}/,d-b.options.max);try{b.feedbackTarget.text(g)}catch(e){}try{b.feedbackTarget.val(g)}catch(e){}if(d>=b.options.max&&$.isFunction(b.options.onFull)){b.options.onFull.apply(a,[d>b.options.max])}},enable:function(a){a=$(a);if(!a.hasClass(this._getMarker())){return}var b=this._getInst(a);a.prop('disabled',false).removeClass(b.name+'-disabled');b.feedbackTarget.removeClass(b.name+'-disabled')},disable:function(a){a=$(a);if(!a.hasClass(this._getMarker())){return}var b=this._getInst(a);a.prop('disabled',true).addClass(b.name+'-disabled');b.feedbackTarget.addClass(b.name+'-disabled')},_preDestroy:function(a,b){if(b.feedbackTarget.length>0){if(b.hadFeedbackTarget){b.feedbackTarget.empty().val('').css('visibility','visible').removeClass(this._feedbackClass+' '+this._fullClass+' '+this._overflowClass)}else{b.feedbackTarget.remove()}}a.removeClass(this._fullClass+' '+this._overflowClass).off('.'+b.name)}})})(jQuery); \ No newline at end of file diff --git a/culturefeed_entry_ui/js/maxlength/jquery.plugin.js b/culturefeed_entry_ui/js/maxlength/jquery.plugin.js deleted file mode 100644 index 71767a6b..00000000 --- a/culturefeed_entry_ui/js/maxlength/jquery.plugin.js +++ /dev/null @@ -1,344 +0,0 @@ -/* Simple JavaScript Inheritance - * By John Resig http://ejohn.org/ - * MIT Licensed. - */ -// Inspired by base2 and Prototype -(function(){ - var initializing = false; - - // The base JQClass implementation (does nothing) - window.JQClass = function(){}; - - // Collection of derived classes - JQClass.classes = {}; - - // Create a new JQClass that inherits from this class - JQClass.extend = function extender(prop) { - var base = this.prototype; - - // Instantiate a base class (but only create the instance, - // don't run the init constructor) - initializing = true; - var prototype = new this(); - initializing = false; - - // Copy the properties over onto the new prototype - for (var name in prop) { - // Check if we're overwriting an existing function - prototype[name] = typeof prop[name] == 'function' && - typeof base[name] == 'function' ? - (function(name, fn){ - return function() { - var __super = this._super; - - // Add a new ._super() method that is the same method - // but on the super-class - this._super = function(args) { - return base[name].apply(this, args || []); - }; - - var ret = fn.apply(this, arguments); - - // The method only need to be bound temporarily, so we - // remove it when we're done executing - this._super = __super; - - return ret; - }; - })(name, prop[name]) : - prop[name]; - } - - // The dummy class constructor - function JQClass() { - // All construction is actually done in the init method - if (!initializing && this._init) { - this._init.apply(this, arguments); - } - } - - // Populate our constructed prototype object - JQClass.prototype = prototype; - - // Enforce the constructor to be what we expect - JQClass.prototype.constructor = JQClass; - - // And make this class extendable - JQClass.extend = extender; - - return JQClass; - }; -})(); - -(function($) { // Ensure $, encapsulate - - /** Abstract base class for collection plugins v1.0.1. - Written by Keith Wood (kbwood{at}iinet.com.au) December 2013. - Licensed under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. - @module $.JQPlugin - @abstract */ - JQClass.classes.JQPlugin = JQClass.extend({ - - /** Name to identify this plugin. - @example name: 'tabs' */ - name: 'plugin', - - /** Default options for instances of this plugin (default: {}). - @example defaultOptions: { - selectedClass: 'selected', - triggers: 'click' - } */ - defaultOptions: {}, - - /** Options dependent on the locale. - Indexed by language and (optional) country code, with '' denoting the default language (English/US). - @example regionalOptions: { - '': { - greeting: 'Hi' - } - } */ - regionalOptions: {}, - - /** Names of getter methods - those that can't be chained (default: []). - @example _getters: ['activeTab'] */ - _getters: [], - - /** Retrieve a marker class for affected elements. - @private - @return {string} The marker class. */ - _getMarker: function() { - return 'is-' + this.name; - }, - - /** Initialise the plugin. - Create the jQuery bridge - plugin name xyz
- produces$.xyz
and$.fn.xyz
. */ - _init: function() { - // Apply default localisations - $.extend(this.defaultOptions, (this.regionalOptions && this.regionalOptions['']) || {}); - // Camel-case the name - var jqName = camelCase(this.name); - // Expose jQuery singleton manager - $[jqName] = this; - // Expose jQuery collection plugin - $.fn[jqName] = function(options) { - var otherArgs = Array.prototype.slice.call(arguments, 1); - if ($[jqName]._isNotChained(options, otherArgs)) { - return $[jqName][options].apply($[jqName], [this[0]].concat(otherArgs)); - } - return this.each(function() { - if (typeof options === 'string') { - if (options[0] === '_' || !$[jqName][options]) { - throw 'Unknown method: ' + options; - } - $[jqName][options].apply($[jqName], [this].concat(otherArgs)); - } - else { - $[jqName]._attach(this, options); - } - }); - }; - }, - - /** Set default values for all subsequent instances. - @param options {object} The new default options. - @example $.plugin.setDefauls({name: value}) */ - setDefaults: function(options) { - $.extend(this.defaultOptions, options || {}); - }, - - /** Determine whether a method is a getter and doesn't permit chaining. - @private - @param name {string} The method name. - @param otherArgs {any[]} Any other arguments for the method. - @return {boolean} True if this method is a getter, false otherwise. */ - _isNotChained: function(name, otherArgs) { - if (name === 'option' && (otherArgs.length === 0 || - (otherArgs.length === 1 && typeof otherArgs[0] === 'string'))) { - return true; - } - return $.inArray(name, this._getters) > -1; - }, - - /** Initialise an element. Called internally only. - Adds an instance object as data named for the plugin. - @param elem {Element} The element to enhance. - @param options {object} Overriding settings. */ - _attach: function(elem, options) { - elem = $(elem); - if (elem.hasClass(this._getMarker())) { - return; - } - elem.addClass(this._getMarker()); - options = $.extend({}, this.defaultOptions, this._getMetadata(elem), options || {}); - var inst = $.extend({name: this.name, elem: elem, options: options}, - this._instSettings(elem, options)); - elem.data(this.name, inst); // Save instance against element - this._postAttach(elem, inst); - this.option(elem, options); - }, - - /** Retrieve additional instance settings. - Override this in a sub-class to provide extra settings. - @param elem {jQuery} The current jQuery element. - @param options {object} The instance options. - @return {object} Any extra instance values. - @example _instSettings: function(elem, options) { - return {nav: elem.find(options.navSelector)}; - } */ - _instSettings: function(elem, options) { - return {}; - }, - - /** Plugin specific post initialisation. - Override this in a sub-class to perform extra activities. - @param elem {jQuery} The current jQuery element. - @param inst {object} The instance settings. - @example _postAttach: function(elem, inst) { - elem.on('click.' + this.name, function() { - ... - }); - } */ - _postAttach: function(elem, inst) { - }, - - /** Retrieve metadata configuration from the element. - Metadata is specified as an attribute: -data-<plugin name>="<setting name>: '<value>', ..."
. - Dates should be specified as strings in this format: 'new Date(y, m-1, d)'. - @private - @param elem {jQuery} The source element. - @return {object} The inline configuration or {}. */ - _getMetadata: function(elem) { - try { - var data = elem.data(this.name.toLowerCase()) || ''; - data = data.replace(/'/g, '"'); - data = data.replace(/([a-zA-Z0-9]+):/g, function(match, group, i) { - var count = data.substring(0, i).match(/"/g); // Handle embedded ':' - return (!count || count.length % 2 === 0 ? '"' + group + '":' : group + ':'); - }); - data = $.parseJSON('{' + data + '}'); - for (var name in data) { // Convert dates - var value = data[name]; - if (typeof value === 'string' && value.match(/^new Date\((.*)\)$/)) { - data[name] = eval(value); - } - } - return data; - } - catch (e) { - return {}; - } - }, - - /** Retrieve the instance data for element. - @param elem {Element} The source element. - @return {object} The instance data or {}. */ - _getInst: function(elem) { - return $(elem).data(this.name) || {}; - }, - - /** Retrieve or reconfigure the settings for a plugin. - @param elem {Element} The source element. - @param name {object|string} The collection of new option values or the name of a single option. - @param [value] {any} The value for a single named option. - @return {any|object} If retrieving a single value or all options. - @example $(selector).plugin('option', 'name', value) - $(selector).plugin('option', {name: value, ...}) - var value = $(selector).plugin('option', 'name') - var options = $(selector).plugin('option') */ - option: function(elem, name, value) { - elem = $(elem); - var inst = elem.data(this.name); - if (!name || (typeof name === 'string' && value == null)) { - var options = (inst || {}).options; - return (options && name ? options[name] : options); - } - if (!elem.hasClass(this._getMarker())) { - return; - } - var options = name || {}; - if (typeof name === 'string') { - options = {}; - options[name] = value; - } - this._optionsChanged(elem, inst, options); - $.extend(inst.options, options); - }, - - /** Plugin specific options processing. - Old value available ininst.options[name]
, new value inoptions[name]
. - Override this in a sub-class to perform extra activities. - @param elem {jQuery} The current jQuery element. - @param inst {object} The instance settings. - @param options {object} The new options. - @example _optionsChanged: function(elem, inst, options) { - if (options.name != inst.options.name) { - elem.removeClass(inst.options.name).addClass(options.name); - } - } */ - _optionsChanged: function(elem, inst, options) { - }, - - /** Remove all trace of the plugin. - Override_preDestroy
for plugin-specific processing. - @param elem {Element} The source element. - @example $(selector).plugin('destroy') */ - destroy: function(elem) { - elem = $(elem); - if (!elem.hasClass(this._getMarker())) { - return; - } - this._preDestroy(elem, this._getInst(elem)); - elem.removeData(this.name).removeClass(this._getMarker()); - }, - - /** Plugin specific pre destruction. - Override this in a sub-class to perform extra activities and undo everything that was - done in the_postAttach
or_optionsChanged
functions. - @param elem {jQuery} The current jQuery element. - @param inst {object} The instance settings. - @example _preDestroy: function(elem, inst) { - elem.off('.' + this.name); - } */ - _preDestroy: function(elem, inst) { - } - }); - - /** Convert names from hyphenated to camel-case. - @private - @param value {string} The original hyphenated name. - @return {string} The camel-case version. */ - function camelCase(name) { - return name.replace(/-([a-z])/g, function(match, group) { - return group.toUpperCase(); - }); - } - - /** Expose the plugin base. - @namespace "$.JQPlugin" */ - $.JQPlugin = { - - /** Create a new collection plugin. - @memberof "$.JQPlugin" - @param [superClass='JQPlugin'] {string} The name of the parent class to inherit from. - @param overrides {object} The property/function overrides for the new class. - @example $.JQPlugin.createPlugin({ - name: 'tabs', - defaultOptions: {selectedClass: 'selected'}, - _initSettings: function(elem, options) { return {...}; }, - _postAttach: function(elem, inst) { ... } - }); */ - createPlugin: function(superClass, overrides) { - if (typeof superClass === 'object') { - overrides = superClass; - superClass = 'JQPlugin'; - } - superClass = camelCase(superClass); - var className = camelCase(overrides.name); - JQClass.classes[className] = JQClass.classes[superClass].extend(overrides); - new JQClass.classes[className](); - } - }; - -})(jQuery); \ No newline at end of file diff --git a/culturefeed_entry_ui/js/maxlength/jquery.plugin.min.js b/culturefeed_entry_ui/js/maxlength/jquery.plugin.min.js deleted file mode 100644 index 2323e543..00000000 --- a/culturefeed_entry_ui/js/maxlength/jquery.plugin.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/** Abstract base class for collection plugins v1.0.1. - Written by Keith Wood (kbwood{at}iinet.com.au) December 2013. - Licensed under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. */ -(function(){var j=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function extender(f){var g=this.prototype;j=true;var h=new this();j=false;for(var i in f){h[i]=typeof f[i]=='function'&&typeof g[i]=='function'?(function(d,e){return function(){var b=this._super;this._super=function(a){return g[d].apply(this,a||[])};var c=e.apply(this,arguments);this._super=b;return c}})(i,f[i]):f[i]}function JQClass(){if(!j&&this._init){this._init.apply(this,arguments)}}JQClass.prototype=h;JQClass.prototype.constructor=JQClass;JQClass.extend=extender;return JQClass}})();(function($){JQClass.classes.JQPlugin=JQClass.extend({name:'plugin',defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return'is-'+this.name},_init:function(){$.extend(this.defaultOptions,(this.regionalOptions&&this.regionalOptions[''])||{});var c=camelCase(this.name);$[c]=this;$.fn[c]=function(a){var b=Array.prototype.slice.call(arguments,1);if($[c]._isNotChained(a,b)){return $[c][a].apply($[c],[this[0]].concat(b))}return this.each(function(){if(typeof a==='string'){if(a[0]==='_'||!$[c][a]){throw'Unknown method: '+a;}$[c][a].apply($[c],[this].concat(b))}else{$[c]._attach(this,a)}})}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_isNotChained:function(a,b){if(a==='option'&&(b.length===0||(b.length===1&&typeof b[0]==='string'))){return true}return $.inArray(a,this._getters)>-1},_attach:function(a,b){a=$(a);if(a.hasClass(this._getMarker())){return}a.addClass(this._getMarker());b=$.extend({},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c);this._postAttach(a,c);this.option(a,b)},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(d){try{var f=d.data(this.name.toLowerCase())||'';f=f.replace(/'/g,'"');f=f.replace(/([a-zA-Z0-9]+):/g,function(a,b,i){var c=f.substring(0,i).match(/"/g);return(!c||c.length%2===0?'"'+b+'":':b+':')});f=$.parseJSON('{'+f+'}');for(var g in f){var h=f[g];if(typeof h==='string'&&h.match(/^new Date\((.*)\)$/)){f[g]=eval(h)}}return f}catch(e){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name);if(!b||(typeof b==='string'&&c==null)){var e=(d||{}).options;return(e&&b?e[b]:e)}if(!a.hasClass(this._getMarker())){return}var e=b||{};if(typeof b==='string'){e={};e[b]=c}this._optionsChanged(a,d,e);$.extend(d.options,e)},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a);if(!a.hasClass(this._getMarker())){return}this._preDestroy(a,this._getInst(a));a.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(a,b){}});function camelCase(c){return c.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}$.JQPlugin={createPlugin:function(a,b){if(typeof a==='object'){b=a;a='JQPlugin'}a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b);new JQClass.classes[c]()}}})(jQuery); \ No newline at end of file diff --git a/culturefeed_entry_ui/js/maxlength/maxlengthBasic.html b/culturefeed_entry_ui/js/maxlength/maxlengthBasic.html deleted file mode 100644 index cef0ff94..00000000 --- a/culturefeed_entry_ui/js/maxlength/maxlengthBasic.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - -jQuery Max Length Basics - - - - - - - -jQuery Max Length Basics
-This page demonstrates the very basics of the - jQuery Max Length plugin. - It contains the minimum requirements for using the plugin and - can be used as the basis for your own experimentation.
-For more detail see the documentation reference page.
-Default max length: -
- - diff --git a/culturefeed_entry_ui/theme/culturefeed-entry-ui-event-form.tpl.php b/culturefeed_entry_ui/theme/culturefeed-entry-ui-event-form.tpl.php deleted file mode 100644 index 7e9aabc6..00000000 --- a/culturefeed_entry_ui/theme/culturefeed-entry-ui-event-form.tpl.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/culturefeed_entry_ui/theme/theme.inc b/culturefeed_entry_ui/theme/theme.inc deleted file mode 100644 index b09f0056..00000000 --- a/culturefeed_entry_ui/theme/theme.inc +++ /dev/null @@ -1,58 +0,0 @@ - array( - array( - 'data' => drupal_render($form[$row]['value']), - 'class' => 'edit-tag-objects-form-cell', - ), - array( - 'data' => drupal_render($form[$row]['visible']), - 'class' => 'edit-tag-objects-form-cell', - ), - array( - 'data' => drupal_render($form[$row]['remove']), - 'class' => 'edit-tag-objects-form-cell', - ), - ), - 'no_striping' => TRUE, - ); - } - - $output = theme('table', array('attributes' => $attributes, 'header' => $header, 'rows' => $rows)); - $output .= drupal_render_children($form); - return $output; - -} - - -/** - * Preprocess function for the culturefeed_entry_ui_event_form. - */ -function template_preprocess_culturefeed_entry_ui_event_form(&$variables) { - // Add the theme form elements as suffixes to the what options. - $variables['form']['basic']['what']['0.100.0.0.0']['0.50.4.0.0']['#suffix'] = render($variables['form']['basic']['what']['themes']['concerts']); - $variables['form']['basic']['what']['0.100.0.0.0']['0.55.0.0.0']['#suffix'] = render($variables['form']['basic']['what']['themes']['theatre']); - $variables['form']['basic']['what']['0.100.0.0.0']['0.54.0.0.0']['#suffix'] = render($variables['form']['basic']['what']['themes']['dance']); - $variables['form']['basic']['what']['0.100.0.0.0']['0.50.6.0.0']['#suffix'] = render($variables['form']['basic']['what']['themes']['film']); - $variables['form']['basic']['what']['0.100.0.0.0']['0.19.0.0.0']['#suffix'] = render($variables['form']['basic']['what']['themes']['sport']); - // Don't show any markup anymore for the themes fieldset. - $variables['form']['basic']['what']['themes']['#printed'] = TRUE; -} diff --git a/culturefeed_entry_ui/translations/culturefeed_entry_ui.de.po b/culturefeed_entry_ui/translations/culturefeed_entry_ui.de.po deleted file mode 100644 index 766c298f..00000000 --- a/culturefeed_entry_ui/translations/culturefeed_entry_ui.de.po +++ /dev/null @@ -1,676 +0,0 @@ -msgid "" -msgstr "" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: POEditor.com\n" -"Project-Id-Version: CFK - translations\n" -"Language: de\n" - -#: -msgid "Manage object tags" -msgstr "Objekt-Tags verwalten" - -#: -msgid "Manage all the tags from the objects on culturefeed (events, actors, ...)." -msgstr "Alle Tags der Objekte auf CultureFeed verwalten (Events, Akteure usw.)" - -#: -msgid "Manage custom tags" -msgstr "Benutzerdefinierte Tags verwalten" - -#: -msgid "Manage custom tags from the objects on culturefeed (events, actors, ...) managed on the admin section." -msgstr "Alle benutzerdefinierten Tags der Objekte auf CultureFeed verwalten (Events, Akteure usw.), die im Admin-Bereich verwaltet werden" - -#: -msgid "Create events" -msgstr "Events anlegen" - -#: -msgid "Create new events through the entity api." -msgstr "Neue Events über die Entity API anlegen." - -#: -msgid "Edit events" -msgstr "Events bearbeiten" - -#: -msgid "Edit events through the entity api." -msgstr "Events über die Entity API bearbeiten." - -#: -msgid "Delete events" -msgstr "Events löschen" - -#: -msgid "Delete events through the entity api." -msgstr "Events über die Entity API löschen." - -#: -msgid "Tags" -msgstr "Tags" - -#: -msgid "Edit" -msgstr "Bearbeiten" - -#: -msgid "View" -msgstr "Ansehen" - -#: -msgid "ZIP Code" -msgstr "Postleitzahl" - -#: -msgid "New event" -msgstr "Neue Aktivität" - -#: -msgid "Edit event" -msgstr "Aktivität bearbeiten" - -#: -msgid "Delete event" -msgstr "Aktivität löschen" - -#: -msgid "CultureFeed Entry UI" -msgstr "CultureFeed Eingabe-UI" - -#: -msgid "All configurations to entry api for this site" -msgstr "Alle Konfigurationen für Eingabe-API auf dieser Webseite" - -#: -msgid "Multilingual forms to post, update and delete events to UiTDatabank Entry API" -msgstr "Mehrsprachige Formulare, um Events an die UiTDatenbank-Eingabe-API zu senden, sie zu aktualisieren und zu löschen" - -#: -msgid "CultureFeed" -msgstr "CultureFeed" - -#: -msgid "Preferred language" -msgstr "Sprachpräferenz" - -#: -msgid "Use the preferred language of the UiTID user, with the Drupal UI language as fallback" -msgstr "Die bevorzugte Sprache des UiTID-Users verwenden, wobei notfalls auf die Drupal-UI-Sprache zurückgegriffen wird" - -#: -msgid "Custom tags" -msgstr "Benutzerdefinierte Tags" - -#: -msgid "Custom tags specific for this site. Use a new line for each tag." -msgstr "Benutzerdefinierte Tags speziell für diese Webseite. Neue Zeile für jedes Tag verwenden." - -#: -msgid "mon" -msgstr "Mo" - -#: -msgid "tue" -msgstr "Di" - -#: -msgid "wed" -msgstr "Mi" - -#: -msgid "thu" -msgstr "Do" - -#: -msgid "fri" -msgstr "Fr" - -#: -msgid "sat" -msgstr "Sa" - -#: -msgid "sun" -msgstr "So" - -#: -msgid "Basic info" -msgstr "Grundlegende Infos" - -#: -msgid "Event title" -msgstr "Titel" - -#: -msgid "Concerts" -msgstr "Konzerte" - -#: -msgid "Dance" -msgstr "Tanz" - -#: -msgid "Film" -msgstr "Film" - -#: -msgid "Theatre" -msgstr "Theater" - -#: -msgid "Sport" -msgstr "Sport" - -#: -msgid "Location" -msgstr "Standort" - -#: -msgid "Location not found, add location" -msgstr "Veranstaltungsort nicht gefunden, Veranstaltungsort hinzufügen" - -#: -msgid "Location Title" -msgstr "Bezeichnung Veranstaltungsort" - -#: -msgid "Street" -msgstr "Straße" - -#: -msgid "House Number" -msgstr "Hausnummer" - -#: -msgid "City" -msgstr "Stadt oder Ort" - -#: -msgid "Country" -msgstr "Land" - -#: -msgid "Dates" -msgstr "Daten" - -#: -msgid "Permanent" -msgstr "Dauerhaft" - -#: -msgid "remove date" -msgstr "datum entfernen" - -#: -msgid "Date" -msgstr "Anfangsdatum" - -#: -msgid "+ add end date or time" -msgstr "+ Ende hinzufügen" - -#: -msgid "End date" -msgstr "Enddatum" - -#: -msgid "remove end date" -msgstr "Ende entfernen" - -#: -msgid "+ add date" -msgstr "+ Datum hinzufügen" - -#: -msgid "Open all day?" -msgstr "Ganztägig geöffnet?" - -#: -msgid "Yes" -msgstr "Ja" - -#: -msgid "No" -msgstr "Nein" - -#: -msgid "Extra info" -msgstr "Zusatzinfo" - -#: -msgid "Description" -msgstr "Beschreibung" - -#: -msgid "Short description" -msgstr "Kurzbeschreibung" - -#: -msgid "+ add long description" -msgstr "+ ausführliche Beschreibung hinzufügen" - -#: -msgid "Long description" -msgstr "Ausführliche Beschreibung" - -#: -msgid "Add multiple tags seperated by a \";\"" -msgstr "Mehrere Tags getrennt durch ein Semikolon (;) hinzufügen" - -#: -msgid "Links" -msgstr "Links" - -#: -msgid "+ add another link" -msgstr "+ weiteren Link hinzufügen" - -#: -msgid "Image" -msgstr "Bild" - -#: -msgid "Image upload" -msgstr "Bild hinaufladen" - -#: -msgid "Allowed extensions: gif png jpg jpeg" -msgstr "Zugelassene Dateierweiterungen: gif png jpg jpeg" - -#: -msgid "I agree to the terms & conditions of UiTdatabank and I declare that I have the necessary rights or permissions to distribute the image." -msgstr "Ich stimme den Allgemeinen Bedingungen zu und erkläre, dass ich über die erforderlichen Rechte oder Genehmigungen verfüge, um das Bild verbreiten zu dürfen." - -#: -msgid "Price" -msgstr "Preis" - -#: -msgid "Free event" -msgstr "Gratis-Aktivität" - -#: -msgid "+ add conditions & discounts" -msgstr "+ Bedingungen & Rabatte hinzufügen" - -#: -msgid "Price conditions & discounts" -msgstr "Preis Bedingungen & Rabatte" - -#: -msgid "Organizer" -msgstr "Organisator" - -#: -msgid "Organizer not found, add organizer" -msgstr "Organisator nicht gefunden, Organisator hinzufügen" - -#: -msgid "Name new organizer" -msgstr "Neuen Organisator benennen" - -#: -msgid "Age" -msgstr "Alter" - -#: -msgid "For everyone" -msgstr "Für jedermann" - -#: -msgid "For children (between 1 and 12 years)" -msgstr "Für Kinder (zwischen 1 und 12 Jahren)" - -#: -msgid "For youth (between 12 and 18 years)" -msgstr "Für Jugendliche (zwischen 12 und 18 Jahren)" - -#: -msgid "For adults (18+)" -msgstr "Für Erwachsene (ab 18)" - -#: -msgid "Suitable for ages from" -msgstr "Geeignet für Alter ab" - -#: -msgid "Activities for children will get the 'Fly' label" -msgstr "Aktivitäten für Kinder erhalten das „Fly“-Zeichen" - -#: -msgid "Contact" -msgstr "Ansprechpartner" - -#: -msgid "+ add contact option" -msgstr "+ Kontaktmöglichkeit hinzufügen" - -#: -msgid "Performers" -msgstr "Künstler" - -#: -msgid "+ add another performer" -msgstr "+ weiteren Künstler hinzufügen" - -#: -msgid "Language" -msgstr "Sprache" - -#: -msgid "+ add more language info" -msgstr "+ mehr Sprachinformationen hinzufügen" - -#: -msgid "Access" -msgstr "Zugriff" - -#: -msgid "Open for everyone" -msgstr "Zugänglich für alle" - -#: -msgid "Only for members" -msgstr "Nur für Mitglieder" - -#: -msgid "Translations" -msgstr "Übersetzungen" - -#: -msgid "Dutch" -msgstr "Niederländisch" - -#: -msgid "English" -msgstr "Englisch" - -#: -msgid "French" -msgstr "Französisch" - -#: -msgid "German" -msgstr "Deutsch" - -#: -msgid "Publication date" -msgstr "Veröffentlichungsdatum" - -#: -msgid "Save" -msgstr "Speichern" - -#: -msgid "Start time" -msgstr "Uhrzeit Anfang" - -#: -msgid "End time" -msgstr "Uhrzeit Ende" - -#: -msgid "Spoken" -msgstr "Originalton" - -#: -msgid "Dubbed" -msgstr "Synchronisiert" - -#: -msgid "Subtitled" -msgstr "Untertitelt" - -#: -msgid "in" -msgstr "in" - -#: -msgid "Contact" -msgstr "Kontakt" - -#: -msgid "Input" -msgstr "Input" - -#: -msgid "Performer" -msgstr "Künstler" - -#: -msgid "Role" -msgstr "Rolle" - -#: -msgid "Link" -msgstr "Link" - -#: -msgid "for reservation" -msgstr "Reservierung erforderlich" - -#: -msgid "Format" -msgstr "Format" - -#: -msgid "Please fill in correct age" -msgstr "Bitte das richtige Alter eingeben" - -#: -msgid "Please fill in correct date and time" -msgstr "Bitte das richtige Datum und die richtige Uhrzeit eingeben" - -#: -msgid "A date is required." -msgstr "Ein Datum ist erforderlich." - -#: -msgid "Date field is invalid. The end date is earlier than the beginning date." -msgstr "Datumsfeld ungültig. Das Enddatum liegt vor dem Anfangsdatum." - -#: -msgid "Date field is invalid. The end time is earlier than the beginning time." -msgstr "Datumsfeld ungültig. Die Uhrzeit des Endes liegt vor der Uhrzeit des Anfangs." - -#: -msgid "Please fill in correct date" -msgstr "Bitte das richtige Datum eingeben." - -#: -msgid "Please agree to the general conditions of UiTdatabank and declare that you have the necessary rights or permissions to distribute the image through UiTdatabank." -msgstr "Bitte stimmen Sie sich mit den Allgemeinen Bedingungen der UiTDatenbank einverstanden und erklären Sie, dass Sie über die erforderlichen Rechte oder Genehmigungen verfügen, um das Bild über die UiTDatenbank verbreiten zu dürfen." - -#: -msgid "A category is required." -msgstr "Eine Kategorie ist erforderlich." - -#: -msgid "A title is required for a custom location" -msgstr "Für einen benutzerdefinierten Veranstaltungsort ist ein Titel erforderlich" - -#: -msgid "A zip code is required for a custom location" -msgstr "Für einen benutzerdefinierten Veranstaltungsort ist eine Postleitzahl erforderlich" - -#: -msgid "A city is required for a custom location" -msgstr "Für einen benutzerdefinierten Veranstaltungsort ist eine Stadt/ein Ort erforderlich" - -#: -msgid "A location is required." -msgstr "Ein Veranstaltungsort ist erforderlich." - -#: -msgid "We could not validate the location" -msgstr "Wir konnten den Veranstaltungsort nicht validieren" - -#: -msgid "Not a valid URL" -msgstr "Keine gültige URL" - -#: -msgid "We could not validate the organizer" -msgstr "Wir konnten die Organisator nicht validieren" - -#: -msgid "Not a valid email address" -msgstr "Keine gültige E-Mail-Adresse" - -#: -msgid "Order tickets" -msgstr "Karten bestellen" - -#: -msgid "An error occurred while saving the event" -msgstr "Beim Speichern des Events ist ein Fehler aufgetreten" - -#: -msgid "Event successfully updated" -msgstr "Event erfolgreich aktualisiert" - -#: -msgid "Click here to update" -msgstr "Zum Aktualisieren hier klicken" - -#: -msgid "Are you sure you want to delete the event?" -msgstr "Sind Sie sicher, dass Sie das Event löschen möchten?" - -#: -msgid "This action cannot be undone" -msgstr "Dieser Befehl kann nicht rückgängig gemacht werden." - -#: -msgid "Delete" -msgstr "Löschen" - -#: -msgid "Cancel" -msgstr "Abbrechen" - -#: -msgid "Event successfully deleted" -msgstr "Event erfolgreich gelöscht" - -#: -msgid "An error occurred while deleting the event" -msgstr "Beim Löschen des Events ist ein Fehler aufgetreten" - -#: -msgid "Seperate multiple tags by ;" -msgstr "Mehrere Tags durch ein Semikolon (;) trennen" - -#: -msgid "Submit" -msgstr "Hinzufügen" - -#: -msgid "Tag @tag is not permitted because it's already a custom tag." -msgstr "Das Tag @tag ist unzulässig, weil es bereits ein benutzerdefiniertes Tag ist." - -#: -msgid "Autocomplete popup" -msgstr "Pop-up-Menü zum automatischen Ausfüllen" - -#: -msgid "open" -msgstr "geöffnet" - -#: -msgid "from" -msgstr "von" - -#: -msgid "to" -msgstr "bis" - -#: -msgid "Operations" -msgstr "Tätigkeiten" - -#: -msgid "Links to operations that can be performed" -msgstr "Links zu Tätigkeiten, die ausgeführt werden können" - -#: -msgid "Create event" -msgstr "Event anlegen" - -#: -msgid "Link to create event" -msgstr "Link zum Anlegen eines Events" - -#: -msgid "Master" -msgstr "Master" - -#: -msgid "Events created by me" -msgstr "Von mir angelegte Events" - -#: -msgid "more" -msgstr "mehr" - -#: -msgid "Apply" -msgstr "Anwenden" - -#: -msgid "Reset" -msgstr "Zurücksetzen" - -#: -msgid "Sort by" -msgstr "Sortieren nach" - -#: -msgid "Asc" -msgstr "Aufsteigend" - -#: -msgid "Desc" -msgstr "Absteigend" - -#: -msgid "Notification that no results were found" -msgstr "Hinweis, das kein Ergebnis gefunden wurde" - -#: -msgid "Unable to find any events created by you." -msgstr "Es konnte kein von Ihnen angelegtes Event gefunden werden." - -#: -msgid "Last updated" -msgstr "Letzte Aktualisierung" - -#: -msgid "Block" -msgstr "Sperren" - -#: -msgid "Add event" -msgstr "Event hinzufügen" - -#: culturefeed_elements/culturefeed_location_control/form/asset.inc:78 -msgid "Remove address" -msgstr "Entfernen Adresse" - -#: culturefeed_elements/culturefeed_location_control/form/custom.inc:136 -msgid "Remove address" -msgstr "Entfernen Adresse" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module:85 -msgid "Hide tag" -msgstr "Tag ausblenden" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module:96 -msgid "Remove tag" -msgstr "Remove tag" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module:113 -msgid "Add tag" -msgstr "Tags hinzufügen" \ No newline at end of file diff --git a/culturefeed_entry_ui/translations/culturefeed_entry_ui.fr.po b/culturefeed_entry_ui/translations/culturefeed_entry_ui.fr.po deleted file mode 100644 index b3414e26..00000000 --- a/culturefeed_entry_ui/translations/culturefeed_entry_ui.fr.po +++ /dev/null @@ -1,676 +0,0 @@ -msgid "" -msgstr "" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: POEditor.com\n" -"Project-Id-Version: CFK - translations\n" -"Language: fr-be\n" - -#: -msgid "Manage object tags" -msgstr "Gérer les tags objet" - -#: -msgid "Manage all the tags from the objects on culturefeed (events, actors, ...)." -msgstr "Gérer tous les tags des objets sur culturefeed (événements, acteurs…)" - -#: -msgid "Manage custom tags" -msgstr "Gérer les tags personnalisés" - -#: -msgid "Manage custom tags from the objects on culturefeed (events, actors, ...) managed on the admin section." -msgstr "Gérer les tags personnalisés des objets sur culturefeed (événements, acteurs...) gérés dans la section admin." - -#: -msgid "Create events" -msgstr "Créer des événements" - -#: -msgid "Create new events through the entity api." -msgstr "Créer de nouveaux événements via l'Entity API" - -#: -msgid "Edit events" -msgstr "Modifier les événements" - -#: -msgid "Edit events through the entity api." -msgstr "Modifier des événements via l'Entity API" - -#: -msgid "Delete events" -msgstr "Supprimer des événements" - -#: -msgid "Delete events through the entity api." -msgstr "Supprimer des événements via l'Entity API" - -#: -msgid "Tags" -msgstr "Tags" - -#: -msgid "Edit" -msgstr "Modifier" - -#: -msgid "View" -msgstr "Voir" - -#: -msgid "ZIP Code" -msgstr "Code postal" - -#: -msgid "New event" -msgstr "Nouvelle activité" - -#: -msgid "Edit event" -msgstr "Modifier activité" - -#: -msgid "Delete event" -msgstr "Supprimer activité" - -#: -msgid "CultureFeed Entry UI" -msgstr "Entrée UI CultureFeed" - -#: -msgid "All configurations to entry api for this site" -msgstr "Toutes les configurations pour l'entrée API concernant ce site" - -#: -msgid "Multilingual forms to post, update and delete events to UiTDatabank Entry API" -msgstr "Formulaires multilingues permettant de poster, mettre à jour et supprimer des événements de l'entrée UiTDatabank de l'API" - -#: -msgid "CultureFeed" -msgstr "CultureFeed" - -#: -msgid "Preferred language" -msgstr "Préférence linguistique" - -#: -msgid "Use the preferred language of the UiTID user, with the Drupal UI language as fallback" -msgstr "Utiliser la préférence linguistique de l'utilisateur UiTID et la langue UI Drupal comme alternative" - -#: -msgid "Custom tags" -msgstr "Tags personnalisés" - -#: -msgid "Custom tags specific for this site. Use a new line for each tag." -msgstr "Tags personnalisés propres à ce site. Utiliser une nouvelle ligne pour chaque tag." - -#: -msgid "mon" -msgstr "lun" - -#: -msgid "tue" -msgstr "mar" - -#: -msgid "wed" -msgstr "mer" - -#: -msgid "thu" -msgstr "jeu" - -#: -msgid "fri" -msgstr "ven" - -#: -msgid "sat" -msgstr "sam" - -#: -msgid "sun" -msgstr "dim" - -#: -msgid "Basic info" -msgstr "Information de base" - -#: -msgid "Event title" -msgstr "Titre" - -#: -msgid "Concerts" -msgstr "Concerts" - -#: -msgid "Dance" -msgstr "Danse" - -#: -msgid "Film" -msgstr "Cinéma" - -#: -msgid "Theatre" -msgstr "Théâtre" - -#: -msgid "Sport" -msgstr "Sport" - -#: -msgid "Location" -msgstr "Emplacement" - -#: -msgid "Location not found, add location" -msgstr "L'emplacement n'a pas pu être trouvé. Veuillez ajouter un emplacement." - -#: -msgid "Location Title" -msgstr "Titre de l'emplacement" - -#: -msgid "Street" -msgstr "Rue" - -#: -msgid "House Number" -msgstr "Numéro" - -#: -msgid "City" -msgstr "Ville ou commune" - -#: -msgid "Country" -msgstr "Pays" - -#: -msgid "Dates" -msgstr "Dates" - -#: -msgid "Permanent" -msgstr "Permanent" - -#: -msgid "remove date" -msgstr "retirer date" - -#: -msgid "Date" -msgstr "Date de début" - -#: -msgid "+ add end date or time" -msgstr "+ ajouter fin" - -#: -msgid "End date" -msgstr "Date de fin" - -#: -msgid "remove end date" -msgstr "retirer fin" - -#: -msgid "+ add date" -msgstr "+ ajouter date" - -#: -msgid "Open all day?" -msgstr "Ouvert toute la journée ?" - -#: -msgid "Yes" -msgstr "Oui" - -#: -msgid "No" -msgstr "Non" - -#: -msgid "Extra info" -msgstr "Informations complémentaires" - -#: -msgid "Description" -msgstr "Description" - -#: -msgid "Short description" -msgstr "Brève description" - -#: -msgid "+ add long description" -msgstr "+ ajouter longue description" - -#: -msgid "Long description" -msgstr "Longue description" - -#: -msgid "Add multiple tags seperated by a \";\"" -msgstr "Ajouter plusieurs tags séparés par un \";\"" - -#: -msgid "Links" -msgstr "Liens" - -#: -msgid "+ add another link" -msgstr "+ ajouter un autre lien" - -#: -msgid "Image" -msgstr "Image" - -#: -msgid "Image upload" -msgstr "Télécharger une image" - -#: -msgid "Allowed extensions: gif png jpg jpeg" -msgstr "Extensions autorisées : gif png jpg jpeg" - -#: -msgid "I agree to the terms & conditions of UiTdatabank and I declare that I have the necessary rights or permissions to distribute the image." -msgstr "Je marque mon accord avec les conditions générales et déclare détenir les droits ou autorisations nécessaires pour diffuser l'image." - -#: -msgid "Price" -msgstr "Prix" - -#: -msgid "Free event" -msgstr "Événement gratuit" - -#: -msgid "+ add conditions & discounts" -msgstr "+ ajouter tarifs et réductions" - -#: -msgid "Price conditions & discounts" -msgstr "Tarifs spéciaux et réductions" - -#: -msgid "Organizer" -msgstr "Organisateur" - -#: -msgid "Organizer not found, add organizer" -msgstr "L'organisateur n'a pu être trouvée. Ajouter une organisateur" - -#: -msgid "Name new organizer" -msgstr "Nom nouvel organisateur" - -#: -msgid "Age" -msgstr "Âge" - -#: -msgid "For everyone" -msgstr "Tous âges" - -#: -msgid "For children (between 1 and 12 years)" -msgstr "Pour les enfants (entre 1 et 12 ans)" - -#: -msgid "For youth (between 12 and 18 years)" -msgstr "Pour les adolescents (entre 12 et 18 ans)" - -#: -msgid "For adults (18+)" -msgstr "Pour les adultes (+ de 18 ans)" - -#: -msgid "Suitable for ages from" -msgstr "Convient aux âges dès" - -#: -msgid "Activities for children will get the 'Fly' label" -msgstr "Les activités pour les enfants recevront le label \"Fly\"" - -#: -msgid "Contact" -msgstr "Coordonnées" - -#: -msgid "+ add contact option" -msgstr "+ ajouter des coordonnées" - -#: -msgid "Performers" -msgstr "Artistes" - -#: -msgid "+ add another performer" -msgstr "+ ajouter un autre artiste" - -#: -msgid "Language" -msgstr "Langue" - -#: -msgid "+ add more language info" -msgstr "+ ajouter plus d'informations linguistiques" - -#: -msgid "Access" -msgstr "Accès" - -#: -msgid "Open for everyone" -msgstr "Accessible à tous" - -#: -msgid "Only for members" -msgstr "Réservé aux membres" - -#: -msgid "Translations" -msgstr "Traductions" - -#: -msgid "Dutch" -msgstr "Néerlandais" - -#: -msgid "English" -msgstr "Anglais" - -#: -msgid "French" -msgstr "Français" - -#: -msgid "German" -msgstr "Allemand" - -#: -msgid "Publication date" -msgstr "Date de publication" - -#: -msgid "Save" -msgstr "Enregistrer" - -#: -msgid "Start time" -msgstr "Heure de début" - -#: -msgid "End time" -msgstr "Heure de fin" - -#: -msgid "Spoken" -msgstr "Parlé" - -#: -msgid "Dubbed" -msgstr "Doublé" - -#: -msgid "Subtitled" -msgstr "Sous-titré" - -#: -msgid "in" -msgstr "en" - -#: -msgid "Contact" -msgstr "Contact" - -#: -msgid "Input" -msgstr "Input" - -#: -msgid "Performer" -msgstr "Artiste" - -#: -msgid "Role" -msgstr "Rôle" - -#: -msgid "Link" -msgstr "Lien" - -#: -msgid "for reservation" -msgstr "pour la réservation" - -#: -msgid "Format" -msgstr "Format" - -#: -msgid "Please fill in correct age" -msgstr "Veuillez indiquer l'âge correct" - -#: -msgid "Please fill in correct date and time" -msgstr "Veuillez indiquer la date et l'heure correctes" - -#: -msgid "A date is required." -msgstr "Veuillez indiquer une date." - -#: -msgid "Date field is invalid. The end date is earlier than the beginning date." -msgstr "Cette date n'est pas correcte. La date de fin est antérieure à la date de début." - -#: -msgid "Date field is invalid. The end time is earlier than the beginning time." -msgstr "Cette date n'est pas correcte. L'heure de fin est antérieure à l'heure de début." - -#: -msgid "Please fill in correct date" -msgstr "Veuillez indiquer la date correcte" - -#: -msgid "Please agree to the general conditions of UiTdatabank and declare that you have the necessary rights or permissions to distribute the image through UiTdatabank." -msgstr "Veuillez marquer votre accord avec les conditions générales de UiTdatabank et déclarer que vous détenez les droits ou autorisations nécessaires pour diffuser l'image via UiTdatabank." - -#: -msgid "A category is required." -msgstr "Veuillez indiquer une catégorie." - -#: -msgid "A title is required for a custom location" -msgstr "Veuillez indiquer un titre pour un emplacement personnalisé" - -#: -msgid "A zip code is required for a custom location" -msgstr "Veuillez indiquer un code postal pour un emplacement personnalisé" - -#: -msgid "A city is required for a custom location" -msgstr "Veuillez indiquer une ville pour un emplacement personnalisé" - -#: -msgid "A location is required." -msgstr "Veuillez indiquer un emplacement." - -#: -msgid "We could not validate the location" -msgstr "Cet emplacement n'a pas pu être validé" - -#: -msgid "Not a valid URL" -msgstr "Cette URL n'est pas valide" - -#: -msgid "We could not validate the organizer" -msgstr "L'organisateur n'a pas pu être validée" - -#: -msgid "Not a valid email address" -msgstr "Cette adresse électronique n'est pas valide" - -#: -msgid "Order tickets" -msgstr "Commander des billets" - -#: -msgid "An error occurred while saving the event" -msgstr "Une erreur s'est produite lors de l'enregistrement de l'événement" - -#: -msgid "Event successfully updated" -msgstr "L'événement a été correctement mis à jour" - -#: -msgid "Click here to update" -msgstr "Cliquez ici pour mettre à jour" - -#: -msgid "Are you sure you want to delete the event?" -msgstr "Êtes-vous sûr de vouloir supprimer l'événement ?" - -#: -msgid "This action cannot be undone" -msgstr "Cette action ne peut être annulée" - -#: -msgid "Delete" -msgstr "Supprimer" - -#: -msgid "Cancel" -msgstr "Annuler" - -#: -msgid "Event successfully deleted" -msgstr "Cet événement a été correctement supprimé" - -#: -msgid "An error occurred while deleting the event" -msgstr "Une erreur s'est produite lors de la suppression de l'événement" - -#: -msgid "Seperate multiple tags by ;" -msgstr "Insérez un ; entre plusieurs tags" - -#: -msgid "Submit" -msgstr "Ajouter" - -#: -msgid "Tag @tag is not permitted because it's already a custom tag." -msgstr "Le tag @tag n'est pas autorisé car ce tag est déjà personnalisé." - -#: -msgid "Autocomplete popup" -msgstr "Pop-up automatique" - -#: -msgid "open" -msgstr "ouvert" - -#: -msgid "from" -msgstr "de" - -#: -msgid "to" -msgstr "à" - -#: -msgid "Operations" -msgstr "Opérations" - -#: -msgid "Links to operations that can be performed" -msgstr "Liens vers les opérations pouvant être accomplies" - -#: -msgid "Create event" -msgstr "Créer un événement" - -#: -msgid "Link to create event" -msgstr "Lien vers la création d'un événement" - -#: -msgid "Master" -msgstr "Master" - -#: -msgid "Events created by me" -msgstr "Mes événements créés" - -#: -msgid "more" -msgstr "plus" - -#: -msgid "Apply" -msgstr "Appliquer" - -#: -msgid "Reset" -msgstr "Réinitialiser" - -#: -msgid "Sort by" -msgstr "Trier par" - -#: -msgid "Asc" -msgstr "Ordre croissant" - -#: -msgid "Desc" -msgstr "Ordre décroissant" - -#: -msgid "Notification that no results were found" -msgstr "Notification d'absence de résultats" - -#: -msgid "Unable to find any events created by you." -msgstr "Aucun événement créé par vous n'a pu être trouvé" - -#: -msgid "Last updated" -msgstr "Dernière mise à jour" - -#: -msgid "Block" -msgstr "Bloquer" - -#: -msgid "Add event" -msgstr "Ajouter événement" - -#: culturefeed_elements/culturefeed_location_control/form/asset.inc:78 -msgid "Remove address" -msgstr "Retrait adresse" - -#: culturefeed_elements/culturefeed_location_control/form/custom.inc:136 -msgid "Remove address" -msgstr "Retrait adresse" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module:85 -msgid "Hide tag" -msgstr "Masquer tag" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module:96 -msgid "Remove tag" -msgstr "Retirer tag" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module:113 -msgid "Add tag" -msgstr "Ajouter un tag" \ No newline at end of file diff --git a/culturefeed_entry_ui/translations/culturefeed_entry_ui.nl.po b/culturefeed_entry_ui/translations/culturefeed_entry_ui.nl.po deleted file mode 100644 index 5f91b9bf..00000000 --- a/culturefeed_entry_ui/translations/culturefeed_entry_ui.nl.po +++ /dev/null @@ -1,963 +0,0 @@ -# $Id$ -# -# Dutch translation of Drupal (general) -# Copyright YEAR NAME-# Generated from files: -# culturefeed_entry_ui.module: n/a -# views/culturefeed_entry_ui.views_default.inc: n/a -# includes/culturefeed_entry_ui.pages.inc: n/a -# includes/form/culturefeed_entry_ui.tag_objects.inc: n/a -# includes/form/culturefeed_entry_ui.tags.inc: n/a -# views/handlers/views_handler_field_cdb_item_operations.inc: n/a -# views/handlers/views_handler_area_cdb_item_create.inc: n/a -# culturefeed_entry_ui.info: n/a -# culturefeed_elements/culturefeed_elements.info: n/a -# culturefeed_elements/culturefeed_date_control/culturefeed_date_control.info: n/a -# culturefeed_elements/culturefeed_location_control/culturefeed_location_control.info: n/a -# culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.info: n/a -# culturefeed_elements/culturefeed_elements.module: n/a -# culturefeed_elements/culturefeed_date_control/form/date_control.inc: n/a -# culturefeed_elements/culturefeed_date_control/form/hybrid.inc: n/a -# culturefeed_elements/culturefeed_date_control/form/timestamps.inc: n/a -# culturefeed_elements/culturefeed_date_control/form/opening_times.inc: n/a -# culturefeed_elements/culturefeed_date_control/form/period.inc: n/a -# culturefeed_elements/culturefeed_date_control/theme/theme.inc: n/a -# culturefeed_elements/culturefeed_location_control/form/asset.inc: n/a -# culturefeed_elements/culturefeed_location_control/form/custom.inc: n/a -# culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module: n/a -# includes/culturefeed_entry_ui.admin.inc: n/a -# includes/form/culturefeed_entry_ui.collaboration.inc: n/a -# includes/form/culturefeed_entry_ui.location.inc: n/a -# js/culturefeed_entry_ui.js: n/a -# views/culturefeed_entry_ui.views.inc: n/a -# -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2015-06-05 11:22+0200\n" -"PO-Revision-Date: 2015-06-05 11:44+0100\n" -"Last-Translator: NAME \n" -"Language-Team: Dutch \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" -"Language: nl\n" -"X-Generator: Poedit 1.8.1\n" - -#: culturefeed_entry_ui.module:18 -msgid "Manage object tags" -msgstr "Beheer object tags" - -#: culturefeed_entry_ui.module:19 -msgid "Manage all the tags from the objects on culturefeed (events, actors, ...)." -msgstr "Beheer alle tags van objecten op culture feed (activiteiten, actoren ...)." - -#: culturefeed_entry_ui.module:22 -msgid "Manage custom tags" -msgstr "Manage custom tags" - -#: culturefeed_entry_ui.module:23 -msgid "Manage custom tags from the objects on culturefeed (events, actors, ...) managed on the admin section." -msgstr "Beheer aangepaste labels van de objecten in culturefeed (evenementen, actors, ...) beheerd op de adminsectie." - -#: culturefeed_entry_ui.module:26 -msgid "Create events" -msgstr "Events aanmaken" - -#: culturefeed_entry_ui.module:27 -msgid "Create new events through the entity api." -msgstr "Maak activiteiten aan via Entry API" - -#: culturefeed_entry_ui.module:30 views/culturefeed_entry_ui.views_default.inc:131;171 -msgid "Edit events" -msgstr "Events aanpassen" - -#: culturefeed_entry_ui.module:31 -msgid "Edit events through the entity api." -msgstr "Pas activiteiten aan via Entry API" - -#: culturefeed_entry_ui.module:34 -msgid "Delete events" -msgstr "Verwijder events" - -#: culturefeed_entry_ui.module:35 -msgid "Delete events through the entity api." -msgstr "Verwijder activiteiten via Entry API" - -#: culturefeed_entry_ui.module:38 -msgid "Manage culturefeed collaborative info" -msgstr "Beheer culturefeed collaborative info" - -#: culturefeed_entry_ui.module:39 -msgid "Manage culturefeed collaborative info through the entity api." -msgstr "Beheer culturefeed collaborative info via de entity api." - -#: culturefeed_entry_ui.module:157;77 includes/culturefeed_entry_ui.pages.inc:2223 includes/form/culturefeed_entry_ui.tag_objects.inc:41 includes/form/culturefeed_entry_ui.tags.inc:37;63 views/handlers/views_handler_field_cdb_item_operations.inc:54 -msgid "Tags" -msgstr "Labels" - -#: culturefeed_entry_ui.module:170;85 -msgid "Collaboration" -msgstr "Samenwerking" - -#: culturefeed_entry_ui.module:188 views/handlers/views_handler_field_cdb_item_operations.inc:27 -msgid "Edit" -msgstr "Bewerken" - -#: culturefeed_entry_ui.module:206 -msgid "View" -msgstr "Weergeven" - -#: culturefeed_entry_ui.module:428 views/handlers/views_handler_area_cdb_item_create.inc:19 -msgid "Add event" -msgstr "Voeg activiteit toe" - -#: culturefeed_entry_ui.module:454 -msgid "Some disallowed html tags will be removed in the %field_name field. The allowed tags are %allowed_tags" -msgstr "Niet toegelaten html-tags zullen verwijderd worden in het veld %field_name. De toegelaten tags zijn %allowed_tags" - -#: culturefeed_entry_ui.module:93 -msgid "New event" -msgstr "Maak nieuwe activiteit aan" - -#: culturefeed_entry_ui.module:101 -msgid "Edit event" -msgstr "Pas activiteit aan" - -#: culturefeed_entry_ui.module:109 -msgid "Delete event" -msgstr "Verwijder activiteit" - -#: culturefeed_entry_ui.module:117 culturefeed_entry_ui.info:0 -msgid "CultureFeed Entry UI" -msgstr "CultureFeed Entry UI" - -#: culturefeed_entry_ui.module:118 -msgid "All configurations to entry api for this site" -msgstr "Alle configuraties voor entry api voor deze website" - -#: culturefeed_entry_ui.info:0 -msgid "Multilingual forms to post, update and delete events to UiTDatabank Entry API" -msgstr "Meertalig invoerformulier om activiteiten aan te maken, aan te passen en verwijderen in UiTdatabank via Entry API" - -#: culturefeed_entry_ui.info:0 culturefeed_elements/culturefeed_elements.info:0 culturefeed_elements/culturefeed_date_control/culturefeed_date_control.info:0 culturefeed_elements/culturefeed_location_control/culturefeed_location_control.info:0 -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.info:0 -msgid "CultureFeed" -msgstr "CultureFeed" - -#: culturefeed_elements/culturefeed_elements.module:50 -msgid "AHAH callback" -msgstr "AHAH terugkoppeling" - -#: culturefeed_elements/culturefeed_elements.info:0 -msgid "CultureFeed Elements" -msgstr "" - -#: culturefeed_elements/culturefeed_elements.info:0 -msgid "Form elements for the Entry UI." -msgstr "Formulier elementen voor de Entry UI." - -#: culturefeed_elements/culturefeed_date_control/culturefeed_date_control.info:0 -msgid "CultureFeed Entry UI Date control" -msgstr "" - -#: culturefeed_elements/culturefeed_date_control/culturefeed_date_control.info:0 -msgid "Form element to manage dates in the Entry UI." -msgstr "Formulier lement voor het beheren van datums in de Entry UI." - -#: culturefeed_elements/culturefeed_date_control/form/date_control.inc:28 includes/culturefeed_entry_ui.pages.inc:495 -msgid "Dates" -msgstr "Datums" - -#: culturefeed_elements/culturefeed_date_control/form/date_control.inc:87 culturefeed_elements/culturefeed_date_control/form/hybrid.inc:131 -msgid "Permanent" -msgstr "Permanent" - -#: culturefeed_elements/culturefeed_date_control/form/hybrid.inc:83;108 culturefeed_elements/culturefeed_date_control/form/timestamps.inc:104 -msgid "Date" -msgstr "Datum" - -#: culturefeed_elements/culturefeed_date_control/form/hybrid.inc:98 -msgid "+ add end date or time" -msgstr "+ voeg einddatum toe" - -#: culturefeed_elements/culturefeed_date_control/form/hybrid.inc:124 culturefeed_elements/culturefeed_date_control/form/timestamps.inc:143 -msgid "+ add date" -msgstr "+ voeg datum toe" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:24 -msgid "mon" -msgstr "ma" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:25 -msgid "tue" -msgstr "di" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:26 -msgid "wed" -msgstr "woe" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:27 -msgid "thu" -msgstr "don" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:28 -msgid "fri" -msgstr "vrij" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:29 -msgid "sat" -msgstr "zat" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:30 -msgid "sun" -msgstr "zon" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:36 -msgid "Yes" -msgstr "Ja" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:36 -msgid "No" -msgstr "Nee" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:37 -msgid "Open all day ?" -msgstr "De hele dag geopend?" - -#: culturefeed_elements/culturefeed_date_control/form/opening_times.inc:60;67 -msgid "Format" -msgstr "Formaat" - -#: culturefeed_elements/culturefeed_date_control/form/period.inc:82 -msgid "Start date" -msgstr "Begindatum" - -#: culturefeed_elements/culturefeed_date_control/form/period.inc:88 -msgid "+ add end date" -msgstr "+ voeg einddatum toe" - -#: culturefeed_elements/culturefeed_date_control/form/period.inc:99 -msgid "End date" -msgstr "Einddatum" - -#: culturefeed_elements/culturefeed_date_control/form/period.inc:106 -msgid "- remove end date" -msgstr "- verwijder einddatum" - -#: culturefeed_elements/culturefeed_date_control/form/timestamps.inc:92 -msgid "×" -msgstr "x" - -#: culturefeed_elements/culturefeed_date_control/form/timestamps.inc:131 -msgid "- remove end time" -msgstr "- verwijder einduur" - -#: culturefeed_elements/culturefeed_date_control/form/timestamps.inc:136 -msgid "+ add end time" -msgstr "+ voeg einduur toe" - -#: culturefeed_elements/culturefeed_date_control/theme/theme.inc:64 -msgid "open" -msgstr "open" - -#: culturefeed_elements/culturefeed_date_control/theme/theme.inc:64 -msgid "from" -msgstr "van" - -#: culturefeed_elements/culturefeed_date_control/theme/theme.inc:64 -msgid "to" -msgstr "tot" - -#: culturefeed_elements/culturefeed_location_control/culturefeed_location_control.info:0 -msgid "CultureFeed Entry UI Location control" -msgstr "" - -#: culturefeed_elements/culturefeed_location_control/culturefeed_location_control.info:0 -msgid "Form element to manage locations in the Entry UI." -msgstr "Formulier element voor het beheren van locaties in de Entry UI." - -#: culturefeed_elements/culturefeed_location_control/form/asset.inc:59 -msgid "Location" -msgstr "Locatie" - -#: culturefeed_elements/culturefeed_location_control/form/asset.inc:78 culturefeed_elements/culturefeed_location_control/form/custom.inc:136 -msgid "Remove address" -msgstr "Adres verwijderen" - -#: culturefeed_elements/culturefeed_location_control/form/asset.inc:87 -msgid "Location not found, add location" -msgstr "Locatie niet gevonden, voeg locatie toe" - -#: culturefeed_elements/culturefeed_location_control/form/custom.inc:67 -msgid "Location Title" -msgstr "Naam locatie" - -#: culturefeed_elements/culturefeed_location_control/form/custom.inc:77 -msgid "Country" -msgstr "Land" - -#: culturefeed_elements/culturefeed_location_control/form/custom.inc:90 -msgid "ZIP Code" -msgstr "Postcode" - -#: culturefeed_elements/culturefeed_location_control/form/custom.inc:99 -msgid "City" -msgstr "Stad of gemeente" - -#: culturefeed_elements/culturefeed_location_control/form/custom.inc:107 -msgid "Street" -msgstr "Straat" - -#: culturefeed_elements/culturefeed_location_control/form/custom.inc:107 -msgid "Street and House Number" -msgstr "Straat en huisnummer" - -#: culturefeed_elements/culturefeed_location_control/form/custom.inc:116 -msgid "House Number" -msgstr "Huisnummer" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module:85 -msgid "Hide tag" -msgstr "Label verbergen" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module:96 -msgid "Remove tag" -msgstr "Label verwijderen" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module:113 -msgid "Add tag" -msgstr "Label toevoegen" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.info:0 -msgid "CultureFeed Tags element" -msgstr "" - -#: culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.info:0 -msgid "Form element to manage keywords in the Entry UI." -msgstr "Formulier element voor het beheren van labels in de Entry UI." - -#: includes/culturefeed_entry_ui.admin.inc:23 -msgid "Preferred language" -msgstr "Voorkeur taal" - -#: includes/culturefeed_entry_ui.admin.inc:25 -msgid "Use the preferred language of the UiTID user, with the Drupal UI language as fallback" -msgstr "Gebruik de voorkeurstaal van de UiTiD gebruiker, met de Drupal UI taal als backup" - -#: includes/culturefeed_entry_ui.admin.inc:34 -msgid "Custom tags specific for this site." -msgstr "Aangepaste labels specifiek voor deze website." - -#: includes/culturefeed_entry_ui.admin.inc:35;46 -msgid "Custom options on the /tags page" -msgstr "Aangepaste opties voor de /tags pagina" - -#: includes/culturefeed_entry_ui.admin.inc:45 -msgid "Custom tags specific for this site. Use a new line for each tag." -msgstr "Aangepaste labels specifiek voor deze website. Gebruik een nieuwe regel voor elk label." - -#: includes/culturefeed_entry_ui.admin.inc:56 -msgid "Tags pushed under the hood to Entry API." -msgstr "Labels die onder de motorkap worden doorgestuurd naar Entry API." - -#: includes/culturefeed_entry_ui.admin.inc:57;68 -msgid "Custom tags to push to entry API" -msgstr "Aangepaste labels die worden doorgestuurd naar entry API" - -#: includes/culturefeed_entry_ui.admin.inc:67 -msgid "Tags pushed under the hood to Entry API. Use a new line for each tag." -msgstr "Labels die onder de motorkap worden doorgestuurd naar Entry API. Gebruik een nieuwe regel voor elk label." - -#: includes/culturefeed_entry_ui.admin.inc:78 -msgid "Tags used for the collaboration tab." -msgstr "Labels die gebruikt worden voor het collaboration tabblad." - -#: includes/culturefeed_entry_ui.admin.inc:79 -msgid "Custom tags to use as collaboration data" -msgstr "Aangepaste labels die gebruikt worden als collaboration data" - -#: includes/culturefeed_entry_ui.admin.inc:89 -msgid "Default country" -msgstr "Standaardland" - -#: includes/culturefeed_entry_ui.admin.inc:91 -msgid "Select the default country for the entry form." -msgstr "Selecteer het standaard land voor het entry formulier" - -#: includes/culturefeed_entry_ui.pages.inc:335;1050;1081;1112;1143 -msgid "Event title" -msgstr "Titel" - -#: includes/culturefeed_entry_ui.pages.inc:383 -msgid "Concerts" -msgstr "Concerten" - -#: includes/culturefeed_entry_ui.pages.inc:404 -msgid "Dance" -msgstr "Dansvoorstelling" - -#: includes/culturefeed_entry_ui.pages.inc:425 -msgid "Film" -msgstr "Film" - -#: includes/culturefeed_entry_ui.pages.inc:449 -msgid "Theatre" -msgstr "Theatervoorstelling" - -#: includes/culturefeed_entry_ui.pages.inc:471 -msgid "Sport" -msgstr "Sport" - -#: includes/culturefeed_entry_ui.pages.inc:512 -msgid "Extra info" -msgstr "Extra info" - -#: includes/culturefeed_entry_ui.pages.inc:520;528;546 -msgid "Description" -msgstr "Beschrijving" - -#: includes/culturefeed_entry_ui.pages.inc:533;1056;1087;1118;1149 includes/form/culturefeed_entry_ui.collaboration.inc:102 -msgid "Short description" -msgstr "Korte omschrijving" - -#: includes/culturefeed_entry_ui.pages.inc:536 -msgid "Maximum 400 characters" -msgstr "Maximum 400 karakters" - -#: includes/culturefeed_entry_ui.pages.inc:554 -msgid "+ add long description" -msgstr "+ voeg lange beschrijving toe" - -#: includes/culturefeed_entry_ui.pages.inc:569;1063;1094;1125;1156 -msgid "Long description" -msgstr "Lange beschrijving" - -#: includes/culturefeed_entry_ui.pages.inc:586 -msgid "Links" -msgstr "Links" - -#: includes/culturefeed_entry_ui.pages.inc:617 -msgid "+ add another link" -msgstr "+ voeg een link toe" - -#: includes/culturefeed_entry_ui.pages.inc:634 includes/form/culturefeed_entry_ui.collaboration.inc:51 -msgid "Image" -msgstr "Afbeelding" - -#: includes/culturefeed_entry_ui.pages.inc:640 includes/form/culturefeed_entry_ui.collaboration.inc:57 -msgid "Image upload" -msgstr "Afbeelding opladen" - -#: includes/culturefeed_entry_ui.pages.inc:642 includes/form/culturefeed_entry_ui.collaboration.inc:60 -msgid "Allowed extensions: gif png jpg jpeg" -msgstr "Ondersteunde bestandsformaten: gif, png, jpg, jpeg" - -#: includes/culturefeed_entry_ui.pages.inc:667 includes/form/culturefeed_entry_ui.collaboration.inc:79 -msgid "Copyright" -msgstr "Copyright" - -#: includes/culturefeed_entry_ui.pages.inc:668 includes/form/culturefeed_entry_ui.collaboration.inc:80 -msgid "Name of the copyright owner of this image." -msgstr "Naam van de copyright eigenaar van deze afbeelding" - -#: includes/culturefeed_entry_ui.pages.inc:675 includes/form/culturefeed_entry_ui.collaboration.inc:88 -msgid "I agree to the terms & conditions and I declare that I have the necessary rights or permissions to distribute the image." -msgstr "Ik ga akkoord met de algemene voorwaarden van UiTdatabank en verklaar dat ik over de nodige rechten beschik om de afbeelding te verspreiden." - -#: includes/culturefeed_entry_ui.pages.inc:682;687;719 -msgid "Price" -msgstr "Prijs" - -#: includes/culturefeed_entry_ui.pages.inc:702 -msgid "Free event" -msgstr "Gratis activiteit" - -#: includes/culturefeed_entry_ui.pages.inc:726 -msgid "+ add conditions & discounts" -msgstr "+ voeg voorwaarden en kortingen toe" - -#: includes/culturefeed_entry_ui.pages.inc:753 -msgid "Price conditions & discounts" -msgstr "Prijsvoorwaarden & kortingen" - -#: includes/culturefeed_entry_ui.pages.inc:782 -msgid "Organizer" -msgstr "Organisator" - -#: includes/culturefeed_entry_ui.pages.inc:806 -msgid "Organizer not found, add organizer" -msgstr "Organisator niet gevonden, voeg organisator toe" - -#: includes/culturefeed_entry_ui.pages.inc:824 -msgid "Name new organizer" -msgstr "Naam nieuwe organisator" - -#: includes/culturefeed_entry_ui.pages.inc:832 -msgid "Age" -msgstr "Leeftijd" - -#: includes/culturefeed_entry_ui.pages.inc:834 -msgid "For everyone" -msgstr "Voor iedereen" - -#: includes/culturefeed_entry_ui.pages.inc:835 -msgid "For children (between 1 and 12 years)" -msgstr "Voor kinderen (tussen 1 en 12 jaar)" - -#: includes/culturefeed_entry_ui.pages.inc:836 -msgid "For youth (between 12 and 18 years)" -msgstr "Voor jongeren (tussen 12 en 18 jaar)" - -#: includes/culturefeed_entry_ui.pages.inc:837 -msgid "For adults (18+)" -msgstr "Voor volwassenen (18+)" - -#: includes/culturefeed_entry_ui.pages.inc:843 -msgid "Suitable for ages from" -msgstr "Geschikt voor leeftijden vanaf" - -#: includes/culturefeed_entry_ui.pages.inc:866 -msgid "Activities for children will get the 'Fly' label" -msgstr "Activiteiten voor kinderen krijgen automatisch het 'Vlieg'-label" - -#: includes/culturefeed_entry_ui.pages.inc:877;1313 -msgid "Contact" -msgstr "Contact" - -#: includes/culturefeed_entry_ui.pages.inc:910 -msgid "+ add contact option" -msgstr "+ voeg contactgegevens toe" - -#: includes/culturefeed_entry_ui.pages.inc:924 -msgid "Performers" -msgstr "Uitvoerders" - -#: includes/culturefeed_entry_ui.pages.inc:959 -msgid "+ add another performer" -msgstr "+ voeg nog een uitvoerder toe" - -#: includes/culturefeed_entry_ui.pages.inc:973;1267 -msgid "Language" -msgstr "Taal" - -#: includes/culturefeed_entry_ui.pages.inc:1006 -msgid "+ add more language info" -msgstr "+ voeg meer taalinformatie toe" - -#: includes/culturefeed_entry_ui.pages.inc:1021 -msgid "Access" -msgstr "Toegang" - -#: includes/culturefeed_entry_ui.pages.inc:1027 -msgid "Open for everyone" -msgstr "Voor iedereen toegankelijk" - -#: includes/culturefeed_entry_ui.pages.inc:1027 -msgid "Only for members" -msgstr "Enkel voor leden" - -#: includes/culturefeed_entry_ui.pages.inc:1034 -msgid "Translations" -msgstr "Vertalingen" - -#: includes/culturefeed_entry_ui.pages.inc:1042;1284 -msgid "Dutch" -msgstr "Nederlands" - -#: includes/culturefeed_entry_ui.pages.inc:1073;1282 -msgid "English" -msgstr "Engels" - -#: includes/culturefeed_entry_ui.pages.inc:1104;1286 -msgid "French" -msgstr "Frans" - -#: includes/culturefeed_entry_ui.pages.inc:1135;1285 -msgid "German" -msgstr "Duits" - -#: includes/culturefeed_entry_ui.pages.inc:1164 -msgid "Publication date" -msgstr "Publicatiedatum" - -#: includes/culturefeed_entry_ui.pages.inc:1188 includes/form/culturefeed_entry_ui.collaboration.inc:168 includes/form/culturefeed_entry_ui.tag_objects.inc:61 -msgid "Save" -msgstr "Opslaan" - -#: includes/culturefeed_entry_ui.pages.inc:1270 -msgid "Spoken" -msgstr "Gesproken" - -#: includes/culturefeed_entry_ui.pages.inc:1271 -msgid "Dubbed" -msgstr "Gedubd" - -#: includes/culturefeed_entry_ui.pages.inc:1272 -msgid "Subtitled" -msgstr "Ondertiteld" - -#: includes/culturefeed_entry_ui.pages.inc:1279 -msgid "in" -msgstr "in" - -#: includes/culturefeed_entry_ui.pages.inc:1298 -msgid "Phone" -msgstr "Telefoon" - -#: includes/culturefeed_entry_ui.pages.inc:1298 -msgid "E-mail" -msgstr "E-mailadres" - -#: includes/culturefeed_entry_ui.pages.inc:1322 -msgid "Input" -msgstr "Invoer" - -#: includes/culturefeed_entry_ui.pages.inc:1338 -msgid "Performer" -msgstr "Uitvoerder" - -#: includes/culturefeed_entry_ui.pages.inc:1346 -msgid "Role" -msgstr "Rol" - -#: includes/culturefeed_entry_ui.pages.inc:1361 -msgid "Link" -msgstr "Link" - -#: includes/culturefeed_entry_ui.pages.inc:1368 -msgid "for reservation" -msgstr "voor reservatie" - -#: includes/culturefeed_entry_ui.pages.inc:1384 -msgid "Please fill in correct age" -msgstr "Geef de juiste leeftijd op" - -#: includes/culturefeed_entry_ui.pages.inc:1401;1431 -msgid "Please fill in correct date and time" -msgstr "Geef de juiste datum en tijdstip op" - -#: includes/culturefeed_entry_ui.pages.inc:1408 -msgid "Date field is invalid. The end date is earlier than the beginning date." -msgstr "Ingevoerde datum niet correct: einddatum valt voor de begindatum" - -#: includes/culturefeed_entry_ui.pages.inc:1438 -msgid "Date field is invalid. The end time is earlier than the beginning time." -msgstr "Ingevoerde datum niet correct: einduur valt voor beginuur" - -#: includes/culturefeed_entry_ui.pages.inc:1472;1479 -msgid "Please fill in correct time." -msgstr "Geef de juiste datum en tijdstip op" - -#: includes/culturefeed_entry_ui.pages.inc:1494 includes/form/culturefeed_entry_ui.collaboration.inc:270 -msgid "Please agree to the general conditions of UiTdatabank and declare that you have the necessary rights or permissions to distribute the image through UiTdatabank." -msgstr "Geef aan dat je akkoord gaat met de algemene voorwaarden van UiTdatabank en dat je over de nodige rechten of toestemmingen beschikt om de afbeelding te verspreiden via UiTdatabank." - -#: includes/culturefeed_entry_ui.pages.inc:1497 includes/form/culturefeed_entry_ui.collaboration.inc:273 -msgid "Copyright field is required." -msgstr "Het veld 'copyright' is verplicht." - -#: includes/culturefeed_entry_ui.pages.inc:1502 -msgid "A category is required." -msgstr "Een categorie is verplicht" - -#: includes/culturefeed_entry_ui.pages.inc:1516 -msgid "Not a valid URL" -msgstr "Geen geldige URL" - -#: includes/culturefeed_entry_ui.pages.inc:1528;1532 -msgid "We could not validate the organizer" -msgstr "We kunnen de organisatie niet bevestigen" - -#: includes/culturefeed_entry_ui.pages.inc:1548 -msgid "Not a valid email address" -msgstr "Geen geldig emailadres" - -#: includes/culturefeed_entry_ui.pages.inc:1567 -msgid "If you translate something, you should also translate the title." -msgstr "Als je een vertaling toevoegt, moet je ook de titel vertalen." - -#: includes/culturefeed_entry_ui.pages.inc:1707 -msgid "Order tickets" -msgstr "Bestel tickets" - -#: includes/culturefeed_entry_ui.pages.inc:2027 -msgid "An error occurred while saving the event" -msgstr "Er is een fout opgetreden tijdens het opslaan van de activiteit" - -#: includes/culturefeed_entry_ui.pages.inc:2128 -msgid "Saving the event" -msgstr "Evenement aan het bewaren" - -#: includes/culturefeed_entry_ui.pages.inc:2135 -msgid "Initializing." -msgstr "Aan het initialiseren." - -#: includes/culturefeed_entry_ui.pages.inc:2136 -msgid "Completed @current of @total." -msgstr "@current van @total gereed." - -#: includes/culturefeed_entry_ui.pages.inc:2154 -msgid "Are you sure you want to delete the event?" -msgstr "Ben je zeker dat je de activiteit wil verwijderen?" - -#: includes/culturefeed_entry_ui.pages.inc:2156 -msgid "This action cannot be undone" -msgstr "Deze actie kan niet ongedaan gemaakt worden" - -#: includes/culturefeed_entry_ui.pages.inc:2157 views/handlers/views_handler_field_cdb_item_operations.inc:31 -msgid "Delete" -msgstr "Verwijder" - -#: includes/culturefeed_entry_ui.pages.inc:2158 -msgid "Cancel" -msgstr "Annuleren" - -#: includes/culturefeed_entry_ui.pages.inc:2170 -msgid "Event successfully deleted" -msgstr "Activiteit werd verwijderd" - -#: includes/culturefeed_entry_ui.pages.inc:2174 -msgid "An error occurred while deleting the event" -msgstr "Er is een fout opgetreden tijdens het verwijderen van de activiteit" - -#: includes/culturefeed_entry_ui.pages.inc:2216 includes/form/culturefeed_entry_ui.tag_objects.inc:50 -msgid "Custom tags" -msgstr "Aangepaste labels" - -#: includes/culturefeed_entry_ui.pages.inc:2225 -msgid "Seperate multiple tags by ;" -msgstr "Scheid meerdere trefwoorden met ;" - -#: includes/culturefeed_entry_ui.pages.inc:2231 -msgid "Submit" -msgstr "Voeg toe" - -#: includes/culturefeed_entry_ui.pages.inc:2246 includes/form/culturefeed_entry_ui.tag_objects.inc:147 -msgid "Tag @tag is not permitted because it's already a custom tag." -msgstr "Trefwoord @tag is niet toegelaten aangezien het al een bestaande marker is." - -#: includes/culturefeed_entry_ui.pages.inc:2293 -msgid "The tags were adjusted." -msgstr "De labels werden toegevoegd." - -#: includes/culturefeed_entry_ui.pages.inc:2298 includes/form/culturefeed_entry_ui.tag_objects.inc:125 -msgid "You tried to add a tag that should not be added by anyone. If you still wish to add this or have other questions about this, please email to \"vragen@uitdatabank.be\"." -msgstr "Je hebt niet de juiste rechten om dit trefwoord toe te voegen. Als je hier vragen bij hebt, contacteer dan onze helpdesk via \"vragen@uitdatabank.be\"." - -#: includes/culturefeed_entry_ui.pages.inc:2301 includes/form/culturefeed_entry_ui.tag_objects.inc:128 -msgid "Error occured while saving the tags" -msgstr "Er is een fout opgetreden tijdens het opslaan van de labels" - -#: includes/culturefeed_entry_ui.pages.inc:2375 -msgid "The event %title has been created." -msgstr "De activiteit %title werd aangemaakt." - -#: includes/culturefeed_entry_ui.pages.inc:2376 -msgid "The event %title has been updated." -msgstr "Het event %title werd aangepast." - -#: includes/culturefeed_entry_ui.pages.inc:2015;2020 -msgid "culturefeed_entry_ui" -msgstr "" - -#: includes/culturefeed_entry_ui.pages.inc:2015 -msgid "Event %eventid updated." -msgstr "Evenement %eventid geupdate." - -#: includes/culturefeed_entry_ui.pages.inc:2020 -msgid "Event %eventid created." -msgstr "Evenement %eventid aangemaakt." - -#: includes/form/culturefeed_entry_ui.collaboration.inc:32 -msgid "Title" -msgstr "Titel" - -#: includes/form/culturefeed_entry_ui.collaboration.inc:94 -msgid "Article" -msgstr "Artikel" - -#: includes/form/culturefeed_entry_ui.location.inc:110 -msgid "A title is required for a custom location" -msgstr "Een titel is verplicht voor een nieuwe locatie" - -#: includes/form/culturefeed_entry_ui.location.inc:115 -msgid "A zip code is required for a custom location" -msgstr "Een postcode is verplicht voor een nieuwe locatie" - -#: includes/form/culturefeed_entry_ui.location.inc:119 -msgid "A zip code has minimum 4 characters" -msgstr "Een postcode heeft minimaal 4 tekens" - -#: includes/form/culturefeed_entry_ui.location.inc:123 -msgid "A city is required for a custom location" -msgstr "Een stad is verplicht voor een nieuwe locatie" - -#: includes/form/culturefeed_entry_ui.location.inc:132 -msgid "A valid city is required for a custom location." -msgstr "Een geldige stad is nodig voor een aangepaste locatie." - -#: includes/form/culturefeed_entry_ui.location.inc:145 -msgid "Please select a city from the list." -msgstr "Selecteer een stad uit de lijst." - -#: includes/form/culturefeed_entry_ui.location.inc:159 -msgid "A location is required." -msgstr "Een locatie is verplicht" - -#: includes/form/culturefeed_entry_ui.location.inc:164;171 -msgid "We could not validate the location" -msgstr "We kunnen de locatie niet bevestigen" - -#: includes/form/culturefeed_entry_ui.tags.inc:38 -msgid "Add Add tags" -msgstr "Labels toevoegen" - -#: includes/form/culturefeed_entry_ui.tags.inc:64 -msgid "Add multiple tags separated by a \";\"" -msgstr "Voeg meerdere labels toe gescheiden door “;”" - -#: js/culturefeed_entry_ui.js:0 -msgid "Autocomplete popup" -msgstr "Popup voor automatisch aanvullen" - -#: views/culturefeed_entry_ui.views.inc:13 -msgid "Operations" -msgstr "Bewerkingen" - -#: views/culturefeed_entry_ui.views.inc:14 -msgid "Links to operations that can be performed" -msgstr "Link naar mogelijke handelingen" - -#: views/culturefeed_entry_ui.views.inc:20 -msgid "Create event" -msgstr "Maak activiteit aan" - -#: views/culturefeed_entry_ui.views.inc:21 -msgid "Link to create event" -msgstr "Link om activiteit aan te maken" - -#: views/culturefeed_entry_ui.views_default.inc:25;159 -msgid "more" -msgstr "meer" - -#: views/culturefeed_entry_ui.views_default.inc:31;160 -msgid "Select" -msgstr "Selecteren" - -#: views/culturefeed_entry_ui.views_default.inc:32;161 -msgid "Reset" -msgstr "Opnieuw instellen" - -#: views/culturefeed_entry_ui.views_default.inc:33;162 -msgid "Sort" -msgstr "Sorteer op" - -#: views/culturefeed_entry_ui.views_default.inc:34;163 -msgid "Ascending" -msgstr "Oplopend" - -#: views/culturefeed_entry_ui.views_default.inc:35;164 -msgid "Descending" -msgstr "Aflopend" - -#: views/culturefeed_entry_ui.views_default.inc:48;165 -msgid "Notification that no results were found" -msgstr "Melding dat er geen resultaten werden gevonden" - -#: views/culturefeed_entry_ui.views_default.inc:50;166 -msgid "Unable to find any events created by you." -msgstr "Er werden geen activiteiten gevonden die door jou aangemaakt werden" - -#: views/culturefeed_entry_ui.views_default.inc:121;168 -msgid "Created by current user" -msgstr "Aangemaakt door de huidige gebruiker" - -#: views/culturefeed_entry_ui.views_default.inc:126;169;351 -msgid "Block" -msgstr "Blok" - -#: views/culturefeed_entry_ui.views_default.inc:129;170 -msgid "Page" -msgstr "Pagina" - -#: views/culturefeed_entry_ui.views_default.inc:138;172 -msgid "Items on page" -msgstr "Items op pagina" - -#: views/culturefeed_entry_ui.views_default.inc:139;173 -msgid "- All -" -msgstr "- Alle -" - -#: views/culturefeed_entry_ui.views_default.inc:140;174 -msgid "Start" -msgstr "Start" - -#: views/culturefeed_entry_ui.views_default.inc:141;175 -msgid "« first" -msgstr "« eerste" - -#: views/culturefeed_entry_ui.views_default.inc:142;176 -msgid "‹ previous" -msgstr "‹ vorige" - -#: views/culturefeed_entry_ui.views_default.inc:143;177 -msgid "next ›" -msgstr "volgende ›" - -#: views/culturefeed_entry_ui.views_default.inc:144;178 -msgid "last »" -msgstr "laatste »" - -#: views/culturefeed_entry_ui.views_default.inc:157;341 -msgid "Master" -msgstr "Hoofd" - -#: views/culturefeed_entry_ui.views_default.inc:158 -msgid "Events created by me" -msgstr "Mijn activiteiten" - -#: views/culturefeed_entry_ui.views_default.inc:167 -msgid "Last updated" -msgstr "Laatst bijgewerkt" - -#: views/culturefeed_entry_ui.views_default.inc:342 -msgid "Binnenkort" -msgstr "" - -#: views/culturefeed_entry_ui.views_default.inc:343 -msgid "meer" -msgstr "" - -#: views/culturefeed_entry_ui.views_default.inc:344 -msgid "Pas toe" -msgstr "" - -#: views/culturefeed_entry_ui.views_default.inc:345 -msgid "Opnieuw instellen" -msgstr "" - -#: views/culturefeed_entry_ui.views_default.inc:346 -msgid "Sorteer op" -msgstr "" - -#: views/culturefeed_entry_ui.views_default.inc:347 -msgid "Stijgend" -msgstr "" - -#: views/culturefeed_entry_ui.views_default.inc:348 -msgid "Dalend" -msgstr "" - -#: views/culturefeed_entry_ui.views_default.inc:349 -msgid "Wanneer" -msgstr "" - -#: views/culturefeed_entry_ui.views_default.inc:350 -msgid "Waar" -msgstr "" - -#: views/handlers/views_handler_field_cdb_item_operations.inc:47 -msgid "No permission to edit event" -msgstr "Geen toelating om event aan te passen" diff --git a/culturefeed_entry_ui/views/culturefeed_entry_ui.views.inc b/culturefeed_entry_ui/views/culturefeed_entry_ui.views.inc deleted file mode 100644 index 3160ac19..00000000 --- a/culturefeed_entry_ui/views/culturefeed_entry_ui.views.inc +++ /dev/null @@ -1,26 +0,0 @@ - t('Operations'), - 'help' => t('Links to operations that can be performed'), - 'field' => array( - 'handler' => 'views_handler_field_cdb_item_operations', - ), - ); - $data['cdb_items']['create'] = array( - 'title' => t('Create event'), - 'help' => t('Link to create event'), - 'area' => array( - 'handler' => 'views_handler_area_cdb_item_create', - ), - ); -} diff --git a/culturefeed_entry_ui/views/culturefeed_entry_ui.views_default.inc b/culturefeed_entry_ui/views/culturefeed_entry_ui.views_default.inc deleted file mode 100644 index 70a270b7..00000000 --- a/culturefeed_entry_ui/views/culturefeed_entry_ui.views_default.inc +++ /dev/null @@ -1,359 +0,0 @@ -name = 'culturefeed_events_createdbycurrentuser'; - $view->description = ''; - $view->tag = 'default'; - $view->base_table = 'cdb_items'; - $view->human_name = 'CultureFeed edit events'; - $view->core = 7; - $view->api_version = '3.0'; - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ - - /* Display: Master */ - $handler = $view->new_display('default', 'Master', 'default'); - $handler->display->display_options['title'] = 'Events created by me'; - $handler->display->display_options['use_more_always'] = FALSE; - $handler->display->display_options['use_more_text'] = t('more'); - $handler->display->display_options['access']['type'] = 'perm'; - $handler->display->display_options['access']['perm'] = 'create culturefeed events'; - $handler->display->display_options['cache']['type'] = 'none'; - $handler->display->display_options['query']['type'] = 'views_query'; - $handler->display->display_options['exposed_form']['type'] = 'basic'; - $handler->display->display_options['exposed_form']['options']['submit_button'] = t('Select'); - $handler->display->display_options['exposed_form']['options']['reset_button_label'] = t('Reset'); - $handler->display->display_options['exposed_form']['options']['exposed_sorts_label'] = t('Sort'); - $handler->display->display_options['exposed_form']['options']['sort_asc_label'] = t('Ascending'); - $handler->display->display_options['exposed_form']['options']['sort_desc_label'] = t('Descending'); - $handler->display->display_options['pager']['type'] = 'none'; - $handler->display->display_options['style_plugin'] = 'default'; - $handler->display->display_options['row_plugin'] = 'fields'; - /* Kop: Cdb items: Maak activiteit aan */ - $handler->display->display_options['footer']['create']['id'] = 'create'; - $handler->display->display_options['footer']['create']['table'] = 'cdb_items'; - $handler->display->display_options['footer']['create']['field'] = 'create'; - $handler->display->display_options['footer']['create']['empty'] = TRUE; - /* Gedrag bij ontbreken van resultaten: Algemeen: Tekstveld */ - $handler->display->display_options['empty']['area']['id'] = 'area'; - $handler->display->display_options['empty']['area']['table'] = 'views'; - $handler->display->display_options['empty']['area']['field'] = 'area'; - $handler->display->display_options['empty']['area']['label'] = t('Notification that no results were found'); - $handler->display->display_options['empty']['area']['empty'] = TRUE; - $handler->display->display_options['empty']['area']['content'] = t('Unable to find any events created by you.'); - $handler->display->display_options['empty']['area']['format'] = 'filtered_html'; - /* Veld: Cdb items: Titel */ - $handler->display->display_options['fields']['title']['id'] = 'title'; - $handler->display->display_options['fields']['title']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['title']['field'] = 'title'; - $handler->display->display_options['fields']['title']['label'] = ''; - $handler->display->display_options['fields']['title']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['title']['link'] = 1; - /* Veld: Cdb items: Afbeelding */ - $handler->display->display_options['fields']['picture']['id'] = 'picture'; - $handler->display->display_options['fields']['picture']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['picture']['field'] = 'picture'; - $handler->display->display_options['fields']['picture']['label'] = ''; - $handler->display->display_options['fields']['picture']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['picture']['width'] = '100'; - $handler->display->display_options['fields']['picture']['height'] = '100'; - $handler->display->display_options['fields']['picture']['link'] = 1; - /* Veld: Cdb items: Short Description */ - $handler->display->display_options['fields']['description']['id'] = 'description'; - $handler->display->display_options['fields']['description']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['description']['field'] = 'description'; - $handler->display->display_options['fields']['description']['label'] = ''; - $handler->display->display_options['fields']['description']['element_label_colon'] = FALSE; - /* Veld: Cdb items: Locatie */ - $handler->display->display_options['fields']['location']['id'] = 'location'; - $handler->display->display_options['fields']['location']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['location']['field'] = 'location'; - $handler->display->display_options['fields']['location']['label'] = ''; - $handler->display->display_options['fields']['location']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['location']['show'] = array( - 'city' => 'city', - 'title' => 0, - 'address' => 0, - ); - /* Veld: Cdb items: Calendar summary */ - $handler->display->display_options['fields']['when']['id'] = 'when'; - $handler->display->display_options['fields']['when']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['when']['field'] = 'when'; - $handler->display->display_options['fields']['when']['label'] = ''; - $handler->display->display_options['fields']['when']['element_label_colon'] = FALSE; - /* Veld: Cdb items: Laatst bijgewerkt */ - $handler->display->display_options['fields']['lastupdated']['id'] = 'lastupdated'; - $handler->display->display_options['fields']['lastupdated']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['lastupdated']['field'] = 'lastupdated'; - $handler->display->display_options['fields']['lastupdated']['date_format'] = 'short'; - /* Veld: Cdb items: Bewerkingen */ - $handler->display->display_options['fields']['operations']['id'] = 'operations'; - $handler->display->display_options['fields']['operations']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['operations']['field'] = 'operations'; - $handler->display->display_options['fields']['operations']['label'] = ''; - $handler->display->display_options['fields']['operations']['element_label_colon'] = FALSE; - /* Sorteercriterium: Cdb items: Laatst bijgewerkt */ - $handler->display->display_options['sorts']['lastupdated']['id'] = 'lastupdated'; - $handler->display->display_options['sorts']['lastupdated']['table'] = 'cdb_items'; - $handler->display->display_options['sorts']['lastupdated']['field'] = 'lastupdated'; - $handler->display->display_options['sorts']['lastupdated']['order'] = 'DESC'; - /* Filtercriterium: Cdb items: Type */ - $handler->display->display_options['filters']['type']['id'] = 'type'; - $handler->display->display_options['filters']['type']['table'] = 'cdb_items'; - $handler->display->display_options['filters']['type']['field'] = 'type'; - $handler->display->display_options['filters']['type']['value'] = array( - 'event' => 'event', - ); - $handler->display->display_options['filters']['type']['group'] = 1; - /* Filtercriterium: Cdb items: Created by current user */ - $handler->display->display_options['filters']['createdbycurrentuser']['id'] = 'createdbycurrentuser'; - $handler->display->display_options['filters']['createdbycurrentuser']['table'] = 'cdb_items'; - $handler->display->display_options['filters']['createdbycurrentuser']['field'] = 'createdbycurrentuser'; - $handler->display->display_options['filters']['createdbycurrentuser']['exposed'] = TRUE; - $handler->display->display_options['filters']['createdbycurrentuser']['expose']['operator_id'] = 'createdbycurrentuser_op'; - $handler->display->display_options['filters']['createdbycurrentuser']['expose']['label'] = t('Created by current user'); - $handler->display->display_options['filters']['createdbycurrentuser']['expose']['operator'] = 'createdbycurrentuser_op'; - $handler->display->display_options['filters']['createdbycurrentuser']['expose']['identifier'] = 'createdbycurrentuser'; - - /* Display: Block */ - $handler = $view->new_display('block', t('Block'), 'block'); - - /* Display: Pagina */ - $handler = $view->new_display('page', t('Page'), 'page_1'); - $handler->display->display_options['defaults']['title'] = FALSE; - $handler->display->display_options['title'] = t('Edit events'); - $handler->display->display_options['defaults']['pager'] = FALSE; - $handler->display->display_options['pager']['type'] = 'full'; - $handler->display->display_options['pager']['options']['items_per_page'] = '10'; - $handler->display->display_options['pager']['options']['offset'] = '0'; - $handler->display->display_options['pager']['options']['id'] = '0'; - $handler->display->display_options['pager']['options']['quantity'] = '9'; - $handler->display->display_options['pager']['options']['expose']['items_per_page_label'] = t('Items on page'); - $handler->display->display_options['pager']['options']['expose']['items_per_page_options_all_label'] = t('- All -'); - $handler->display->display_options['pager']['options']['expose']['offset_label'] = t('Start'); - $handler->display->display_options['pager']['options']['tags']['first'] = t('« first'); - $handler->display->display_options['pager']['options']['tags']['previous'] = t('‹ previous'); - $handler->display->display_options['pager']['options']['tags']['next'] = t('next ›'); - $handler->display->display_options['pager']['options']['tags']['last'] = t('last »'); - $handler->display->display_options['defaults']['filter_groups'] = FALSE; - $handler->display->display_options['defaults']['filters'] = FALSE; - /* Filtercriterium: Cdb items: Type */ - $handler->display->display_options['filters']['type']['id'] = 'type'; - $handler->display->display_options['filters']['type']['table'] = 'cdb_items'; - $handler->display->display_options['filters']['type']['field'] = 'type'; - $handler->display->display_options['filters']['type']['value'] = array( - 'event' => 'event', - ); - $handler->display->display_options['filters']['type']['group'] = 1; - $handler->display->display_options['path'] = 'agenda/edit'; - $translatables['culturefeed_events_createdbycurrentuser'] = array( - t('Master'), - t('Events created by me'), - t('more'), - t('Select'), - t('Reset'), - t('Sort'), - t('Ascending'), - t('Descending'), - t('Notification that no results were found'), - t('Unable to find any events created by you.'), - t('Last updated'), - t('Created by current user'), - t('Block'), - t('Page'), - t('Edit events'), - t('Items on page'), - t('- All -'), - t('Start'), - t('« first'), - t('‹ previous'), - t('next ›'), - t('last »'), - ); - - $views[$view->name] = $view; - - $collaboration_tags = variable_get('culturefeed_entry_ui_custom_collaboration_tags', array()); - foreach ($collaboration_tags as $tag) { - - $tag_name = $tag['value']; - $tag_machine_name = str_replace(' ', '_', $tag['value']); - - $view = new view(); - $view->name = 'upcoming_collaboration_' . $tag_machine_name; - $view->description = ''; - $view->tag = 'default'; - $view->base_table = 'cdb_items'; - $view->human_name = 'Upcoming collaboration ' . $tag_name; - $view->core = 7; - $view->api_version = '3.0'; - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ - - /* Display: Master */ - $handler = $view->new_display('default', 'Master', 'default'); - $handler->display->display_options['title'] = 'Binnenkort'; - $handler->display->display_options['use_more_always'] = FALSE; - $handler->display->display_options['use_more_text'] = 'meer'; - $handler->display->display_options['access']['type'] = 'none'; - $handler->display->display_options['cache']['type'] = 'none'; - $handler->display->display_options['query']['type'] = 'views_query'; - $handler->display->display_options['exposed_form']['type'] = 'basic'; - $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Pas toe'; - $handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Opnieuw instellen'; - $handler->display->display_options['exposed_form']['options']['exposed_sorts_label'] = 'Sorteer op'; - $handler->display->display_options['exposed_form']['options']['sort_asc_label'] = 'Stijgend'; - $handler->display->display_options['exposed_form']['options']['sort_desc_label'] = 'Dalend'; - $handler->display->display_options['pager']['type'] = 'some'; - $handler->display->display_options['pager']['options']['items_per_page'] = '5'; - $handler->display->display_options['style_plugin'] = 'default'; - $handler->display->display_options['row_plugin'] = 'fields'; - /* Veld: UDB items: Afbeelding */ - $handler->display->display_options['fields']['picture']['id'] = 'picture'; - $handler->display->display_options['fields']['picture']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['picture']['field'] = 'picture'; - $handler->display->display_options['fields']['picture']['label'] = ''; - $handler->display->display_options['fields']['picture']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['picture']['override'] = 1; - $handler->display->display_options['fields']['picture']['width'] = '300'; - $handler->display->display_options['fields']['picture']['height'] = '300'; - $handler->display->display_options['fields']['picture']['link'] = 0; - /* Veld: UDB items: Titel */ - $handler->display->display_options['fields']['title']['id'] = 'title'; - $handler->display->display_options['fields']['title']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['title']['field'] = 'title'; - $handler->display->display_options['fields']['title']['label'] = ''; - $handler->display->display_options['fields']['title']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['title']['override'] = 1; - $handler->display->display_options['fields']['title']['link'] = 1; - /* Veld: UDB items: Short Description */ - $handler->display->display_options['fields']['description']['id'] = 'description'; - $handler->display->display_options['fields']['description']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['description']['field'] = 'description'; - $handler->display->display_options['fields']['description']['label'] = ''; - $handler->display->display_options['fields']['description']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['description']['override'] = 1; - /* Veld: UDB items: Kalendersamenvatting */ - $handler->display->display_options['fields']['when']['id'] = 'when'; - $handler->display->display_options['fields']['when']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['when']['field'] = 'when'; - $handler->display->display_options['fields']['when']['label'] = 'Wanneer'; - $handler->display->display_options['fields']['when']['element_label_colon'] = FALSE; - /* Veld: UDB items: Locatie */ - $handler->display->display_options['fields']['location']['id'] = 'location'; - $handler->display->display_options['fields']['location']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['location']['field'] = 'location'; - $handler->display->display_options['fields']['location']['label'] = 'Waar'; - $handler->display->display_options['fields']['location']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['location']['show'] = array( - 'city' => 'city', - 'title' => 0, - 'address' => 0, - ); - /* Veld: UDB items: Link */ - $handler->display->display_options['fields']['link']['id'] = 'link'; - $handler->display->display_options['fields']['link']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['link']['field'] = 'link'; - $handler->display->display_options['fields']['link']['label'] = ''; - $handler->display->display_options['fields']['link']['element_label_colon'] = FALSE; - /* Veld: UDB items: Categorie */ - $handler->display->display_options['fields']['category']['id'] = 'category'; - $handler->display->display_options['fields']['category']['table'] = 'cdb_items'; - $handler->display->display_options['fields']['category']['field'] = 'category'; - $handler->display->display_options['fields']['category']['label'] = ''; - $handler->display->display_options['fields']['category']['element_label_colon'] = FALSE; - $handler->display->display_options['fields']['category']['link'] = 1; - /* Sort criterion: UDB items: Gewicht */ - $handler->display->display_options['sorts']['weight_sort']['id'] = 'weight_sort'; - $handler->display->display_options['sorts']['weight_sort']['table'] = 'cdb_items'; - $handler->display->display_options['sorts']['weight_sort']['field'] = 'weight_sort'; - $handler->display->display_options['sorts']['weight_sort']['order'] = 'DESC'; - /* Sort criterion: UDB items: Datum */ - $handler->display->display_options['sorts']['date']['id'] = 'date'; - $handler->display->display_options['sorts']['date']['table'] = 'cdb_items'; - $handler->display->display_options['sorts']['date']['field'] = 'date'; - $handler->display->display_options['sorts']['date']['order'] = 'ASC'; - /* Filter criterion: UDB items: Datum */ - $handler->display->display_options['filters']['date']['id'] = 'date'; - $handler->display->display_options['filters']['date']['table'] = 'cdb_items'; - $handler->display->display_options['filters']['date']['field'] = 'date'; - $handler->display->display_options['filters']['date']['group'] = 1; - $handler->display->display_options['filters']['date']['option_absolute'] = '1'; - $handler->display->display_options['filters']['date']['relative_date'] = '+2 weeks'; - /* Filter criterion: UDB items: Labels */ - $handler->display->display_options['filters']['tags']['id'] = 'tags'; - $handler->display->display_options['filters']['tags']['table'] = 'cdb_items'; - $handler->display->display_options['filters']['tags']['field'] = 'tags'; - $handler->display->display_options['filters']['tags']['operator'] = 'and'; - $handler->display->display_options['filters']['tags']['group'] = 1; - $handler->display->display_options['filters']['tags']['keyword'] = array( - 0 => array( - 'value' => $tag_name, - 'not' => 0, - ), - 1 => array( - 'value' => '', - 'not' => 0, - ), - 2 => array( - 'value' => '', - 'not' => 0, - ), - 3 => array( - 'value' => '', - 'not' => 0, - ), - 4 => array( - 'value' => '', - 'not' => 0, - ), - 5 => array( - 'value' => '', - 'not' => 0, - ), - 6 => array( - 'value' => '', - 'not' => 0, - ), - 7 => array( - 'value' => '', - 'not' => 0, - ), - 8 => array( - 'value' => '', - 'not' => 0, - ), - 9 => array( - 'value' => '', - 'not' => 0, - ), - ); - - /* Display: Block */ - $handler = $view->new_display('block', 'Block', 'block'); - $translatables['upcoming_collaboration'] = array( - t('Master'), - t('Binnenkort'), - t('meer'), - t('Pas toe'), - t('Opnieuw instellen'), - t('Sorteer op'), - t('Stijgend'), - t('Dalend'), - t('Wanneer'), - t('Waar'), - t('Block'), - ); - - $views[$view->name] = $view; - - } - - return $views; -} diff --git a/culturefeed_entry_ui/views/handlers/views_handler_area_cdb_item_create.inc b/culturefeed_entry_ui/views/handlers/views_handler_area_cdb_item_create.inc deleted file mode 100644 index 6c4d65aa..00000000 --- a/culturefeed_entry_ui/views/handlers/views_handler_area_cdb_item_create.inc +++ /dev/null @@ -1,31 +0,0 @@ - $links)); - } - else { - return ''; - } - - } - -} diff --git a/culturefeed_entry_ui/views/handlers/views_handler_field_cdb_item_operations.inc b/culturefeed_entry_ui/views/handlers/views_handler_field_cdb_item_operations.inc deleted file mode 100644 index d875d01e..00000000 --- a/culturefeed_entry_ui/views/handlers/views_handler_field_cdb_item_operations.inc +++ /dev/null @@ -1,74 +0,0 @@ -getType() === 'event') { - - // Update and delete - $ops = array( - 'edit' => array( - 'permission' => 'edit culturefeed events', - 'title' => t('Edit'), - ), - 'delete' => array( - 'permission' => 'delete culturefeed events', - 'title' => t('Delete'), - ) - ); - - $user = $cf_account = DrupalCultureFeed::getLoggedInUser(); - $udb_permission = user_access('edit culturefeed events') && ($extended_entity->getEntity()->getCreatedBy() == $user->mbox); - - if ($udb_permission) { - foreach ($ops as $op => $op_details) { - $path = culturefeed_entry_ui_entity_path($extended_entity, $op); - if ($path && user_access($op_details['permission'])) { - $links[$op] = l($op_details['title'], $path); - } - } - } - else { - $links[] = ''; - } - - // Collaboration - $ops = array( - 'tags' => array( - 'permission' => 'manage object tags', - 'title' => t('Tags'), - ) - ); - foreach ($ops as $op => $op_details) { - $path = culturefeed_entry_ui_entity_path($extended_entity, $op); - if ($path && user_access($op_details['permission'])) { - $links[$op] = l($op_details['title'], $path); - } - } - - } - - if (!empty($links)) { - return theme('item_list', array('items' => $links)); - } - else { - return ''; - } - } - -} diff --git a/culturefeed_messages/culturefeed_messages.info b/culturefeed_messages/culturefeed_messages.info deleted file mode 100644 index 8a05911e..00000000 --- a/culturefeed_messages/culturefeed_messages.info +++ /dev/null @@ -1,7 +0,0 @@ -name = CultureFeed Messages -description = CultureFeed Messages adds the ability to send messages to other users. -package = CultureFeed -version = VERSION -core = 7.x - -dependencies[] = culturefeed \ No newline at end of file diff --git a/culturefeed_messages/culturefeed_messages.module b/culturefeed_messages/culturefeed_messages.module deleted file mode 100644 index 5b8e6bb5..00000000 --- a/culturefeed_messages/culturefeed_messages.module +++ /dev/null @@ -1,308 +0,0 @@ - array( - 'variables' => array( - 'messages' => NULL, - 'add_new_allowed' => FALSE, - ), - 'template' => 'culturefeed-messages-message-list', - 'path' => $path, - 'file' => 'theme.inc', - ), - 'culturefeed_messages_message_list_item'=> array( - 'variables' => array( - 'message' => NULL, - 'class_name' => NULL, - ), - 'template' => 'culturefeed-messages-message-list-item', - 'path' => $path, - 'file' => 'theme.inc', - ), - 'culturefeed_messages_thread' => array( - 'variables' => array( - 'thread' => NULL, - ), - 'template' => 'culturefeed-messages-thread', - 'path' => $path, - 'file' => 'theme.inc', - ), - 'culturefeed_messages_message_default' => array( - 'variables' => array( - 'message' => NULL, - ), - 'template' => 'culturefeed-messages-message-default', - 'path' => $path, - 'file' => 'theme.inc', - ), - 'culturefeed_messages_message_contactmembers' => array( - 'variables' => array( - 'message' => NULL, - ), - 'template' => 'culturefeed-messages-message-contactmembers', - 'path' => $path, - 'file' => 'theme.inc', - ), - 'culturefeed_messages_message_contactpage' => array( - 'variables' => array( - 'message' => NULL, - ), - 'template' => 'culturefeed-messages-message-contactpage', - 'path' => $path, - 'file' => 'theme.inc', - ), - 'culturefeed_messages_message_booking' => array( - 'variables' => array( - 'message' => NULL, - ), - 'template' => 'culturefeed-messages-message-booking', - 'path' => $path, - 'file' => 'theme.inc', - ), - 'culturefeed_messages_message_report' => array( - 'variables' => array( - 'message' => NULL, - ), - 'template' => 'culturefeed-messages-message-report', - 'path' => $path, - 'file' => 'theme.inc', - ), - 'culturefeed_messages_message_requestadmin' => array( - 'variables' => array( - 'message' => NULL, - ), - 'template' => 'culturefeed-messages-message-requestadmin', - 'path' => $path, - 'file' => 'theme.inc', - ), - 'culturefeed_messages_new_message_form' => array( - 'template' => 'culturefeed-messages-new-message-form', - 'render element' => 'form', - 'path' => $path, - ), - 'culturefeed_messages_total_messages_profile_box_item' => array( - 'variables' => array('total' => 0), - 'path' => $path, - 'file' => 'theme.inc', - ), - ); - -} - -/** - * Implements hook_menu(). - */ -function culturefeed_messages_menu() { - - $items = array(); - - $items['culturefeed/messages/%culturefeed_messages_message'] = array( - 'title' => 'My messages', - 'page callback' => 'culturefeed_messages_page_view_message', - 'page arguments' => array(2), - 'access callback' => 'culturefeed_is_culturefeed_user', - 'type' => MENU_CALLBACK, - 'file' => 'includes/pages.inc', - ); - - $items['culturefeed/messages/%culturefeed_messages_message/delete/%'] = array( - 'title' => 'Delete message', - 'page callback' => 'culturefeed_messages_page_delete_message_confirm', - 'page arguments' => array(2, 4), - 'access callback' => 'culturefeed_is_culturefeed_user', - 'type' => MENU_CALLBACK, - 'file' => 'includes/pages.inc', - ); - - if (module_exists('culturefeed_pages')) { - - $items['pages/%culturefeed_pages_page/messages/new'] = array( - 'title' => 'Messages', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('culturefeed_messages_new_message_form', 1), - 'access callback' => 'culturefeed_pages_edit_page_access', - 'access arguments' => array(1), - 'type' => MENU_CALLBACK, - 'file' => 'includes/pages.inc', - ); - - $items['pages/%culturefeed_pages_page/messages'] = array( - 'title' => 'Messages', - 'page callback' => 'culturefeed_messages_page_view_message', - 'page arguments' => array(NULL, 1), - 'access callback' => 'culturefeed_pages_edit_page_access', - 'access arguments' => array(1), - 'type' => MENU_CALLBACK, - 'file' => 'includes/pages.inc', - ); - - $items['pages/%culturefeed_pages_page/messages/%culturefeed_messages_message'] = array( - 'title' => 'Messages', - 'page callback' => 'culturefeed_messages_page_view_message', - 'page arguments' => array(4, 1), - 'access callback' => 'culturefeed_pages_edit_page_access', - 'access arguments' => array(1), - 'type' => MENU_CALLBACK, - 'file' => 'includes/pages.inc', - ); - - } - - $items['culturefeed/messages'] = array( - 'title' => 'My messages', - 'page callback' => 'culturefeed_messages_page_view_message', - 'access callback' => 'culturefeed_is_culturefeed_user', - 'type' => MENU_CALLBACK, - 'file' => 'includes/pages.inc', - ); - - $items['culturefeed/messages/new'] = array( - 'title' => 'Messages', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('culturefeed_messages_new_message_form'), - 'access callback' => 'culturefeed_pages_get_active_page_id', - 'type' => MENU_CALLBACK, - 'file' => 'includes/pages.inc', - ); - - return $items; - -} - -/** - * Implements hook_block_info(). - */ -function culturefeed_messages_block_info() { - - $blocks = array(); - - $blocks['inbox'] = array( - 'info' => t('Culturefeed messages: user inbox'), - 'cache' => DRUPAL_NO_CACHE, - ); - - if (module_exists('culturefeed_pages')) { - $blocks['page-inbox'] = array( - 'info' => t('Culturefeed messages: page inbox'), - 'cache' => DRUPAL_NO_CACHE, - ); - } - - return $blocks; - -} -/** - * Implements hook_block_view(). - */ -function culturefeed_messages_block_view($delta) { - - module_load_include('inc', 'culturefeed_messages', 'includes/blocks'); - - switch ($delta) { - - case 'inbox': - return culturefeed_messages_block_inbox(); - - case 'page-inbox': - $page = menu_get_object('culturefeed_pages_page', 1); - if (!$page || arg(2) != 'messages') { - return; - } - return culturefeed_messages_block_inbox($page); - - } - -} - -/** - * Implements hook_culturefeed_ui_profile_box_main_items(). - */ -function culturefeed_messages_culturefeed_ui_profile_box_main_items() { - - $items = array(); - try { - - $message_count = DrupalCultureFeed::getLoggedInUserInstance()->messages()->getMessageCount(); - - $items['messages'] = array( - 'data' => theme('culturefeed_messages_total_messages_profile_box_item', array( - 'total' => isset($message_count[CultureFeed_Messages_Default::MESSAGE_COUNT_UNREAD]) ? $message_count[CultureFeed_Messages_Default::MESSAGE_COUNT_UNREAD] : 0, - )), - 'class' => 'messages', - 'weight' => -20, - ); - } - catch (Exception $e) { - watchdog_exception('culturefeed_messages', $e); - } - - return $items; - -} - -/** - * Implements hook_culturefeed_pages_page_admin_menu(). - */ -function culturefeed_messages_culturefeed_pages_page_admin_menu_alter(&$items, CultureFeed_Cdb_Item_Page $page) { - - return array( - 'messages' => array( - 'title' => t('Messages'), - 'url' => 'pages/' . $page->getId() . '/messages', - 'description' => t('Read and reply to your messages'), - 'weight' => -18, - ), - ); - -} - -/** - * Implements hook_culturefeed_ui_profile_menu(). - */ -function culturefeed_messages_culturefeed_ui_profile_menu_alter(&$items) { - - return array( - 'messages' => array( - 'title' => t('My messages'), - 'url' => 'culturefeed/messages', - 'description' => t('Read and reply to your messages'), - 'weight' => -15, - ), - ); - -} - -/** - * Load a message by id. - * @param string $message_id - * ID of message to load. - */ -function culturefeed_messages_message_load($message_id) { - - $messages = array(); - if (isset($messages[$message_id])) { - return $messages[$message_id]; - } - - try { - $messages[$message_id] = DrupalCultureFeed::getLoggedInUserInstance()->messages()->getMessage($message_id); - } - catch (Exception $e) { - watchdog_exception('culturefeed_messages', $e); - $messages[$message_id] = FALSE; - } - - return $messages[$message_id]; - -} diff --git a/culturefeed_messages/includes/blocks.inc b/culturefeed_messages/includes/blocks.inc deleted file mode 100644 index c8b58404..00000000 --- a/culturefeed_messages/includes/blocks.inc +++ /dev/null @@ -1,36 +0,0 @@ -getId(); - $messages = DrupalCultureFeed::getLoggedInUserInstance()->messages()->getMessages($recipient_page); - } - catch (Exception $e) { - watchdog_exception('culturefeed_messages', $e); - return; - } - - $block['subject'] = 'Inbox'; - $block['content'] = array( - '#theme' => 'culturefeed_messages_message_list', - '#messages' => $messages, - '#add_new_allowed' => (!module_exists('culturefeed_pages') || culturefeed_pages_get_active_page_id()), // Only admins can send message with normal form. - ); - - return $block; - -} \ No newline at end of file diff --git a/culturefeed_messages/includes/pages.inc b/culturefeed_messages/includes/pages.inc deleted file mode 100644 index 04e13d90..00000000 --- a/culturefeed_messages/includes/pages.inc +++ /dev/null @@ -1,308 +0,0 @@ -getId(); - $messages = DrupalCultureFeed::getLoggedInUserInstance()->messages()->getMessages($recipient_page); - if ($messages->total == 0) { - return array('#markup' => t('You have no messages')); - } - - $message = DrupalCultureFeed::getLoggedInUserInstance()->messages()->getMessage($messages->objects[0]->id); - } - - } - catch (Exception $e) { - watchdog_exception('culturefeed_messages', $e); - return array('#markup' => t('Something went wrong while getting your message.')); - } - - $build = array(); - $build['message_thread'] = array( - '#theme' => 'culturefeed_messages_thread', - '#thread' => $message, - ); - - $build['reply-form'] = drupal_get_form('culturefeed_messages_new_message_form', $message); - - return $build; - -} - -/** - * Show the form to add a new message. - * @param $object - * Object to send this message to. Can be a page or a message. - */ -function culturefeed_messages_new_message_form($form, &$form_state, $object = NULL) { - - $form = array(); - $form['title'] = array('#markup' => t('New message')); - - $form['subject'] = array( - '#type' => 'textfield', - '#title' => t('Subject'), - ); - - $form['message'] = array( - '#type' => 'textarea', - '#title' => t('Message'), - ); - - // If empty object. Load active page. This form needs a page. - if (empty($object)) { - $object = culturefeed_pages_get_active_page(); - if (empty($object)) { - return; - } - } - - $send_as_option = TRUE; - // If we are on a page. Options are to members or to admins. - if ($object instanceof CultureFeed_Cdb_Item_Page) { - - try { - - $cf_pages = DrupalCultureFeed::getConsumerInstance()->pages(); - $user_list = $cf_pages->getUserList($object->getId(), array(CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN, CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER), FALSE); - - if (!empty($user_list->memberships)) { - - $member_count = 0; - $admin_count = 0; - - foreach ($user_list->memberships as $user_list_membership) { - if ($user_list_membership->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN) { - $admin_count++; - } - else { - $member_count++; - } - } - - } - - $form['recipient'] = array( - '#type' => 'radios', - '#title' => t('Send new message to:'), - '#options' => array( - CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN => t('all administrators of my page') . ' (' . $admin_count . ')', - CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER => t('all members of my page') . ' (' . $member_count . ')', - ), - ); - - $form_state['page'] = $object; - - } - catch (Exception $e) { - watchdog_exception('culturefeed_messages', $e); - return $form; - } - - } - // If object is a message. We are sending a reply. - elseif ($object instanceof CultureFeed_Messages_Message) { - $form['title']['#markup'] = t('Reply'); - $form['subject']['#value'] = 'RE:' . ' ' . $object->subject; - $form['subject']['#access'] = FALSE; - $form_state['reply_to'] = $object->id; - $form_state['message_type'] = $object->type; - } - - // Add select to choose the 'send as'. - if ($send_as_option) { - try { - - $cf_user = DrupalCultureFeed::getLoggedInUser(); - - if (!empty($cf_user->pageMemberships)) { - $send_as_options = array(); - foreach ($cf_user->pageMemberships as $membership) { - $send_as_options[$membership->page->getId()] = $membership->page->getName(); - } - - // Always use recipientPage as senderPage in replies - if ($object instanceof CultureFeed_Messages_Message && $object->recipientPage instanceof CultureFeed_Cdb_Item_Page) { - $form['send_as'] = array( - '#type' => 'hidden', - '#default_value' => $object->recipientPage->getId(), - ); - } - - else { - $form['send_as'] = array( - '#title' => t('Send message as'), - '#type' => 'select', - '#options' => $send_as_options, - '#default_value' => culturefeed_pages_get_active_page_id(), - ); - } - } - } - catch (Exception $e) { - watchdog_exception('culturefeed_messages', $e); - } - } - - $form['submit'] = array( - '#type' => 'submit', - '#value' => t('Send'), - ); - - return $form; - -} - -/** - * Validate the send message form. Try to send the message to the service. - * Note: only sending a page, or a reply is available in the UI. - */ -function culturefeed_messages_new_message_form_validate($form, &$form_state) { - - $params = array( - 'subject' => $form_state['values']['subject'], - 'body' => str_replace("\n", "
", $form_state['values']['message']), - ); - - if (!empty($form_state['values']['send_as'])) { - $params['senderPage'] = $form_state['values']['send_as']; - } - // New messages always use current page as default. - else { - if (module_exists('culturefeed_pages')) { - $curr_page = culturefeed_pages_get_active_page_id(); - if ($curr_page) { - $params['senderPage'] = $curr_page; - } - } - } - - // Check if we are sending to a page. - if (!empty($form_state['page'])) { - $params['recipientPage'] = $form_state['page']->getId(); - $params['role'] = $form_state['values']['recipient']; - $params['type'] = CultureFeed_Messages_Message::TYPE_MEMBERS; - } - // Check if we are sending a reply. - elseif (!empty($form_state['reply_to'])) { - $params['replyTo'] = $form_state['reply_to']; - $params['type'] = $form_state['message_type']; - } - else { - $params['recipient'] = $form_state['values']['recipient']; - } - - try { - $message_id = DrupalCultureFeed::getLoggedInUserInstance()->messages()->sendMessage($params); - } - catch (Exception $e) { - form_set_error('', t('Something went wrong while sending your message.')); - watchdog_exception('culturefeed_messages', $e); - } - -} - -/** - * Submit the new message form. - */ -function culturefeed_messages_new_message_form_submit($form, &$form_state) { - - drupal_set_message(t('Message send')); - - $form_state['redirect'] = 'culturefeed/messages'; - if (!empty($form_state['page'])) { - $form_state['redirect'] = 'pages/' . $form_state['page']->getId() . '/messages'; - } - - if (!empty($form_state['reply_to'])) { - $form_state['redirect'] .= '/' . $form_state['reply_to']; - } - -} - -/** - * Page callback to add a confirimation to the - * @param CultureFeed_Cdb_Item_Page $page - */ -function culturefeed_messages_page_delete_message_confirm($message, $request_type = 'ajax') { - - $form = drupal_get_form('culturefeed_messages_delete_message_confirm_form', $message, $request_type); - - if ($request_type == 'ajax') { - $output = drupal_render($form); - print $output; - } - else { - return $form; - } - -} - -/** - * Form confirmation callback to show a form to confirm the removal of a message. - */ -function culturefeed_messages_delete_message_confirm_form($form, &$form_state, CultureFeed_Messages_Message $message, $request_type) { - - if ($request_type == 'ajax') { - $form['#prefix'] = '' . t('Delete message') . '
'; - } - - $form_state['message'] = $message; - - $form['page_remove_confirm'] = array( - '#type' => 'markup', - '#markup' => ' -' . t('This action cannot be undone') . '
-' . t('Are you sure you want to delete this message?') . '
-
', - ); - - $form['remove'] = array( - '#type' => 'submit', - '#value' => t('Delete'), - '#attributes' => array('class' => array('button-remove')), - ); - - $form['decline'] = array( - '#type' => 'link', - '#title' => t('Cancel'), - '#href' => isset($_GET['destination']) ? $_GET['destination'] : 'culturefeed/messages/' . $message->id, - '#attributes' => array('class' => array('button-decline')), - ); - - return $form; - -} - -/** - * Function to actually delete the page. - */ -function culturefeed_messages_delete_message_confirm_form_submit($form, &$form_state) { - - $message = $form_state['message']; - - // Send request to remove the message. - try { - DrupalCultureFeed::getLoggedInUserInstance()->messages()->deleteMessage($message->id); - drupal_set_message(format_string(t('Message "@message" is deleted.'), array('@message' => $message->subject))); - } - catch (Exception $e) { - watchdog_exception('culturefeed_messages', $e); - drupal_set_message(t('Something went wrong while deleting your message.'), 'error'); - } - - $form_state['redirect'] = 'culturefeed/messages'; - -} diff --git a/culturefeed_messages/theme/culturefeed-messages-message-booking.tpl.php b/culturefeed_messages/theme/culturefeed-messages-message-booking.tpl.php deleted file mode 100644 index e1c64045..00000000 --- a/culturefeed_messages/theme/culturefeed-messages-message-booking.tpl.php +++ /dev/null @@ -1,15 +0,0 @@ -- - - - - -
- --diff --git a/culturefeed_messages/theme/culturefeed-messages-message-contactmembers.tpl.php b/culturefeed_messages/theme/culturefeed-messages-message-contactmembers.tpl.php deleted file mode 100644 index e1c64045..00000000 --- a/culturefeed_messages/theme/culturefeed-messages-message-contactmembers.tpl.php +++ /dev/null @@ -1,15 +0,0 @@ --
:
-
-:
- -- - - - - -
- --diff --git a/culturefeed_messages/theme/culturefeed-messages-message-contactpage.tpl.php b/culturefeed_messages/theme/culturefeed-messages-message-contactpage.tpl.php deleted file mode 100644 index e1c64045..00000000 --- a/culturefeed_messages/theme/culturefeed-messages-message-contactpage.tpl.php +++ /dev/null @@ -1,15 +0,0 @@ --
:
-
-:
- -- - - - - -
- --diff --git a/culturefeed_messages/theme/culturefeed-messages-message-default.tpl.php b/culturefeed_messages/theme/culturefeed-messages-message-default.tpl.php deleted file mode 100644 index e1c64045..00000000 --- a/culturefeed_messages/theme/culturefeed-messages-message-default.tpl.php +++ /dev/null @@ -1,15 +0,0 @@ --
:
-
-:
- -- - - - - -
- --diff --git a/culturefeed_messages/theme/culturefeed-messages-message-list-item.tpl.php b/culturefeed_messages/theme/culturefeed-messages-message-list-item.tpl.php deleted file mode 100644 index 09c08b7c..00000000 --- a/culturefeed_messages/theme/culturefeed-messages-message-list-item.tpl.php +++ /dev/null @@ -1,15 +0,0 @@ - - - ' . t('New') . '-
:
-
-:
- -
- - - - - -
- --diff --git a/culturefeed_messages/theme/culturefeed-messages-message-requestadmin.tpl.php b/culturefeed_messages/theme/culturefeed-messages-message-requestadmin.tpl.php deleted file mode 100644 index e1c64045..00000000 --- a/culturefeed_messages/theme/culturefeed-messages-message-requestadmin.tpl.php +++ /dev/null @@ -1,15 +0,0 @@ --
:
-
-:
- -
- - - - - -
- --diff --git a/culturefeed_messages/theme/culturefeed-messages-new-message-form.tpl.php b/culturefeed_messages/theme/culturefeed-messages-new-message-form.tpl.php deleted file mode 100644 index 18392a57..00000000 --- a/culturefeed_messages/theme/culturefeed-messages-new-message-form.tpl.php +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/culturefeed_messages/theme/culturefeed-messages-thread.tpl.php b/culturefeed_messages/theme/culturefeed-messages-thread.tpl.php deleted file mode 100644 index 3cc88c61..00000000 --- a/culturefeed_messages/theme/culturefeed-messages-thread.tpl.php +++ /dev/null @@ -1,13 +0,0 @@ --
:
-
-:
- -
|
:
-:
-:
-' . t('Sure you want to add @nick as a member?') . '
' . t('This action cannot be undone.') . '
', - ); - - if ($my_pages) { - $form['remove_confirm']['#markup'] .= '' . t('Are you sure you want to remove yourself as a member?') . '
' . t('Are you sure you want to remove this member?') . '
' . t('By deleting a page, the page will no longer appear in search results and all contact info will be removed.') . '
-' . t('Members of this page, and activities in the name of this page will not be deleted.') . '
-' . t('Are you sure?') . '
', - ); - - $form['footer_wrapper'] = array( - '#type' => 'markup', - '#prefix' => ' ', - ); - - $form['footer_wrapper']['remove'] = array( - '#type' => 'submit', - '#value' => t('Delete'), - '#attributes' => array('class' => array('button-remove btn btn-warning')), - '#submit' => array('culturefeed_pages_remove_page_confirm_form_submit'), - '#limit_validation_errors' => array(), - ); - - $form['footer_wrapper']['decline'] = array( - '#type' => 'link', - '#title' => t('Cancel'), - '#href' => 'pages/' . $page->getId() . '/configuration', - '#attributes' => array( - 'data-dismiss' => 'modal', - 'aria-hidden' => 'true', - 'class' => array('button-decline close btn') - ), - ); - - return $form; - -} - -/** - * Function to actually delete the page. - */ -function culturefeed_pages_remove_page_confirm_form_submit($form, &$form_state) { - - $form_state['redirect'] = ''; - $page = $form_state['page']; - - // Send request to remove a page. - try { - - $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages(); - $cf_pages->removePage($page->getId()); - drupal_set_message(format_string(t('Page "@page" is deleted.'), array('@page' => $page->getName()))); - - // Set the next available page as active. - culturefeed_pages_remove_active_page(); - $cf_user = DrupalCultureFeed::getLoggedInUser(); - if (!empty($cf_user->pageMemberships)) { - foreach ($cf_user->pageMemberships as $key => $membership) { - if ($membership->page->getId() != $page->getId()) { - culturefeed_pages_set_active_page($membership->page); - break; - } - } - } - } - catch (Exception $e) { - watchdog_exception('culturefeed_pages', $e); - return; - } - - // Also remove the activity for it. - try { - - $query = new CultureFeed_SearchActivitiesQuery(); - $query->max = 1; - $query->type = CultureFeed_Activity::TYPE_PAGE_CREATED; - $query->userId = $cf_user->id; - $query->nodeId = $page->getId(); - $activities = DrupalCultureFeed::searchActivities($query); - if ($activities && $activities->total > 0) { - DrupalCultureFeed::deleteActivity($activities->objects[0]->id); - } - } - catch (Exception $e) { - watchdog_exception('culturefeed_pages', $e); - } - -} - -/** - * Page callback to add a confirimation to the - * @param CultureFeed_Cdb_Item_Page $page - */ -function culturefeed_pages_publish_page_confirm($page) { - - $form = drupal_get_form('culturefeed_pages_publish_page_confirm_form', $page); - $output = drupal_render($form); - - print $output; - exit(); -} - -/** - * Form confirmation callback to show a form to confirm the publishing of a page. - */ -function culturefeed_pages_publish_page_confirm_form($form, &$form_state, $page) { - - $form_state['page_id'] = $page->getId(); - $form_state['page'] = $page; - - $form['wrapper'] = array( - '#type' => 'markup', - '#prefix' => '' . t('By publishing a page, the page will re-appear in the search results.') . '
-' . t('Members of this page, and activities in the name of this page will be recreated.') . '
-' . t('Are you sure?') . '
', - ); - - $form['wrapper']['publish'] = array( - '#type' => 'submit', - '#value' => t('Publish'), - '#attributes' => array('class' => array('button-publish')), - ); - - $form['wrapper']['decline'] = array( - '#type' => 'button', - '#value' => t('Cancel'), - '#attributes' => array( - 'data-dismiss' => 'modal', - 'aria-hidden' => 'true', - 'class' => array('button-decline close') - ), - ); - - return $form; - -} - -/** - * Function to actually publish the page. - */ -function culturefeed_pages_publish_page_confirm_form_submit($form, &$form_state) { - - $page = $form_state['page']; - - // Send request to (re-)publish a page. - try { - DrupalCultureFeed::getLoggedInUserInstance()->pages()->publishPage($page->getId()); - drupal_set_message(format_string(t('Page "@page" is recreated.'), array('@page' => $page->getName()))); - } - catch (Exception $e) { - watchdog_exception('culturefeed_pages', $e); - form_set_error('', t('There was an error while recreating the page.')); - } - - $form_state['redirect'] = culturefeed_search_detail_url("page", $page->getId(), $page->getName()); - -} - -/** - * Page callback to show a list of all agenda activities for a page. - */ -function culturefeed_pages_page_events(CultureFeed_Cdb_Item_Page $page) { - - $curr_page = isset($_GET['page']) ? $_GET['page'] : 0; - - // Add start index (page number we want) + items per page - $parameters[] = new \CultuurNet\Search\Parameter\Start($curr_page * CULTUREFEED_PAGES_ADMIN_EVENTS_COUNT); - $parameters[] = new \CultuurNet\Search\Parameter\Rows(CULTUREFEED_PAGES_ADMIN_EVENTS_COUNT); - - // Add grouping so returned events are not duplicate. - $parameters[] = new \CultuurNet\Search\Parameter\Group(); - - // Search on events that have a relation to the page ID. - $parameters[] = new \CultuurNet\Search\Parameter\FilterQuery('type:event'); - $parameters[] = new \CultuurNet\Search\Parameter\Query('"'.$page->getId().'"'); - - // Add sorting. - $sort_field = 'startdate'; - $direction = 'asc'; - if (isset($_GET['order'])) { - - $direction = $_GET['sort']; - - switch ($_GET['order']) { - - case t('Title'): - $sort_field = 'title_sort'; - break; - - case t('Date'): - $sort_field = 'startdate'; - break; - - case t('Reactions'): - $sort_field = 'comment_count'; - break; - - } - - } - - $parameters[] = new \CultuurNet\Search\Parameter\Sort($sort_field, $direction); - $service = culturefeed_get_search_service(); - - // Execute search and show results. - $build = array(); - try { - - $result = $service->search($parameters); - pager_default_initialize($result->getTotalCount(), CULTUREFEED_PAGES_ADMIN_EVENTS_COUNT); - - $build['page'] = array( - '#theme' => 'culturefeed_pages_events_admin_page', - '#items' => $result->getItems(), - '#page' => $page, - ); - } - catch (Exception $e) { - watchdog_exception('culturefeed_pages', $e); - $build['error'] = array('#markup' => t('There was an error while loading the activities.')); - } - - culturefeed_pages_set_page_breadcrumb($page); - - return $build; - -} - -/** - * Page callback to show an admin overview that contains all the news - * for given page. - */ -function culturefeed_pages_page_manage_news(CultureFeed_Cdb_Item_Page $page) { - - $curr_page = isset($_GET['page']) ? $_GET['page'] : 0; - - $query = new CultureFeed_SearchActivitiesQuery(); - $query->max = CULTUREFEED_PAGES_ADMIN_NEWS_COUNT; - $query->start = $curr_page * $query->max; - $query->type = CultureFeed_Activity::TYPE_NEWS; - $query->consumer = variable_get('culturefeed_api_application_key', ''); - $query->nodeId = $page->getId(); - $query->skipCache = TRUE; - - // Execute search and show results. - $build = array(); - try { - - $result = DrupalCultureFeed::searchActivities($query); - pager_default_initialize($result->total, CULTUREFEED_PAGES_ADMIN_NEWS_COUNT); - - $build['page'] = array( - '#theme' => 'culturefeed_pages_news_admin_page', - '#results' => $result->objects, - '#page' => $page, - ); - } - catch (Exception $e) { - watchdog_exception('culturefeed_pages', $e); - $build['error'] = array('#markup' => t('There was an error while loading the activities.')); - } - - culturefeed_pages_set_page_breadcrumb($page); - - return $build; -} - -/** - * Form callback to add a news item. - */ -function culturefeed_pages_add_news_form($form, &$form_state, CultureFeed_Cdb_Item_Page $page) { - - $form = array(); - - $form_state['page'] = $page; - - $form['title'] = array( - '#type' => 'textfield', - '#title' => t('Title'), - '#required' => TRUE, - ); - - $form['image'] = array( - '#type' => 'managed_file', - '#title' => t('Image'), - '#description' => t('Allowed extensions: jpg, jpeg, gif or png'), - '#size' => 26, - '#default_value' => '', - '#process' => array('file_managed_file_process', 'culturefeed_image_file_process'), - '#upload_validators' => array( - 'file_validate_extensions' => array('jpg jpeg png gif'), - ), - '#upload_location' => 'public://news', - ); - - $form['body'] = array( - '#type' => 'textarea', - '#title' => t('Message'), - '#required' => TRUE, - ); - - $form['submit'] = array( - '#type' => 'submit', - '#value' => t('Publish'), - ); - - return $form; -} - -/** - * Validate the news form. Create the activity. - */ -function culturefeed_pages_add_news_form_validate($form, $form_state) { - - // Don't create if other validations had errors. - $errors = form_get_errors(); - if ($errors) { - return; - } - - $activity = new CultureFeed_Activity(); - $activity->type = CultureFeed_Activity::TYPE_NEWS; - $activity->userId = DrupalCultureFeed::getLoggedInUserId(); - $activity->onBehalfOf = $form_state['page']->getId(); - $activity->contentType = 'page'; - $activity->nodeId = $form_state['page']->getId(); - $activity->nodeTitle = $form_state['page']->getName(); - - $value = new stdClass(); - $value->title = $form_state['values']['title']; - $value->body = $form_state['values']['body']; - - if (!empty($form_state['values']['image'])) { - $file = file_load($form_state['values']['image']); - $value->image = file_create_url($file->uri); - } - - $activity->value = json_encode($value); - - try { - DrupalCultureFeed::createActivity($activity); - // If activity created we need to change the status of the file to permanent - if (!empty($form_state['values']['image'])) { - $file = file_load($form_state['values']['image']); - $file->status = 1; - file_save($file); - } - } - catch (Exception $e) { - watchdog_exception('culturefeed_pages', $e); - form_set_error('', t('There was an error while creating the news item')); - } - -} - -/** - * Submit the 'add news' form, redirect to overview. - */ -function culturefeed_pages_add_news_form_submit($form, &$form_state) { - drupal_set_message(t('The news item %title was created', array('%title' => $form_state['values']['title']))); - $form_state['redirect'] = 'pages/' . $form_state['page']->getId() . '/news'; -} - -/** - * Form callback to show a confirmation form for deleting a news item. - */ -function culturefeed_pages_delete_news_form($form, &$form_state, $page, $news_item) { - - // Real title is stored in the json. - $title = $news_item->nodeTitle; - $content = json_decode($news_item->value); - if ($content && !empty($content->title)) { - $title = $content->title; - } - - $form_state['news'] = $news_item; - $form_state['title'] = $title; - $form_state['page'] = $page; - - return confirm_form($form, t('Are you sure you want to delete %title?', array('%title' => $title)), 'pages/' . $page->getId() . '/news', '' . t('This action cannot be undone.') . '
', t('Delete'), t('Cancel') - ); -} - -/** - * Submit the confirmation form. Delete the news item. - */ -function culturefeed_pages_delete_news_form_submit($form, &$form_state) { - - if ($form_state['values']['confirm']) { - - try { - DrupalCultureFeed::deleteActivity($form_state['news']->id); - $form_state['redirect'] = 'pages/' . $form_state['page']->getId() . '/news'; - drupal_set_message(t('News item %title has been deleted.', array('%title' => $form_state['title']))); - } - catch (Exception $e) { - drupal_set_message(t('There was an error while deleting your news item.', array('%title' => $form_state['title']))); - watchdog_exception('culturefeed_pages', $e); - } - - } - -} - -/** - * Page callback to show a list of my culturefeed pages. - */ -function culturefeed_pages_page_my_pages() { - - drupal_add_library('system', 'drupal.ajax'); - - $build = array(); - - try { - - $cf_user = DrupalCultureFeed::getLoggedInUser(); - $cf_pages = DrupalCultureFeed::getConsumerInstance()->pages(); - - // Build all the membership rows. - $membership_page_ids = array(); - if (!empty($cf_user->pageMemberships)) { - - $memberships = $cf_user->pageMemberships; - foreach ($memberships as $membership) { - - $is_page_admin = $membership->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN; - $admins_of_page = array(); - $path = culturefeed_search_detail_path('page', $membership->page->getId(), $membership->page->getName()); - - // We need the full user list of every page, to check if the user is the only admin. - if ($is_page_admin) { - $admin_link = l(t('Administer page'), $path); - $admins_of_page = culturefeed_pages_get_admins_of_page($membership->page); - } - else { - // Show request admin link. - $admin_link = theme('culturefeed_pages_admin_request_link', array( - 'page' => $membership->page, - 'cf_user' => $cf_user, - )); - } - - // If user is only admin, he can't delete his membership. - if ($is_page_admin && count($admins_of_page) == 1) { - $member_link = theme('culturefeed_pages_membership_delete_not_possible', array('page' => $membership->page)); - } - else { - $delete_options = array( - 'attributes' => array( - 'role' => 'button', - 'data-toggle' => 'modal', - 'data-target' => '#page_confirm', - 'data-remote' => url('pages/' . $membership->page->getId() . '/membership/delete/ajax'), - ), - ); - $member_link = l(t('Remove membership'), 'pages/' . $membership->page->getId() . '/membership/delete/nojs', $delete_options); - } - - $row = array( - l($membership->page->getName(), $path), - format_date($membership->creationDate, 'custom', 'd/m/Y H:i'), - $member_link, - $admin_link - ); - - $membership_page_ids[] = $membership->page->getId(); - $rows[] = $row; - - } - - // Pages where I am a member. - $build['member_pages'] = array( - '#theme' => 'table', - '#header' => array(t('Page'), t('Member since'), '', ''), - '#rows' => $rows, - ); - - } - - // Build all the follow rows. - if (!empty($cf_user->following)) { - - $followed_pages = $cf_user->following; - - $rows = array(); - foreach ($followed_pages as $followed_page) { - - $path = culturefeed_search_detail_path('page', $followed_page->page->getId(), $followed_page->page->getName()); - - $follow_link = l(t('Unfollow'), 'culturefeed/pages/defollow/nojs/' . $followed_page->page->getId(), array('attributes' => array('class' => array('use-ajax')))); - $become_member_link = t('You are a member of this page'); - if (!in_array($followed_page->page->getId(), $membership_page_ids)) { - $become_member_link = l(t('Become a member'), 'culturefeed/pages/join/nojs/' . $followed_page->page->getId(), array('attributes' => array('class' => array('use-ajax')))); - } - - $row = array( - l($followed_page->page->getName(), $path), - format_date($followed_page->creationDate, 'custom', 'd/m/Y H:i'), - $follow_link, - $become_member_link - ); - $rows[] = $row; - - } - - // Pages I follow. - $build['followed-pages'] = array( - '#theme' => 'table', - '#header' => array(t('Page'), t('Following since'), '', ''), - '#rows' => $rows, - ); - - } - - } - catch (Exception $e) { - watchdog_exception('culturefeed_pages', $e); - } - - $build['search-pages'] = culturefeed_pages_page_basic_search(); - - return array( - '#theme' => 'culturefeed_pages_page_my_pages', - '#build' => $build, - '#user' => $cf_user, - ); - -} - -/** - * Ajax callback to get the agenda of a page. - */ -function culturefeed_pages_page_ajax_get_agenda(CultureFeed_Cdb_Item_Page $page) { - - $requested_page = isset($_GET['page']) ? $_GET['page'] : 0; - $max_results = variable_get('pages_block_agenda_total_items', 5) * ($requested_page + 1); - - // Execute search and show results. - $result = culturefeed_pages_get_activities_from_page($page, $max_results); - if (!$result || $result->getTotalCount() == 0) { - return; - } - - // Render the results. - $search_results = $result->getItems(); - $items = array(); - foreach ($search_results as $search_result) { - $items[] = theme('culturefeed_' . $search_result->getType() . '_mini_summary', array('item' => $search_result)); - } - - $build = array(); - $build['list'] = array( - '#theme' => 'culturefeed_pages_page_agenda', - '#items' => $items, - '#page' => $page, - '#class' => 'page-activities', - ); - - if ($result->getTotalCount() > $max_results) { - $build['list']['#read_more_path'] = 'culturefeed/ajax/page/agenda/' . $page->getId(); - } - - $commands = array(ajax_command_replace('#page-agenda-ajax-wrapper-' . $page->getId(), render($build))); - - ajax_deliver(array('#type' => 'ajax', '#commands' => $commands)); -} diff --git a/culturefeed_pages/js/page_suggestions.js b/culturefeed_pages/js/page_suggestions.js deleted file mode 100644 index 707a6bb1..00000000 --- a/culturefeed_pages/js/page_suggestions.js +++ /dev/null @@ -1,21 +0,0 @@ -(function($) { - - // At page load, read the postal cookie and submit the form. - Drupal.behaviors.pageSuggestions = { - attach: function(context, settings) { - var $submit = $('#culturefeed-pages-page-suggestions-filter-form').find('#edit-submit'); - if ($submit.hasClass('ajax-processed')) { - $submit.once('suggestions-loaded', function() { - - var cookie = $.cookie('culturefeed_pages_suggestions_city'); - if (cookie) { - $('#culturefeed-pages-page-suggestions-filter-form').find('#edit-city').val(decodeURIComponent(cookie.replace(/\+/g, ' '))); - } - - $(this).trigger('mousedown'); - }); - } - } - } - -})(jQuery); \ No newline at end of file diff --git a/culturefeed_pages/lib/Drupal/PagesSearchPage.php b/culturefeed_pages/lib/Drupal/PagesSearchPage.php deleted file mode 100644 index 5a62b975..00000000 --- a/culturefeed_pages/lib/Drupal/PagesSearchPage.php +++ /dev/null @@ -1,122 +0,0 @@ -facetComponent)) { - $this->facetComponent = new Facet\FacetComponent(); - - // Retrieve search parameters and add some defaults. - $params = drupal_get_query_parameters(); - $params += array( - 'sort' => \CultuurNet\Search\ActivityStatsExtendedEntity::ACTIVITY_COUNT_PAGE_FOLLOW, - 'page' => 0, - 'search' => '', - 'facet' => array(), - ); - - $this->pageNumber = empty($params['page']) ? 1 : $params['page'] + 1; - - if (!empty($params['search'])) { - $this->addQueryTerm($params['search']); - } - - $this->addFacetFilters($params); - - $this->parameters[] = $this->facetComponent->facetField('category'); - $this->parameters[] = $this->facetComponent->facetField('city'); - - $this->execute($params); - } - } - - /** - * Execute the search for current page. - */ - protected function execute($params) { - - // Add start index (page number we want) - $this->start = $params['page'] * $this->resultsPerPage; - $this->parameters[] = new Parameter\Start($this->start); - - // Add items / page. - $this->parameters[] = new Parameter\Rows($this->resultsPerPage); - - // Add grouping so returned data is not duplicate. - $this->parameters[] = new Parameter\Group($this->group); - - // Add spellcheck if needed - if (!empty($this->query[0])) { - $this->parameters[] = new Parameter\Parameter('spellcheck', 'true'); - $this->parameters[] = new Parameter\Parameter('spellcheckQuery', $this->query[0]); - } - else { - $this->parameters[] = new Parameter\Parameter('spellcheck', 'false'); - } - - drupal_alter('culturefeed_search_page_query', $this); - - // Prepare the search query and add to the search parameters. - $this->parameters[] = $this->prepareQuery(); - - $this->result = culturefeed_get_search_service()->searchPages($this->parameters); - $this->facetComponent->obtainResults($this->result); - - } - - /** - * Gets a page description for all pages. - * - * Only type aanbod UiT domein, theme and location need to be prepared for search engines. - * - * @see culturefeed_search_ui_search_page() - * - * @return string - * Description for this type of page. - */ - public function getPageDescription() { - - $message = ""; - - $query = drupal_get_query_parameters(NULL, array('q')); - - if (empty($query)) { - $message = t("A summary of all pages on @site", array('@site' => variable_get('site_name', ''))); - } - else { - $message = t("A summary of all pages on @site", array('@site' => variable_get('site_name', ''))); - - if (!empty($query['regId'])) { - $term = culturefeed_search_get_term_translation($query['regId']); - $message .= t(" in @region", array('@region' => $term)); - } - elseif (!empty($query['location'])) { - $message .= t(" in @region", array('@region' => $query['location'])); - } - - if (!empty($query['facet']['category_actortype_id'][0])) { - $term = culturefeed_search_get_term_translation($query['facet']['category_actortype_id'][0]); - $message .= t(" of the type @type", array('@type' => $term)); - } - - } - - return $message; - } - -} \ No newline at end of file diff --git a/culturefeed_pages/theme/culturefeed-page-invisible.tpl.php b/culturefeed_pages/theme/culturefeed-page-invisible.tpl.php deleted file mode 100644 index d111f810..00000000 --- a/culturefeed_pages/theme/culturefeed-page-invisible.tpl.php +++ /dev/null @@ -1 +0,0 @@ - diff --git a/culturefeed_pages/theme/culturefeed-page-summary.tpl.php b/culturefeed_pages/theme/culturefeed-page-summary.tpl.php deleted file mode 100644 index 9f5be31b..00000000 --- a/culturefeed_pages/theme/culturefeed-page-summary.tpl.php +++ /dev/null @@ -1,56 +0,0 @@ - - -- -
- - - -- -
- - --
administrator privileges for this page. In order to make any changes, please change your active page:'); ?>
- - diff --git a/culturefeed_pages/theme/culturefeed-pages-block-page-suggestions.tpl.php b/culturefeed_pages/theme/culturefeed-pages-block-page-suggestions.tpl.php deleted file mode 100644 index d080541c..00000000 --- a/culturefeed_pages/theme/culturefeed-pages-block-page-suggestions.tpl.php +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - -list below shows all the activities that are currently published on your page.') ?>
-
- UiTdatabank .'); ?>
UiTdatabank .') ?>
- - - \ No newline at end of file diff --git a/culturefeed_pages/theme/culturefeed-pages-fellow-members-block.tpl.php b/culturefeed_pages/theme/culturefeed-pages-fellow-members-block.tpl.php deleted file mode 100644 index 3a822f6a..00000000 --- a/culturefeed_pages/theme/culturefeed-pages-fellow-members-block.tpl.php +++ /dev/null @@ -1,27 +0,0 @@ - \ No newline at end of file diff --git a/culturefeed_pages/theme/culturefeed-pages-followers-block.tpl.php b/culturefeed_pages/theme/culturefeed-pages-followers-block.tpl.php deleted file mode 100644 index e2d8cb8e..00000000 --- a/culturefeed_pages/theme/culturefeed-pages-followers-block.tpl.php +++ /dev/null @@ -1,24 +0,0 @@ - - - --
- - - - - - - - - diff --git a/culturefeed_pages/theme/culturefeed-pages-members-block.tpl.php b/culturefeed_pages/theme/culturefeed-pages-members-block.tpl.php deleted file mode 100644 index 0c321f86..00000000 --- a/culturefeed_pages/theme/culturefeed-pages-members-block.tpl.php +++ /dev/null @@ -1,25 +0,0 @@ - - - --
- - - - - - - - - - \ No newline at end of file diff --git a/culturefeed_pages/theme/culturefeed-pages-nearby-pages.tpl.php b/culturefeed_pages/theme/culturefeed-pages-nearby-pages.tpl.php deleted file mode 100644 index 7c2b04ed..00000000 --- a/culturefeed_pages/theme/culturefeed-pages-nearby-pages.tpl.php +++ /dev/null @@ -1,22 +0,0 @@ - - - - - -- | - | - | |
---|---|---|---|
- | - | - |
www.uitdatabank.be.'); ?>
- - -
-
-
-
-
-
\ No newline at end of file diff --git a/culturefeed_pages/theme/culturefeed-pages-user-search-result.tpl.php b/culturefeed_pages/theme/culturefeed-pages-user-search-result.tpl.php deleted file mode 100644 index 3add4bcf..00000000 --- a/culturefeed_pages/theme/culturefeed-pages-user-search-result.tpl.php +++ /dev/null @@ -1,21 +0,0 @@ - - - - -
' . t('You are following this page now') . '
'; - - if ($variables['page']->getPermissions()->allowMembers && !culturefeed_pages_is_user_member_of_page($variables['page']->getId())) { - $message .= '' . t('Want to join this page?') . ' '; - $message .= l(t('Become a member'), 'culturefeed/pages/join/nojs/' . $variables['page']->getId(), array( - 'attributes' => array('class' => array('use-ajax')))); - } - - return $message; - -} - -/** - * Theme the message when an unfollow action was succesfull. - */ -function theme_culturefeed_pages_unfollow_success_message($variables) { - return '
' . t('You are no longer following this page anymore') . '
'; -} - -/** - * Theme the message when a user is anonymous, and the follow link would be displayed. - */ -function theme_culturefeed_pages_login_required_message($variables) { - - if ($variables['action'] == CultureFeed_Pages_Default::ACTION_BECOME_MEMBER) { - $message = t('You must be logged in to join this page.'); - } - else { - $message = t('You must be logged in to follow this page.'); - } - - return '', - '#suffix' => '
' . t('This user didn\'t perform any actions yet') . '
' - ); - } - else { - - if (!empty($active_types) && $activities->total > 20) { - $content['filter'] = drupal_get_form('culturefeed_social_user_activity_filter_form', 'all', TRUE, $account); - } - - if ($account->culturefeed_uid == DrupalCultureFeed::getLoggedInUserId()) { - - $content['edit'] = array( - '#markup' => '' . l(' ' . t('Manage your actions'), 'culturefeed/activities', array('html' => TRUE, 'attributes' => array('class' => array('manage-activities-link')))) . '
', - ); - - $facebook = _culturefeed_ui_facebook_privacy_toggle(); - if ($facebook) { - $item_list = array( - '#theme' => 'item_list', - '#attributes' => array( - 'id' => 'facebook-privacy-toggle', - ), - '#items' => array( - array( - 'data' => $facebook, - 'id' => 'onlineaccount-facebook', - ), - ), - ); - $content['facebook'] = array( - '#markup' => drupal_render($item_list), - ); - } - - } - - - $content['activities'] = array( - '#theme' => 'culturefeed_social_user_activity_list', - '#activities' => $activities, - '#class' => 'user-activity-list', - '#attached' => array('js' => array(drupal_get_path('module', 'culturefeed_social') . '/js/activities.js')), - ); - - if ($activities->total > count($activities->objects)) { - $content['activities']['#read_more_url'] = url('culturefeed/ajax/user/activities', array('query' => array('culturefeed_uid' => $account->culturefeed_uid))); - $content['activities']['#read_more_text'] = t('Read previous messages'); - } - - } - - $block['subject'] = t('Recent actions'); - $block['content'] = $content; - - return $block; - -} - -/** - * Block callback to render the comments on an item. - * @param misc $object - * @return array - **/ -function culturefeed_social_block_comments($object) { - - if (!$object || !method_exists($object, 'getType') || arg(4) == 'edit' || arg(4) == 'tags') { - return; - } - - // When you want to show comments on a node. The field_comments_enabled should be checked. - if ($object instanceof DrupalNodeExtendedEntity) { - $status = field_get_items('node', $object->getEntity(), 'field_comments_enabled'); - if (!$status || !$status[0]['value']) { - return; - } - } - - $content_type = culturefeed_get_content_type($object->getType()); - - $query = new CultureFeed_SearchActivitiesQuery(); - $query->type = CultureFeed_Activity::TYPE_COMMENT; - //$query->contentType = $content_type; - $query->nodeId = culturefeed_social_get_activity_node_id($content_type, $object); - $query->depth = 2; - - try { - $activities = DrupalCultureFeed::searchActivities($query); - } - catch (Exception $e) { - watchdog_exception('culturefeed_social', $e); - return; - } - - $content = array(); - $content['comment_list'] = culturefeed_social_comment_list($object, $activities); - $content['comment_form'] = culturefeed_social_comment_actionbox($object); - - $block['subject'] = t('Comments'); - $block['content'] = $content; - - return $block; - -} - -/** - * Show a block with the latest notifications for this user. - */ -function culturefeed_social_block_my_notifications() { - - if (!culturefeed_is_culturefeed_user()) { - return; - } - - $block = array(); - $block['subject'] = t('My notifications'); - $block['content'] = array('#markup' => '' . ($config->action ? t('Are you sure you want to delete your @action permanently', array('@action' => $config->action)) : t('Are you sure you want to delete this action permanently')) . '?
.
- -' . implode('
', array_unique($prices)) . '
'; - } - - // Promotions. - if ($vars['organiser']) { - module_load_include('inc', 'culturefeed_uitpas', 'includes/event_details_advantages'); - $promotions = culturefeed_uitpas_event_details_advantages_get($vars['organiser']['id'], $vars['organiser']['title']); - $vars['uitpas_promotions'] = drupal_render($promotions); - } - - } - } - -} - -/** - * Preprocess function to add classes to radio input elements. - */ -function culturefeed_uitpas_preprocess_culturefeed_uitpas_filter_labels(&$variables) { - $attributes = array(); - if (isset($variables['element']['#id'])) { - $attributes['id'] = $variables['element']['#id']; - } - $attributes['class'] = 'form-radios'; - if (!empty($variables['element']['#attributes']['class'])) { - $attributes['class'] .= ' ' . implode(' ', $variables['element']['#attributes']['class']); - } - if (isset($variables['element']['#attributes']['title'])) { - $attributes['title'] = $variables['element']['#attributes']['title']; - } - foreach (element_children($variables['element']) as $child) { - $variables['element'][$child]['#prefix'] = ''; - $variables['element'][$child]['#suffix'] = ''; - $variables['element'][$child]['#attributes']['data-counter'] = drupal_html_class($variables['element'][$child]['#title']); - $rendered_child = drupal_render($variables['element'][$child]); - - $variables['element']['#children'] .= $rendered_child; - } - $variables['#attributes'] = $attributes; -} - -/** - * Implements hook_preprocess_culturefeed_uitpas_register_cta(). - */ -function culturefeed_uitpas_preprocess_culturefeed_uitpas_register_cta(&$vars) { - $vars['intro'] = t('Register here, so you can follow your UiTPAS advantages and points balance online.'); - $vars['register_link'] = l(t('Register your UiTPAS'), 'culturefeed/oauth/connect', array('query' => array('destination' => 'register_uitpas'))); - $vars['get_title'] = t('No UiTPAS yet?'); - $vars['get_link'] = l(t('Get an UiTPAS'), 'register_where'); -} - -/** - * Implements hook_preprocess_culturefeed_uitpas_profile_section_register(). - */ -function culturefeed_uitpas_preprocess_culturefeed_uitpas_profile_section_register(&$vars) { - - if(culturefeed_uitpas_not_yet_registered()) { - $vars['intro_title'] = t('You did not register your UiTPAS yet.'); - $vars['intro_text'] = t('Register here, so you can follow your UiTPAS advantages and points balance online.'); - $vars['cta_link'] = l(t('Register your UiTPAS'), 'register_uitpas'); - } - - else { - $vars['intro_title'] = t('No UiTPAS yet?'); - $vars['intro_text'] = t('Holders of an UiTPAS can earn points by participating in leisure activities and exchange them for') . ' ' . l(t('nice benefits'), 'promotions') . '.'; - $vars['cta_link'] = l(t('Get an UiTPAS'), 'register_where'); - } -} diff --git a/culturefeed_uitpas/culturefeed_uitpas.variable.inc b/culturefeed_uitpas/culturefeed_uitpas.variable.inc deleted file mode 100644 index 3050ca99..00000000 --- a/culturefeed_uitpas/culturefeed_uitpas.variable.inc +++ /dev/null @@ -1,24 +0,0 @@ - array( - 'title' => t('Culturefeed uitpas: profile notifications: intro'), - 'localize' => TRUE, - ), - 'culturefeed_uitpas_promotions_highlight_more_link_text' => array( - 'title' => t('Culturefeed uitpas: promotions highlight: more link text'), - 'localize' => TRUE, - ), - ); - -} diff --git a/culturefeed_uitpas/images/default.png b/culturefeed_uitpas/images/default.png deleted file mode 100644 index 36382ea7..00000000 Binary files a/culturefeed_uitpas/images/default.png and /dev/null differ diff --git a/culturefeed_uitpas/includes/activate.inc b/culturefeed_uitpas/includes/activate.inc deleted file mode 100644 index 9037f131..00000000 --- a/culturefeed_uitpas/includes/activate.inc +++ /dev/null @@ -1,37 +0,0 @@ - array('destination' => 'registration_confirmation'), - 'absolute' => TRUE, - ); - $callback_url = url('culturefeed/oauth/authorize', $callback_options); - - $token = $cf->getRequestToken($callback_url); - - $_SESSION['oauth_token'] = $token['oauth_token']; - $_SESSION['oauth_token_secret'] = $token['oauth_token_secret']; - - $auth_url = $cf->getUrlAuthorize($token, $callback_url, CultureFeed::AUTHORIZE_TYPE_REGULAR, TRUE); - - $link = $cf->uitpas()->constructPassHolderActivationLink($uid, $code, $auth_url); - - drupal_goto($link); -} diff --git a/culturefeed_uitpas/includes/advantage_details.inc b/culturefeed_uitpas/includes/advantage_details.inc deleted file mode 100644 index c70721d7..00000000 --- a/culturefeed_uitpas/includes/advantage_details.inc +++ /dev/null @@ -1,31 +0,0 @@ -title)) { - drupal_goto('advantage/' . culturefeed_search_slug($advantage->title) . '/' . $advantage->id, array(), 301); - } - - return array( - '#advantage' => $advantage, - '#theme' => 'culturefeed_uitpas_advantage', - ); - -} - -/** - * Returns advantage details title. - */ -function culturefeed_uitpas_advantage_details_title_get($advantage) { - - return $advantage->title; - -} diff --git a/culturefeed_uitpas/includes/advantages.inc b/culturefeed_uitpas/includes/advantages.inc deleted file mode 100644 index a395140b..00000000 --- a/culturefeed_uitpas/includes/advantages.inc +++ /dev/null @@ -1,215 +0,0 @@ -start = $advantages_page * $advantages_max; - $query->max = $advantages_max; - $query->unexpired = TRUE; - $query->cashingPeriodBegin = time(); - $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id'); - if ($card_system_id) { - $query->applicableCardSystemId = $card_system_id; - } - if ($filter) { - $query->owningCardSystemId = $filter; - } - $result = $cf->uitpas()->searchWelcomeAdvantages($query); - $advantages = $result->objects; - $advantages_total = $result->total; - - } - catch (Exception $e) { - - watchdog_exception('culturefeed_uitpas_advantages', $e); - pager_default_initialize(0, $advantages_max, $advantages_pager_element); - - } - - return array( - '#theme' => 'culturefeed_uitpas_advantages', - '#advantages' => $advantages, - '#advantages_total' => $advantages_total, - '#advantages_pager_element' => $advantages_pager_element, - ); - -} - -/** - * Returns form elements for advantages promotions settings. - */ -function culturefeed_uitpas_advantages_settings_get(&$form) { - - $form['advantages'] = array( - '#type' => 'fieldset', - '#title' => t('UiTPAS advantages settings'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, - ); - $form['advantages']['culturefeed_uitpas_advantages_advantages_max'] = array( - '#type' => 'textfield', - '#title' => t('Number of advantages to display'), - '#default_value' => variable_get('culturefeed_uitpas_advantages_advantages_max', 20), - ); - -} - -/** - * Returns form elements for filter & sort on promotions page. - */ -function culturefeed_uitpas_advantages_filter_sort($form, $form_state) { - - // If advantages aren't shown above promotions, fall back to links to toggle between both - if (variable_get('culturefeed_uitpas_show_advantages_above_promotions') == FALSE) { - $form['advantages_link'] = array( - '#attributes' => array( - 'id' => 'promotions_link' - ), - '#links' => array( - 'promotions' => array( - 'href' => 'promotions', - 'title' => t('Promotions'), - ), - 'advantages' => array( - 'href' => 'advantages', - 'title' => t('Welcome Advantages'), - ), - ), - '#theme' => 'links', - ); - } - - $card_systems = culturefeed_uitpas_get_card_systems(); - $multiple_card_systems = culturefeed_uitpas_multiple_cardsystems(); - - if ($multiple_card_systems) { - $filter = isset($form_state['values']['filter']) ? $form_state['values']['filter'] : (isset($_GET['filter']) ? $_GET['filter'] : NULL); - } - // If only one cardsystem is enabled, use default filter option - else { - $filter = $card_systems[0]->id; - } - - $advantages = culturefeed_uitpas_advantages_get($filter); - - $id = drupal_html_id('advantages-filter-sort'); - - $form['advantages']['#prefix'] = "' . l(t('Show all advantages'), 'advantages', $options) . '
'; - } - - if (count($promotions['#promotions'])) { - $form['promotions']['result']['#markup'] = theme('culturefeed_uitpas_promotions_table', $promotions); - } - else { - $form['promotions']['result']['#markup'] = '' . format_string(t('Already registered? Apply here.'), $args) . '
'; - - } - - return $form; - -} - -/** - * Form validation handler for culturefeed_uitpas_user_register_form(). - */ -function culturefeed_uitpas_user_register_form_validate(&$form, &$form_state) { - - $number = str_replace(' ', '', $form_state['values']['uitpasnumber']); - $dob = $form_state['values']['dob']['year'] . '-' . $form_state['values']['dob']['month'] . '-' . $form_state['values']['dob']['day']; - $dob = new DateTime($dob); - - $cf = DrupalCultureFeed::getConsumerInstance(); - if ($number) { - - try { - - $callback_options = array( - 'query' => array('isnewpassholder' => 'true'), - 'absolute' => TRUE, - ); - $callback_url = url('culturefeed/oauth/authorize', $callback_options); - - $activation_data = new CultureFeed_Uitpas_Passholder_Query_ActivationData(); - $activation_data->uitpasNumber = $number; - $activation_data->dob = $dob; - - $link = $cf->uitpas()->getPassholderActivationLink($activation_data, function () use ($cf, $callback_url) { - - $token = $cf->getRequestToken($callback_url); - - $_SESSION['oauth_token'] = $token['oauth_token']; - $_SESSION['oauth_token_secret'] = $token['oauth_token_secret']; - - $auth_url = $cf->getUrlAuthorize($token, $callback_url, CultureFeed::AUTHORIZE_TYPE_REGULAR, TRUE); - - return $auth_url; - - }); - - $form_state['values']['link'] = $link; - - } - catch (CultureFeed_Exception $e) { - - switch ($e->error_code) { - case 'INVALID_DOB': - $error = variable_get('culturefeed_uitpas_user_register_validation_invalid_dob', t('Invalid date of birth.')); - form_set_error('dob', $error); - break; - - case 'PARSE_INVALID_UITPASNUMBER': - $error = variable_get('culturefeed_uitpas_user_register_validation_parse_invalid_uitpasnumber', t('Invalid UiTPAS number.')); - form_set_error('number', $error); - break; - - case 'USER_ALREADY_ACTIVATED': - $error = variable_get('culturefeed_uitpas_user_register_validation_user_already_activated', t('User already activated.')); - form_set_error('number', $error); - break; - - case 'MISSING_REQUIRED_FIELDS': - $error = variable_get('culturefeed_uitpas_user_register_validation_user_missing_required_fields', t('Missing required fields.')); - form_error($form, $error); - break; - - case 'PARSE_INVALID_DATE': - $error = variable_get('culturefeed_uitpas_user_register_validation_parse_invalid_date', t('Invalid date.')); - form_set_error('dob', $error); - break; - - case 'UNKNOWN_UITPASNUMBER': - $error = variable_get('culturefeed_uitpas_user_register_validation_unknown_uitpasnumber', t('Unknown UiTPAS number.')); - form_set_error('number', $error); - break; - - case 'ACTION_FAILED': - $error = variable_get('culturefeed_uitpas_user_register_validation_action_failed', t('Action failed.')); - form_error($form, $error); - break; - - default: - form_error($form, t('We are unable to process your request at this moment. Please try again later.')); - watchdog(__FUNCTION__, 'Unexpected error code when validating UiTPAS: @code', array('@code' => $e->error_code), WATCHDOG_WARNING); - } - } - catch (Exception $e) { - form_error($form, t('We are unable to process your request at this moment. Please try again later.')); - watchdog_exception('culturefeed_uitpas_user_register_form_validate', $e); - } - } - -} - -/** - * Form submission handler for culturefeed_uitpas_user_register_form(). - */ -function culturefeed_uitpas_user_register_form_submit(&$form, &$form_state) { - $form_state['redirect'] = $form_state['values']['link']; -} - -/** - * Modifies the year element of a date form element. - */ -function culturefeed_uitpas_user_register_form_process_year($element) { - - $year = date('Y'); - // 1900 is hardcoded in inludes/form.inc - $element['year']['#options'] = array_slice($element['year']['#options'], 0, $year - 1900 + 1, TRUE); - return $element; - -} diff --git a/culturefeed_uitpas/js/script.js b/culturefeed_uitpas/js/script.js deleted file mode 100644 index 3d433be9..00000000 --- a/culturefeed_uitpas/js/script.js +++ /dev/null @@ -1,9 +0,0 @@ -(function ($) { - - Drupal.CultureFeed = Drupal.CultureFeed || {}; - - Drupal.CultureFeed.UiTPASToggleExchangeInfo = function() { - $('.how-to-exchange .exchange-info').toggle(); - }; - -})(jQuery); \ No newline at end of file diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-advantage.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-advantage.tpl.php deleted file mode 100644 index 4d7afac5..00000000 --- a/culturefeed_uitpas/theme/culturefeed-uitpas-advantage.tpl.php +++ /dev/null @@ -1,59 +0,0 @@ - -- | - |
---|---|
name; ?> | -endDate); ?> | -
:
- -- | - | - |
:
\ No newline at end of file diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-block-more-promotions.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-block-more-promotions.tpl.php deleted file mode 100644 index 548da21d..00000000 --- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-block-more-promotions.tpl.php +++ /dev/null @@ -1,36 +0,0 @@ - - -- - -
- - -
- - - - - - - - -- - - - - - - -
\ No newline at end of file diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-exchange-form.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-exchange-form.tpl.php deleted file mode 100644 index d16abd67..00000000 --- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-exchange-form.tpl.php +++ /dev/null @@ -1,27 +0,0 @@ - - -- - -
- - -
- diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-page.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-page.tpl.php deleted file mode 100644 index 008b5aaf..00000000 --- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-page.tpl.php +++ /dev/null @@ -1,15 +0,0 @@ - - - - -- | - | - | - |
---|
' . t('Congratulations! you collected') . ' ' . $points_message . ' ' . t('and have now') . ' ' . $total_points_message . '
'; - - return $message; - -} - -/** - * Theme the message when a user lost some points. - */ -function theme_culturefeed_userpoints_ui_points_lost_message($variables) { - - $activity = $variables['activity']; - $points = CultureFeedUserpointsWishlist::getRealPoints($activity->points); - $total_points = CultureFeedUserpointsWishlist::getRealPoints($activity->newTotalPoints); - - $points_message = format_plural($points, '@count punt', '@count punten'); - $total_points_message = format_plural($total_points, '@count punt', '@count punten'); - - $config = CultureFeedActivityConfigBase::loadByType($activity->type); - if (!$config) { - return; - } - - $message = '' . t('You lost') . ' ' . $points_message . ' ' . t('with your @action and have now', array('@action' => strtolower($config->action))) . ' ' . $total_points_message . '
'; - - return $message; -} - -/** - * Theme function for a message when the userpoints were exchanged. - * @param array $variables - */ -function theme_culturefeed_userpoints_ui_points_exchanged_message($variables) { - - return t('Thank you, your points have been exchanged. Your gift will be sent shortly to the specified address.'); - -} - -/** - * Preprocess the exchange confirmation page. - * @see culturefeed-userpoints-ui-page-exchange-confirmation.tpl.php - */ -function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_page_exchange_confirmation(&$variables) { - - $variables['total_points'] = 0; - try { - $cf_user = DrupalCultureFeed::getLoggedInUser(); - $variables['total_points'] = CultureFeedUserpointsWishlist::getRealPoints($cf_user->points); - } - catch (Exception $e) { - watchdog_exception('culturefeed_userpoints_ui', $e); - } - -} diff --git a/culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.de.po b/culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.de.po deleted file mode 100755 index 8af7c40b..00000000 --- a/culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.de.po +++ /dev/null @@ -1,442 +0,0 @@ -# -# Dutch translation of Drupal (general) -# Copyright YEAR NAME