From a18c2f207e5c4f462dd3efedebc0eb179058402a Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 5 Nov 2019 13:58:49 +0100
Subject: [PATCH 01/16] 4.0 release: Move culturefeed calendar to own repo
---
.../css/culturefeed_calendar_anonymous.css | 3 -
.../culturefeed_calendar.info | 8 -
.../culturefeed_calendar.module | 368 --------
culturefeed_calendar/includes/admin.inc | 22 -
culturefeed_calendar/includes/helpers.inc | 632 --------------
culturefeed_calendar/includes/pages.inc | 786 ------------------
culturefeed_calendar/js/clipboard.min.js | 7 -
.../js/culturefeed_calendar.js | 87 --
.../js/culturefeed_calendar_clipboard.js | 20 -
...turefeed-calendar-activities-going.tpl.php | 23 -
...turefeed-calendar-activities-liked.tpl.php | 15 -
...culturefeed-calendar-activity-mini.tpl.php | 11 -
...turefeed-calendar-activity-summary.tpl.php | 66 --
.../culturefeed-calendar-button-hover.tpl.php | 8 -
.../theme/culturefeed-calendar-button.tpl.php | 20 -
.../culturefeed-calendar-nav-months.tpl.php | 18 -
.../theme/culturefeed-calendar-page.tpl.php | 48 --
...culturefeed-calendar-settings-page.tpl.php | 9 -
.../culturefeed-calendar-share-page.tpl.php | 34 -
culturefeed_calendar/theme/theme.inc | 408 ---------
.../translations/culturefeed_calendar.nl.po | 388 ---------
21 files changed, 2981 deletions(-)
delete mode 100644 culturefeed_calendar/css/culturefeed_calendar_anonymous.css
delete mode 100644 culturefeed_calendar/culturefeed_calendar.info
delete mode 100644 culturefeed_calendar/culturefeed_calendar.module
delete mode 100644 culturefeed_calendar/includes/admin.inc
delete mode 100644 culturefeed_calendar/includes/helpers.inc
delete mode 100644 culturefeed_calendar/includes/pages.inc
delete mode 100644 culturefeed_calendar/js/clipboard.min.js
delete mode 100644 culturefeed_calendar/js/culturefeed_calendar.js
delete mode 100644 culturefeed_calendar/js/culturefeed_calendar_clipboard.js
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-activities-going.tpl.php
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-activities-liked.tpl.php
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-activity-mini.tpl.php
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-activity-summary.tpl.php
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-button-hover.tpl.php
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-button.tpl.php
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-nav-months.tpl.php
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-page.tpl.php
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-settings-page.tpl.php
delete mode 100644 culturefeed_calendar/theme/culturefeed-calendar-share-page.tpl.php
delete mode 100644 culturefeed_calendar/theme/theme.inc
delete mode 100644 culturefeed_calendar/translations/culturefeed_calendar.nl.po
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 = '' . t('Possible dates') . ':' . ' ' . $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' => '' . t('Are you sure you want to remove \'!title\' from your calender?', array('!title' => $params['node_title'])) . ' ',
- );
-
- $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;ar;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;a>i;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},e.exports=r},{}],8:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n show all add to calendars.
- $(".btn-add-calendar").show();
- $(".btn-like-calendar").show();
- }
- }
-
- /**
- * Show how many activites are currently stored in the cookie.
- */
- Drupal.CultureFeed.Calendar.showTotalAdded = function() {
-
- var $calendarItem = $('.calendar-popover-link');
-
- // Get cookie calendar information.
- if (Drupal.CultureFeed.Calendar.cookieJson !== null) {
-
- // Count the cookie event objects.
- var total = 0;
- $.each(Drupal.CultureFeed.Calendar.cookieJson, function(index, value) {
- total++;
- });
-
- // set the label and value if needed.
- // show popover by triggering click
- // not trigger on calendar-page!
- if (total > 0) {
- if (document.location.href.search("/culturefeed/calendar")==-1){
- $calendarItem.show();
- $('.calendar-popover-link').trigger('click');
- }
-
- }
- }
- }
-
-})(jQuery);
diff --git a/culturefeed_calendar/js/culturefeed_calendar_clipboard.js b/culturefeed_calendar/js/culturefeed_calendar_clipboard.js
deleted file mode 100644
index ac243659..00000000
--- a/culturefeed_calendar/js/culturefeed_calendar_clipboard.js
+++ /dev/null
@@ -1,20 +0,0 @@
-(function($) {
-
- Drupal.CultureFeed = Drupal.CultureFeed || {};
- Drupal.CultureFeed.Calendar = Drupal.CultureFeed.Calendar || {};
-
- $(document).ready(function() {
- Drupal.CultureFeed.Calendar.copyToClipboard();
- });
-
- Drupal.CultureFeed.Calendar.copyToClipboard = function() {
-
- var clipboard = new Clipboard('.js-copy-to-clipboard');
- clipboard.on('success', function(e) {
- $(".status").show().delay(2000).fadeOut('slow');
- });
-
- }
-
-
-})(jQuery);
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-activities-going.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-activities-going.tpl.php
deleted file mode 100644
index 27b95eb7..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-activities-going.tpl.php
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- $activities): ?>
-
-
-
-
-
- $activity, 'my_calendar' => $my_calendar)) ?>
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-activities-liked.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-activities-liked.tpl.php
deleted file mode 100644
index 07663859..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-activities-liked.tpl.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
- $activity)); ?>
-
-
-
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-activity-mini.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-activity-mini.tpl.php
deleted file mode 100644
index dbd458a1..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-activity-mini.tpl.php
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-activity-summary.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-activity-summary.tpl.php
deleted file mode 100644
index c46393fc..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-activity-summary.tpl.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- :
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-button-hover.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-button-hover.tpl.php
deleted file mode 100644
index 915fef67..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-button-hover.tpl.php
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-button.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-button.tpl.php
deleted file mode 100644
index c45f285f..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-button.tpl.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-nav-months.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-nav-months.tpl.php
deleted file mode 100644
index eee5df92..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-nav-months.tpl.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-page.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-page.tpl.php
deleted file mode 100644
index 3e819c78..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-page.tpl.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-settings-page.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-settings-page.tpl.php
deleted file mode 100644
index 43dc4fd8..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-settings-page.tpl.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
diff --git a/culturefeed_calendar/theme/culturefeed-calendar-share-page.tpl.php b/culturefeed_calendar/theme/culturefeed-calendar-share-page.tpl.php
deleted file mode 100644
index 097bd065..00000000
--- a/culturefeed_calendar/theme/culturefeed-calendar-share-page.tpl.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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
-# Generated from files:
-# culturefeed_calendar.module: n/a
-# culturefeed_calendar.info: n/a
-# includes/helpers.inc: n/a
-# includes/pages.inc: n/a
-# theme/theme.inc: n/a
-# theme/culturefeed-calendar-activities-going.tpl.php: n/a
-# theme/culturefeed-calendar-activities-liked.tpl.php: n/a
-# theme/culturefeed-calendar-activity-summary.tpl.php: n/a
-# theme/culturefeed-calendar-button-hover.tpl.php: n/a
-# theme/culturefeed-calendar-button.tpl.php: n/a
-# theme/culturefeed-calendar-page.tpl.php: n/a
-# theme/culturefeed-calendar-settings-page.tpl.php: n/a
-# theme/culturefeed-calendar-share-page.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2016-03-10 16:31+0100\n"
-"PO-Revision-Date: 2016-03-10 16:37+0100\n"
-"Last-Translator: Reinout \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.6\n"
-
-#: culturefeed_calendar.module:40
-msgid "Share your calendar"
-msgstr "Deel je kalender"
-
-#: culturefeed_calendar.module:47
-msgid "Calendar Settings"
-msgstr "Instellingen"
-
-#: culturefeed_calendar.module:61
-msgid "Add to calendar"
-msgstr "Toevoegen"
-
-#: culturefeed_calendar.module:69
-msgid "I'm interested"
-msgstr "Ik ben geïnteresseerd"
-
-#: culturefeed_calendar.module:77
-msgid "Edit event in calendar"
-msgstr "Wijzig in kalender"
-
-#: culturefeed_calendar.module:85
-msgid "Delete event from calendar"
-msgstr "Verwijder uit kalender"
-
-#: culturefeed_calendar.module:257
-msgid "The items are saved to your calendar."
-msgstr "De evenementen zijn bewaard in je kalender."
-
-#: culturefeed_calendar.module:269;285
-msgid "My calendar"
-msgstr "Mijn UiTkalender"
-
-#: culturefeed_calendar.module:271
-msgid "Manage your favorite events in your personal calendar"
-msgstr "Beheer je favoriete activiteiten in je persoonlijke UiTkalender"
-
-#: culturefeed_calendar.info:0
-msgid "CultureFeed Calendar"
-msgstr ""
-
-#: culturefeed_calendar.info:0
-msgid "CultureFeed Calendar allows users to manage their own events in a calendar."
-msgstr ""
-
-#: culturefeed_calendar.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/helpers.inc:619
-msgid "Your calendar event was updated."
-msgstr "Je aanpassingen zijn bewaard."
-
-#: includes/helpers.inc:622
-msgid "An error occured while saving your calendar"
-msgstr "Fout bij het bewaren in je kalender"
-
-#: includes/pages.inc:54
-msgid "Add !title to your calendar"
-msgstr "!title toevoegen aan je UiTkalender"
-
-#: includes/pages.inc:55;88
-msgid "Add"
-msgstr "Toevoegen"
-
-#: includes/pages.inc:87;152;290
-msgid "When do you want to go?"
-msgstr "Wanneer wil je gaan?"
-
-#: includes/pages.inc:108;454
-msgid "There was an error while adding to your calendar"
-msgstr "Fout bij het toevoegen aan je kalender"
-
-#: includes/pages.inc:153
-msgid "Update event"
-msgstr "Bewaren"
-
-#: includes/pages.inc:225
-msgid "Choose a date"
-msgstr "Kies een datum"
-
-#: includes/pages.inc:237
-msgid "Choose a date between "
-msgstr "Kies een datum tussen "
-
-#: includes/pages.inc:237
-msgid "and"
-msgstr "en"
-
-#: includes/pages.inc:277
-msgid "!date from !starthour to !endhour"
-msgstr "!date van !starthour tot !endhour"
-
-#: includes/pages.inc:280
-msgid "!date from !starthour"
-msgstr "!date om !starthour"
-
-#: includes/pages.inc:284
-msgid "!date"
-msgstr "!date"
-
-#: includes/pages.inc:309
-msgid "I don't know yet"
-msgstr "Ik weet het nog niet"
-
-#: includes/pages.inc:333;534;744
-msgid "Cancel"
-msgstr "Annuleren"
-
-#: includes/pages.inc:405
-msgid "You selected a date in the past. Please select a date in the future."
-msgstr "Je koos een datum in het verleden. Gelieve een datum in de toekomst te selecteren."
-
-#: includes/pages.inc:417
-msgid "Enter a date between "
-msgstr "Kies een datum tussen"
-
-#: includes/pages.inc:417
-msgid " and "
-msgstr " en "
-
-#: includes/pages.inc:428
-msgid "The event is closed on "
-msgstr "Dit event is gesloten op "
-
-#: includes/pages.inc:428
-msgid "Please choose another day"
-msgstr "Gelieve een andere dag te kiezen"
-
-#: includes/pages.inc:483
-msgid "Remove event"
-msgstr "Verwijder event"
-
-#: includes/pages.inc:511
-msgid "Are you sure you want to remove '!title' from your calender?"
-msgstr "Ben je zeker dat je '!title' wil verwijderen uit je kalender?"
-
-#: includes/pages.inc:520 theme/theme.inc:253;292
-msgid "Remove"
-msgstr "Verwijderen"
-
-#: includes/pages.inc:588
-msgid "Your calendar event was deleted."
-msgstr "Dit evenement is verwijderd."
-
-#: includes/pages.inc:591
-msgid "An error occured while deleting the event from your calendar"
-msgstr "Fout bij het verwijderen uit je kalender."
-
-#: includes/pages.inc:722
-msgid "There was an error while loading the user information"
-msgstr "Fout bij het laden van de gebruikersgegevens"
-
-#: includes/pages.inc:728
-msgid "Who can see your calendar"
-msgstr "Wie kan je UiTkalender zien?"
-
-#: includes/pages.inc:731
-msgid "Only me"
-msgstr "Alleen ik"
-
-#: includes/pages.inc:732
-msgid "Everyone"
-msgstr "Iedereen"
-
-#: includes/pages.inc:738
-msgid "Save"
-msgstr "Opslaan"
-
-#: includes/pages.inc:773;776
-msgid "Changes succesfully saved."
-msgstr "Jouw wijzigingen werden bewaard."
-
-#: includes/pages.inc:773;776 theme/theme.inc:200
-msgid "Go to your calendar"
-msgstr "Ga naar kalender"
-
-#: includes/pages.inc:773
-msgid "or"
-msgstr "of"
-
-#: includes/pages.inc:773
-msgid "share it with your friends"
-msgstr "deel hem met je vrienden"
-
-#: includes/pages.inc:781
-msgid "There was an error while saving the form"
-msgstr "Fout bij het verzenden van dit formulier"
-
-#: theme/culturefeed-calendar-activities-going.tpl.php:18
-msgid "No events scheduled in this month"
-msgstr "Er werden nog geen activiteiten ingepland deze maand"
-
-#: theme/culturefeed-calendar-activities-liked.tpl.php:9
-msgid "Unscheduled events"
-msgstr "Nog niet ingepland"
-
-#: theme/culturefeed-calendar-activity-summary.tpl.php:25
-msgid "Where"
-msgstr "Waar"
-
-#: theme/culturefeed-calendar-activity-summary.tpl.php:45
-msgid "Price"
-msgstr "Prijs"
-
-#: theme/culturefeed-calendar-activity-summary.tpl.php:57
-msgid "Phone"
-msgstr "Telefoon"
-
-#: theme/culturefeed-calendar-activity-summary.tpl.php:63
-msgid "More info"
-msgstr "Meer info"
-
-#: theme/culturefeed-calendar-button-hover.tpl.php:2
-msgid "You have temporarily added events to your calendar. Log in and save the events to your personal calendar."
-msgstr "Je hebt activiteiten toegevoegd aan je UiTkalender. Meld je aan om deze te bewaren."
-
-#: theme/culturefeed-calendar-button-hover.tpl.php:5
-msgid "Log in"
-msgstr "Aanmelden"
-
-#: theme/culturefeed-calendar-button-hover.tpl.php:6
-msgid "View your calendar"
-msgstr "Kalender bekijken"
-
-#: theme/culturefeed-calendar-button.tpl.php:11
-msgid "This event is already started"
-msgstr "Dit event is al begonnen"
-
-#: theme/culturefeed-calendar-button.tpl.php:13
-msgid "This event is already finished"
-msgstr "Dit event is reeds afgelopen"
-
-#: theme/culturefeed-calendar-page.tpl.php:9
-msgid "Personal calendar"
-msgstr "UiTkalender"
-
-#: theme/culturefeed-calendar-page.tpl.php:16
-msgid "This calendar has not been shared yet."
-msgstr "Je kalender is ingesteld als privé."
-
-#: theme/culturefeed-calendar-page.tpl.php:19
-msgid "Login"
-msgstr "Aanmelden"
-
-#: theme/culturefeed-calendar-page.tpl.php:23
-msgid "Settings"
-msgstr "Instellingen"
-
-#: theme/culturefeed-calendar-page.tpl.php:27
-msgid "Share"
-msgstr "Deel"
-
-#: theme/culturefeed-calendar-page.tpl.php:45
-msgid "No activities added to your calendar yet."
-msgstr "Je hebt nog geen activiteiten toegevoegd aan je UiTkalender."
-
-#: theme/culturefeed-calendar-settings-page.tpl.php:8
-msgid "Settings for your calendar"
-msgstr "Instellingen"
-
-#: theme/culturefeed-calendar-share-page.tpl.php:9
-msgid "Back to my calendar"
-msgstr "Terug naar kalender"
-
-#: theme/culturefeed-calendar-share-page.tpl.php:11
-msgid "Share your calendar with your friends"
-msgstr "Deel je UiTkalender met je vrienden"
-
-#: theme/culturefeed-calendar-share-page.tpl.php:12
-msgid "You can share this link with your friends"
-msgstr "Gebruik deze link om je kalender te delen"
-
-#: theme/culturefeed-calendar-share-page.tpl.php:14
-msgid "Facebook"
-msgstr ""
-
-#: theme/culturefeed-calendar-share-page.tpl.php:15
-msgid "Google+"
-msgstr ""
-
-#: theme/culturefeed-calendar-share-page.tpl.php:16
-msgid "Twitter"
-msgstr ""
-
-#: theme/culturefeed-calendar-share-page.tpl.php:19
-msgid "Mail"
-msgstr "Mail"
-
-#: theme/culturefeed-calendar-share-page.tpl.php:24
-msgid "You have chosen earlier to not share your calendar. You can change this in your settings."
-msgstr "Je kalender is ingesteld als privé. Wijzig de instellingen van je kalender."
-
-#: theme/culturefeed-calendar-share-page.tpl.php:26
-msgid "Edit settings"
-msgstr "Wijzig instellingen"
-
-#: theme/theme.inc:146
-msgid "This event is added to your calendar."
-msgstr "Deze activiteit is toegevoegd aan je UiTkalender."
-
-#: theme/theme.inc:147
-msgid "View calendar"
-msgstr "Bekijk kalender"
-
-#: theme/theme.inc:150
-msgid "to your calendar"
-msgstr "in je kalender"
-
-#: theme/theme.inc:164;167
-msgid "Going"
-msgstr "Gaat"
-
-#: theme/theme.inc:181;184
-msgid "Interested"
-msgstr "Geïnteresseerd"
-
-#: theme/theme.inc:203
-msgid "unsaved events: 0"
-msgstr "niet bewaarde activiteiten: 0"
-
-#: theme/theme.inc:250
-msgid "Schedule"
-msgstr "Inplannen"
-
-#: theme/theme.inc:288
-msgid "Reschedule"
-msgstr "Opnieuw inplannen"
-
-#: theme/theme.inc:322
-msgid "There was an error while searching the user"
-msgstr "Fout bij het zoeken naar gebruiker"
-
-#: theme/theme.inc:361
-msgid "Calendar"
-msgstr "Kalender"
-
-#: theme/theme.inc:387
-msgid "Calendar of "
-msgstr "Kalender van "
-
-#: theme/theme.inc:389
-msgid "Discover the calendar of "
-msgstr "Ontdek de kalender van"
-
-#: theme/theme.inc:392
-msgid "Make your own calendar"
-msgstr "Maak je eigen kalender"
-
-#: theme/theme.inc:394
-msgid "Put activities from "
-msgstr "Plaats activiteiten van "
-
-#: theme/theme.inc:394
-msgid " in your personal calendar."
-msgstr " in je eigen kalender."
From 0db6eadb71a8aaa6525cc732d4f29717719a5f60 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 5 Nov 2019 14:03:20 +0100
Subject: [PATCH 02/16] Moved culturefeed_entry_ui to
https://github.com/cultuurnet/culturefeed_entry_ui
---
.../culturefeed_entry_ui.collaboration.css | 26 -
.../css/culturefeed_entry_ui.css | 166 --
.../css/edit_tag_objects_form.css | 13 -
.../culturefeed_date_control/README.txt | 21 -
.../css/culturefeed_date_control.css | 36 -
...culturefeed_date_control_opening_times.css | 7 -
.../culturefeed_date_control.info | 6 -
.../culturefeed_date_control.module | 230 --
.../form/date_control.inc | 374 ---
.../culturefeed_date_control/form/hybrid.inc | 215 --
.../form/opening_times.inc | 159 --
.../culturefeed_date_control/form/period.inc | 194 --
.../form/timestamps.inc | 264 --
.../culturefeed_date_control_opening_times.js | 27 -
.../culturefeed_date_control_time_select.js | 43 -
.../culturefeed_date_control/theme/theme.inc | 192 --
.../culturefeed_elements.info | 5 -
.../culturefeed_elements.module | 59 -
.../culturefeed_location_control.info | 6 -
.../culturefeed_location_control.module | 55 -
.../form/asset.inc | 163 --
.../form/custom.inc | 223 --
.../form/location_control.inc | 211 --
.../css/culturefeed_tags_element.css | 22 -
.../culturefeed_tags_element.info | 6 -
.../culturefeed_tags_element.module | 245 --
.../culturefeed_tags_element/theme/theme.inc | 48 -
.../culturefeed_entry_ui.api.php | 35 -
.../culturefeed_entry_ui.info | 19 -
.../culturefeed_entry_ui.install | 21 -
.../culturefeed_entry_ui.module | 515 ----
.../includes/culturefeed_entry_ui.admin.inc | 103 -
.../includes/culturefeed_entry_ui.pages.inc | 2442 -----------------
.../culturefeed_entry_ui.collaboration.inc | 280 --
.../form/culturefeed_entry_ui.location.inc | 262 --
.../form/culturefeed_entry_ui.tag_objects.inc | 153 --
.../form/culturefeed_entry_ui.tags.inc | 119 -
.../culturefeed_entry_ui.collaboration.inc | 81 -
.../js/culturefeed_entry_ui.js | 336 ---
.../js/maxlength/jquery.maxlength-de.js | 11 -
.../js/maxlength/jquery.maxlength-fr.js | 12 -
.../js/maxlength/jquery.maxlength-nl.js | 11 -
.../js/maxlength/jquery.maxlength.css | 14 -
.../js/maxlength/jquery.maxlength.js | 230 --
.../js/maxlength/jquery.maxlength.min.js | 6 -
.../js/maxlength/jquery.plugin.js | 344 ---
.../js/maxlength/jquery.plugin.min.js | 4 -
.../js/maxlength/maxlengthBasic.html | 26 -
.../culturefeed-entry-ui-event-form.tpl.php | 1 -
culturefeed_entry_ui/theme/theme.inc | 58 -
.../translations/culturefeed_entry_ui.de.po | 676 -----
.../translations/culturefeed_entry_ui.fr.po | 676 -----
.../translations/culturefeed_entry_ui.nl.po | 963 -------
.../views/culturefeed_entry_ui.views.inc | 26 -
.../culturefeed_entry_ui.views_default.inc | 359 ---
.../views_handler_area_cdb_item_create.inc | 31 -
...iews_handler_field_cdb_item_operations.inc | 74 -
57 files changed, 10904 deletions(-)
delete mode 100644 culturefeed_entry_ui/css/culturefeed_entry_ui.collaboration.css
delete mode 100644 culturefeed_entry_ui/css/culturefeed_entry_ui.css
delete mode 100644 culturefeed_entry_ui/css/edit_tag_objects_form.css
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/README.txt
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/css/culturefeed_date_control.css
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/css/culturefeed_date_control_opening_times.css
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/culturefeed_date_control.info
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/culturefeed_date_control.module
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/date_control.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/hybrid.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/opening_times.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/period.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/timestamps.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/js/culturefeed_date_control_opening_times.js
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/js/culturefeed_date_control_time_select.js
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/theme/theme.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_elements.info
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_elements.module
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/culturefeed_location_control.info
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/culturefeed_location_control.module
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/asset.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/custom.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/location_control.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/css/culturefeed_tags_element.css
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.info
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module
delete mode 100644 culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/theme/theme.inc
delete mode 100644 culturefeed_entry_ui/culturefeed_entry_ui.api.php
delete mode 100644 culturefeed_entry_ui/culturefeed_entry_ui.info
delete mode 100644 culturefeed_entry_ui/culturefeed_entry_ui.install
delete mode 100644 culturefeed_entry_ui/culturefeed_entry_ui.module
delete mode 100644 culturefeed_entry_ui/includes/culturefeed_entry_ui.admin.inc
delete mode 100644 culturefeed_entry_ui/includes/culturefeed_entry_ui.pages.inc
delete mode 100644 culturefeed_entry_ui/includes/form/culturefeed_entry_ui.collaboration.inc
delete mode 100644 culturefeed_entry_ui/includes/form/culturefeed_entry_ui.location.inc
delete mode 100644 culturefeed_entry_ui/includes/form/culturefeed_entry_ui.tag_objects.inc
delete mode 100644 culturefeed_entry_ui/includes/form/culturefeed_entry_ui.tags.inc
delete mode 100644 culturefeed_entry_ui/includes/helpers/culturefeed_entry_ui.collaboration.inc
delete mode 100644 culturefeed_entry_ui/js/culturefeed_entry_ui.js
delete mode 100644 culturefeed_entry_ui/js/maxlength/jquery.maxlength-de.js
delete mode 100644 culturefeed_entry_ui/js/maxlength/jquery.maxlength-fr.js
delete mode 100644 culturefeed_entry_ui/js/maxlength/jquery.maxlength-nl.js
delete mode 100644 culturefeed_entry_ui/js/maxlength/jquery.maxlength.css
delete mode 100644 culturefeed_entry_ui/js/maxlength/jquery.maxlength.js
delete mode 100644 culturefeed_entry_ui/js/maxlength/jquery.maxlength.min.js
delete mode 100644 culturefeed_entry_ui/js/maxlength/jquery.plugin.js
delete mode 100644 culturefeed_entry_ui/js/maxlength/jquery.plugin.min.js
delete mode 100644 culturefeed_entry_ui/js/maxlength/maxlengthBasic.html
delete mode 100644 culturefeed_entry_ui/theme/culturefeed-entry-ui-event-form.tpl.php
delete mode 100644 culturefeed_entry_ui/theme/theme.inc
delete mode 100644 culturefeed_entry_ui/translations/culturefeed_entry_ui.de.po
delete mode 100644 culturefeed_entry_ui/translations/culturefeed_entry_ui.fr.po
delete mode 100644 culturefeed_entry_ui/translations/culturefeed_entry_ui.nl.po
delete mode 100644 culturefeed_entry_ui/views/culturefeed_entry_ui.views.inc
delete mode 100644 culturefeed_entry_ui/views/culturefeed_entry_ui.views_default.inc
delete mode 100644 culturefeed_entry_ui/views/handlers/views_handler_area_cdb_item_create.inc
delete mode 100644 culturefeed_entry_ui/views/handlers/views_handler_field_cdb_item_operations.inc
diff --git a/culturefeed_entry_ui/css/culturefeed_entry_ui.collaboration.css b/culturefeed_entry_ui/css/culturefeed_entry_ui.collaboration.css
deleted file mode 100644
index 10be0767..00000000
--- a/culturefeed_entry_ui/css/culturefeed_entry_ui.collaboration.css
+++ /dev/null
@@ -1,26 +0,0 @@
-
-.edit-collaboration-data fieldset .panel-body {
- padding-top: 0px;
-}
-
-.edit-collaboration-data fieldset .no-top-margin {
- margin-top: 0px;
-}
-
-.edit-collaboration-data fieldset.vertical-tabs-pane > legend.panel-heading {
- display: none;
-}
-
-.edit-collaboration-data .form-item-image-upload > .row > .col-md-6 {
- width: auto;
-}
-
-.edit-collaboration-data img {
- max-width: 150px;
- max-height: 150px;
-}
-
-.edit-collaboration-data .btn-danger {
- margin-left: 15px;
- margin-top: 5px;
-}
diff --git a/culturefeed_entry_ui/css/culturefeed_entry_ui.css b/culturefeed_entry_ui/css/culturefeed_entry_ui.css
deleted file mode 100644
index 8772804e..00000000
--- a/culturefeed_entry_ui/css/culturefeed_entry_ui.css
+++ /dev/null
@@ -1,166 +0,0 @@
-@CHARSET "UTF-8";
-
-/*
- * give the form elements some space
- */
-
-#location-ajax-wrapper {
- margin-bottom: 30px;
-}
-
-#description-ajax-wrapper, .form-item-keywords, #edit-add-more-links, #photo-ajax-wrapper, #edit-price, #organiser-ajax-wrapper {
- padding-bottom: 20px !important;
- margin-bottom: 0px !important;
- border-bottom: 1px solid #ccc;
-}
-
-#photo-ajax-wrapper {
- border-top: 1px solid #ccc;
-}
-
-.form-item-keywords, #links-ajax-wrapper, #photo-ajax-wrapper, #edit-price, #organiser-ajax-wrapper, .form-item-age-category {
- padding-top: 20px !important;
-}
-
-#edit-add-more-links {
- margin-top: -10px;
-}
-
-#edit-price-extra {
- margin-top: -12px;
-}
-
-#basic-wrapper .form-item {
- float: left;
-}
-
-#edit-what > fieldset {
- width: 32.4%;
- float: left;
- min-height: 431px;
-}
-
-#location-ajax-wrapper {
- clear: left;
-}
-
-.form-item-street, .form-item-location-country {
- clear: left;
-}
-
-.form-item-street {
- float: left;
- margin-right: 30px;
-}
-
-.form-item-house-number {
- padding-top: 2px;
-}
-
-.form-item-zip-code {
- float: left;
-}
-
-.form-item-new-citywrapper-city {
- padding-top: 2px;
-}
-
-#citywrapper-ajax-wrapper {
- clear: left;
-}
-
-.form-item-country-select {
- clear: left;
-}
-
-.link-field {
- float: left;
-}
-
-input.form-checkbox {
- float: left;
- margin-right: 5px;
- margin-left: 5px;
-}
-
-#photo-ajax-wrapper img {
- max-width: 150px;
- max-height: 150px;
-}
-
-.price-prefix {
- float: left;
- margin-right: 5px;
- margin-top: 24px;
-}
-
-.price-amount {
- float: left;
- margin-bottom: 15px;
-}
-
-.form-type-textarea {
- clear: left;
-}
-
-.price-add-more-subit {
- clear: left;
- width: 100%;
-}
-
-input.add-more-link {
- border:none !important;
- background: none !important;
- border-radius: 0 !important;
- font-weight: normal !important;
- color: #0071B3 !important;
- padding: 0px !important;
- clear: left;
- display: block;
-}
-
-input.add-more-link:hover {
- color: #018fe2 !important;
- text-decoration: underline !important;
-}
-
-/* contacts */
-#contacts-ajax-wrapper .form-type-select {
- width: 20%;
- float: left;
- clear: left;
- margin-top: 0;
- margin-right: 2%;
-}
-
-#contacts-ajax-wrapper .form-type-textfield input {
- width: 78%;
-}
-
-#performers-ajax-wrapper .form-type-textfield {
- float: left;
- width: 48%;
- margin-right: 2%;
-}
-
-.language-item-wrapper {
- clear: left;
-}
-
-#edit-language .form-type-select {
- width: 35%;
- float: left;
-}
-
-/* Photo */
-
-.photo_thumbnail {
- padding-right: 2px;
-}
-
-/* https://drupal.org/node/222380 */
-.form-item input[type="checkbox"].error,
-.form-item input[type="radio"].error {
- outline: 2px solid red;
- border: none;
-}
\ No newline at end of file
diff --git a/culturefeed_entry_ui/css/edit_tag_objects_form.css b/culturefeed_entry_ui/css/edit_tag_objects_form.css
deleted file mode 100644
index f9ebc746..00000000
--- a/culturefeed_entry_ui/css/edit_tag_objects_form.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.edit-tag-objects-form-table td.edit-tag-objects-form-cell {
- vertical-align: middle;
- border-top: none;
-}
-
-.edit-tag-objects-form-table td.edit-tag-objects-form-cell .form-group {
- margin: 0px;
-}
-
-.edit-tag-objects-form-table input.form-checkbox {
- max-width: inherit;
- margin-right: 0;
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/README.txt b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/README.txt
deleted file mode 100644
index fbd02cef..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/README.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-This module contains a drupal form element to enter or modify culturefeed dates.
-
-The dates can be of different formats:
-* timestamps (date and optional time)
-* period (start date and end date including opening hours)
-* opening times (including culturefeed weekscheme).
-
-To provide flexible form elements, this module provides form elements for
-each individual type and these can be used separately. The actual date control
-form element uses the three above elements and a hybrid element. The hybrid
-element is an element that switches to one of the other elements depending on
-initial input.
-
-Developers:
-* The form is very depending on user interaction. Therefore all manipulation of
- the form is done on user input level. This because the manipulation is on
- elements (adding and/or removing elements) and not data. This means working
- with element value callback and form state input. This also ensures that the
- final date in form state values stays clean.
-* The actual manipulation is done in element validate functions, a common core
- practice.
\ No newline at end of file
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/css/culturefeed_date_control.css b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/css/culturefeed_date_control.css
deleted file mode 100644
index 0f7af494..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/css/culturefeed_date_control.css
+++ /dev/null
@@ -1,36 +0,0 @@
-@CHARSET "UTF-8";
-
-/* dates */
-
-table.date-control-table {
- width: auto;
-}
-
-.date-control-table .container-inline-date .date-padding {
- padding: 0;
- float: none;
-}
-
-.date-control-table .ui-icon {
- display: inline-block;
-}
-
-.date-control-table input.add-more-link {
- display: inline-block;
- vertical-align: middle;
-}
-
-.date-control-table td {
- white-space: nowrap;
- padding: 4px;
- vertical-align: top;
-}
-
-.date-control-table td .container-inline-date .form-item .form-item {
- display: inline-block;
- float: none;
-}
-
-.date-control-table td .container-inline-date .form-item {
- vertical-align: top;
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/css/culturefeed_date_control_opening_times.css b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/css/culturefeed_date_control_opening_times.css
deleted file mode 100644
index ddccd50a..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/css/culturefeed_date_control_opening_times.css
+++ /dev/null
@@ -1,7 +0,0 @@
-@CHARSET "UTF-8";
-
-/* dates */
-
-table.date-control-opening-times-table {
- width: 100% !important;
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/culturefeed_date_control.info b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/culturefeed_date_control.info
deleted file mode 100644
index c76fdde5..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/culturefeed_date_control.info
+++ /dev/null
@@ -1,6 +0,0 @@
-name = CultureFeed Entry UI Date control
-description = Form element to manage dates in the Entry UI.
-package = CultureFeed
-version = VERSION
-core = 7.x
-dependencies[] = culturefeed_elements
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/culturefeed_date_control.module b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/culturefeed_date_control.module
deleted file mode 100644
index 845a8e31..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/culturefeed_date_control.module
+++ /dev/null
@@ -1,230 +0,0 @@
- ";
- }
- return $element;
-}
-
-/**
- * Implements hook_element_info().
- *
- * This is a complex ajax driven form element. Several new ajax buttons are
- * added based on initial interaction or default value. Most of the logic is
- * taken from the core managed file field.
- *
- * - To ensure all buttons remain registered in the form, visibility is set
- * through access in a pre render function.
- * - Element validation functions are used to set the data.
- * - A custom ajax callback path to ensure the form is rerenderd.
- *
- * @see file_managed_file_pre_render()
- * @see file_managed_file_value()
- */
-function culturefeed_date_control_element_info() {
- return array(
- 'culturefeed_date_control' => array(
- '#element_validate' => array('culturefeed_date_control_date_control_validate'),
- '#input' => TRUE,
- '#process' => array('culturefeed_date_control_date_control_process', 'ajax_process_form'),
- '#tree' => TRUE,
- '#value_callback' => 'culturefeed_date_control_date_control_value_callback',
- ),
- 'culturefeed_date_control_hybrid' => array(
- '#element_validate' => array('culturefeed_date_control_hybrid_validate'),
- '#input' => TRUE,
- '#pre_render' => array('culturefeed_date_control_hybrid_pre_render'),
- '#process' => array('culturefeed_date_control_hybrid_process', 'ajax_process_form'),
- '#theme' => 'culturefeed_date_control_hybrid_table',
- '#tree' => TRUE,
- '#value_callback' => 'culturefeed_date_control_hybrid_value_callback',
- ),
- 'culturefeed_date_control_opening_times' => array(
- '#input' => TRUE,
- '#process' => array('culturefeed_date_control_opening_times_process', 'ajax_process_form'),
- '#tree' => TRUE,
- '#value_callback' => 'culturefeed_date_control_opening_times_value_callback',
- ),
- 'culturefeed_date_control_period' => array(
- '#element_validate' => array('culturefeed_date_control_period_validate'),
- '#input' => TRUE,
- '#pre_render' => array('culturefeed_date_control_period_pre_render'),
- '#process' => array('culturefeed_date_control_period_process', 'ajax_process_form'),
- '#theme' => 'culturefeed_date_control_period_table',
- '#tree' => TRUE,
- '#value_callback' => 'culturefeed_date_control_period_value_callback',
- ),
- 'culturefeed_date_control_timestamps' => array(
- '#cell_count' => 4,
- '#element_validate' => array('culturefeed_date_control_timestamps_validate'),
- '#input' => TRUE,
- '#pre_render' => array('culturefeed_date_control_timestamps_pre_render'),
- '#process' => array('culturefeed_date_control_timestamps_process', 'ajax_process_form'),
- '#theme' => 'culturefeed_date_control_timestamps_table',
- '#tree' => TRUE,
- '#value_callback' => 'culturefeed_date_control_timestamps_value_callback',
- ),
- );
-}
-
-/**
- * Implements hook_element_info_alter().
- */
-function culturefeed_date_control_element_info_alter(&$types) {
- if (isset($types['date_popup'])) {
- $types['date_popup']['#after_build'][] = 'culturefeed_date_control_element_date_popup_after_build';
- }
-}
-
-/**
- * Explodes a date string into array components.
- *
- * @param array $element
- * The element.
- * @param string $date_string
- * The date.
- *
- * @return array
- * The exploded date.
- */
-function culturefeed_date_control_explode_date(array $element, $date_string) {
-
- $date_element = array(
- '#date_flexible' => 0,
- '#date_format' => $element['#popup_date_format'],
- '#date_increment' => $element['#popup_date_increment'],
- '#date_timezone' => date_default_timezone(),
- '#default_value' => $date_string,
- );
-
- $date = date_default_date($date_element);
- $date = array(
- 'date' => date_format_date($date, 'custom', $element['#popup_date_format']),
- );
-
- return $date;
-
-}
-
-/**
- * Explodes a time string into array components.
- *
- * @param array $element
- * The element.
- * @param string $time_string
- * The time.
- * @param string $date_string
- * The date.
- *
- * @return array
- * The exploded time.
- */
-function culturefeed_date_control_explode_time(array $element, $time_string, $date_string) {
-
- $time_element = array(
- '#date_flexible' => 0,
- '#date_format' => $element['#select_time_format'],
- '#date_increment' => $element['#select_time_increment'],
- '#date_timezone' => date_default_timezone(),
- '#default_value' => $date_string . ' ' . $time_string,
- );
-
- return date_select_element_value_callback($time_element);
-
-}
-
-/**
- * Implodes a date array into string.
- *
- * @param array $element
- * The element.
- * @param array $date_array
- * The date array.
- *
- * @return string
- * The imploded date.
- */
-function culturefeed_date_control_implode_date(array $element, array $date_array) {
-
- $element = array(
- '#date_flexible' => 0,
- '#date_format' => $element['#popup_date_format'],
- '#date_increment' => $element['#popup_date_increment'],
- '#date_timezone' => date_default_timezone(),
- '#default_value' => $date_array,
- );
- $date = date_popup_input_date($element, $date_array);
- return date_format_date($date, 'custom', 'Y-m-d');
-
-}
-
-/**
- * Implodes a time array into string.
- *
- * @param array $time_array
- * The time array.
- * @param string $date_string
- * The date string.
- *
- * @return string
- * The imploded time.
- */
-function culturefeed_date_control_implode_time(array $time_array, $date_string) {
-
- $time = '';
- if (isset($time_array['hour']) && isset($time_array['minute']) && $date_string) {
- $time = new DateObject(
- array(
- 'hour' => $time_array['hour'],
- 'minute' => $time_array['minute'],
- ),
- date_default_timezone()
- );
- $time = $date_string . ' ' . $time->format(DATE_FORMAT_DATETIME);
- }
- return $time;
-
-}
-
-/**
- * Implements hook_theme().
- */
-function culturefeed_date_control_theme() {
-
- $settings = array(
- 'file' => 'theme.inc',
- 'path' => drupal_get_path('module', 'culturefeed_date_control') . '/theme',
- 'render element' => 'form',
- );
-
- return array(
- 'culturefeed_date_control_hybrid_table' => $settings,
- 'culturefeed_date_control_opening_times_table' => $settings,
- 'culturefeed_date_control_period_table' => $settings,
- 'culturefeed_date_control_timestamps_table' => $settings,
- );
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/date_control.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/date_control.inc
deleted file mode 100644
index c67120ea..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/date_control.inc
+++ /dev/null
@@ -1,374 +0,0 @@
-";
- $element['#suffix'] = "";
-
- $element['date_control'] = array(
- '#type' => 'fieldset',
- '#title' => (isset($element['#title'])) ? $element['#title'] : t('Dates'),
- );
-
- if (isset($element['#description'])) {
- $element['date_control']['#description'] = $element['#description'];
- }
-
- $date_control = $element['#value']['date_control'];
-
- // Type.
- $element['date_control']['type'] = array(
- '#type' => 'hidden',
- '#value' => $date_control['type'],
- );
-
- // Hybrid.
- $access = $date_control['type'] == 'hybrid';
- $element['date_control']['hybrid'] = array(
- '#access' => $access,
- '#date_control' => $element,
- '#default_value' => $access && isset($date_control['hybrid']) ? $date_control['hybrid'] : '',
- '#popup_date_format' => 'd-m-Y',
- '#popup_date_increment' => 1,
- '#select_time_format' => 'H:i',
- '#select_time_increment' => 15,
- '#type' => 'culturefeed_date_control_hybrid',
- );
-
- // Timestamps.
- $access = $date_control['type'] == 'timestamps';
- $element['date_control']['timestamps'] = array(
- '#access' => $access,
- '#date_control' => $element,
- '#default_value' => $access && isset($date_control['timestamps']) ? $date_control['timestamps'] : '',
- '#popup_date_format' => 'd-m-Y',
- '#popup_date_increment' => 1,
- '#select_time_format' => 'H:i',
- '#select_time_increment' => 15,
- '#type' => 'culturefeed_date_control_timestamps',
- );
-
- // Period.
- $access = $date_control['type'] == 'period';
- $element['date_control']['period'] = array(
- '#access' => $access,
- '#date_control' => $element,
- '#default_value' => $access && isset($date_control['period']) ? $date_control['period'] : '',
- '#popup_date_format' => 'd-m-Y',
- '#popup_date_increment' => 1,
- '#type' => 'culturefeed_date_control_period',
- );
-
- // Permanent.
- $access = $date_control['type'] == 'permanent';
- $element['date_control']['permanent'] = array(
- '#access' => $access,
- '#ajax' => array(
- 'effect' => 'none',
- 'path' => 'culturefeed_elements/ajax/' . implode('/', $element['#array_parents']),
- 'progress' => array('type' => 'throbber'),
- 'wrapper' => $element['#id'] . '-ajax-wrapper',
- ),
- '#value' => $access && isset($date_control['permanent']) ? $date_control['permanent'] : 0,
- '#title' => t('Permanent'),
- '#type' => 'checkbox',
- );
-
- // Opening times.
- $access = $date_control['type'] == 'period' || $date_control['type'] == 'permanent';
- $element['date_control']['opening_times'] = array(
- '#access' => $access,
- '#allowed_days' => $element['#allowed_days'],
- '#date_control' => $element,
- '#default_value' => $access && isset($date_control['opening_times']) ? $date_control['opening_times'] : '',
- '#type' => 'culturefeed_date_control_opening_times',
- );
-
- $element['#attached'] = array(
- 'css' => array(
- drupal_get_path('module', 'culturefeed_date_control') . '/css/culturefeed_date_control.css',
- ),
- );
-
- return $element;
-
-}
-
-/**
- * Submit handler for the ajax buttons.
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_date_control_date_control_submit(array $form, array &$form_state) {
-
- $form_state['rebuild'] = TRUE;
-
-}
-
-/**
- * Validate and alter the culturefeed date control form values.
- *
- * This is where the element switching is set, based on values.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_date_control_date_control_validate(array $element, array &$form_state) {
-
- $triggering_element = (isset($form_state['triggering_element'])) ? $form_state['triggering_element'] : '';
- $triggering_parent = array_pop($triggering_element['#parents']);
- // Use form_state instead of element as individual sub elements have changes
- // that won't be reflected in element.
- $values = drupal_array_get_nested_value($form_state['input'], $element['#parents']);
- $date_control = $values['date_control'];
-
- if (culturefeed_elements_check_trigger_element($triggering_element, $element)) {
-
- $type = $date_control['type'];
-
- // Hybrid.
- if ($date_control['type'] == 'hybrid') {
-
- // Period.
- if ($triggering_parent == 'end_date') {
-
- $type = 'period';
- $date_control['period'] = array('start_date' => '');
- if (isset($date_control['hybrid']['start_date'])) {
- $date_control['period']['start_date'] = $date_control['hybrid']['start_date'];
- }
- if (isset($date_control['hybrid']['end_date'])) {
- $date_control['period']['end_date'] = $date_control['hybrid']['end_date'];
- }
-
- }
-
- // Permanent.
- if ($triggering_parent == 'permanent') {
-
- $type = 'permanent';
- $date_control['permanent'] = 1;
-
- }
-
- // Timestamps.
- if (
- $triggering_parent == 'add_date' || $triggering_parent == 'hour' || $triggering_parent == 'minute' ||
- ($triggering_parent == 'end_date' && isset($date_control['period']['start_date']) && isset($date_control['period']['end_date']) &&
- $date_control['period']['start_date'] == $date_control['period']['end_date'])
- ) {
-
- $type = 'timestamps';
- $date_control['timestamps']['stamps'] = array(
- array('date' => ''),
- );
- if (isset($date_control['hybrid']['start_date'])) {
- $date_control['timestamps']['stamps'][0]['date'] = $date_control['hybrid']['start_date'];
- }
- if (isset($date_control['hybrid']['start_time'])) {
- $date_control['timestamps']['stamps'][0]['start_time'] = $date_control['hybrid']['start_time'];
- }
- if (isset($date_control['hybrid']['end_time'])) {
- $date_control['timestamps']['stamps'][0]['end_time'] = $date_control['hybrid']['end_time'];
- }
- if ($triggering_parent == 'add_date') {
- $date_control['timestamps']['stamps'][] = array('date' => '');
- }
-
- }
-
- }
-
- // Period.
- if ($date_control['type'] == 'period') {
-
- if ($triggering_parent == 'remove_end') {
-
- $type = 'hybrid';
- // Pass over any set values.
- $date_control['hybrid'] = array(
- 'start_date' => isset($date_control['period']['start_date']) ? $date_control['period']['start_date'] : '',
- );
-
- }
-
- }
-
- // Permanent.
- if ($date_control['type'] == 'permanent') {
-
- if ($triggering_parent == 'permanent') {
-
- $type = 'hybrid';
-
- }
-
- }
-
- // Timestamps.
- if ($date_control['type'] == 'timestamps') {
-
- if (
- (($triggering_parent == 'remove_stamp' && !isset($date_control['timestamps']['stamps'][0]['end_time'])) ||
- $triggering_parent == 'remove_end') && count($date_control['timestamps']['stamps']) == 1
- ) {
-
- $type = 'hybrid';
- $date_control['hybrid'] = array('start_date' => '');
- if (isset($date_control['timestamps']['stamps'][0]['date'])) {
- $date_control['hybrid']['start_date'] = $date_control['timestamps']['stamps'][0]['date'];
- }
- if (isset($date_control['timestamps']['stamps'][0]['start_time'])) {
- $date_control['hybrid']['start_time'] = $date_control['timestamps']['stamps'][0]['start_time'];
- }
-
- }
-
- }
-
- $date_control['type'] = $type;
- $element['#parents'][] = 'date_control';
-
- drupal_array_set_nested_value($form_state['input'], $element['#parents'], $date_control);
-
- }
- else {
-
- // The one exception.
- if ($date_control['type'] == 'hybrid') {
-
- $values = drupal_array_get_nested_value($form_state['values'], $element['#parents']);
- $date_control = $values['date_control'];
-
- $date_control['timestamps']['stamps'][0] = array(
- 'date' => $date_control['hybrid']['start_date'],
- );
- if (isset($date_control['hybrid']['start_time'])) {
- $date_control['timestamps']['stamps'][0]['start_time'] = $date_control['hybrid']['start_time'];
- }
- $date_control['type'] = 'timestamps';
-
- $element['#parents'][] = 'date_control';
- drupal_array_set_nested_value($form_state['values'], $element['#parents'], $date_control);
-
- }
-
- }
-
-}
-
-/**
- * Value callback for the date control element.
- *
- * @param array $element
- * The element.
- * @param mixed $input
- * The input.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The value.
- */
-function culturefeed_date_control_date_control_value_callback(array &$element, $input, array $form_state) {
-
- if ($input) {
- return $input;
- }
- else {
-
- $value = array(
- 'date_control' => array(
- 'type' => 'hybrid',
- 'hybrid' => array(),
- 'opening_times' => array(),
- 'period' => array(),
- 'timestamps' => array(),
- ),
- );
-
- if (isset($element['#default_value']) && $element['#default_value']) {
-
- $date_control = $value['date_control'];
- $default_value = $element['#default_value'];
-
- // Timestamps / hybrid.
- if (count($default_value['timestamps']) == 1 && !isset($default_value['timestamps'][0]['end_time'])) {
-
- $date_control['type'] = 'hybrid';
- $date_control['hybrid'] = array(
- 'start_date' => $default_value['timestamps'][0]['date'],
- );
- if (isset($default_value['timestamps'][0]['start_time'])) {
- $date_control['hybrid']['start_time'] = $default_value['timestamps'][0]['start_time'];
- }
-
- }
-
- // Timestamps.
- elseif (count($default_value['timestamps'])) {
-
- $date_control['type'] = 'timestamps';
- $date_control['timestamps'] = $default_value['timestamps'];
-
- }
-
- // Period.
- elseif ($default_value['period']['start_date'] && $default_value['period']['end_date']) {
-
- $date_control['type'] = 'period';
- $date_control['period'] = $default_value['period'];
-
- }
-
- // Permanent.
- elseif ($default_value['permanent']) {
-
- $date_control['type'] = 'permanent';
- $date_control['permanent'] = $default_value['permanent'];
-
- }
-
- else {
- $date_control['type'] = 'hybrid';
- }
-
- // Opening times don't set type, they go with period or permanent.
- if ($default_value['opening_times']) {
-
- $date_control['opening_times'] = $default_value['opening_times'];
-
- }
-
- $value['date_control'] = $date_control;
-
- }
-
- return $value;
-
- }
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/hybrid.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/hybrid.inc
deleted file mode 100644
index 8f87377b..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/hybrid.inc
+++ /dev/null
@@ -1,215 +0,0 @@
-";
- $element['#suffix'] = "";
-
- if (isset($element['#date_control'])) {
- $element_id = $element['#date_control']['#id'];
- $array_parents = $element['#date_control']['#array_parents'];
- }
-
- $hybrid = $element['#value'];
-
- $ajax_settings = array(
- 'effect' => 'none',
- 'path' => 'culturefeed_elements/ajax/' . implode('/', $array_parents),
- 'progress' => array('type' => 'throbber'),
- 'wrapper' => $element_id . '-ajax-wrapper',
- );
-
- $ajax_button = array(
- '#access' => TRUE,
- '#ajax' => $ajax_settings,
- '#attributes' => array('class' => array('add-more-link btn-link')),
- '#limit_validation_errors' => array($element['#parents']),
- '#submit' => array('culturefeed_date_control_date_control_submit'),
- '#type' => 'submit',
- );
-
- $date = isset($hybrid['start_date']) && $hybrid['start_date'] ? culturefeed_date_control_implode_date($element, $hybrid['start_date']) : '';
- $element['start_date'] = array(
- '#date_format' => 'd-m-Y',
- '#date_label_position' => 'none',
- '#default_value' => $date,
- '#icon' => TRUE,
- '#required' => TRUE,
- '#title' => t('Date'),
- '#type' => 'date_popup',
- );
-
- $time = isset($hybrid['start_time']) && $hybrid['start_time'] ? culturefeed_date_control_implode_time($hybrid['start_time'], $date) : '';
- $element['start_time'] = array(
- '#attributes' => array('class' => array('time-select-complete-minutes')),
- '#date_format' => 'H:i',
- '#date_increment' => 15,
- '#default_value' => $time,
- '#title' => '',
- '#type' => 'date_select',
- );
-
- $element['add_end_date_or_time'] = $ajax_button + array(
- '#value' => t('+ add end date or time'),
- );
-
- $element['end_date'] = array(
- '#access' => TRUE,
- '#ajax' => $ajax_settings,
- '#date_format' => 'd-m-Y',
- '#date_label_position' => 'none',
- '#default_value' => '',
- '#icon' => TRUE,
- '#title' => t('Date'),
- '#type' => 'date_popup',
- );
-
- $element['end_time'] = array(
- '#access' => TRUE,
- '#attributes' => array('class' => array('time-select-complete-minutes')),
- '#ajax' => $ajax_settings,
- '#date_format' => 'H:i',
- '#date_increment' => 15,
- '#default_value' => '',
- '#title' => '',
- '#type' => 'date_select',
- );
-
- $element['add_date'] = $ajax_button + array(
- '#value' => t('+ add date'),
- );
-
- // Value will always be 0 as a different element is used when actually
- // permanent.
- $element['permanent'] = array(
- '#ajax' => $ajax_settings,
- '#title' => t('Permanent'),
- '#type' => 'checkbox',
- '#value' => 0,
- );
-
- $element['#attached'] = array(
- 'js' => array(
- drupal_get_path('module', 'culturefeed_date_control') . '/js/culturefeed_date_control_time_select.js',
- ),
- );
-
- return $element;
-
-}
-
-/**
- * Validate and alter the culturefeed date control hybrid form values.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_date_control_hybrid_validate(array &$element, array &$form_state) {
-
- $triggering_element = (isset($form_state['triggering_element'])) ? $form_state['triggering_element'] : '';
- $triggering_parent = array_pop($triggering_element['#parents']);
- $hybrid = $element['#value'];
-
- if (culturefeed_elements_check_trigger_element($triggering_element, $element)) {
-
- switch ($triggering_parent) {
-
- case 'add_end_date_or_time':
-
- $hybrid['end_date'] = array('date' => '');
- $hybrid['end_time'] = array('hour' => '', 'minute' => '');
-
- }
-
- drupal_array_set_nested_value($form_state['input'], $element['#parents'], $hybrid);
-
- }
-
-}
-
-/**
- * Value callback for the culturefeed date control hybrid element.
- *
- * @param array $element
- * The element.
- * @param mixed $input
- * The input.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The value.
- */
-function culturefeed_date_control_hybrid_value_callback(array $element, $input, array $form_state) {
-
- if ($input) {
- return $input;
- }
- else {
-
- $value = array('start_date' => '', 'start_time' => '');
-
- if (isset($element['#default_value']) && $element['#default_value']) {
-
- $default_value = $element['#default_value'];
- if (isset($default_value['start_date']) && $default_value['start_date']) {
- $value['start_date'] = culturefeed_date_control_explode_date($element, $default_value['start_date']);
- if (isset($element['#default_value']['start_time']) && $element['#default_value']['start_time']) {
- $value['start_time'] = culturefeed_date_control_explode_time($element, $default_value['start_time'], $default_value['start_date']);
- }
- }
-
- }
-
- return $value;
-
- }
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/opening_times.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/opening_times.inc
deleted file mode 100644
index da4d707d..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/opening_times.inc
+++ /dev/null
@@ -1,159 +0,0 @@
- t('mon'),
- 'tuesday' => t('tue'),
- 'wednesday' => t('wed'),
- 'thursday' => t('thu'),
- 'friday' => t('fri'),
- 'saturday' => t('sat'),
- 'sunday' => t('sun'),
- );
-
- $opening_times = $element['#value'];
-
- $element['all_day'] = array(
- '#options' => array('1' => t('Yes'), '0' => t('No')),
- '#title' => t('Open all day ?'),
- '#type' => 'radios',
- '#default_value' => $opening_times['days'] ? 0 : 1,
- );
-
- $element['days'] = array(
- '#type' => 'container',
- '#theme' => 'culturefeed_date_control_opening_times_table',
- '#states' => array(
- 'visible' => array(":input[name=\"" . $element['#name'] . "[all_day]\"]" => array('value' => '0')),
- ),
- );
-
- foreach ($element['#allowed_days'] as $day) {
-
- $element['days'][$day] = array(
- '#tree' => TRUE,
- '#type' => 'fieldset',
- '#title' => $day_labels[$day],
- );
-
- $element['days'][$day][0]['open_from'] = array(
- '#default_value' => isset($opening_times['days'][$day]) && isset($opening_times['days'][$day][0]['open_from']) ? $opening_times['days'][$day][0]['open_from'] : '',
- '#description' => t('Format') . ': 12:00',
- '#size' => 12,
- '#type' => 'textfield',
- );
-
- $element['days'][$day][0]['open_till'] = array(
- '#default_value' => isset($opening_times['days'][$day]) && isset($opening_times['days'][$day][0]['open_till']) ? $opening_times['days'][$day][0]['open_till'] : '',
- '#description' => t('Format') . ': 12:00',
- '#size' => 12,
- '#type' => 'textfield',
- );
-
- }
-
- $element['#attached'] = array(
- 'css' => array(
- drupal_get_path('module', 'culturefeed_date_control') . '/css/culturefeed_date_control_opening_times.css',
- ),
- 'js' => array(
- drupal_get_path('module', 'culturefeed_date_control') . '/js/culturefeed_date_control_opening_times.js',
- ),
- );
-
- if (!isset($element['#date_control'])) {
- $element['#attached']['css'][] = drupal_get_path('module', 'culturefeed_date_control') . '/css/culturefeed_date_control.css';
- }
-
- return $element;
-
-}
-
-/**
- * Value callback for the culturefeed date control opening times element.
- *
- * @param array $element
- * The element.
- * @param mixed $input
- * The input.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The value.
- */
-function culturefeed_date_control_opening_times_value_callback(array $element, $input, array $form_state) {
-
- if ($input) {
-
- // Clean up.
- $days = array();
- foreach ($input['days'] as $day => $times) {
- if ($times[0]['open_from'] && $times[0]['open_till']) {
- $days[$day] = $input['days'][$day];
- }
- }
- $input['days'] = $days;
- return $input;
-
- }
- else {
-
- if (
- isset($element['#default_value']) && isset($element['#default_value']['days']) &&
- $element['#default_value']['days']
- ) {
-
- // @todo This should be in the entry_ui module.
- /* @var CultureFeed_Cdb_Data_Calendar_Weekscheme $week_scheme */
- $week_scheme = $element['#default_value']['days'];
- $days = array();
-
- foreach ($element['#allowed_days'] as $day) {
-
- $day_scheme = $week_scheme->getDay($day);
- if ($day_scheme->isOpen()) {
-
- /* @var CultureFeed_Cdb_Data_Calendar_OpeningTime[] $opening_times */
- $opening_times = $day_scheme->getOpeningTimes();
- // Strip the seconds.
- $days[$day] = array(
- array(
- 'open_from' => substr($opening_times[0]->getOpenFrom(), 0, 5),
- 'open_till' => substr($opening_times[0]->getOpenTill(), 0, 5),
- ),
- );
-
- }
-
- }
-
- return array('days' => $days);
-
- }
- else {
- return array('days' => '');
- }
-
- }
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/period.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/period.inc
deleted file mode 100644
index 835e1582..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/period.inc
+++ /dev/null
@@ -1,194 +0,0 @@
-";
- $element['#suffix'] = "";
-
- if (isset($element['#date_control'])) {
- $element_id = $element['#date_control']['#id'];
- $array_parents = $element['#date_control']['#array_parents'];
- }
-
- $period = $element['#value'];
-
- $ajax_button = array(
- '#access' => TRUE,
- '#ajax' => array(
- 'effect' => 'none',
- 'path' => 'culturefeed_elements/ajax/' . implode('/', $array_parents),
- 'progress' => array('type' => 'throbber'),
- 'wrapper' => $element_id . '-ajax-wrapper',
- ),
- '#attributes' => array('class' => array('add-more-link btn-link')),
- '#limit_validation_errors' => array($element['#parents']),
- '#submit' => array('culturefeed_date_control_date_control_submit'),
- '#type' => 'submit',
- );
-
- $date = isset($period['start_date']) && $period['start_date'] ? culturefeed_date_control_implode_date($element, $period['start_date']) : '';
- $element['start_date'] = array(
- '#date_format' => 'd-m-Y',
- '#date_label_position' => 'none',
- '#default_value' => $date,
- '#icon' => TRUE,
- '#required' => TRUE,
- '#title' => t('Start date'),
- '#type' => 'date_popup',
- );
-
- $element['add_end'] = array(
- '#name' => 'add_end',
- '#value' => t('+ add end date'),
- ) + $ajax_button;
-
- $date = isset($period['end_date']) && $period['end_date'] ? culturefeed_date_control_implode_date($element, $period['end_date']) : '';
- $element['end_date'] = array(
- '#access' => TRUE,
- '#date_format' => 'd-m-Y',
- '#date_label_position' => 'none',
- '#default_value' => $date,
- '#icon' => TRUE,
- '#required' => TRUE,
- '#title' => t('End date'),
- '#type' => 'date_popup',
- );
-
- $element['remove_end'] = array(
- '#limit_validation_errors' => array(),
- '#name' => 'remove_end',
- '#value' => t('- remove end date'),
- ) + $ajax_button;
-
- if (!isset($element['#date_control'])) {
- $element['#attached'] = array(
- 'css' => array(
- drupal_get_path('module', 'culturefeed_date_control') . '/css/culturefeed_date_control.css',
- ),
- );
- }
-
- return $element;
-
-}
-
-/**
- * Validate and alter the culturefeed date control timestamps form values.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_date_control_period_validate(array $element, array &$form_state) {
-
- $triggering_element = (isset($form_state['triggering_element'])) ? $form_state['triggering_element'] : '';
- $triggering_parent = array_pop($triggering_element['#parents']);
- $dates = $element['#value'];
-
- if (culturefeed_elements_check_trigger_element($triggering_element, $element)) {
-
- switch ($triggering_parent) {
-
- case 'add_end':
- $dates['end_date'] = array('date' => '');
- break;
-
- case 'remove_end':
- unset($dates['end_date']);
- break;
-
- }
-
- drupal_array_set_nested_value($form_state['input'], $element['#parents'], $dates, TRUE);
-
- }
-
-}
-
-/**
- * Value callback for the culturefeed date control period element.
- *
- * @param array $element
- * The element.
- * @param mixed $input
- * The input.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The value.
- */
-function culturefeed_date_control_period_value_callback(array $element, $input, array $form_state) {
-
- if ($input) {
- return $input;
- }
- else {
-
- $value = array('start_date' => '', 'end_date' => '');
-
- if (isset($element['#default_value']) && $element['#default_value']) {
-
- $default_value = $element['#default_value'];
- if (
- isset($default_value['start_date']) && $default_value['start_date'] &&
- isset($default_value['end_date']) && $default_value['end_date']
- ) {
- $value['start_date'] = culturefeed_date_control_explode_date($element, $default_value['start_date']);
- $value['end_date'] = culturefeed_date_control_explode_date($element, $default_value['end_date']);
- }
-
- }
-
- return $value;
-
- }
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/timestamps.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/timestamps.inc
deleted file mode 100644
index 23595966..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/form/timestamps.inc
+++ /dev/null
@@ -1,264 +0,0 @@
- $timestamp) {
-
- if (
- isset($timestamps[$key]['end_time'])
- && !is_null($timestamps[$key]['end_time']['hour'])
- && !is_null($timestamps[$key]['end_time']['minute'])
- ) {
- $element['stamps'][$key]['add_end']['#access'] = FALSE;
- $element['#cell_count'] = 5;
- }
- else {
- $element['stamps'][$key]['end_time']['#access'] = FALSE;
- $element['stamps'][$key]['remove_end']['#access'] = FALSE;
- }
- }
-
- return $element;
-
-}
-
-/**
- * Sets the culturefeed date control timestamps form elements.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- * @param array $form
- * The form.
- *
- * @return array
- * The element.
- */
-function culturefeed_date_control_timestamps_process(array $element, array &$form_state, array $form) {
-
- $element_id = $element['#id'];
- $array_parents = $element['#array_parents'];
-
- $element['#prefix'] = "";
- $element['#suffix'] = "
";
-
- if (isset($element['#date_control'])) {
- $element_id = $element['#date_control']['#id'];
- $array_parents = $element['#date_control']['#array_parents'];
- }
-
- $ajax_button = array(
- '#access' => TRUE,
- '#ajax' => array(
- 'effect' => 'none',
- 'path' => 'culturefeed_elements/ajax/' . implode('/', $array_parents),
- 'progress' => array('type' => 'throbber'),
- 'wrapper' => $element_id . '-ajax-wrapper',
- ),
- '#attributes' => array('class' => array('add-more-link btn-link')),
- '#limit_validation_errors' => array($element['#parents']),
- '#submit' => array('culturefeed_date_control_date_control_submit'),
- '#type' => 'submit',
- );
-
- $timestamps = $element['#value'];
-
- foreach ($timestamps['stamps'] as $key => $timestamp) {
-
- $element['stamps'][$key]['remove_stamp'] = array(
- '#limit_validation_errors' => array(),
- '#value' => t('×'),
- '#name' => 'remove_stamp_' . $key,
- ) + $ajax_button;
-
- $date = isset($timestamp['date']) && $timestamp['date'] ? culturefeed_date_control_implode_date($element, $timestamp['date']) : '';
- $element['stamps'][$key]['date'] = array(
- '#date_format' => $element['#popup_date_format'],
- '#date_increment' => $element['#popup_date_increment'],
- '#date_label_position' => 'none',
- '#default_value' => $date,
- '#icon' => TRUE,
- '#required' => TRUE,
- '#title' => t('Date'),
- '#type' => 'date_popup',
- );
-
- $time = isset($timestamp['start_time']) && $timestamp['start_time'] ? culturefeed_date_control_implode_time($timestamp['start_time'], $date) : '';
- $element['stamps'][$key]['start_time'] = array(
- '#attributes' => array('class' => array('time-select-complete-minutes')),
- '#date_format' => $element['#select_time_format'],
- '#date_increment' => $element['#select_time_increment'],
- '#default_value' => $time,
- '#title' => '',
- '#type' => 'date_select',
- );
-
- $time = isset($timestamp['end_time']) && $timestamp['end_time'] ? culturefeed_date_control_implode_time($timestamp['end_time'], $date) : '';
- $element['stamps'][$key]['end_time'] = array(
- '#access' => TRUE,
- '#attributes' => array('class' => array('time-select-complete-minutes')),
- '#date_format' => $element['#select_time_format'],
- '#date_increment' => $element['#select_time_increment'],
- '#default_value' => $time,
- '#title' => '',
- '#type' => 'date_select',
- );
-
- $element['stamps'][$key]['remove_end'] = array(
- '#name' => 'remove_end_' . $key,
- '#value' => t('- remove end time'),
- ) + $ajax_button;
-
- $element['stamps'][$key]['add_end'] = array(
- '#name' => 'add_end_' . $key,
- '#value' => t('+ add end time'),
- ) + $ajax_button;
-
- }
-
- $element['timestamps_add_stamp'] = array(
- '#name' => 'add_stamp',
- '#value' => t('+ add date'),
- ) + $ajax_button;
-
- $element['#attached'] = array(
- 'js' => array(
- drupal_get_path('module', 'culturefeed_date_control') . '/js/culturefeed_date_control_time_select.js',
- ),
- );
-
- if (!isset($element['#date_control'])) {
- $element['#attached']['css'] = array(
- drupal_get_path('module', 'culturefeed_date_control') . '/css/culturefeed_date_control.css',
- );
- }
-
- return $element;
-
-}
-
-/**
- * Validate and alter the culturefeed date control timestamps form values.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_date_control_timestamps_validate(array $element, array &$form_state) {
-
- $triggering_element = (isset($form_state['triggering_element'])) ? $form_state['triggering_element'] : '';
- $triggering_parent = array_pop($triggering_element['#parents']);
- $timestamps = $element['#value'];
-
- if (culturefeed_elements_check_trigger_element($triggering_element, $element)) {
-
- switch ($triggering_parent) {
-
- case 'timestamps_add_stamp':
- $timestamps['stamps'][] = array('date' => array('date' => ''));
- break;
-
- case 'remove_stamp':
- $index = array_pop($triggering_element['#parents']);
- array_splice($timestamps['stamps'], $index, 1);
- break;
-
- case 'add_end':
- $index = array_pop($triggering_element['#parents']);
- $timestamps['stamps'][$index]['end_time'] = array('hour' => '', 'minute' => '');
- break;
-
- case 'remove_end':
- $index = array_pop($triggering_element['#parents']);
- unset($timestamps['stamps'][$index]['end_time']);
- break;
-
- }
-
- drupal_array_set_nested_value($form_state['input'], $element['#parents'], $timestamps);
-
- }
-
-}
-
-/**
- * Value callback for the culturefeed date control timestamps element.
- *
- * @param array $element
- * The element.
- * @param mixed $input
- * The input.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The value.
- */
-function culturefeed_date_control_timestamps_value_callback(array $element, $input, array $form_state) {
-
- if ($input) {
- return $input;
- }
- else {
-
- $value = array(
- 'stamps' => array(
- array('date' => '', 'start_time' => '', 'end_time' => ''),
- ),
- );
-
- if (isset($element['#default_value']) && $element['#default_value']) {
-
- $stamps = array();
- foreach ($element['#default_value'] as $default_value) {
-
- if (isset($default_value['date']) && $default_value['date']) {
-
- $stamp = array();
- $stamp['date'] = culturefeed_date_control_explode_date($element, $default_value['date']);
- if (isset($default_value['start_time']) && $default_value['start_time']) {
- $stamp['start_time'] = culturefeed_date_control_explode_time($element, $default_value['start_time'], $default_value['date']);
- }
- if (isset($default_value['end_time']) && $default_value['end_time']) {
- $stamp['end_time'] = culturefeed_date_control_explode_time($element, $default_value['end_time'], $default_value['date']);
- }
- $stamps[] = $stamp;
-
- }
-
- }
-
- if (count($stamps)) {
- $value['stamps'] = $stamps;
- }
-
- }
-
- return $value;
-
- }
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/js/culturefeed_date_control_opening_times.js b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/js/culturefeed_date_control_opening_times.js
deleted file mode 100644
index ab32d3f2..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/js/culturefeed_date_control_opening_times.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * @file
- * Contains culturefeed date control opening times javascript.
- */
-
-(function ($) {
-
- Drupal.behaviors.culturefeed_date_control_opening_times_complete_time = {
- attach: function (context, setings) {
- $(".culturefeed-date-control-opening-times-complete input").blur(function () {
- var string = $(this).val();
- if (string) {
- var time = string.split(':');
- var has_separator = time.length - 1;
- if (has_separator === 0) {
- $(this).val(string + ':00');
- }
- if (time[1].length === 0) {
- $(this).val(string + '00');
- }
- }
- });
- }
- }
-
-})(jQuery);
-
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/js/culturefeed_date_control_time_select.js b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/js/culturefeed_date_control_time_select.js
deleted file mode 100644
index 6db731fa..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/js/culturefeed_date_control_time_select.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * @file
- * Contains culturefeed date control opening times javascript.
- */
-
-(function ($) {
-
- Drupal.behaviors.culturefeed_date_control_time_select_complete_time = {
-
- attach: function (context, setings) {
-
- var time_complete = $(".date-hour > .time-select-complete-minutes");
-
- time_complete.each(function () {
- var id = $(this).attr('id');
- if (typeof Drupal.ajax[id] !== 'undefined') {
- var parentBeforeSerialize = Drupal.ajax[id].options.beforeSerialize;
- Drupal.ajax[id].options.beforeSerialize = function (element, options) {
- parentBeforeSerialize(element, options);
- culturefeed_date_control_time_select_complete_time($('#' + id));
- }
- }
- });
-
- time_complete.change(function () {
- if ($(this).val()) {
- culturefeed_date_control_time_select_complete_time($(this));
- }
- });
-
- }
-
- }
-
- function culturefeed_date_control_time_select_complete_time(element) {
- var minute = element.parents(".form-type-date-select").find(".date-minute > .time-select-complete-minutes");
- if (!minute.val()) {
- minute.val('00');
- }
-
- }
-
-})(jQuery);
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/theme/theme.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/theme/theme.inc
deleted file mode 100644
index 2e7ac91d..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_date_control/theme/theme.inc
+++ /dev/null
@@ -1,192 +0,0 @@
- array(
- 'class' => array(
- 'date-control-table',
- 'date-control-hybrid-table',
- ),
- ),
- 'rows' => array(),
- );
-
- $cells = array();
- $cells[] = drupal_render($form['start_date']);
- $cells[] = drupal_render($form['start_time']);
- if (!$form['end_date']['#access'] && !$form['end_time']['#access']) {
- $cells[] = drupal_render($form['add_end_date_or_time']);
- }
- if ($form['end_date']['#access']) {
- $cells[] = drupal_render($form['end_date']);
- }
- if ($form['end_time']['#access']) {
- $cells[] = drupal_render($form['end_time']);
- }
-
- $table['rows'][] = $cells;
- $output = theme('table', $table);
- $output .= drupal_render_children($form);
- return $output;
-
-}
-
-/**
- * Theme the timestamps table.
- *
- * @param array $variables
- * The variables.
- *
- * @return string
- * The output.
- */
-function theme_culturefeed_date_control_opening_times_table(array &$variables) {
-
- $form = $variables['form'];
-
- $header = array(t('open'), t('from'), t('to'));
- $table = array(
- 'attributes' => array(
- 'class' => array(
- 'date-control-table',
- 'date-control-opening-times-table',
- ),
- ),
- 'header' => $header,
- 'rows' => array(),
- );
-
- foreach (element_children($form) as $element) {
-
- $cells = array();
- $cells[] = $form[$element]['#title'];
- $cells[] = array(
- 'data' => drupal_render($form[$element][0]['open_from']),
- 'class' => 'culturefeed-date-control-opening-times-complete',
- );
- $cells[] = array(
- 'data' => drupal_render($form[$element][0]['open_till']),
- 'class' => 'culturefeed-date-control-opening-times-complete',
- );
- $table['rows'][] = $cells;
-
- }
-
- $output = theme('table', $table);
- return $output;
-
-}
-
-/**
- * Theme the period table.
- *
- * @param array $variables
- * The variables.
- *
- * @return string
- * The output.
- */
-function theme_culturefeed_date_control_period_table(array &$variables) {
-
- $form = $variables['form'];
-
- $table = array(
- 'attributes' => array(
- 'class' => array(
- 'date-control-table',
- 'date-control-period-table',
- ),
- ),
- 'rows' => array(),
- );
-
- $cells = array(drupal_render($form['start_date']));
- if ($form['add_end']['#access']) {
- $cells[] = drupal_render($form['add_end']);
- }
- if ($form['end_date']['#access']) {
- $cells[] = drupal_render($form['end_date']);
- }
- if ($form['remove_end']['#access']) {
- $cells[] = drupal_render($form['remove_end']);
- }
-
- $table['rows'][] = $cells;
- $output = theme('table', $table);
- return $output;
-
-}
-
-/**
- * Theme the timestamps table.
- *
- * @param array $variables
- * The variables.
- *
- * @return string
- * The output.
- */
-function theme_culturefeed_date_control_timestamps_table(array &$variables) {
-
- $form = $variables['form'];
-
- $table = array(
- 'attributes' => array(
- 'class' => array(
- 'date-control-table',
- 'date-control-timestamps-table',
- ),
- ),
- 'rows' => array(),
- );
-
- foreach (element_children($form['stamps']) as $element) {
-
- if ($element !== 'timestamps_add_stamp') {
-
- $cells = array();
- if ($form['stamps'][$element]['remove_stamp']['#access']) {
- $cells[] = drupal_render($form['stamps'][$element]['remove_stamp']);
- }
- $cells[] = drupal_render($form['stamps'][$element]['date']);
- $cells[] = drupal_render($form['stamps'][$element]['start_time']);
- if ($form['stamps'][$element]['end_time']['#access']) {
- $cells[] = drupal_render($form['stamps'][$element]['end_time']);
- }
- if ($form['stamps'][$element]['add_end']['#access']) {
- $cells[] = drupal_render($form['stamps'][$element]['add_end']);
- }
- if ($form['stamps'][$element]['remove_end']['#access']) {
- $cells[] = drupal_render($form['stamps'][$element]['remove_end']);
- }
- elseif ($form['#cell_count'] == 5) {
- $cells[] = '';
- }
- $table['rows'][] = $cells;
-
- }
-
- }
-
- $output = theme('table', $table);
- $output .= drupal_render_children($form);
- return $output;
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_elements.info b/culturefeed_entry_ui/culturefeed_elements/culturefeed_elements.info
deleted file mode 100644
index ea789ace..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_elements.info
+++ /dev/null
@@ -1,5 +0,0 @@
-name = CultureFeed Elements
-description = Form elements for the Entry UI.
-package = CultureFeed
-version = VERSION
-core = 7.x
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_elements.module b/culturefeed_entry_ui/culturefeed_elements/culturefeed_elements.module
deleted file mode 100644
index 0a2363d3..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_elements.module
+++ /dev/null
@@ -1,59 +0,0 @@
- 'ajax',
- '#commands' => ajax_prepare_response($output),
- );
- return $result;
-
-}
-
-/**
- * Checks if the triggering element is part of the element.
- *
- * @param array $triggering_element
- * The triggering element.
- * @param array $element
- * The element.
- *
- * @return bool
- * True or false.
- */
-function culturefeed_elements_check_trigger_element(array $triggering_element, array $element) {
- $test = array_intersect($triggering_element['#parents'], $element['#parents']);
- return array_intersect($triggering_element['#parents'], $element['#parents']) == $element['#parents'];
-}
-
-/**
- * Implements hook_menu().
- */
-function culturefeed_elements_menu() {
-
- return array(
- 'culturefeed_elements/ajax' => array(
- 'title' => 'AHAH callback',
- 'page callback' => 'culturefeed_elements_ajax_callback',
- 'delivery callback' => 'ajax_deliver',
- 'access callback' => TRUE,
- 'theme callback' => 'ajax_base_page_theme',
- 'type' => MENU_CALLBACK,
- ),
- );
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/culturefeed_location_control.info b/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/culturefeed_location_control.info
deleted file mode 100644
index ace7982a..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/culturefeed_location_control.info
+++ /dev/null
@@ -1,6 +0,0 @@
-name = CultureFeed Entry UI Location control
-description = Form element to manage locations in the Entry UI.
-package = CultureFeed
-version = VERSION
-core = 7.x
-dependencies[] = culturefeed_elements
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/culturefeed_location_control.module b/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/culturefeed_location_control.module
deleted file mode 100644
index 23e628e5..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/culturefeed_location_control.module
+++ /dev/null
@@ -1,55 +0,0 @@
- array(
- '#element_validate' => array('culturefeed_location_control_location_control_validate'),
- '#input' => TRUE,
- '#pre_render' => array('culturefeed_location_control_location_control_pre_render'),
- '#process' => array('culturefeed_location_control_location_control_process', 'ajax_process_form'),
- '#tree' => TRUE,
- '#value_callback' => 'culturefeed_location_control_location_control_value_callback',
- ),
- 'culturefeed_location_control_asset' => array(
- '#element_validate' => array('culturefeed_location_control_asset_validate'),
- '#input' => TRUE,
- '#process' => array('culturefeed_location_control_asset_process', 'ajax_process_form'),
- '#tree' => TRUE,
- '#value_callback' => 'culturefeed_location_control_asset_value_callback',
- ),
- 'culturefeed_location_control_custom' => array(
- '#element_validate' => array('culturefeed_location_control_custom_validate'),
- '#input' => TRUE,
- '#pre_render' => array('culturefeed_location_control_custom_pre_render'),
- '#process' => array('culturefeed_location_control_custom_process', 'ajax_process_form'),
- '#tree' => TRUE,
- '#value_callback' => 'culturefeed_location_control_custom_value_callback',
- ),
- );
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/asset.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/asset.inc
deleted file mode 100644
index 7ff803ff..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/asset.inc
+++ /dev/null
@@ -1,163 +0,0 @@
-";
- $element['#suffix'] = "";
-
- if (isset($element['#location_control'])) {
- $element_id = $element['#location_control']['#id'];
- $array_parents = $element['#location_control']['#array_parents'];
- }
-
- $asset = $element['#value'];
-
- $ajax_settings = array(
- 'effect' => 'none',
- 'path' => 'culturefeed_elements/ajax/' . implode('/', $array_parents),
- 'progress' => array('type' => 'throbber'),
- 'wrapper' => $element_id . '-ajax-wrapper',
- );
-
- $ajax_button = array(
- '#access' => TRUE,
- '#ajax' => $ajax_settings,
- '#attributes' => array(
- 'class' => array('add-more-link btn-link'),
- ),
- '#limit_validation_errors' => array($element['#parents']),
- '#submit' => array('culturefeed_location_control_location_control_submit'),
- '#type' => 'submit',
- );
-
- $element['label'] = array(
- '#autocomplete_path' => 'autocomplete/culturefeed/location-suggestions/all',
- '#default_value' => isset($asset['label']) ? $asset['label'] : '',
- '#required' => FALSE,
- '#size' => 80,
- '#title' => t('Location'),
- '#type' => 'textfield',
- );
- if ($asset['id']) {
- $element['label']['#attributes']['readonly'] = 'readonly';
- }
-
- // @see culturefeed_entry_ui.js.
- $element['id'] = array(
- '#attributes' => array(
- 'id' => 'location_actor_id',
- ),
- '#default_value' => isset($asset['id']) ? $asset['id'] : '',
- '#type' => 'hidden',
- );
-
- $element['asset_remove'] = $ajax_button + array(
- '#id' => 'location_asset_remove',
- '#name' => 'asset_remove',
- '#value' => t('Remove address'),
- );
- if (!$asset['id']) {
- $element['asset_remove']['#attributes']['style'] = 'display: none;';
- }
-
- $element['new'] = $ajax_button + array(
- '#id' => 'location_custom_add',
- '#name' => 'new',
- '#value' => t('Location not found, add location'),
- );
- $element['new']['#attributes']['style'] = 'display: none;';
-
- return $element;
-
-}
-
-/**
- * Validate and alter the culturefeed location control asset form values.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_location_control_asset_validate(array &$element, array &$form_state) {
-
- $triggering_element = (isset($form_state['triggering_element'])) ? $form_state['triggering_element'] : '';
- $triggering_parent = array_pop($triggering_element['#parents']);
- $asset = $element['#value'];
-
- if (culturefeed_elements_check_trigger_element($triggering_element, $element)) {
-
- switch ($triggering_parent) {
-
- case 'asset_remove':
-
- $asset['id'] = '';
- $asset['label'] = '';
-
- }
-
- drupal_array_set_nested_value($form_state['input'], $element['#parents'], $asset);
-
- }
-
-}
-
-/**
- * Value callback for the culturefeed location control asset element.
- *
- * @param array $element
- * The element.
- * @param mixed $input
- * The input.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The value.
- */
-function culturefeed_location_control_asset_value_callback(array $element, $input, array $form_state) {
-
- if ($input) {
- return $input;
- }
- else {
-
- $value = array(
- 'id' => '',
- 'label' => '',
- );
-
- if (isset($element['#default_value']) && $element['#default_value']) {
-
- $default_value = $element['#default_value'];
- $value['id'] = $default_value['id'];
- $value['label'] = $default_value['label'];
-
- }
-
- return $value;
-
- }
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/custom.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/custom.inc
deleted file mode 100644
index 3f7b5a2a..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/custom.inc
+++ /dev/null
@@ -1,223 +0,0 @@
-";
- $element['#suffix'] = "";
-
- $custom = $element['#value'];
-
- $ajax_settings = array(
- 'effect' => 'none',
- 'path' => 'culturefeed_elements/ajax/' . implode('/', $array_parents),
- 'progress' => array('type' => 'throbber'),
- 'wrapper' => $element_id . '-ajax-wrapper',
- );
-
- $country = isset($custom['country']) && $custom['country'] ? $custom['country'] : variable_get('culturefeed_entry_ui_default_country');
-
- $element['title'] = array(
- '#type' => 'textfield',
- '#title' => t('Location Title'),
- '#default_value' => isset($custom['title']) ? $custom['title'] : '',
- '#required' => FALSE,
- '#size' => 80,
- );
-
- $element['country'] = array(
- '#ajax' => $ajax_settings,
- '#default_value' => $country,
- '#required' => FALSE,
- '#title' => t('Country'),
- '#type' => 'select',
- '#options' => country_get_list(),
- );
-
- $element['zip'] = array(
- '#access' => TRUE,
- '#attributes' => array(
- 'style' => array('margin-right:30px;'),
- ),
- '#default_value' => isset($custom['zip']) ? $custom['zip'] : '',
- '#required' => FALSE,
- '#size' => 10,
- '#title' => t('ZIP Code'),
- '#type' => 'textfield',
- );
-
- $element['city'] = array(
- '#autocomplete_path' => ($country == 'BE') ? 'autocomplete/culturefeed/city-suggestion' : '',
- '#default_value' => isset($custom['city']) ? $custom['city'] : '',
- '#required' => FALSE,
- '#size' => 60,
- '#title' => t('City'),
- '#type' => 'textfield',
- );
-
- $element['street'] = array(
- '#default_value' => isset($custom['street']) ? $custom['street'] : '',
- '#required' => FALSE,
- '#size' => 60,
- '#title' => ($country == 'BE') ? t('Street') : t('Street and House Number'),
- '#type' => 'textfield',
- );
-
- $element['number'] = array(
- '#access' => TRUE,
- '#default_value' => isset($custom['number']) ? $custom['number'] : '',
- '#required' => FALSE,
- '#size' => 10,
- '#title' => t('House Number'),
- '#type' => 'textfield',
- );
-
- if (isset($element['#location_control'])) {
- $element_id = $element['#location_control']['#id'];
- $array_parents = $element['#location_control']['#array_parents'];
- }
-
- $element['custom_remove'] = array(
- '#access' => TRUE,
- '#ajax' => array(
- 'path' => 'culturefeed_elements/ajax/' . implode('/', $array_parents),
- 'wrapper' => $element_id . '-ajax-wrapper',
- ) + $ajax_settings,
- '#attributes' => array('class' => array('add-more-link btn-link')),
- '#limit_validation_errors' => array($element['#parents']),
- '#name' => 'custom_remove',
- '#submit' => array('culturefeed_location_control_location_control_submit'),
- '#type' => 'submit',
- '#value' => t('Remove address'),
- );
-
- return $element;
-
-}
-
-/**
- * Validate and alter the culturefeed location control custom form values.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_location_control_custom_validate(array &$element, array &$form_state) {
-
- $triggering_element = (isset($form_state['triggering_element'])) ? $form_state['triggering_element'] : '';
- $triggering_parent = array_pop($triggering_element['#parents']);
- $custom = $element['#value'];
-
- if (culturefeed_elements_check_trigger_element($triggering_element, $element)) {
-
- switch ($triggering_parent) {
-
- case 'custom_remove':
-
- $custom['city'] = '';
- $custom['country'] = '';
- $custom['number'] = '';
- $custom['street'] = '';
- $custom['title'] = '';
- $custom['zip'] = '';
-
- }
-
- drupal_array_set_nested_value($form_state['input'], $element['#parents'], $custom);
-
- }
-
-}
-
-/**
- * Value callback for the culturefeed location control custom element.
- *
- * @param array $element
- * The element.
- * @param mixed $input
- * The input.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The value.
- */
-function culturefeed_location_control_custom_value_callback(array $element, $input, array $form_state) {
-
- if ($input) {
- return $input;
- }
- else {
-
- $value = array(
- 'city' => '',
- 'country' => '',
- 'number' => '',
- 'street' => '',
- 'title' => '',
- 'zip' => '',
- );
-
- if (isset($element['#default_value']) && $element['#default_value']) {
-
- $default_value = $element['#default_value'];
- $value['city'] = $default_value['city'];
- $value['country'] = $default_value['country'];
- $value['number'] = $default_value['number'];
- $value['street'] = $default_value['street'];
- $value['title'] = $default_value['title'];
- $value['zip'] = $default_value['zip'];
-
- }
-
- return $value;
-
- }
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/location_control.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/location_control.inc
deleted file mode 100644
index 5d6737da..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_location_control/form/location_control.inc
+++ /dev/null
@@ -1,211 +0,0 @@
- array(
- 'class' => array('clearfix'),
- 'id' => $element['#id'] . '-ajax-wrapper',
- ),
- '#type' => 'container',
- );
-
- // Type.
- $element['location_control']['type'] = array(
- '#type' => 'hidden',
- '#value' => $location_control['type'],
- );
-
- // Asset.
- $element['location_control']['asset'] = array(
- '#access' => TRUE,
- '#default_value' => isset($location_control['asset']) ? $location_control['asset'] : '',
- '#location_control' => $element,
- '#type' => 'culturefeed_location_control_asset',
- );
-
- // Custom.
- $element['location_control']['custom'] = array(
- '#access' => TRUE,
- '#default_value' => isset($location_control['custom']) ? $location_control['custom'] : '',
- '#location_control' => $element,
- '#type' => 'culturefeed_location_control_custom',
- );
-
- if (isset($element['#description'])) {
- $element['location_control']['description'] = array(
- '#attributes' => array(
- 'class' => array('description'),
- ),
- '#type' => 'container',
- 'markup' => array(
- '#markup' => $element['#description'],
- ),
- );
- }
-
- return $element;
-
-}
-
-/**
- * Submit handler for the ajax buttons.
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_location_control_location_control_submit(array $form, array &$form_state) {
-
- $form_state['rebuild'] = TRUE;
-
-}
-
-/**
- * Validate and alter the culturefeed location control form values.
- *
- * This is where the element switching is set, based on values.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_location_control_location_control_validate(array $element, array &$form_state) {
-
- $triggering_element = (isset($form_state['triggering_element'])) ? $form_state['triggering_element'] : '';
- $triggering_parent = array_pop($triggering_element['#parents']);
-
- // Use form_state instead of element as individual sub elements have changes
- // that won't be reflected in element.
- $values = drupal_array_get_nested_value($form_state['input'], $element['#parents']);
- $location_control = $values['location_control'];
-
- if (culturefeed_elements_check_trigger_element($triggering_element, $element)) {
-
- $type = $location_control['type'];
-
- // Custom.
- if ($triggering_parent == 'new') {
-
- $type = 'custom';
- if (isset($location_control['asset']['label']) && $location_control['asset']['label']) {
- $location_control['custom']['title'] = $location_control['asset']['label'];
- }
-
- }
-
- // Remove.
- if ($triggering_parent == 'asset_remove' || $triggering_parent == 'custom_remove') {
-
- $type = 'asset';
-
- }
-
- $location_control['type'] = $type;
- $element['#parents'][] = 'location_control';
-
- drupal_array_set_nested_value($form_state['input'], $element['#parents'], $location_control);
- }
-
-}
-
-/**
- * Value callback for the location control element.
- *
- * @param array $element
- * The element.
- * @param mixed $input
- * The input.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The value.
- */
-function culturefeed_location_control_location_control_value_callback(array &$element, $input, array $form_state) {
-
- if ($input) {
- return $input;
- }
- else {
-
- $value = array(
- 'location_control' => array(
- 'type' => 'asset',
- 'asset' => array(),
- 'custom' => array(),
- ),
- );
-
- if (isset($element['#default_value']) && $element['#default_value']) {
-
- $location_control = $value['location_control'];
- $default_value = $element['#default_value'];
-
- // Asset.
- if ($default_value['asset']['id']) {
- $location_control['asset'] = $default_value['asset'];
- $location_control['type'] = 'asset';
- }
-
- // Custom.
- if ($default_value['custom']['title']) {
- $location_control['custom'] = $default_value['custom'];
- $location_control['type'] = 'custom';
- }
-
- $value['location_control'] = $location_control;
-
- }
-
- return $value;
-
- }
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/css/culturefeed_tags_element.css b/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/css/culturefeed_tags_element.css
deleted file mode 100644
index 6a22dfa1..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/css/culturefeed_tags_element.css
+++ /dev/null
@@ -1,22 +0,0 @@
-table.tags-element-form-table {
- margin-bottom: 10px;
- width: auto;
-}
-
-.tags-element-form-table td.tags-element-form-cell {
- vertical-align: middle;
- border-top: none;
-}
-
-.tags-element-form-table td.tags-element-form-cell .form-group {
- margin: 0px;
-}
-
-.tags-element-form-table input.form-checkbox {
- max-width: inherit;
- margin-right: 0;
-}
-
-button.tags-element-add-tag {
- margin: 0px 0px 10px 8px;
-}
\ No newline at end of file
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.info b/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.info
deleted file mode 100644
index 4075ffb7..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.info
+++ /dev/null
@@ -1,6 +0,0 @@
-name = CultureFeed Tags element
-description = Form element to manage keywords in the Entry UI.
-package = CultureFeed
-version = VERSION
-core = 7.x
-dependencies[] = culturefeed_elements
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module b/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module
deleted file mode 100644
index 3875f39f..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/culturefeed_tags_element.module
+++ /dev/null
@@ -1,245 +0,0 @@
- array(
- '#element_validate' => array('culturefeed_tags_element_tags_element_validate'),
- '#input' => TRUE,
- '#process' => array('culturefeed_tags_element_tags_element_process', 'ajax_process_form'),
- '#tree' => TRUE,
- '#value_callback' => 'culturefeed_tags_element_tags_element_value_callback',
- ),
- );
-
-}
-
-/**
- * Process function for the culturefeed keywords element.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- * @param array $form
- * The form.
- *
- * @return array
- * The processed element.
- */
-function culturefeed_tags_element_tags_element_process(array $element, array &$form_state, array $form) {
-
- $element_id = $element['#id'];
- $array_parents = $element['#array_parents'];
-
- // Title.
- if (isset($element['#title'])) {
- $element['title'] = array(
- '#markup' => theme('form_element_label', array('element' => $element)),
- );
- }
-
- // Default visibility.
- if (!isset($element['#visible_default'])) {
- $element['#visible_default'] = TRUE;
- }
-
- // Ajax wrapper.
- $element['#prefix'] = "";
- $element['#suffix'] = "
";
-
- // Tags.
- $tags = $element['#value'];
- if (empty($tags['keywords'])) {
- $tags['keywords'] = array(
- array('value' => '', 'hidden' => !$element['#visible_default']),
- );
- }
-
- $element['keywords'] = array(
- '#attached' => array(
- 'css' => array(
- drupal_get_path('module', 'culturefeed_tags_element') . '/css/culturefeed_tags_element.css',
- ),
- ),
- '#attributes' => array('class' => array('tags-element-form-table')),
- '#theme' => 'culturefeed_tags_element_tags_element_form_table',
- );
-
- foreach ($tags['keywords'] as $key => $tag) {
-
- $element['keywords'][$key] = array(
- 'value' => array(
- '#default_value' => $tag['value'],
- '#type' => 'textfield',
- ),
- 'hidden' => array(
- '#default_value' => isset($tag['hidden']) && $tag['hidden'] ? 1 : 0,
- '#title' => t('Hide tag'),
- '#type' => 'checkbox',
- ),
- 'remove' => array(
- '#ajax' => array(
- 'path' => 'culturefeed_elements/ajax/' . implode('/', $array_parents),
- 'wrapper' => $element_id . '-ajax-wrapper',
- ),
- '#name' => $element_id . '-remove-' . $key,
- '#submit' => array('culturefeed_tags_element_tags_element_process_submit'),
- '#type' => 'submit',
- '#value' => t('Remove tag'),
- ),
- );
-
- }
-
- $element['add_tag'] = array(
- '#ajax' => array(
- 'path' => 'culturefeed_elements/ajax/' . implode('/', $array_parents),
- 'wrapper' => $element_id . '-ajax-wrapper',
- ),
- '#attributes' => array(
- 'class' => array('tags-element-add-tag'),
- ),
- '#name' => $element_id . '-add-tag',
- '#submit' => array('culturefeed_tags_element_tags_element_process_submit'),
- '#type' => 'submit',
- '#value' => t('Add tag'),
- );
-
- return $element;
-
-}
-
-/**
- * Validation handler for the culturefeed keywords element.
- *
- * @param array $element
- * The element.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_tags_element_tags_element_validate(array &$element, array &$form_state) {
-
- // Triggering data.
- $triggering_element = (isset($form_state['triggering_element'])) ? $form_state['triggering_element'] : '';
- $triggering_parent = array_pop($triggering_element['#array_parents']);
- $tags = $element['#value'];
-
- if (culturefeed_elements_check_trigger_element($triggering_element, $element)) {
-
- // Check if a tag needs to be added.
- if ($triggering_parent == 'add_tag') {
- $tag = array('value' => '', 'hidden' => !$element['#visible_default']);
- $tags['keywords'][] = $tag;
- }
-
- // Check if a tag needs to be removed. This is done here as renumbering
- // needs to be ensured.
- if ($triggering_parent == 'remove') {
-
- $index = array_pop($triggering_element['#array_parents']);
- array_splice($tags['keywords'], $index, 1);
-
- }
-
- }
-
- // The form element works with $element['#value']
- // (and thus $form_state['input']).
- drupal_array_set_nested_value($form_state['input'], $element['#parents'], $tags);
-
- // The form works with $form_state['values']. Drop the keywords wrapper so
- // clean tags are returned to the form and set the hidden property as visible.
- $values = array();
- foreach ($tags['keywords'] as $tag) {
-
- if (isset($tag['value']) && $tag['value']) {
- $values[$tag['value']] = array(
- 'value' => $tag['value'],
- 'visible' => !(isset($tag['hidden']) && $tag['hidden']),
- );
- }
- }
-
- drupal_array_set_nested_value($form_state['values'], $element['#parents'], $values);
-
-}
-
-/**
- * Submit handler for the culturefeed keywords element.
- */
-function culturefeed_tags_element_tags_element_process_submit($form, &$form_state) {
-
- $form_state['rebuild'] = TRUE;
-
-}
-
-/**
- * Implements hook_theme().
- */
-function culturefeed_tags_element_theme() {
-
- return array(
- 'culturefeed_tags_element_tags_element_form_table' => array(
- 'render element' => 'form',
- 'path' => drupal_get_path('module', 'culturefeed_tags_element') . '/theme',
- 'file' => 'theme.inc',
- ),
- );
-}
-
-/**
- * Value callback for the culturefeed date control timestamps element.
- *
- * @param array $element
- * The element.
- * @param mixed $input
- * The input.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The value.
- */
-function culturefeed_tags_element_tags_element_value_callback(array $element, $input, array $form_state) {
-
- if ($input) {
- return $input;
- }
-
- else {
-
- $value = array('keywords' => array());
-
- if (isset($element['#default_value']) && $element['#default_value']) {
-
- $keywords = array();
- foreach ($element['#default_value'] as $tag) {
-
- if (isset($tag['value']) && $tag['value']) {
-
- $keywords[] = array(
- 'value' => $tag['value'],
- 'hidden' => (isset($tag['visible']) && !$tag['visible']) ? 1 : 0,
- );
-
- }
-
- }
-
- $value['keywords'] = $keywords;
-
- }
-
- return $value;
-
- }
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/theme/theme.inc b/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/theme/theme.inc
deleted file mode 100644
index 0ccd1f7b..00000000
--- a/culturefeed_entry_ui/culturefeed_elements/culturefeed_tags_element/theme/theme.inc
+++ /dev/null
@@ -1,48 +0,0 @@
- array(
- array(
- 'data' => drupal_render($form[$row]['value']),
- 'class' => 'tags-element-form-cell',
- ),
- array(
- 'data' => drupal_render($form[$row]['hidden']),
- 'class' => 'tags-element-form-cell',
- ),
- array(
- 'data' => drupal_render($form[$row]['remove']),
- 'class' => 'tags-element-form-cell',
- ),
- ),
- 'no_striping' => TRUE,
- );
- }
-
- $output = theme('table', array(
- 'attributes' => $attributes,
- 'header' => $header,
- 'rows' => $rows,
- ));
- $output .= drupal_render_children($form);
- return $output;
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_entry_ui.api.php b/culturefeed_entry_ui/culturefeed_entry_ui.api.php
deleted file mode 100644
index 2b4c9949..00000000
--- a/culturefeed_entry_ui/culturefeed_entry_ui.api.php
+++ /dev/null
@@ -1,35 +0,0 @@
- array(
- 'value' => $site_name,
- 'visible' => FALSE,
- ),
- ));
-
-}
diff --git a/culturefeed_entry_ui/culturefeed_entry_ui.module b/culturefeed_entry_ui/culturefeed_entry_ui.module
deleted file mode 100644
index dbe47a5e..00000000
--- a/culturefeed_entry_ui/culturefeed_entry_ui.module
+++ /dev/null
@@ -1,515 +0,0 @@
- array(
- 'title' => t('Manage object tags'),
- 'description' => t('Manage all the tags from the objects on culturefeed (events, actors, ...).'),
- ),
- 'manage custom tags' => array(
- 'title' => t('Manage custom tags'),
- 'description' => t('Manage custom tags from the objects on culturefeed (events, actors, ...) managed on the admin section.'),
- ),
- 'create culturefeed events' => array(
- 'title' => t('Create events'),
- 'description' => t('Create new events through the entity api.'),
- ),
- 'edit culturefeed events' => array(
- 'title' => t('Edit events'),
- 'description' => t('Edit events through the entity api.'),
- ),
- 'delete culturefeed events' => array(
- 'title' => t('Delete events'),
- 'description' => t('Delete events through the entity api.'),
- ),
- 'manage culturefeed collaborative info' => array(
- 'title' => t('Manage culturefeed collaborative info'),
- 'description' => t('Manage culturefeed collaborative info through the entity api.'),
- ),
- );
-}
-
-/**
- * Implements hook_theme().
- */
-function culturefeed_entry_ui_theme() {
-
- return array(
- 'culturefeed_entry_ui_event_form' => array(
- 'render element' => 'form',
- 'template' => 'culturefeed-entry-ui-event-form',
- 'path' => drupal_get_path('module', 'culturefeed_entry_ui') . '/theme',
- 'file' => 'theme.inc',
- ),
- );
-}
-
-/**
- * Implements hook_menu().
- */
-function culturefeed_entry_ui_menu() {
-
- $items = array();
-
- $tags_form = array(
- 'argument' => 'culturefeed_entry_ui_edit_tags_form',
- 'file' => 'includes/culturefeed_entry_ui.pages.inc',
- );
-
- if (culturefeed_entry_ui_is_capable_of_cdbxml_version_3_3()) {
- $tags_form['argument'] = 'culturefeed_entry_ui_edit_tag_objects_form';
- $tags_form['file'] = 'includes/form/culturefeed_entry_ui.tag_objects.inc';
- }
-
- $items['agenda/e/%/%culturefeed_agenda_event/tags'] = array(
- 'title' => 'Tags',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array($tags_form['argument'], 3),
- 'access callback' => 'culturefeed_entry_ui_manage_tags_access',
- 'file' => $tags_form['file'],
- );
-
- $items['agenda/e/%/%culturefeed_agenda_event/collaboration'] = array(
- 'title' => 'Collaboration',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_entry_ui_edit_collaboration_data_form', 3),
- 'access callback' => 'culturefeed_entry_ui_manage_collaboration_access',
- 'file' => 'includes/form/culturefeed_entry_ui.collaboration.inc',
- );
-
- $items['agenda/e/add'] = array(
- 'title' => 'New event',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_entry_ui_event_form'),
- 'access arguments' => array('create culturefeed events'),
- 'file' => 'includes/culturefeed_entry_ui.pages.inc',
- );
-
- $items['agenda/e/%/%culturefeed_agenda_event/edit'] = array(
- 'title' => 'Edit event',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_entry_ui_event_form', 3),
- 'access arguments' => array('edit culturefeed events'),
- 'file' => 'includes/culturefeed_entry_ui.pages.inc',
- );
-
- $items['agenda/e/%/%culturefeed_agenda_event/delete'] = array(
- 'title' => 'Delete event',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_entry_ui_delete_event_form', 3),
- 'access arguments' => array('delete culturefeed events'),
- 'file' => 'includes/culturefeed_entry_ui.pages.inc',
- );
-
- $items['agenda/e/%/timeout_redirect'] = array(
- 'title' => 'Edit event',
- 'page callback' => 'culturefeed_entry_ui_event_timeout_redirect',
- 'page arguments' => array(2),
- 'access arguments' => array('edit culturefeed events'),
- 'file' => 'includes/culturefeed_entry_ui.pages.inc',
- );
-
- $items['admin/config/culturefeed/entry_ui'] = array(
- 'title' => 'CultureFeed Entry UI',
- 'description' => 'All configurations to entry api for this site',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_entry_ui_settings_form'),
- 'access arguments' => array('administer site configuration'),
- 'file' => 'includes/culturefeed_entry_ui.admin.inc',
- );
-
- return $items;
-
-}
-
-/**
- * Implements hook_menu_local_tasks_alter().
- */
-function culturefeed_entry_ui_menu_local_tasks_alter(&$data, $router_item, $root_path) {
- $culturefeed_user = NULL;
- try {
- $culturefeed_user = DrupalCultureFeed::getLoggedInUser();
-
- // We only alter when there is a valid culturefeed user.
- if (!$culturefeed_user) {
- return;
- }
- }
- catch (Exception $e) {
- // DrupalCultureFeed::getLoggedInUser() throws an exception
- // when there is not a valid token set. This also means there is no
- // culturefeed user logged in. Just ignore the exception to avoid flooding
- // the logs.
- return;
- }
-
- $id = '';
- if (arg(0) == 'agenda' && arg(1) == 'e') {
- $id = arg(3);
- }
- if (!$id) {
- return;
- }
-
- $event = entry_api_event_load($id);
- if (!$event) {
- return;
- }
- $title = $event->getDetails()->getDetailByLanguage(culturefeed_search_get_preferred_language())->getTitle();
- $request_detail = array(
- 'event' => $id,
- 'title' => $title,
- );
- $tabs = array();
- $path = culturefeed_search_detail_path('event', $id, $title);
-
- // Add a tab for managing the tags.
- if (culturefeed_entry_ui_manage_tags_access()) {
-
- $link = array(
- 'href' => $path . '/tags',
- 'localized_options' => array(),
- 'title' => t('Tags'),
- );
-
- $tabs[] = array(
- '#theme' => 'menu_local_task',
- '#link' => $link,
- '#active' => arg(4) === 'tags',
- );
- }
-
- // Add tab for collaboration info.
- if (culturefeed_entry_ui_manage_collaboration_access()) {
-
- $link = array(
- 'href' => $path . '/collaboration',
- 'localized_options' => array(),
- 'title' => t('Collaboration'),
- );
-
- $tabs[] = array(
- '#theme' => 'menu_local_task',
- '#link' => $link,
- '#active' => arg(4) === 'collaboration',
- );
- }
-
- if (user_access('edit culturefeed events')) {
- $udb_permission = Drupalculturefeed_EntryApi::checkPermission($culturefeed_user->id, $culturefeed_user->mbox, array('ids' => $event->getCdbId()));
- }
-
- // Add tab for editing the event.
- if (user_access('edit culturefeed events') && ($event->getCreatedBy() == $culturefeed_user->mbox || (isset($udb_permission) && $udb_permission[$event->getCdbId()] == 'true'))) {
-
- $link = array(
- 'href' => $path . '/edit',
- 'localized_options' => array(),
- 'title' => t('Edit'),
- );
-
- $tabs[] = array(
- '#theme' => 'menu_local_task',
- '#link' => $link,
- '#active' => arg(4) === 'edit',
- );
- }
-
- // Detail only exists when culturefeed_agenda is enabled.
- if ($tabs && module_exists('culturefeed_agenda')) {
-
- $request_detail = array(
- 'event' => $id,
- 'title' => $title,
- );
-
- $link = array(
- 'href' => $path,
- 'localized_options' => array(),
- 'title' => t('View'),
- );
- $tab = array(
- '#theme' => 'menu_local_task',
- '#link' => $link,
- '#active' => empty(arg(4)),
- );
- array_unshift($tabs, $tab);
-
- }
-
- // Clean state to start with.
- if (empty($data['tabs'])) {
- $data['tabs'] = array(
- 0 => array(
- 'output' => array(),
- 'count' => 0,
- ),
- );
- }
-
- $data['tabs'][0]['output'] = array_merge($data['tabs'][0]['output'], $tabs);
- $data['tabs'][0]['count'] += count($tabs);
-}
-
-/**
- * Load an event on the entry api.
- */
-function entry_api_event_load($id) {
-
- static $events = array();
- if (isset($events[$id])) {
- return $events[$id];
- }
-
- try {
- $events[$id] = Drupalculturefeed_EntryApi::getEvent($id);
- return $events[$id];
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_entry_ui', $e, array(), WATCHDOG_ERROR);
- }
-
- $events[$id] = FALSE;
-
- return FALSE;
-
-}
-
-/**
- * Access callback, to check if a user has access to the manage tags screen.
- */
-function culturefeed_entry_ui_manage_tags_access() {
- return user_access('manage custom tags') || user_access('manage object tags');
-}
-
-/**
- * Access callback, to check if a user has access to the manage collaboration screen.
- *
- * The collaboration screen will only work properly if also the search module
- * is configured to use cdb xml version 3.3.
- */
-function culturefeed_entry_ui_manage_collaboration_access() {
- return
- culturefeed_entry_ui_is_capable_of_cdbxml_version_3_3() &&
- user_access('manage culturefeed collaborative info');
-}
-
-function culturefeed_entry_ui_is_capable_of_cdbxml_version_3_3() {
- return
- version_compare(
- variable_get('culturefeed_search_cdb_version', CULTUREFEED_SEARCH_CDB_DEFAULT_VERSION),
- '3.3',
- '>='
- ) &&
- version_compare(
- variable_get('culturefeed_cdb_version', CULTUREFEED_CDB_DEFAULT_VERSION),
- '3.3',
- '>='
- );
-}
-
-/**
- * Submit callback for the 'add more' buttons.
- */
-function culturefeed_entry_ui_add_more_submit($form, &$form_state) {
-
- switch ($form_state['input']['_triggering_element_name']) {
-
- case 'links_add_more':
- $form_state['#links_needed'] = count(element_children($form['extra']['links'])) + 1;
- break;
-
- case 'opening_times_add_more':
- $form_state['#opening_times_needed'] = count(element_children($form['basic']['when']['period_or_permanent']['opening_times']['monday'])) + 1;
- break;
-
- case 'ld_add_more':
- $form_state['#ld_needed'] = TRUE;
- break;
-
- case 'price_add_more':
- $form_state['#price_needed'] = TRUE;
- break;
-
- case 'actor_add_more':
- $form_state['#actor_needed'] = TRUE;
- if (isset($form_state['input']['organiser']['actor']['organiser_actor_label']) && $form_state['input']['organiser']['actor']['organiser_actor_label']) {
- $form_state['#actor_label'] = $form_state['input']['organiser']['actor']['organiser_actor_label'];
- }
- break;
-
- case 'performers_add_more':
- $form_state['#performers_needed'] = count(element_children($form['extra']['performers']['wrapper']));
- break;
-
- case 'contacts_add_more':
- $form_state['#contacts_needed'] = count(element_children($form['extra']['contacts']['wrapper']));
- break;
-
- case 'languages_add_more':
- $form_state['#languages_needed'] = count(element_children($form['extra']['language']['wrapper']));
- break;
-
- }
-
- $form_state['rebuild'] = TRUE;
-
-}
-
-/**
- * Ajax form callback: Add a new row.
- *
- * Return the element that was set in the submit.
- */
-function culturefeed_entry_ui_add_more_js($form, $form_state) {
-
- switch ($form_state['input']['_triggering_element_name']) {
-
- case 'links_add_more':
- return $form['extra']['links'];
-
- case 'opening_times_add_more':
- return $form['basic']['period_or_permanent']['opening_times'];
-
- case 'price_add_more':
- return $form['extra']['price']['extra'];
-
- case 'ld_add_more':
- return $form['extra']['description']['ld'];
-
- case 'actor_add_more':
- return $form['extra']['organiser'];
-
- case 'performers_add_more':
- return $form['extra']['performers']['wrapper'];
-
- case 'contacts_add_more':
- return $form['extra']['contacts']['wrapper'];
-
- case 'languages_add_more':
- return $form['extra']['language']['wrapper'];
-
- case 'organiser_actor_id':
- return $form['extra']['organiser']['actor'];
- }
-
-}
-
-/**
- * Get the language preferred for input on the Entry API.
- */
-function culturefeed_entry_ui_get_preferred_language() {
- $language = variable_get('culturefeed_entry_ui_preferred_language', '');
-
- if (!$language) {
- $language = culturefeed_search_get_preferred_language();
- }
-
- return $language;
-}
-
-/**
- * Implements hook_views_api().
- */
-function culturefeed_entry_ui_views_api() {
- return array(
- 'api' => 3,
- 'path' => drupal_get_path('module','culturefeed_entry_ui') . '/views',
- );
-}
-
-function culturefeed_entry_ui_entity_path(\CultuurNet\Search\ActivityStatsExtendedEntity $entity, $op) {
-
- if ($entity->getType() == 'event') {
- $id = $entity->getId();
- $entity = $entity->getEntity();
- $details = $entity->getDetails()->getDetailByLanguage(culturefeed_search_get_preferred_language());
- $name = $details->getTitle();
- $path = culturefeed_search_detail_path('event', $id, $name);
- return "{$path}/{$op}";
- }
-}
-
-/**
- * Implements hook_block_info_alter().
- */
-function culturefeed_entry_ui_block_info_alter(&$blocks, $theme, $code_blocks) {
- $delta = '4abc71e4bcf51672335a80c2c3b6023e';
- if (isset($blocks[$delta])) {
- $block[$delta]['region'] = 'sidebar_second';
- $block[$delta]['status'] = 1;
- }
-}
-
-function culturefeed_entry_ui_remove_filter_input(&$form) {
-
- unset($form['format']['guidelines']);
- unset($form['format']['help']);
- return $form;
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_box_main_items().
- */
-function culturefeed_entry_ui_culturefeed_ui_profile_box_main_items() {
-
- $items = array();
- try {
-
- $items['entry'] = array(
- 'data' => l(t('Add event'),'agenda/e/add'),
- 'class' => 'entry',
- 'weight' => -10,
- );
-
- } catch (Exception $e) {
- watchdog_exception('culturefeed_entry_ui', $e);
- }
-
- return $items;
-}
-
-/**
- * Validation function for some textarea form elements.
- */
-function culturefeed_entry_ui_validate_textarea_markup($element, &$form_state, $form) {
- $value = drupal_array_get_nested_value($form_state['values'], $element['#parents'], $key_exists);
- if ($key_exists) {
- // Remember the original value.
- $original_value = $value;
-
- // Only allow the following tags.
- $allowed_tags = array('a', 'em', 'strong', 'ul', 'ol', 'li', 'hr');
- $value = filter_xss($value, $allowed_tags);
- // Let the user know if we removed any tags.
- if ($original_value != $value) {
- drupal_set_message(t(
- 'Some disallowed html tags will be removed in the %field_name field. The allowed tags are %allowed_tags',
- array(
- '%field_name' => $element['#title'],
- '%allowed_tags' => implode(', ', $allowed_tags),
- )
- ), 'warning');
- }
-
- // Replace newlines by 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' => '
',
- '#suffix' => '
'
- );
-
- $types = array_merge(
- array(CULTUREFEED_ENTRY_UI_EVENTTYPE_CAT_ID_KIJKEN_EN_LUISTEREN => culturefeed_search_get_eventtype_categories(array('parent' => CULTUREFEED_ENTRY_UI_EVENTTYPE_CAT_ID_KIJKEN_EN_LUISTEREN))),
- array(CULTUREFEED_ENTRY_UI_EVENTTYPE_CAT_ID_DOEN => culturefeed_search_get_eventtype_categories(array('parent' => CULTUREFEED_ENTRY_UI_EVENTTYPE_CAT_ID_DOEN))),
- array(CULTUREFEED_ENTRY_UI_EVENTTYPE_CAT_ID_BEZOEKEN => culturefeed_search_get_eventtype_categories(array('parent' => CULTUREFEED_ENTRY_UI_EVENTTYPE_CAT_ID_BEZOEKEN)))
- );
-
- foreach ($types as $cluster_id => $cluster_value) {
-
- $cluster_name = culturefeed_search_get_eventtype_categories(array('tid' => $cluster_id));
- $form['basic']['what'][$cluster_id] = array(
- '#type' => 'fieldset',
- '#title' => $cluster_name[$cluster_id],
- );
- foreach ($cluster_value as $type_id => $type_name) {
- $form['basic']['what'][$cluster_id][$type_id] = array(
- '#type' => 'radio',
- '#title' => $type_name,
- '#return_value' => $type_id,
- '#default_value' => $eventtype_default,
- '#parents' => array('what'),
- );
- }
- }
-
- $form['basic']['what']['themes'] = array(
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- '#tree' => TRUE
- );
-
- $themesconcerts = culturefeed_search_get_theme_categories(array('tid_like' => 1.8));
- $form['basic']['what']['themes']['concerts'] = array(
- '#type' => 'fieldset',
- '#title' => t('Concerts'),
- '#states' => array(
- 'visible' => array(
- 'input[name="what"]' => array('value' => '0.50.4.0.0'),
- ),
- ),
- );
-
- foreach ($themesconcerts as $theme_id => $theme_name) {
- $form['basic']['what']['themes']['concerts'][$theme_name] = array(
- '#type' => 'radio',
- '#title' => $theme_name,
- '#return_value' => $theme_id,
- '#default_value' => $themetype_default,
- '#parents' => array('themes'),
- );
- }
-
- $themesdance = culturefeed_search_get_theme_categories(array('tid_like' => 1.9));
- $form['basic']['what']['themes']['dance'] = array(
- '#type' => 'fieldset',
- '#title' => t('Dance'),
- '#states' => array(
- 'visible' => array(
- 'input[name="what"]' => array('value' => '0.54.0.0.0'),
- ),
- ),
- );
-
- foreach ($themesdance as $theme_id => $theme_name) {
- $form['basic']['what']['themes']['dance'][$theme_name] = array(
- '#type' => 'radio',
- '#title' => $theme_name,
- '#return_value' => $theme_id,
- '#default_value' => $themetype_default,
- '#parents' => array('themes'),
- );
- }
-
- $themesfilm = culturefeed_search_get_theme_categories(array('tid_like' => 1.7));
- $form['basic']['what']['themes']['film'] = array(
- '#type' => 'fieldset',
- '#title' => t('Film'),
- '#states' => array(
- 'visible' => array(
- 'input[name="what"]' => array('value' => '0.50.6.0.0'),
- ),
- ),
- );
-
- foreach ($themesfilm as $theme_id => $theme_name) {
- $form['basic']['what']['themes']['film'][$theme_name] = array(
- '#type' => 'radio',
- '#title' => $theme_name,
- '#return_value' => $theme_id,
- '#default_value' => $themetype_default,
- '#parents' => array('themes'),
- );
- }
-
- $themestheatre = culturefeed_search_get_theme_categories(array('tid_like' => '1.3.'));
- $themestheatre = array_merge($themestheatre, culturefeed_search_get_theme_categories(array('tid_like' => '0.52.0')));
- $themestheatre = array_merge($themestheatre, culturefeed_search_get_theme_categories(array('tid_like' => '1.4.')));
- $themestheatre = array_merge($themestheatre, culturefeed_search_get_theme_categories(array('tid_like' => '1.5.')));
- $form['basic']['what']['themes']['theatre'] = array(
- '#type' => 'fieldset',
- '#title' => t('Theatre'),
- '#states' => array(
- 'visible' => array(
- 'input[name="what"]' => array('value' => '0.55.0.0.0'),
- ),
- ),
- );
-
- foreach ($themestheatre as $theme_id => $theme_name) {
- $form['basic']['what']['themes']['theatre'][$theme_name] = array(
- '#type' => 'radio',
- '#title' => $theme_name,
- '#return_value' => $theme_id,
- '#default_value' => $themetype_default,
- '#parents' => array('themes'),
- );
- }
-
- $themessport = culturefeed_search_get_theme_categories(array('tid_like' => '1.51'));
- $themessport = array_merge($themessport, culturefeed_search_get_theme_categories(array('tid_like' => '1.58.8')));
- $form['basic']['what']['themes']['sport'] = array(
- '#type' => 'fieldset',
- '#title' => t('Sport'),
- '#states' => array(
- 'visible' => array(
- 'input[name="what"]' => array('value' => '0.19.0.0.0'),
- ),
- ),
- );
-
- foreach ($themessport as $theme_id => $theme_name) {
- $form['basic']['what']['themes']['sport'][$theme_name] = array(
- '#type' => 'radio',
- '#title' => $theme_name,
- '#return_value' => $theme_id,
- '#default_value' => $themetype_default,
- '#parents' => array('themes'),
- );
- }
-
- // Location control.
- form_load_include($form_state, 'inc', 'culturefeed_entry_ui', 'includes/form/culturefeed_entry_ui.location');
- culturefeed_entry_ui_location_form($form, $form_state, $event);
-
- // Date control
- $form['basic']['when'] = array(
- '#title' => t('Dates'),
- '#type' => 'culturefeed_date_control',
- '#default_value' => array(
- 'period' => array(
- 'start_date' => $period_start,
- 'end_date' => $period_end,
- ),
- 'permanent' => $permanent,
- 'timestamps' => $timestamps,
- 'opening_times' => array('days' => $weekscheme),
- ),
- '#allowed_days' => CultureFeed_Cdb_Data_Calendar_SchemeDay::$allowedDays,
- );
-
- // Extra.
- $form['extra'] = array(
- '#type' => 'fieldset',
- '#title' => t('Extra info'),
- );
-
- $form['extra']['description'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- '#title' => t('Description'),
- );
-
- $form['extra']['description']['sd'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- '#title' => t('Description'),
- );
-
- $form['extra']['description']['sd']['short_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Short description'),
- '#rows' => 4,
- '#maxlength' => 400,
- '#description' => t('Maximum 400 characters'),
- '#default_value' => $default_short_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
-
- $form['extra']['description']['ld'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- '#title' => t('Description'),
- );
-
- //Long Description
- if (!isset($form_state['#ld_needed'])) {
- $form['extra']['description']['ld']['add_long_description'] = array(
- '#type' => 'submit',
- '#name' => 'ld_add_more',
- '#value' => t('+ add long description'),
- '#attributes' => array('class' => array('add-more-link btn-link')),
- '#ajax' => array(
- 'callback' => 'culturefeed_entry_ui_add_more_js',
- 'wrapper' => 'description-ld-ajax-wrapper',
- 'effect' => 'none',
- ),
- '#limit_validation_errors' => array(array('ld')),
- '#submit' => array('culturefeed_entry_ui_add_more_submit'),
- );
- }
-
- if (isset($form_state['#ld_needed'])) {
- $form['extra']['description']['ld']['long_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Long description'),
- '#rows' => 10,
- '#default_value' => $default_long_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
- }
-
- // Tags
- form_load_include($form_state, 'inc', 'culturefeed_entry_ui', 'includes/form/culturefeed_entry_ui.tags');
- culturefeed_entry_ui_tags_form($form, $form_state, $event);
-
- // Links
- $form['extra']['links'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- '#title' => t('Links'),
- );
-
- if ($default_links) {
- $links_count = count($default_links);
- }
- else {
- $links_count = 0;
- }
- // Add link type selections.
- if ($default_links) {
- foreach ($default_links as $i => $info) {
- culturefeed_entry_ui_attach_link_info_elements($form, $i, $info, $default_links_reservation[$i]);
- $links_count++;
- }
- }
- else {
- culturefeed_entry_ui_attach_link_info_elements($form, 0);
- $links_count++;
- }
-
- // Add more button was clicked. Check how many extra rows need to be added.
- if (isset($form_state['#links_needed'])) {
- for (; $links_count < $form_state['#links_needed']; $links_count++) {
- culturefeed_entry_ui_attach_link_info_elements($form, $links_count);
- }
- }
-
- $form['extra']['add_more_links'] = array(
- '#type' => 'submit',
- '#name' => 'links_add_more',
- '#value' => t('+ add another link'),
- '#attributes' => array('class' => array('add-more-link btn-link')),
- '#ajax' => array(
- 'callback' => 'culturefeed_entry_ui_add_more_js',
- 'wrapper' => 'links-ajax-wrapper',
- 'effect' => 'none',
- ),
- '#limit_validation_errors' => array(array('links')),
- '#submit' => array('culturefeed_entry_ui_add_more_submit'),
- );
-
- //Photo
- $form['extra']['photo'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- '#title' => t('Image'),
- );
-
- $form['extra']['photo']['upload'] = array(
- '#type' => 'managed_file',
- '#name' => 'image_upload',
- '#title' => t('Image upload'),
- '#default_value' => isset($default_image->fid) ? $default_image->fid : '',
- '#description' => t('Allowed extensions: gif png jpg jpeg'),
- '#upload_location' => 'public://uploads/',
- '#upload_validators' => array(
- 'file_validate_extensions' => array('gif png jpg jpeg'),
- // Pass the maximum file size in bytes
- 'file_validate_size' => array(1024 * 1024 * 1024),
- ),
- '#after_build' => array('culturefeed_entry_ui_photo_after_build'),
- '#default_image' => isset($default_image->fid) ? $default_image : FALSE,
- );
-
- if (isset($default_image->fid)) {
- $form['extra']['photo']['current_file'] = array(
- '#type' => 'hidden',
- '#value' => $default_image->fid,
- );
- $form['extra']['photo']['current_file_hlink'] = array(
- '#type' => 'hidden',
- '#value' => $default_image_hlink,
- );
- }
-
- // Copyright
- $form['extra']['photo']['copyright_text'] = array(
- '#type' => 'textfield',
- '#title' => t('Copyright'),
- '#description' => t('Name of the copyright owner of this image.'),
- '#default_value' => isset($default_copyright) ? $default_copyright : '',
- '#size' => 30,
- );
- $form['extra']['photo']['copyright'] = array(
- '#type' => 'checkbox',
- '#default_value' => isset($default_image->fid) ? 1 : 0,
- '#title' => t('I agree to the terms & conditions and I declare that I have the necessary rights or permissions to distribute the image.'),
- );
-
- // Price
- $form['extra']['price'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#title' => t('Price'),
- );
-
- $form['extra']['price']['amount'] = array(
- '#type' => 'textfield',
- '#title' => t('Price'),
- '#default_value' => isset($default_price) ? $default_price : '',
- '#attributes' => array(
- 'class' => array(
- 'price-amount'
- ),
- 'placeholder' => array(
- '€'
- ),
- ),
- '#size' => 15,
- );
-
- $form['extra']['price']['free'] = array(
- '#type' => 'checkbox',
- '#title' => t('Free event'),
- '#default_value' => isset($default_free_price) ? $default_free_price : 0,
- '#states' => array(
- 'checked' => array(
- 'input[name="price_amount"]' => array('value' => '0'),
- ),
- 'invisible' => array(
- 'input[name="price_amount"]' => array('filled' => TRUE),
- ),
- ),
- );
-
- $form['extra']['price']['extra'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#title' => t('Price'),
- );
-
- if (!isset($form_state['#price_needed'])) {
- $form['extra']['price']['extra']['add_extra_info'] = array(
- '#type' => 'submit',
- '#name' => 'price_add_more',
- '#value' => t('+ add conditions & discounts'),
- '#attributes' => array(
- 'class' => array(
- 'add-more-link btn-link'
- ),
- 'style' => array(
- 'display:block; clear:left;'
- ),
- ),
- '#ajax' => array(
- 'callback' => 'culturefeed_entry_ui_add_more_js',
- 'wrapper' => 'price-extra-ajax-wrapper',
- 'effect' => 'none',
- ),
- '#limit_validation_errors' => array(array('price')),
- '#submit' => array('culturefeed_entry_ui_add_more_submit'),
- '#states' => array(
- 'visible' => array(
- 'input[name="price_amount"]' => array('filled' => TRUE),
- ),
- ),
- );
- }
-
- if (isset($form_state['#price_needed'])) {
- $form['extra']['price']['extra']['extra_info'] = array(
- '#type' => 'textarea',
- '#title' => t('Price conditions & discounts'),
- '#default_value' => isset($default_price_description) ? $default_price_description : '',
- '#states' => array(
- 'visible' => array(
- 'input[name="price_free"]' => array('checked' => FALSE),
- ),
- 'invisible' => array(
- 'input[name="price_amount"]' => array('empty' => TRUE),
- ),
- ),
- );
- }
-
- // Organiser add label (organisatie niet gevonden)
- $form['extra']['organiser'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- );
-
- $form['extra']['organiser']['actor'] = array(
- '#prefix' => '',
- '#suffix' => '
',
- '#type' => 'container',
- );
- if (!isset($form_state['#actor_needed'])) {
- $form['extra']['organiser']['actor']['organiser_actor_label'] = array(
- '#type' => 'textfield',
- '#title' => t('Organizer'),
- '#autocomplete_path' => 'autocomplete/culturefeed/organizer-suggestions/all',
- '#required' => FALSE,
- '#default_value' => $default_organiser_label,
- );
- }
-
- $form['extra']['organiser']['actor']['organiser_actor_id'] = array(
- '#id' => 'organiser_actor_id',
- '#type' => 'hidden',
- '#default_value' => $default_organiser_id,
- '#ajax' => array(
- 'callback' => 'culturefeed_entry_ui_add_more_js',
- 'wrapper' => 'organiser-actor-ajax-wrapper',
- 'event' => 'organiser_eventsearch',
- ),
- '#attributes' => array(
- 'id' => 'organiser_actor_id',
- ),
- );
-
- $form['extra']['organiser']['add_new_actor'] = array(
- '#type' => 'submit',
- '#name' => 'actor_add_more',
- '#value' => t('Organizer not found, add organizer'),
- '#attributes' => array(
- 'class' => array('add-more-link btn-link'),
- 'style' => array('display:none'),
- ),
- '#ajax' => array(
- 'callback' => 'culturefeed_entry_ui_add_more_js',
- 'wrapper' => 'organiser-ajax-wrapper',
- 'effect' => 'none',
- ),
- '#limit_validation_errors' => array(array('price')),
- '#submit' => array('culturefeed_entry_ui_add_more_submit'),
- );
-
- if (isset($form_state['#actor_needed'])) {
- $default_actor = isset($form_state['#actor_label']) ? $form_state['#actor_label'] : '';
- $form['extra']['organiser']['new_actor'] = array(
- '#type' => 'textfield',
- '#title' => t('Name new organizer'),
- '#default_value' => $default_actor,
- );
- }
-
- // Age
- $form['extra']['age_category'] = array(
- '#type' => 'select',
- '#title' => t('Age'),
- '#options' => array(
- 'everyone' => t('For everyone'),
- '1-12' => t('For children (between 1 and 12 years)'),
- '12-18' => t('For youth (between 12 and 18 years)'),
- '18+' => t('For adults (18+)'),
- ),
- '#default_value' => $age_category,
- );
-
- $form['extra']['age'] = array(
- '#title' => t('Suitable for ages from'),
- '#type' => 'textfield',
- '#states' => array(
- 'invisible' => array(
- ':input[name=age_category]' => array(
- array('value' => 'everyone'),
- ),
- ),
- ),
- '#default_value' => $age,
- );
-
- $form['extra']['fly'] = array(
- '#type' => 'container',
- '#states' => array(
- 'visible' => array(
- ':input[name=age_category]' => array(
- array('value' => '1-12'),
- ),
- ),
- ),
- );
- $form['extra']['fly']['value'] = array(
- '#markup' => t("Activities for children will get the 'Fly' label"),
- );
-
- // Start vertical tabs
- $form['extra']['vertical_tabs'] = array(
- '#type' => 'vertical_tabs',
- );
-
- // Contact
- $form['extra']['contacts'] = array(
- '#type' => 'fieldset',
- '#title' => t('Contact'),
- '#group' => 'vertical_tabs',
- );
-
- $form['extra']['contacts']['wrapper'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- );
-
- $contact_count = 0;
- // Add contacts type.
- if ($default_contacts) {
- foreach ($default_contacts as $i => $info) {
- culturefeed_entry_ui_attach_contacts_elements($form, $i, $info);
- $contact_count++;
- }
- }
- else {
- culturefeed_entry_ui_attach_contacts_elements($form, 0);
- $contact_count++;
- }
- // Add more button was clicked. Check how many extra rows need to be added.
- if (isset($form_state['#contacts_needed'])) {
- for (; $contact_count < $form_state['#contacts_needed']; $contact_count++) {
- culturefeed_entry_ui_attach_contacts_elements($form, $contact_count);
- }
- }
-
- $form['extra']['contacts']['wrapper']['add_more_contacts'] = array(
- '#type' => 'submit',
- '#name' => 'contacts_add_more',
- '#value' => t('+ add contact option'),
- '#attributes' => array('class' => array('add-more-link btn-link')),
- '#ajax' => array(
- 'callback' => 'culturefeed_entry_ui_add_more_js',
- 'wrapper' => 'contacts-ajax-wrapper',
- 'effect' => 'none',
- ),
- '#limit_validation_errors' => array(array('contacts')),
- '#submit' => array('culturefeed_entry_ui_add_more_submit'),
- );
-
- // Performers todo
- $form['extra']['performers'] = array(
- '#type' => 'fieldset',
- '#title' => t('Performers'),
- '#group' => 'vertical_tabs',
- );
-
- $form['extra']['performers']['wrapper'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- );
-
-
- $performers_count = 0;
- // Add performer type.
- if ($performers_info) {
- foreach ($performers_info as $i => $info) {
- culturefeed_entry_ui_attach_performers_elements($form, $i, $info);
- $performers_count++;
- }
- }
- else {
- culturefeed_entry_ui_attach_performers_elements($form, 0);
- $performers_count++;
- }
-
- // Add more button was clicked. Check how many extra rows need to be added.
- if (isset($form_state['#performers_needed'])) {
- for (; $performers_count < $form_state['#performers_needed']; $performers_count++) {
- culturefeed_entry_ui_attach_performers_elements($form, $performers_count);
- }
- }
-
- $form['extra']['performers']['wrapper']['add_more_performers'] = array(
- '#type' => 'submit',
- '#name' => 'performers_add_more',
- '#value' => t('+ add another performer'),
- '#attributes' => array('class' => array('add-more-link btn-link')),
- '#ajax' => array(
- 'callback' => 'culturefeed_entry_ui_add_more_js',
- 'wrapper' => 'performers-ajax-wrapper',
- 'effect' => 'none',
- ),
- '#limit_validation_errors' => array(array('performers')),
- '#submit' => array('culturefeed_entry_ui_add_more_submit'),
- );
-
- //language
- $form['extra']['language'] = array(
- '#type' => 'fieldset',
- '#title' => t('Language'),
- '#group' => 'vertical_tabs',
- );
-
- $form['extra']['language']['wrapper'] = array(
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- '#tree' => TRUE,
- );
-
- $language_count = 0;
- // Add language
- if ($languages_info) {
- foreach ($languages_info as $i => $info) {
- culturefeed_entry_ui_attach_language_elements($form, $i, $info);
- $language_count++;
- }
- }
- else {
- culturefeed_entry_ui_attach_language_elements($form, 0);
- }
-
- // Add more button was clicked. Check how many rows need to be added.
- if (isset($form_state['#languages_needed'])) {
- for (; $language_count < $form_state['#languages_needed']; $language_count++) {
- culturefeed_entry_ui_attach_language_elements($form, $language_count);
- }
- }
-
- $form['extra']['language']['wrapper']['add_more_languages'] = array(
- '#type' => 'submit',
- '#name' => 'languages_add_more',
- '#value' => t('+ add more language info'),
- '#attributes' => array('class' => array('add-more-link btn-link')),
- '#ajax' => array(
- 'callback' => 'culturefeed_entry_ui_add_more_js',
- 'wrapper' => 'languages-ajax-wrapper',
- 'effect' => 'none',
- ),
- '#limit_validation_errors' => array(array('languages')),
- '#submit' => array('culturefeed_entry_ui_add_more_submit'),
- );
-
- //entrance
- //$form['extra']['target_group'] = array(
- $form['extra']['entrance'] = array(
- '#type' => 'fieldset',
- '#title' => t('Access'),
- '#group' => 'vertical_tabs',
- );
-
- $form['extra']['entrance']['members'] = array(
- '#type' => 'radios',
- '#options' => array(0 => t('Open for everyone'), 1 => t('Only for members')),
- '#default_value' => ($is_private) ? 1 : 0,
- );
-
- // translations
- $form['extra']['translations'] = array(
- '#type' => 'fieldset',
- '#title' => t('Translations'),
- '#group' => 'vertical_tabs',
- );
-
- // Dutch.
- if (culturefeed_search_get_preferred_language() != 'nl') {
- $form['extra']['translations']['dutch'] = array(
- '#type' => 'fieldset',
- '#title' => t('Dutch'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- '#tree' => TRUE,
- );
-
- $form['extra']['translations']['dutch']['language'] = array(
- '#type' => 'textfield',
- '#title' => t('Event title'),
- '#default_value' => $nl_title,
- );
-
- $form['extra']['translations']['dutch']['short_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Short description'),
- '#default_value' => $nl_short_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
-
- $form['extra']['translations']['dutch']['long_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Long description'),
- '#default_value' => $nl_long_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
- }
-
- // English.
- if (culturefeed_search_get_preferred_language() != 'en') {
- $form['extra']['translations']['english'] = array(
- '#type' => 'fieldset',
- '#title' => t('English'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- '#tree' => TRUE,
- );
-
- $form['extra']['translations']['english']['language'] = array(
- '#type' => 'textfield',
- '#title' => t('Event title'),
- '#default_value' => $en_title,
- );
-
- $form['extra']['translations']['english']['short_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Short description'),
- '#default_value' => $en_short_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
-
- $form['extra']['translations']['english']['long_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Long description'),
- '#default_value' => $en_long_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
- }
-
- // French.
- if (culturefeed_search_get_preferred_language() != 'fr') {
- $form['extra']['translations']['french'] = array(
- '#type' => 'fieldset',
- '#title' => t('French'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- '#tree' => TRUE,
- );
-
- $form['extra']['translations']['french']['language'] = array(
- '#type' => 'textfield',
- '#title' => t('Event title'),
- '#default_value' => $fr_title,
- );
-
- $form['extra']['translations']['french']['short_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Short description'),
- '#default_value' => $fr_short_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
-
- $form['extra']['translations']['french']['long_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Long description'),
- '#default_value' => $fr_long_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
- }
-
- // German.
- if (culturefeed_search_get_preferred_language() != 'de') {
- $form['extra']['translations']['german'] = array(
- '#type' => 'fieldset',
- '#title' => t('German'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- '#tree' => TRUE,
- );
-
- $form['extra']['translations']['german']['language'] = array(
- '#type' => 'textfield',
- '#title' => t('Event title'),
- '#default_value' => $de_title,
- );
-
- $form['extra']['translations']['german']['short_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Short description'),
- '#default_value' => $de_short_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
-
- $form['extra']['translations']['german']['long_description'] = array(
- '#type' => 'textarea',
- '#title' => t('Long description'),
- '#default_value' => $de_long_description,
- '#element_validate' => array('culturefeed_entry_ui_validate_textarea_markup'),
- );
- }
- //Publication & Private
- $form['extra']['publication_date'] = array(
- '#type' => 'fieldset',
- '#title' => t('Publication date'),
- '#group' => 'vertical_tabs',
- );
-
- $form['extra']['publication_date']['wrapper'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- '#prefix' => '',
- '#suffix' => '
',
- );
-
- $form['extra']['publication_date']['wrapper']['date'] = array(
- '#type' => 'date_popup',
- '#default_value' => ($publication_date == '') ? date('Y-m-d') : $publication_date,
- '#date_format' => 'Y-m-d',
- );
-
- /*$form['extra']['publication_date']['wrapper']['private'] = array(
- '#type' => 'checkbox',
- '#title' => t('Public'),
- );*/
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Save'),
- '#validate' => array('culturefeed_entry_ui_event_save_validate'),
- );
-
- $form['#attached']['css'][] = drupal_get_path('module', 'culturefeed_entry_ui') . '/css/culturefeed_entry_ui.css';
- $form['#attached']['js'][] = drupal_get_path('module', 'culturefeed_entry_ui') . '/js/culturefeed_entry_ui.js';
- $form['#attached']['js'][] = drupal_get_path('module', 'culturefeed_entry_ui') . '/js/maxlength/jquery.plugin.js';
- $form['#attached']['js'][] = drupal_get_path('module', 'culturefeed_entry_ui') . '/js/maxlength/jquery.maxlength.js';
- if (culturefeed_search_get_preferred_language() == 'nl') {
- $form['#attached']['js'][] = drupal_get_path('module', 'culturefeed_entry_ui') . '/js/maxlength/jquery.maxlength-nl.js';
- }
- elseif (culturefeed_search_get_preferred_language() == 'fr') {
- $form['#attached']['js'][] = drupal_get_path('module', 'culturefeed_entry_ui') . '/js/maxlength/jquery.maxlength-fr.js';
- }
- elseif (culturefeed_search_get_preferred_language() == 'de') {
- $form['#attached']['js'][] = drupal_get_path('module', 'culturefeed_entry_ui') . '/js/maxlength/jquery.maxlength-de.js';
- }
- return $form;
-
-}
-
-/**
- * Attach a new language element.
- *
- */
-function culturefeed_entry_ui_attach_language_elements(&$form, $i, $info = NULL) {
- if ($info[0] == 'spoken') {
- $medium = 1;
- }
- else {
- if ($info[0] == 'dubbed') {
- $medium = 2;
- }
- else {
- if ($info[0] == 'subtitles') {
- $medium = 3;
- }
- else {
- $medium = 0;
- }
- }
- }
-
- if ($info[1] == 'Engels') {
- $lang = 1;
- }
- else {
- if ($info[1] == 'Spaans') {
- $lang = 2;
- }
- else {
- if ($info[1] == 'Nederlands') {
- $lang = 3;
- }
- else {
- if ($info[1] == 'Duits') {
- $lang = 4;
- }
- else {
- if ($info[1] == 'Frans') {
- $lang = 5;
- }
- else {
- $lang = 0;
- }
- }
- }
- }
- }
-
- $form['extra']['language']['wrapper'][$i] = array(
- '#type' => 'container',
- '#tree' => TRUE,
- '#prefix' => '',
- '#suffix' => '
',
- );
-
- $form['extra']['language']['wrapper'][$i]['spoken_language'] = array(
- '#type' => 'select',
- '#title' => t('Language'),
- '#options' => array(
- 0 => '',
- 1 => t('Spoken'),
- 2 => t('Dubbed'),
- 3 => t('Subtitled'),
- ),
- '#default_value' => $medium,
- );
-
- $form['extra']['language']['wrapper'][$i]['in_language'] = array(
- '#type' => 'select',
- '#title' => t('in'),
- '#options' => array(
- 0 => '',
- 1 => t('English'),
- //2 => t('Spanish'),
- 3 => t('Dutch'),
- 4 => t('German'),
- 5 => t('French'),
- ),
- '#default_value' => $lang,
- );
-}
-
-/**
- * Attach a new contact element.
- *
- */
-function culturefeed_entry_ui_attach_contacts_elements(&$form, $i, $info = NULL) {
-
- $options = array(0 => t('Phone'), 1 => t('E-mail'));
- $contact_type = 0;
-
- if ($info[0] == 'phone') {
- $contact_type = 0;
- }
-
- if ($info[0] == 'E-mail') {
- $contact_type = 1;
- }
-
- $contact = $info[1];
-
- $form['extra']['contacts']['wrapper'][$i]['channel'] = array(
- '#type' => 'select',
- '#title' => t('Contact'),
- '#title_display' => 'invisible',
- '#options' => $options,
- '#default_value' => $contact_type,
- '#attributes' => array('class' => array('channel-field')),
- );
-
- $form['extra']['contacts']['wrapper'][$i]['channel_input'] = array(
- '#type' => 'textfield',
- '#title' => t('Input'),
- '#title_display' => 'invisible',
- '#default_value' => $contact,
- '#attributes' => array('class' => array('channel-input-field')),
- );
-
-}
-
-/**
- * Attach a new performer element.
- *
- */
-function culturefeed_entry_ui_attach_performers_elements(&$form, $i, $info = NULL) {
-
- $form['extra']['performers']['wrapper'][$i]['performer'] = array(
- '#type' => 'textfield',
- '#title' => t('Performer'),
- '#display_title' => FALSE,
- '#default_value' => $info[1],
- '#attributes' => array('class' => array('performer-field')),
- );
-
- $form['extra']['performers']['wrapper'][$i]['role'] = array(
- '#type' => 'textfield',
- '#title' => t('Role'),
- '#default_value' => $info[0],
- '#attributes' => array('class' => array('role-field')),
- );
-
-}
-
-/**
- * Attach a new link element.
- *
- */
-function culturefeed_entry_ui_attach_link_info_elements(&$form, $i, $info = NULL, $reserve = NULL) {
-
- $form['extra']['links'][$i]['URL'] = array(
- '#type' => 'textfield',
- '#title' => t('Link'),
- '#default_value' => $info,
- '#attributes' => array('class' => array('link-field')),
- );
-
- $form['extra']['links'][$i]['reservation'] = array(
- '#type' => 'checkbox',
- '#title' => t('for reservation'),
- '#default_value' => $reserve,
- '#attributes' => array('class' => array('reservation-checkbox')),
- );
-
-}
-
-/**
- * Validate the event form.
- */
-function culturefeed_entry_ui_event_save_validate($form, &$form_state) {
-
- $values = $form_state['values'];
-
- // Validate age.
- if ($values['age'] && !is_numeric($values['age'])) {
- form_set_error('age', t('Please fill in correct age'));
- }
-
- // Validate period.
- if ($values['when']['date_control']['type'] == 'period') {
-
- $period = $values['when']['date_control']['period'];
-
- // Form validation hasn't processed the dates values yet, so don't validate.
- if (!is_array($period['start_date']) && !is_array($period['end_date'])) {
-
- // The dates.
- try {
- CultureFeed_Cdb_Data_Calendar::validateDate($period['start_date']);
- CultureFeed_Cdb_Data_Calendar::validateDate($period['end_date']);
- }
- catch (UnexpectedValueException $e) {
- form_set_error('when][date_control][period', t('Please fill in correct date and time'));
- }
-
- // Order of dates.
- $start_date = strtotime($period['start_date']);
- $end_date = strtotime($period['end_date']);
- if ($start_date > $end_date) {
- form_set_error('when][date_control][period', t('Date field is invalid. The end date is earlier than the beginning date.'));
- }
-
- }
-
- }
-
- // Validate timestamps.
- if ($values['when']['date_control']['type'] == 'timestamps') {
-
- $timestamps = $values['when']['date_control']['timestamps']['stamps'];
-
- foreach ($timestamps as $key => $timestamp) {
-
- // Form validation hasn't processed the dates values yet, so don't validate.
- if (is_array($timestamp['date'])) {
- continue;
- }
-
- // The date.
- try {
- CultureFeed_Cdb_Data_Calendar::validateDate($timestamp['date']);
- } catch (UnexpectedValueException $e) {
- form_set_error('when][date_control][timestamps][stamps][' . $key, t('Please fill in correct date and time'));
- }
-
- // The times.
- $start_time = isset($timestamp['start_time']) ? strtotime($timestamp['start_time']) : '';
- $end_time = isset($timestamp['end_time']) ? strtotime($timestamp['end_time']) : '';
- if (($start_time && $end_time) && $start_time > $end_time) {
- form_set_error('when][date_control][timestamps][stamps][' . $key, t('Date field is invalid. The end time is earlier than the beginning time.'));
- }
-
- }
-
- }
-
- // Validate weekscheme.
- if ($values['when']['date_control']['type'] == 'period' || $values['when']['date_control']['type'] == 'permanent') {
-
- $opening_times = $values['when']['date_control']['opening_times'];
- // Validate the weekscheme.
- if (!$opening_times['all_day']) {
-
- foreach ($opening_times['days'] as $day => $opening_times) {
-
- foreach ($opening_times as $key => $opening_time) {
-
- if (!empty($opening_time['open_from']) || !empty($opening_time['open_till'])) {
-
- $parents = array('when', 'date_control', 'opening_times', 'days', $day, $key);
- if (substr_count($opening_time['open_from'], ':') == 1) {
- $opening_time['open_from'] .= ':00';
- form_set_value(array('#parents' => array_merge($parents, array('open_from'))), $opening_time['open_from'], $form_state);
- }
- if (substr_count($opening_time['open_till'], ':') == 1) {
- $opening_time['open_till'] .= ':00';
- form_set_value(array('#parents' => array_merge($parents, array('open_till'))), $opening_time['open_till'], $form_state);
- }
-
- try {
- CultureFeed_Cdb_Data_Calendar::validateTime($opening_time['open_from']);
- }
- catch (Exception $e) {
- form_set_error('when][date_control][opening_times][days][' . $day . '][' . $key . '][open_from', t('Please fill in correct time.'));
- }
-
- try {
- CultureFeed_Cdb_Data_Calendar::validateTime($opening_time['open_till']);
- }
- catch (Exception $e) {
- form_set_error('when][date_control][opening_times][days][' . $day . '][' . $key . '][open_till', t('Please fill in correct time.'));
- }
-
- }
-
- }
-
- }
-
- }
-
- }
-
- // Validate copyright
- if (!empty($values['photo']['upload']) && $values['photo']['copyright'] != 1) {
- form_set_error('photo', t('Please agree to the general conditions of UiTdatabank and declare that you have the necessary rights or permissions to distribute the image through UiTdatabank.'));
- }
- if (!empty($values['photo']['upload']) && empty($values['photo']['copyright_text'])) {
- form_set_error('photo', t('Copyright field is required.'));
- }
-
- // Validate categories
- if (empty($values['what'])) {
- form_set_error('what', t('A category is required.'));
- }
-
- // Validate location
- $location = culturefeed_entry_ui_location_form_validate($form, $form_state);
-
- // Validate Links
- $i = 0;
- foreach ($values['links'] as $link_data) {
- if (!empty($link_data['URL'])) {
- if (!preg_match("@^https?://@", $link_data['URL'])) {
- $link_data['URL'] = 'http://' . $link_data['URL'];
- }
- if (!valid_url($link_data['URL'], TRUE)) {
- form_set_error('links][' . $i . '][URL', t('Not a valid URL'));
- }
- }
- $i++;
- }
-
- // Validate organiser.
- if (!empty($values['organiser']['actor']['organiser_actor_id'])) {
-
- try {
- $organiser = culturefeed_search_item_load($values['organiser']['actor']['organiser_actor_id'], 'actor');
- if (!$organiser) {
- form_set_error('organiser', t('We could not validate the organizer'));
- }
- } catch (Exception $e) {
- watchdog_exception('culturefeed_entry_ui', $e);
- form_set_error('organiser', t('We could not validate the organizer'));
- }
-
- }
- else {
- $organiser = NULL;
- }
-
- foreach ($values['wrapper'] as $extra) {
- if (is_array($extra)) {
-
- // Contacts
- if (!empty($extra['channel_input'])) {
- //if mail is selected
- if ($extra['channel'] == 1) {
- if (!valid_email_address($extra['channel_input'])) {
- form_set_error('channel_input', t('Not a valid email address'));
- }
- }
- }
- }
- }
-
- // Validate translations
- $available_translations = array(
- 'de' => 'german',
- 'en' => 'english',
- 'fr' => 'french',
- 'nl' => 'dutch',
- );
-
- foreach ($available_translations as $key => $language) {
- if (culturefeed_search_get_preferred_language() != $key) {
- if ($values[$language]['short_description'] || $values[$language]['long_description']) {
- if (!$values[$language]['language']) {
- form_set_error('channel_input', t('If you translate something, you should also translate the title.'));
- }
- }
- }
- }
-
- $errors = form_get_errors();
- if (empty($errors)) {
- _culturefeed_entry_ui_ui_event_form_save_event($form, $form_state, $location, $organiser);
- }
-}
-
-/**
- * Save the event form to the entity api.
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- * @param CultuurNet\Search\ActivityStatsExtendedEntity $location
- * The location of the event.
- * @param CultuurNet\Search\ActivityStatsExtendedEntity $organiser
- * The organiser of the event.
- */
-function _culturefeed_entry_ui_ui_event_form_save_event($form, &$form_state, CultuurNet\Search\ActivityStatsExtendedEntity $location = NULL, CultuurNet\Search\ActivityStatsExtendedEntity $organiser = NULL) {
- $values = $form_state['values'];
- $performerList = new CultureFeed_Cdb_Data_PerformerList();
- $mails = array();
- $phones = array();
- $links = array();
- $performers_count = 0;
- $language_list = new CultureFeed_Cdb_Data_LanguageList();
-
- foreach ($values['wrapper'] as $extra) {
- if (is_array($extra)) {
- // Performer
- if (!empty($extra['performer']) || !empty($extra['role'])) {
- $performer = new CultureFeed_Cdb_Data_Performer();
- $performer->setLabel($extra['performer']);
- $performer->setRole($extra['role']);
- $performerList->add($performer);
- $performers_count++;
- }
-
- // Contacts
- if (isset($extra['channel_input'])) {
-
- switch ($extra['channel']) {
- case '0':
- $phone = new CultureFeed_Cdb_Data_Phone($extra['channel_input'], CultureFeed_Cdb_Data_Phone::PHONE_TYPE_PHONE, FALSE, FALSE);
- array_push($phones, $phone);
- break;
- case '1':
- if ($extra['channel_input']) {
- $mail = new CultureFeed_Cdb_Data_Mail($extra['channel_input'], FALSE, FALSE);
- array_push($mails, $mail);
- }
- break;
- }
- }
-
- if (!empty($extra['spoken_language']) && !empty($extra['in_language'])) {
- switch ($extra['spoken_language']) {
- case 1:
- $spoken_language = 'spoken';
- break;
- case 2:
- $spoken_language = 'dubbed';
- break;
- case 3:
- $spoken_language = 'subtitles';
- break;
- }
-
- switch ($extra['in_language']) {
- case 1:
- $in_language = 'Engels';
- break;
- case 2:
- $in_language = 'Spaans'; //Zit niet in UDB, dus werkt niet
- break;
- case 3:
- $in_language = 'Nederlands';
- break;
- case 4:
- $in_language = 'Duits';
- break;
- case 5:
- $in_language = 'Frans';
- }
-
- $language_list->add(new CultureFeed_Cdb_Data_Language($in_language, $spoken_language));
- }
- }
- }
-
-
- // Links
- $media_links = array();
- foreach ($values['links'] as $link_data) {
-
- if ($link_data['URL']) {
-
- if (!preg_match("@^https?://@", $link_data['URL'])) {
- $link_data['URL'] = 'http://' . $link_data['URL'];
- }
-
- $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_WEBRESOURCE;
-
- if (strpos($link_data['URL'], 'plus.google.com')) {
- $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_GOOGLEPLUS;
- }
-
- if (strpos($link_data['URL'], 'facebook.com')) {
- $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_FACEBOOK;
- }
-
- if (strpos($link_data['URL'], 'twitter.com')) {
- $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_TWITTER;
- }
-
- if (strpos($link_data['URL'], 'youtube.com') || strpos($link_data['URL'], 'youtu.be')) {
- $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_YOUTUBE;
- }
-
- if ($link_data['reservation']) {
-
- // Make reservation link for contact element
- $link = new CultureFeed_Cdb_Data_Url($link_data['URL'], FALSE, $link_data['reservation']);
- array_push($links, $link);
-
- // Make reservation link for media element
- $mediatype = CultureFeed_Cdb_Data_File::MEDIA_TYPE_RESERVATIONS;
-
- }
-
- $link = new CultureFeed_Cdb_Data_File();
- $link->setHLink($link_data['URL']);
- $link->setMediaType($mediatype);
- if ($link_data['reservation']) {
- $link->setTitle(t('Order tickets'));
- }
- array_push($media_links, $link);
- }
- }
-
-
- $update = FALSE;
- if (isset($form['#event'])) {
- $update = TRUE;
- $event = $form['#event'];
- }
- else {
- $event = new CultureFeed_Cdb_Item_Event();
- }
-
- // Publication date.
- if ($values['wrapper']['date']) {
- $event->setAvailableFrom($values['wrapper']['date'] . 'T00:00:00');
- }
-
- // Age
- if ($values['age']) {
- $event->setAgeFrom(($values['age'] ? $values['age'] : 0));
- }
- else {
- // Age Category
- switch ($values['age_category']) {
- case '1-12':
- $event->setAgeFrom(1);
- break;
- case '12-18':
- $event->setAgeFrom(12);
- break;
- case '18+':
- $event->setAgeFrom(18);
- break;
- case 'everyone':
- default:
- break;
- }
- }
-
- // Timestamps.
- if ($values['when']['date_control']['type'] == 'timestamps') {
- _culturefeed_entry_ui_event_save_timestamps($event, $values['when']['date_control']['timestamps']['stamps']);
- }
-
- // Period.
- if ($values['when']['date_control']['type'] == 'period') {
- _culturefeed_entry_ui_event_save_period($event, $values['when']['date_control']['period']);
- }
-
- // Weekscheme.
- if ($values['when']['date_control']['type'] == 'period' || $values['when']['date_control']['type'] == 'permanent') {
- _culturefeed_entry_ui_event_save_weekscheme($event, $values['when']['date_control']);
- }
-
- // Categories.
- $category_options = array();
-
- $category_options[$values['what']] = culturefeed_search_get_eventtype_categories(array('tid' => $values['what']));
- $categories = new CultureFeed_Cdb_Data_CategoryList();
- foreach ($category_options as $key => $value) {
- if ($value) {
- $categories->add(new CultureFeed_Cdb_Data_Category(CultureFeed_Cdb_Data_Category::CATEGORY_TYPE_EVENT_TYPE, $key, $value[$key]));
- }
- }
-
- if (isset($values['themes'])) {
- $theme_options[$values['themes']] = culturefeed_search_get_theme_categories(array('tid_like' => $values['themes']));
- foreach ($theme_options as $key => $value) {
- if ($value && isset($value[$key])) {
- $categories->add(new CultureFeed_Cdb_Data_Category(CultureFeed_Cdb_Data_Category::CATEGORY_TYPE_EVENT_TYPE, $key, $value[$key]));
- }
- }
- }
-
- $event->setCategories($categories);
-
- // Event details.
- $detail = new CultureFeed_Cdb_Data_EventDetail();
- $detail->setTitle($values['title']);
-
- if (!empty($values['description']['sd']['short_description'])) {
- $detail->setShortDescription($values['description']['sd']['short_description']);
- }
- if (!empty($values['description']['ld']['long_description'])) {
- $detail->setLongDescription($values['description']['ld']['long_description']);
- }
-
- // Photo
- if ($values['photo']['upload']) {
-
- // Save to Drupal
- $drupal_file = file_load($values['photo']['upload']);
- $drupal_file->status = FILE_STATUS_PERMANENT;
- file_save($drupal_file);
- file_usage_add($drupal_file, 'culturefeed_entry_ui', 'event', $drupal_file->fid);
-
- // Add to detail
- $file = new CultureFeed_Cdb_Data_File();
- $file->setMediaType($file::MEDIA_TYPE_PHOTO);
- $file->setCopyright($values['photo']['copyright_text']);
- $file->setMain(TRUE);
- switch ($drupal_file->filemime) {
- case 'image/gif':
- $file->setFileType($file::FILE_TYPE_GIF);
- break;
- case 'image/jpg':
- case 'image/jpeg':
- $file->setFileType($file::FILE_TYPE_JPEG);
- break;
- case 'image/png':
- $file->setFileType($file::FILE_TYPE_PNG);
- break;
- }
- $file->setHLink(file_create_url($drupal_file->uri));
- $file->setFilename($drupal_file->filename);
-
- $detail->getMedia()->add($file);
- }
-
- // Media links
- if ($media_links) {
- foreach ($media_links as $media_link) {
- $detail->getMedia()->add($media_link);
- }
- }
-
-
- // Price
- if ($values['price']['free']) {
- $price = new CultureFeed_Cdb_Data_Price(0);
- $detail->setPrice($price);
- }
- else {
- if (!empty($values['price']['amount'])) {
- $price = new CultureFeed_Cdb_Data_Price(floatval(str_replace(',','.', $values['price']['amount'])));
- if (!empty($values['price']['extra']['extra_info'])) {
- $price->setDescription($values['price']['extra']['extra_info']);
- }
- $detail->setPrice($price);
- }
- }
-
- // Performers
- if ($performers_count) {
- $detail->setPerformers($performerList);
- }
-
- $detail->setLanguage(culturefeed_entry_ui_get_preferred_language());
-
- $details = new CultureFeed_Cdb_Data_EventDetailList();
- $details->add($detail);
-
- // Translations Dutch.
- if (culturefeed_search_get_preferred_language() != 'nl') {
- if ($values['dutch']['language'] || $values['dutch']['short_description'] || $values['dutch']['long_description']) {
-
- $detail = new CultureFeed_Cdb_Data_EventDetail();
- if ($values['dutch']['language']) {
- $detail->setTitle($values['dutch']['language']);
- }
- if (!empty($values['dutch']['short_description'])) {
- $detail->setShortDescription($values['dutch']['short_description']);
- }
- if (!empty($values['dutch']['long_description'])) {
- $detail->setLongDescription($values['dutch']['long_description']);
- }
-
- $detail->setLanguage("nl");
- $details->add($detail);
- }
- }
-
- // Translations English.
- if (culturefeed_search_get_preferred_language() != 'en') {
- if ($values['english']['language'] || $values['english']['short_description'] || $values['english']['long_description']) {
-
- $detail = new CultureFeed_Cdb_Data_EventDetail();
- if ($values['english']['language']) {
- $detail->setTitle($values['english']['language']);
- }
- if (!empty($values['english']['short_description'])) {
- $detail->setShortDescription($values['english']['short_description']);
- }
- if (!empty($values['english']['long_description'])) {
- $detail->setLongDescription($values['english']['long_description']);
- }
-
- $detail->setLanguage("en");
- $details->add($detail);
- }
- }
-
- // Translations French.
- if (culturefeed_search_get_preferred_language() != 'fr') {
- if ($values['french']['language'] || $values['french']['short_description'] || $values['french']['long_description']) {
-
- $detail = new CultureFeed_Cdb_Data_EventDetail();
- if ($values['french']['language']) {
- $detail->setTitle($values['french']['language']);
- }
- if (!empty($values['french']['short_description'])) {
- $detail->setShortDescription($values['french']['short_description']);
- }
- if (!empty($values['french']['long_description'])) {
- $detail->setLongDescription($values['french']['long_description']);
- }
-
- $detail->setLanguage("fr");
- $details->add($detail);
- }
- }
-
- // Translations German.
- if (culturefeed_search_get_preferred_language() != 'de') {
- if ($values['german']['language'] || $values['german']['short_description'] || $values['german']['long_description']) {
-
- $detail = new CultureFeed_Cdb_Data_EventDetail();
- if ($values['german']['language']) {
- $detail->setTitle($values['german']['language']);
- }
- if (!empty($values['german']['short_description'])) {
- $detail->setShortDescription($values['german']['short_description']);
- }
- if (!empty($values['german']['long_description'])) {
- $detail->setLongDescription($values['german']['long_description']);
- }
-
- $detail->setLanguage("de");
- $details->add($detail);
- }
- }
-
- $event->setDetails($details);
-
- // Location.
- $address = culturefeed_entry_ui_location_form_save($event, $location, $form_state);
-
- // Event organiser.
- if ($organiser) {
- $organiser_object = new CultureFeed_Cdb_Data_Organiser();
- $organiser_detail = $organiser->getEntity()->getDetails()
- ->getDetailByLanguage(culturefeed_search_get_preferred_language());
- if (!$organiser_detail) {
- $organiser_detail = $organiser->getEntity()->getDetails()
- ->getDetailByLanguage("nl");
- }
- $organiser_object->setLabel($organiser_detail->getTitle());
- $organiser_object->setCdbid($organiser->getEntity()->getCdbId());
- $event->setOrganiser($organiser_object);
- }
- else {
- if (isset($values['organiser']['new_actor'])) {
- $organiser_object = new CultureFeed_Cdb_Data_Organiser();
- $organiser_object->setLabel($values['organiser']['new_actor']);
- $event->setOrganiser($organiser_object);
- }
- }
-
- // Contact info.
- $physical_address = $address->getPhysicalAddress();
- $contact_object = new CultureFeed_Cdb_Data_ContactInfo();
- $contact_object->addAddress(new CultureFeed_Cdb_Data_Address($physical_address));
-
- foreach ($mails as $mail) {
- $contact_object->addMail($mail);
- }
- foreach ($phones as $phone) {
- $contact_object->addPhone($phone);
- }
- foreach ($links as $link) {
- $contact_object->addUrl($link);
- }
-
- $event->setContactInfo($contact_object);
-
- // Keywords.
- culturefeed_entry_ui_tags_form_save($event, $form_state);
-
- // Members.
- if ($values['members']) {
- $event->setPrivate(TRUE);
- }
-
- //if ($language_list) {
- $event->setLanguages($language_list);
-
- //}
-
- $form_state['submit_time'] = time();
-
- // Allow alterations by other modules.
- drupal_alter('culturefeed_entry_ui_event_pre_save', $event, $form, $form_state);
-
- try {
- if ($update) {
- Drupalculturefeed_EntryApi::updateEvent($event);
- $form_state['#event_id'] = $event->getCdbId();
- watchdog('culturefeed_entry_ui', 'Event %eventid updated.', array('%eventid' => $form_state['#event_id']));
- cache_clear_all('culturefeed:results:detail:event:' . $event->getCdbId(), 'cache_culturefeed_search');
- }
- else {
- $form_state['#event_id'] = Drupalculturefeed_EntryApi::createEvent($event);
- watchdog('culturefeed_entry_ui', 'Event %eventid created.', array('%eventid' => $form_state['#event_id']));
- }
-
- module_invoke_all('culturefeed_entry_ui_event_post_save', $event, $form, $form_state);
- $form_state['#update_event'] = $update;
-
- } catch (Exception $e) {
- watchdog_exception('culturefeed_entry_ui', $e);
- form_set_error('', t('An error occurred while saving the event'));
- }
-
- // Delete files from file system
- if ($form_state['values']['photo']['upload']) {
- $file = file_load($form_state['values']['photo']['upload']);
- file_delete($file);
- }
- if (isset($form_state['values']['photo']['current_file'])) {
- $file = file_load($form_state['values']['photo']['current_file']);
- file_delete($file);
- }
-
-}
-
-/**
- * Save helper function that creates calendar object for timestamps.
- */
-function _culturefeed_entry_ui_event_save_timestamps(&$event, $timestamps) {
-
- $calendar = new CultureFeed_Cdb_Data_Calendar_TimestampList();
-
- foreach ($timestamps as $timestamp) {
-
- $timestamp_object = new CultureFeed_Cdb_Data_Calendar_Timestamp($timestamp['date']);
- if (!empty($timestamp['start_time'])) {
- $timestamp_object->setStartTime($timestamp['start_time'] . ':00');
- }
- if (!empty($timestamp['end_time'])) {
- $timestamp_object->setEndTime($timestamp['end_time'] . ':00');
- }
- $calendar->add($timestamp_object);
- }
- $event->setCalendar($calendar);
-
-}
-
-/**
- * Save helper function that creates calendar object for timestamps.
- */
-function _culturefeed_entry_ui_event_save_period(&$event, $values) {
-
- $period_list = new CultureFeed_Cdb_Data_Calendar_PeriodList();
- $period = new CultureFeed_Cdb_Data_Calendar_Period($values['start_date'], $values['end_date']);
- $period_list->add($period);
- $event->setCalendar($period_list);
-
-}
-
-/**
- * Save helper function that creates calendar object for weekschemes.
- */
-function _culturefeed_entry_ui_event_save_weekscheme(&$event, $date_control) {
-
- $weekscheme = NULL;
- // Construct the weekscheme.
- if (isset($date_control['opening_times']) && !$date_control['opening_times']['all_day']) {
-
- $weekscheme = new CultureFeed_Cdb_Data_Calendar_Weekscheme();
- foreach ($date_control['opening_times']['days'] as $day => $opening_times) {
-
- $opening_info = new CultureFeed_Cdb_Data_Calendar_SchemeDay($day);
- $open_type = CultureFeed_Cdb_Data_Calendar_SchemeDay::SCHEMEDAY_OPEN_TYPE_CLOSED;
- foreach ($opening_times as $opening_time) {
- if (!empty($opening_time['open_from']) && !empty($opening_time['open_till'])) {
- $open_type = CultureFeed_Cdb_Data_Calendar_SchemeDay::SCHEMEDAY_OPEN_TYPE_OPEN;
- $opening_info->addOpeningTime(new CultureFeed_Cdb_Data_Calendar_OpeningTime($opening_time['open_from'], $opening_time['open_till']));
- }
- }
-
- $opening_info->setOpenType($open_type);
- $weekscheme->setDay($day, $opening_info);
-
- }
-
- }
-
- if ($date_control['type'] == 'period') {
- $calendar = new CultureFeed_Cdb_Data_Calendar_PeriodList();
- $period = new CultureFeed_Cdb_Data_Calendar_Period($date_control['period']['start_date'], $date_control['period']['end_date']);
- if ($weekscheme) {
- $period->setWeekScheme($weekscheme);
- }
- $calendar->add($period);
- }
- else {
- $calendar = new CultureFeed_Cdb_Data_Calendar_Permanent();
- if ($weekscheme) {
- $calendar->setWeekScheme($weekscheme);
- }
- }
-
- $event->setCalendar($calendar);
-
-}
-
-/**
- * Submit the event form, create a batch that waits and redirects.
- */
-function culturefeed_entry_ui_event_form_submit($form, &$form_state) {
-
- $batch = array(
- 'title' => t('Saving the event'),
- 'progress_message' => t('Je evenement is bewaard, maar we sturen het nog door naar alle publicatiekanalen. Dit kan nog even duren.'),
- 'operations' => array(
- array(
- 'culturefeed_entry_ui_event_form_submission_timeout_batch',
- array($form_state),
- ),
- ),
- 'finished' => 'culturefeed_entry_ui_event_form_submission_timeout_batch_finished',
- 'file' => drupal_get_path('module', 'culturefeed_entry_ui') . '/includes/culturefeed_entry_ui.pages.inc',
- );
-
- $form_state['redirect'] = 'agenda/e/' . $form_state['#event_id'] . '/timeout_redirect';
- batch_set($batch);
-
-}
-
-/**
- * Form callback: delete an event.
- */
-function culturefeed_entry_ui_delete_event_form($form, $form_state, $event) {
-
- $event = $event->getEntity();
- $form['id'] = array('#type' => 'value', '#value' => $event->getCdbId());
-
- return confirm_form($form,
- t('Are you sure you want to delete the event?'),
- '',
- t('This action cannot be undone'),
- t('Delete'),
- t('Cancel')
- );
-
-}
-
-/**
- * Submit the delete form.
- */
-function culturefeed_entry_ui_delete_event_form_submit($form, &$form_state) {
-
- try {
- Drupalculturefeed_EntryApi::deleteEvent($form_state['values']['id']);
- drupal_set_message(t('Event successfully deleted'));
- $form_state['redirect'] = 'agenda/edit';
- } catch (Exception $e) {
- watchdog_exception(WATCHDOG_ERROR, $e);
- drupal_set_message(t('An error occurred while deleting the event'), 'error');
- }
-
-}
-
-/**
- * Form callback: Show the manage tags form for a cdb object.
- */
-function culturefeed_entry_ui_edit_tags_form($form, $form_state, $event) {
-
- /** @var \CultuurNet\Search\ActivityStatsExtendedEntity $event */
- $event = $event->getEntity();
-
- /** @var \CultureFeed_Cdb_Item_Event $event */
- $event_tags = $event->getKeywords();
- $form['#old_tags'] = $event_tags;
- $custom_tags = array();
-
- // Get options from variable.
- if (variable_get('culturefeed_entry_ui_custom_tags')) {
- $custom_options = explode("\n", variable_get('culturefeed_entry_ui_custom_tags'));
- $custom_options = array_combine ($custom_options, $custom_options);
- }
-
- // Filter out custom tags.
- if ($event_tags) {
- foreach ($event_tags as $tag) {
- if (isset($custom_options) && array_key_exists($tag, $custom_options)) {
- unset($event_tags[$tag]);
- $custom_tags[$tag] = $tag;
- }
- }
- }
- else {
- $event_tags = array();
- }
-
- $form['#object_id'] = $event->getCdbId();
-
- if (user_access('manage custom tags') && !empty($custom_options)) {
- $form['custom_tags'] = array(
- '#type' => 'checkboxes',
- '#options' => $custom_options,
- '#title' => t('Custom tags'),
- '#default_value' => $custom_tags,
- );
- }
-
- $form['tags'] = array(
- '#type' => 'textfield',
- '#title' => t('Tags'),
- '#default_value' => implode(';', $event_tags),
- '#description' => t('Seperate multiple tags by ;'),
- );
-
-
- $form['submit'] = array(
- '#attributes' => array(
- 'class' => array('main-submit'),
- ),
- '#type' => 'submit',
- '#value' => t('Submit'),
- );
-
- return $form;
-
-}
-
-/**
- * Validate the tag form. Check duplicates with custom tags.
- */
-function culturefeed_entry_ui_edit_tags_form_validate($form, &$form_state) {
-
- $tags = explode(';', $form_state['values']['tags']);
- foreach ($tags as $tag) {
- if (array_key_exists($tag, $form['custom_tags']['#options'])) {
- form_set_error(t("Tag @tag is not permitted because it's already a custom tag.", array('@tag' => $tag)));
- }
- }
-
-}
-
-/**
- * Submit the edit tags form.
- */
-function culturefeed_entry_ui_edit_tags_form_submit($form, &$form_state) {
-
- // Merge custom tags into all tags.
- $tags = explode(';', $form_state['values']['tags']);
- foreach ($form_state['values']['custom_tags'] as $custom_tag) {
- if ($custom_tag) {
- $tags[] = $custom_tag;
- }
- }
-
- // Check what tags are removed.
- $removed_tags = array();
- if (!empty($form['#old_tags'])) {
- foreach ($form['#old_tags'] as $old_tag) {
- if (!in_array($old_tag, $tags)) {
- $removed_tags[] = $old_tag;
- }
- }
- }
-
- $event = new CultureFeed_Cdb_Item_Event();
- $event->setCdbId($form['#object_id']);
-
- try {
-
- // Add new tags.
- $tags = array_filter($tags);
- if ($tags) {
- Drupalculturefeed_EntryApi::addTagToEvent($event, $tags);
- }
-
- // Remove old tags.
- if ($removed_tags) {
- foreach ($removed_tags as $removed_tag) {
- Drupalculturefeed_EntryApi::removeTagFromEvent($event, $removed_tag);
- }
- }
-
- drupal_set_message(t('The tags were adjusted.'));
- cache_clear_all('culturefeed:results:detail:event:' . $event->getCdbId(), 'cache_culturefeed_search');
- drupal_goto(culturefeed_search_detail_path('event', $event->getCdbId(), ''));
-
- } catch (Exception $e) {
-
- if ($e->getCode() == CultureFeed_EntryApi::CODE_KEYWORD_PRIVATE) {
- drupal_set_message(t('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".'));
- }
- else {
- drupal_set_message(t('Error occured while saving the tags'));
- }
-
- watchdog_exception(WATCHDOG_ERROR, $e);
-
- }
-
-}
-
-/**
- * Adds thumbnail to photo field.
- */
-function culturefeed_entry_ui_photo_after_build($element) {
- $image = '';
- if ($element['#file']) {
- $image = $element['#file'];
- }
- if ($element['#default_image']) {
- $image = $element['#default_image'];
- }
- if ($image) {
- $markup = theme('image', array('path' => $image->uri, 'width' => 100, 'attributes' => array('class' => 'photo_thumbnail')));
- $element['filename']['#markup'] = $markup;
- }
- return $element;
-}
-
-/**
- * Batch operation function to wait before redirecting to the event page.
- *
- * @param array $form_state
- * Contains the information of the submitted event form.
- * @param array $context
- * Contains information about the status of the batch.
- */
-function culturefeed_entry_ui_event_form_submission_timeout_batch($form_state, &$context) {
-
- $event_cdbid = $form_state['#event_id'];
- $operation = (!empty($form_state['#update_event'])) ? 'update' : 'add';
-
- if (empty($context['sandbox'])) {
-
- $context['sandbox']['form_submitted_time'] = $form_state['submit_time'];
- $context['sandbox']['start'] = time();
- $context['sandbox']['max_duration'] = variable_get('culturefeed_entry_ui_sync_max_duration', CULTUREFEED_ENTRY_UI_SYNC_MAX_DURATION_DEFAULT);
-
- $context['results']['event_cdbid'] = $event_cdbid;
- $context['results']['event_title'] = $form_state['values']['title'];
- $context['results']['operation'] = $operation;
-
- }
-
- // Set the batch status first.
- $context['sandbox']['duration'] = time() - $context['sandbox']['start'];
- $context['finished'] = $context['sandbox']['duration'] / $context['sandbox']['max_duration'];
-
- // Load the search api item and check if the batch can be finished.
- $search_api_extended_entity = culturefeed_search_item_load($event_cdbid, '', FALSE);
-
- if ($search_api_extended_entity) {
-
- /* @var CultureFeed_Cdb_Item_Event $search_api_event */
- $search_api_event = $search_api_extended_entity->getEntity();
- $search_api_updated_time = new DateTime($search_api_event->getLastUpdated(), new DateTimeZone('Europe/Brussels'));
-
- if (
- // When an event is new and can be loaded from the search api.
- $operation == 'add' ||
- // When updating an event and the updated time on the search api
- // corresponds.
- $operation == 'update' && $search_api_updated_time->getTimestamp() >= $context['sandbox']['form_submitted_time']
- ) {
- $context['finished'] = 1;
- $context['results']['status'] = 'sync';
-
- }
-
- }
-
- // Check if the maximum duration is reached.
- if ($context['sandbox']['duration'] >= $context['sandbox']['max_duration']) {
- $context['finished'] = 1;
- $context['results']['status'] = 'timeout';
- }
-
-}
-
-/**
- * Finish function for the batch API.
- */
-function culturefeed_entry_ui_event_form_submission_timeout_batch_finished($success, $results, $operations) {
-
- $result_messages = array(
- 'sync' => array(
- 'add' => t('The event %title has been created.', array('%title' => check_plain($results['event_title']))),
- 'update' => t('The event %title has been updated.', array('%title' => check_plain($results['event_title']))),
- ),
- 'timeout' => array(
- 'add' => t('The event %title has been created, but might not have been synced yet. This should happen shortly.', array('%title' => check_plain($results['event_title']))),
- 'update' => t('The event %title has been updated, but might not have been synced yet. This should happen shortly.', array('%title' => check_plain($results['event_title']))),
- ),
- );
-
- drupal_set_message($result_messages[$results['status']][$results['operation']], $results['status'] == 'sync' ? 'status' : 'warning');
-
- if ($results['status'] == 'timeout') {
- $message = t('Event !cdbid synchronisation failed.', array('!cdbid' => $results['event_cdbid']));
- watchdog('culturefeed_entry_ui', $message, array(), WATCHDOG_WARNING);
- }
- else {
- $message = t('Event !cdbid was synchronised successfully.', array('!cdbid' => $results['event_cdbid']));
- watchdog('culturefeed_entry_ui', $message);
- }
-
-}
-
-/**
- * Timeout redirect callback.
- * The timeout batch uses this redirect in case a new event has not been synced
- * yet. In that case we redirect to the form.
- *
- * @param string $event_id
- * The event id.
- */
-function culturefeed_entry_ui_event_timeout_redirect($event_id) {
-
- $extended_entity = culturefeed_search_item_load($event_id, 'event', FALSE);
-
- if ($extended_entity) {
- $url = culturefeed_search_detail_url('event', $extended_entity->getId(), $extended_entity->getTitle('nl'));
- drupal_goto($url);
- }
- else {
- $url = 'agenda/e/add';
- drupal_alter('culturefeed_entry_ui_event_timeout_new_no_sync_redirect', $url);
- drupal_goto($url);
- }
-
-}
diff --git a/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.collaboration.inc b/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.collaboration.inc
deleted file mode 100644
index 675e3204..00000000
--- a/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.collaboration.inc
+++ /dev/null
@@ -1,280 +0,0 @@
- 'vertical_tabs',
- '#title' => $keyword,
- '#type' => 'fieldset',
- );
-
- // Title.
- $form['collaboration'][$keyword]['title'] = array(
- '#default_value' => isset($info['title']) ? $info['title'] : '',
- '#required' => TRUE,
- '#title' => t('Title'),
- '#type' => 'textfield',
- );
-
- // Image.
- $default_image = '';
- if (isset($info['description']['image']) && $info['description']['image']) {
-
- $default_image = culturefeed_entry_ui_collaboration_get_image_from_url($info['description']['image']);
-
- // @codingStandardsIgnoreStart
- // $default_image = system_retrieve_file($info['description']['image'], 'public://uploads/', TRUE);
- // @codingStandardsIgnoreEnd
-
- }
-
- $form['collaboration'][$keyword]['image'] = array(
- '#tree' => TRUE,
- '#type' => 'fieldset',
- '#title' => t('Image'),
- );
-
- $form['collaboration'][$keyword]['image']['upload'] = array(
- '#type' => 'managed_file',
- '#name' => 'image_upload',
- '#title' => t('Image upload'),
- '#default_image' => isset($default_image->fid) ? $default_image : FALSE,
- '#default_value' => isset($default_image->fid) ? $default_image->fid : FALSE,
- '#description' => t('Allowed extensions: gif png jpg jpeg'),
- '#upload_location' => 'public://uploads/',
- '#upload_validators' => array(
- 'file_validate_extensions' => array('gif png jpg jpeg'),
- // Pass the maximum file size in bytes.
- 'file_validate_size' => array(1024 * 1024 * 1024),
- ),
- '#after_build' => array('culturefeed_entry_ui_photo_after_build'),
- );
-
- if (isset($default_image->fid)) {
- $form['collaboration'][$keyword]['image']['original_file'] = array(
- '#type' => 'hidden',
- '#value' => $default_image->fid,
- );
- }
-
- $form['collaboration'][$keyword]['image']['copyright_text'] = array(
- '#type' => 'textfield',
- '#title' => t('Copyright'),
- '#description' => t('Name of the copyright owner of this image.'),
- '#default_value' => isset($info['copyright']) ? $info['copyright'] : '',
- '#size' => 30,
- );
-
- $form['collaboration'][$keyword]['image']['copyright'] = array(
- '#type' => 'checkbox',
- '#default_value' => isset($default_image->fid) ? 1 : 0,
- '#title' => t('I agree to the terms & conditions and I declare that I have the necessary rights or permissions to distribute the image.'),
- );
-
- // Article.
- $form['collaboration'][$keyword]['article'] = array(
- '#default_value' => isset($info['description']['article']) ? $info['description']['article'] : '',
- '#title' => t('Article'),
- '#type' => 'textfield',
- );
-
- // Text.
- $form['collaboration'][$keyword]['text'] = array(
- '#default_value' => isset($info['description']['text']) ? $info['description']['text'] : '',
- '#required' => TRUE,
- '#title' => t('Short description'),
- '#type' => 'textarea',
- );
-
-}
-
-/**
- * Form builder for the collaboration tab.
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- * @param \CultuurNet\Search\ActivityStatsExtendedEntity $event
- * The event.
- *
- * @return array
- * The form.
- */
-function culturefeed_entry_ui_edit_collaboration_data_form(array $form, array &$form_state, \CultuurNet\Search\ActivityStatsExtendedEntity $event) {
-
- /* @var \CultuurNet\Search\ActivityStatsExtendedEntity $event */
- $event = $event->getEntity();
- /* @var \CultureFeed_Cdb_Item_Event $event */
- $form['#event'] = $event;
- $form['#attributes'] = array(
- 'class' => array('edit-collaboration-data'),
- );
-
- $custom_tags = variable_get('culturefeed_entry_ui_custom_collaboration_tags', array());
- if (!count($custom_tags)) {
- $tag = variable_get('site_name') . ' selectie';
- $custom_tags[$tag] = array('value' => $tag, 'visible' => FALSE);
- variable_set('culturefeed_entry_ui_custom_collaboration_tags', $custom_tags);
- }
-
- // Start vertical tabs.
- $form['vertical_tabs'] = array(
- '#type' => 'vertical_tabs',
- );
-
- $form['collaboration'] = array(
- '#tree' => TRUE,
- '#type' => 'container',
- );
-
- form_load_include($form_state, 'inc', 'culturefeed_entry_ui', 'includes/helpers/culturefeed_entry_ui.collaboration');
- form_load_include($form_state, 'inc', 'culturefeed_entry_ui', 'includes/culturefeed_entry_ui.pages');
-
- foreach ($custom_tags as $tag) {
-
- $info = culturefeed_entry_ui_collaboration_get_data_by_keyword($event, $tag['value']);
- culturefeed_entry_ui_attach_collaboration_element($form, $form_state, $info);
- }
-
- $form['#attached'] = array(
- 'css' => array(
- drupal_get_path('module', 'culturefeed_entry_ui') . '/css/culturefeed_entry_ui.css',
- drupal_get_path('module', 'culturefeed_entry_ui') . '/css/culturefeed_entry_ui.collaboration.css',
- ),
- );
-
- $form['actions'] = array(
- '#type' => 'actions',
- 'submit' => array(
- '#type' => 'submit',
- '#value' => t('Save'),
- ),
- );
-
- return $form;
-
-}
-
-/**
- * Submit handler for culturefeed_entry_ui_edit_collaboration_data_form().
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_entry_ui_edit_collaboration_data_form_submit(array &$form, array &$form_state) {
-
- $consumer_key = variable_get('culturefeed_api_application_key', '');
- /* @var \CultureFeed_Cdb_Item_Event $event */
- $event = $form['#event'];
-
- if ($consumer_key && $event && isset($form_state['values']['collaboration'])) {
-
- foreach ($form_state['values']['collaboration'] as $keyword => $collaboration) {
-
- $title = $collaboration['title'];
- $copyright = isset($collaboration['image']['copyright_text']) ? $collaboration['image']['copyright_text'] : '';
- $plain_text = $collaboration['text'];
- $image_file = '';
- $image = '';
-
- if ($collaboration['image']['upload']) {
-
- $image_file = file_load($collaboration['image']['upload']);
- $image_file->status = FILE_STATUS_PERMANENT;
- file_save($image_file);
- file_usage_add($image_file, 'culturefeed_entry_ui', 'event', $image_file->fid);
- $image = file_create_url($image_file->uri);
-
- }
-
- $description = drupal_json_encode(array(
- 'keyword' => $keyword,
- 'text' => $plain_text,
- 'image' => $image,
- 'article' => $collaboration['article'],
- ));
-
- /** @var CultureFeed_EntryApi $entryApi */
- $entryApi = Drupalculturefeed_EntryApi::getLoggedInUserInstance();
-
- $entryApi->addCollaborationLinkToEvent(
- $event,
- culturefeed_entry_ui_get_preferred_language(),
- $plain_text,
- $title,
- $copyright,
- $consumer_key,
- $description
- );
-
- // @codingStandardsIgnoreStart
- // Remove the file(s).
- /*if ($image_file) {
- file_delete($image_file);
- }
- if (isset($collaboration['image']['original_file'])) {
- $file = file_load($collaboration['image']['original_file']);
- file_delete($file);
- }*/
- // @codingStandardsIgnoreEnd
-
- // Also save the keyword directly as keyword.
- $keywords = array(
- $keyword => new CultureFeed_Cdb_Data_Keyword($keyword, FALSE),
- );
- $entryApi->addTagToEvent($event, $keywords);
-
- }
-
- }
-
-}
-
-/**
- * Validation handler for culturefeed_entry_ui_edit_collaboration_data_form().
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_entry_ui_edit_collaboration_data_form_validate(array $form, array &$form_state) {
-
- if (isset($form_state['values']['collaboration'])) {
-
- $collaboration = $form_state['values']['collaboration'];
- foreach ($collaboration as $tag => $info) {
-
- $field = "collaboration][" . $tag . "][image][";
- if (!empty($info['image']['upload']) && $info['image']['copyright'] != 1) {
- form_set_error($field . "copyright", t('Please agree to the general conditions of UiTdatabank and declare that you have the necessary rights or permissions to distribute the image through UiTdatabank.'));
- }
- if (!empty($info['image']['upload']) && empty($info['image']['copyright_text'])) {
- form_set_error($field . "copyright_text", t('Copyright field is required.'));
- }
-
- }
-
- }
-
-}
diff --git a/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.location.inc b/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.location.inc
deleted file mode 100644
index 98e96630..00000000
--- a/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.location.inc
+++ /dev/null
@@ -1,262 +0,0 @@
-getLocation()) {
-
- if ($location->getCdbId()) {
- $default_location_id = $location->getCdbId();
- $default_location_label = $location->getLabel();
- }
- else {
-
- $address = $location->getAddress()->getPhysicalAddress();
- $custom_location_title = $location->getLabel();
- $custom_location_street = $address->getStreet();
- $custom_location_number = $address->getHouseNumber();
- $custom_location_zip = $address->getZip();
- $custom_location_country = $address->getCountry();
- if ($custom_location_country == 'BE') {
- $custom_location_city = $custom_location_zip . ' ' . $address->getCity();
- }
- else {
- $custom_location_city = $address->getCity();
- }
-
- }
-
- }
-
- }
-
- // Form element.
- $form['basic']['location'] = array(
- '#type' => 'culturefeed_location_control',
- '#default_value' => array(
- 'asset' => array(
- 'id' => $default_location_id,
- 'label' => $default_location_label,
- ),
- 'custom' => array(
- 'city' => $custom_location_city,
- 'country' => $custom_location_country,
- 'number' => $custom_location_number,
- 'street' => $custom_location_street,
- 'title' => $custom_location_title,
- 'zip' => $custom_location_zip,
- ),
- ),
- );
-
-}
-
-/**
- * Validation handler for the location.
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- *
- * @return mixed
- * The location, NULL or \CultuurNet\Search\ActivityStatsExtendedEntity
- */
-function culturefeed_entry_ui_location_form_validate(array $form, array &$form_state) {
-
- $values = array(
- 'type' => '',
- 'asset' => array(),
- 'custom' => array(),
- );
-
- if (isset($form_state['values']['location']['location_control'])) {
- $values = $form_state['values']['location']['location_control'];
- }
-
- $location = NULL;
-
- // Custom.
- if ($values['type'] == 'custom') {
-
-
- if (empty($values['custom']['title'])) {
- form_set_error('location][location_control][custom][title', t('A title is required for a custom location'));
- }
-
- if ($values['custom']['country'] != 'BE') {
- if (empty($values['custom']['zip'])) {
- form_set_error('location][location_control][custom][zip', t('A zip code is required for a custom location'));
- }
-
- if (strlen($values['custom']['zip']) < 4 || strlen($values['custom']['zip']) > 15) {
- form_set_error('location][location_control][custom][zip', t('A zip code has minimum 4 characters'));
- }
-
- if (empty($values['custom']['city'])) {
- form_set_error('location][location_control][custom][city', t('A city is required for a custom location'));
- }
-
- }
-
- if ($values['custom']['country'] == 'BE') {
-
- // If an existing event is edited, the main city is not shown.
- $available_cities = culturefeed_search_get_city_suggestions($values['custom']['city']);
- $cities = array();
- $pattern = '/ \(.*?\)/';
- foreach ($available_cities as $available_city) {
- $cities[] = strtolower(preg_replace($pattern, '', $available_city));
- }
- $city = strtolower(preg_replace($pattern, '', $values['custom']['city']));
- if (!in_array($city, $cities)) {
- form_set_error('location][location_control][custom][city', t('Please select a city from the list.'));
- }
-
- }
-
- }
-
- elseif ($values['type'] == 'asset') {
-
- try {
-
- if ($values['asset']['label'] == '') {
- form_set_error('location', t('A location is required.'));
- }
- else {
- $location = culturefeed_search_item_load($values['asset']['id'], 'actor');
- if (!$location) {
- form_set_error('location', t('We could not validate the location'));
- }
- }
-
- }
-
- catch (Exception $e) {
- form_set_error('location', t('We could not validate the location'));
- }
-
- }
-
- return $location;
-
-}
-
-/**
- * Save handler for the location.
- *
- * @param \CultureFeed_Cdb_Item_Event $event
- * The event.
- * @param mixed $location
- * NULL or \CultuurNet\Search\ActivityStatsExtendedEntity.
- * @param array $form_state
- * The form state.
- *
- * @return \CultureFeed_Cdb_Data_Address
- * The address.
- */
-function culturefeed_entry_ui_location_form_save(\CultureFeed_Cdb_Item_Event &$event, $location, array $form_state) {
-
- $values = array(
- 'type' => '',
- 'asset' => array(),
- 'custom' => array(),
- );
-
- if (isset($form_state['values']['location']['location_control'])) {
- $values = $form_state['values']['location']['location_control'];
- }
-
- $address = NULL;
-
- // Asset Location / Address.
- if ($location) {
-
- $addresses = $location->getEntity()->getContactInfo()->getAddresses();
-
- /* @var CultureFeed_Cdb_Data_Address $address */
- $address = $addresses[0];
- $location_detail = $location->getEntity()->getDetails()
- ->getDetailByLanguage(culturefeed_search_get_preferred_language());
- if (!$location_detail) {
- $location_detail = $location->getEntity()->getDetails()
- ->getDetailByLanguage("nl");
- }
-
- $cdb_location = new CultureFeed_Cdb_Data_Location($address);
- $cdb_location->setLabel($location_detail->getTitle());
- $cdb_location->setCdbid($location->getEntity()->getCdbId());
- $event->setLocation($cdb_location);
- }
-
- else {
-
- $address = new CultureFeed_Cdb_Data_Address();
- $physical_address = new CultureFeed_Cdb_Data_Address_PhysicalAddress();
-
- // Street and number.
- $physical_address->setStreet($values['custom']['street']);
- if ($values['custom']['country'] == 'BE') {
- $physical_address->setHouseNumber($values['custom']['number']);
- }
- else {
- $physical_address->setHouseNumber('');
- }
-
- // Zip and city.
- if ($values['custom']['country'] == 'BE') {
- $physical_address->setZip(substr($values['custom']['city'], 0, 4));
- $physical_address->setCity(substr($values['custom']['city'], 5));
- }
- else {
- $physical_address->setCity($values['custom']['city']);
- if (empty($values['custom']['zip'])) {
- $physical_address->setZip('0000');
- }
- else {
- $physical_address->setZip($values['custom']['zip']);
- }
- }
-
- // Country.
- $physical_address->setCountry($values['custom']['country']);
-
- $address->setLabel($values['custom']['title']);
- $address->setPhysicalAddress($physical_address);
-
- $cdb_location = new CultureFeed_Cdb_Data_Location($address);
- $cdb_location->setLabel($values['custom']['title']);
- $event->setLocation($cdb_location);
-
- }
-
- return $address;
-
-}
diff --git a/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.tag_objects.inc b/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.tag_objects.inc
deleted file mode 100644
index 9c93649e..00000000
--- a/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.tag_objects.inc
+++ /dev/null
@@ -1,153 +0,0 @@
-getEntity();
- /* @var \CultureFeed_Cdb_Item_Event $event */
- /* @var \CultureFeed_Cdb_Data_Keyword[] $event_tags */
- $event_tags = $event->getKeywords(TRUE);
- $custom_tags = variable_get('culturefeed_entry_ui_custom_tags', array());
- $form['#old_tags'] = $event_tags;
- $form['#object_id'] = $event->getCdbId();
-
- // Tags.
- $tags = array();
- foreach ($event_tags as $tag) {
-
- $value = $tag->getValue();
-
- if (!in_array($value, array_keys($custom_tags))) {
-
- $tags[] = array(
- 'value' => $tag->getValue(),
- 'visible' => $tag->isVisible(),
- );
-
- }
-
- }
-
- $form['tags'] = array(
- '#default_value' => $tags,
- '#title' => t('Tags'),
- '#type' => 'culturefeed_tags_element',
- );
-
- if (user_access('manage custom tags') && !empty($custom_tags)) {
-
- $form['custom_tags'] = array(
- '#default_value' => array_intersect(array_keys($event_tags), array_keys($custom_tags)),
- '#options' => array_combine(array_keys($custom_tags), array_keys($custom_tags)),
- '#title' => t('Custom tags'),
- '#type' => 'checkboxes',
- );
-
- }
-
- $form['actions'] = array(
- '#type' => 'actions',
- 'submit' => array(
- '#type' => 'submit',
- '#validate' => array('culturefeed_entry_ui_edit_tag_objects_form_submit_validate'),
- '#value' => t('Save'),
- ),
- );
-
- return $form;
-
-}
-
-/**
- * Submit handler for culturefeed_entry_ui_edit_tag_objects_form().
- */
-function culturefeed_entry_ui_edit_tag_objects_form_submit($form, &$form_state) {
-
- // Merge custom tags into all tags.
- $keywords = array();
- foreach ($form_state['values']['tags'] as $tag) {
- $keywords[$tag['value']] = new CultureFeed_Cdb_Data_Keyword($tag['value'], isset($tag['visible']) ? $tag['visible'] : TRUE);
- }
-
- if (isset($form_state['values']['custom_tags'])) {
-
- $custom_tags = variable_get('culturefeed_entry_ui_custom_tags', array());
- foreach ($form_state['values']['custom_tags'] as $tag) {
- if (isset($custom_tags[$tag])) {
- $keywords[$custom_tags[$tag]['value']] = new CultureFeed_Cdb_Data_Keyword($custom_tags[$tag]['value'], isset($custom_tags[$tag]['visible']) ? $custom_tags[$tag]['visible'] : TRUE);
- }
- }
-
- }
-
- // Check what tags are removed.
- $removed_tags = array();
- if (!empty($form['#old_tags'])) {
- foreach (array_keys($form['#old_tags']) as $tag) {
- if (!in_array($tag, array_keys($keywords))) {
- $removed_tags[] = $tag;
- }
- }
- }
-
- $event = new CultureFeed_Cdb_Item_Event();
- $event->setCdbId($form['#object_id']);
-
- try {
-
- // Add new tags.
- if ($keywords) {
- Drupalculturefeed_EntryApi::addTagToEvent($event, $keywords);
- }
-
- // Remove old tags.
- if ($removed_tags) {
- foreach ($removed_tags as $removed_tag) {
- Drupalculturefeed_EntryApi::removeTagFromEvent($event, $removed_tag);
- }
- }
-
- drupal_set_message(t('The tags were adjusted.'));
- cache_clear_all('culturefeed:results:detail:event:' . $event->getCdbId(), 'cache_culturefeed_search');
- drupal_goto(culturefeed_search_detail_path('event', $event->getCdbId(), ''));
-
- }
-
- catch (Exception $e) {
-
- if ($e->getCode() == CultureFeed_EntryApi::CODE_KEYWORD_PRIVATE) {
- drupal_set_message(t('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".'));
- }
- else {
- drupal_set_message(t('Error occured while saving the tags'));
- }
-
- watchdog_exception(WATCHDOG_ERROR, $e);
-
- }
-
-}
-
-/**
- * Validation handler for culturefeed_entry_ui_edit_tag_objects_form().
- */
-function culturefeed_entry_ui_edit_tag_objects_form_submit_validate($form, &$form_state) {
-
- $tags = $form_state['values']['tags'];
- $custom_tags = variable_get('culturefeed_entry_ui_custom_tags', array());
-
- foreach (array_keys($tags) as $key => $tag) {
- if (in_array($tag, array_keys($custom_tags))) {
- form_set_error('tags][keywords][' . $key, t("Tag @tag is not permitted because it's already a custom tag.", array('@tag' => $tag)));
- }
- }
-
-}
diff --git a/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.tags.inc b/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.tags.inc
deleted file mode 100644
index 74ff896d..00000000
--- a/culturefeed_entry_ui/includes/form/culturefeed_entry_ui.tags.inc
+++ /dev/null
@@ -1,119 +0,0 @@
-getKeywords(TRUE)) {
-
- /* @var \CultureFeed_Cdb_Data_Keyword $keyword */
- foreach ($event->getKeywords(TRUE) as $keyword) {
- $keywords[$keyword->getValue()] = array(
- 'value' => $keyword->getValue(),
- 'visible' => $keyword->isVisible(),
- );
- }
-
- }
-
- // Form element.
- $form['extra']['tags'] = array(
- '#type' => 'culturefeed_tags_element',
- '#title' => t('Tags'),
- '#description' => t('Add Add tags'),
- '#default_value' => $keywords,
- );
-
- $form['extra']['old_tags'] = array(
- '#type' => 'value',
- '#value' => $keywords,
- );
-
- }
-
- else {
-
- // Default values.
- if ($event && $event->getKeywords()) {
- $keywords = $event->getKeywords();
- $keywords = implode(';', $keywords);
- }
- else {
- $keywords = '';
- }
-
- // Form element.
- $form['extra']['tags'] = array(
- '#type' => 'textfield',
- '#title' => t('Tags'),
- '#description' => t('Add multiple tags separated by a ";"'),
- '#default_value' => $keywords,
- );
-
- }
-
-}
-
-/**
- * Save handler for the tags.
- *
- * @param \CultureFeed_Cdb_Item_Event $event
- * The event.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_entry_ui_tags_form_save(\CultureFeed_Cdb_Item_Event &$event, array $form_state) {
-
- $version = variable_get('culturefeed_cdb_version', CULTUREFEED_CDB_DEFAULT_VERSION);
- if (version_compare($version, '3.3', '>=')) {
-
- $tags = $form_state['values']['tags'];
- $old_tags = $form_state['values']['old_tags'];
- $custom_entry_api_tags = variable_get('culturefeed_entry_ui_custom_entry_api_tags', array());
- $keywords = array_unique(array_merge($tags, $custom_entry_api_tags), SORT_REGULAR);
-
- foreach ($keywords as $keyword) {
- $event->addKeyword(new CultureFeed_Cdb_Data_Keyword($keyword['value'], $keyword['visible']));
- }
-
- foreach ($old_tags as $tag => $keyword) {
- if (!in_array($tag, array_keys($keywords))) {
- $event->deleteKeyword(new CultureFeed_Cdb_Data_Keyword($keyword['value'], $keyword['visible']));
- }
- }
-
- }
-
- else {
-
- $keywords_form = array();
- $custom_entry_api_tags = array();
- if (!empty($form_state['values']['keywords'])) {
- $keywords_form = explode(';', $form_state['values']['tags']);
- }
- if (variable_get('culturefeed_entry_ui_custom_entry_api_tags')) {
- $custom_entry_api_tags = explode("\n", variable_get('culturefeed_entry_ui_custom_entry_api_tags'));
- }
- $keywords = array_map('trim',array_unique(array_merge($keywords_form,$custom_entry_api_tags)));
- foreach ($keywords as $keyword) {
- $event->addKeyword($keyword);
- }
-
- }
-
-}
diff --git a/culturefeed_entry_ui/includes/helpers/culturefeed_entry_ui.collaboration.inc b/culturefeed_entry_ui/includes/helpers/culturefeed_entry_ui.collaboration.inc
deleted file mode 100644
index 6224358c..00000000
--- a/culturefeed_entry_ui/includes/helpers/culturefeed_entry_ui.collaboration.inc
+++ /dev/null
@@ -1,81 +0,0 @@
- $keyword,
- );
-
- $consumer_key = variable_get('culturefeed_api_application_key', '');
-
- /* @var \CultureFeed_Cdb_Data_EventDetail $event_details */
- $event_details = $event->getDetails()->getDetailByLanguage(
- culturefeed_entry_ui_get_preferred_language()
- );
-
- if ($event_details) {
- $media_links = $event_details->getMedia()->byMediaTypes(array(CultureFeed_Cdb_Data_File::MEDIA_TYPE_COLLABORATION));
- foreach ($media_links as $link) {
-
- if ($link->getSubBrand() && $link->getSubBrand() == $consumer_key) {
-
- $description = drupal_json_decode($link->getDescription());
-
- if (isset($description['keyword']) && $description['keyword'] == $keyword) {
-
- $info['copyright'] = $link->getCopyright();
- $info['description'] = $description;
- $info['title'] = $link->getTitle();
-
- }
-
- }
-
- }
-
- }
-
- return $info;
-
-}
-
-/**
- * Returns the uri for a full image url
- *
- * @param string $image
- * The image url.
- *
- * @return object
- * The file object.
- */
-function culturefeed_entry_ui_collaboration_get_image_from_url($image) {
-
- // See if the image is stored on the local url.
- $base_path = $GLOBALS['base_url'] . '/' . variable_get('file_public_path', conf_path() . '/files') . '/';
- $parts = explode($base_path, $image);
- if (count($parts) == 2 && $parts[1]) {
-
- $files = entity_load('file', FALSE, array('uri' => 'public://' . $parts[1]));
- if (!empty($files)) {
- return reset($files);
- }
-
- }
-
-}
diff --git a/culturefeed_entry_ui/js/culturefeed_entry_ui.js b/culturefeed_entry_ui/js/culturefeed_entry_ui.js
deleted file mode 100644
index b6344cd6..00000000
--- a/culturefeed_entry_ui/js/culturefeed_entry_ui.js
+++ /dev/null
@@ -1,336 +0,0 @@
-/**
- * @file
- * Js functionality for the review add form.
- */
-
-Drupal.Culturefeed_entry_ui = Drupal.Culturefeed_entry_ui || {};
-
-(function ($) {
-
- Drupal.behaviors.price = {
-
- attach: function (context, settings) {
-
- $(window).bind('load', function() {
- if($("#edit-price-free").is(":checked")) {
- $('#edit-price-amount').val('0');
- $('#edit-price-amount').attr('disabled','disabled');
- $('#edit-price-amount').css('color','#ccc');
- $('#edit-price-extra').css('display','none');
- $('#edit-price-extra-extra-info').val('');
- }
- else {
- //$('#edit-price-amount').val('');
- $('#edit-price-amount').removeAttr('disabled');
- $('#edit-price-amount').css('color','#000');
- $('#edit-price-extra').css('display','block');
- }
- });
-
- $('#edit-price-free').change(function () {
- if($("#edit-price-free").is(":checked")) {
- $('#edit-price-amount').val('0');
- $('#edit-price-amount').attr('disabled','disabled');
- $('#edit-price-amount').css('color','#ccc');
- $('#edit-price-extra').css('display','none');
- $('#edit-price-extra-extra-info').val('');
- }
- else {
- $('#edit-price-amount').val('');
- $('#edit-price-amount').removeAttr('disabled');
- $('#edit-price-amount').css('color','#000');
- $('#edit-price-extra').css('display','block');
- }
- });
-
- $('#edit-location-actor-location-actor-label').change(function() {
- if($("[name='location[location_control][asset][label]']").val() == '') {
- $('#location_actor_id').val('');
- }
- });
-
- $('#edit-organiser-actor-organiser-actor-label').change(function() {
- if($('#edit-organiser-actor-organiser-actor-label').val() == '') {
- $('#organiser_actor_id').val('');
- }
- });
-
- }
-
- };
-
- /**
- * Maxlength
- */
- Drupal.behaviors.maxlength = {
-
- attach: function (context, settings) {
- $('#edit-description-sd-short-description').maxlength({
- max: 400,
- feedbackTarget: '#edit-description-sd .help-block, #edit-description-sd .description'
- });
- }
-
- }
-
- /**
- * Fire the autocomplete on paste.
- */
- Drupal.behaviors.autocomplete_paste = {
-
- attach: function () {
- $('input.form-autocomplete, .form-autocomplete input.form-text').bind("input propertychange", function (event) {
- $(this).trigger('keyup');
- });
- }
-
- }
-
- /**
- * Ensure submit button only gets clicked once.
- */
- Drupal.behaviors.submit_once = {
-
- attach: function () {
-
- var form = $('#culturefeed-entry-ui-event-form');
-
- form.submit(function(event) {
- $(this).data('submitted', true);
- });
-
- $('.main-submit, .btn-primary').click(function () {
- if (form.data('submitted') === true) {
- $(this).attr('disabled', 'disabled');
- return false;
- }
- });
-
- }
-
- }
-
- /**
- * Hides the autocomplete suggestions.
- */
- Drupal.jsAC.prototype.hidePopup = function (keycode, op) {
-
- // Select item if the right key or mousebutton was pressed.
- if (this.selected && ((keycode && keycode != 46 && keycode != 8 && keycode != 27) || !keycode)) {
-
- if ($(this.selected).data('autocompleteTitle') != undefined) {
-
- this.input.value = $(this.selected).data('autocompleteTitle');
-
- if (this.input.name == 'location[location_control][asset][label]') {
- $('#location_actor_id').val($(this.selected).data('autocompleteValue'));
- $('#location_asset_remove').show();
- $(this.input).attr('readonly', 'readonly');
- }
-
- if (this.input.name == 'organiser[actor][organiser_actor_label]') {
- $('#organiser_actor_id').val($(this.selected).data('autocompleteValue'));
- }
-
- }
-
- else {
- this.input.value = $(this.selected).data('autocompleteValue');
- }
-
- }
-
- // Hide popup.
- var popup = this.popup;
- if (popup) {
-
- this.popup = null;
- $(popup).fadeOut('fast', function () {
- $(popup).remove();
- });
-
- }
- this.selected = false;
- $(this.ariaLive).empty();
-
- // Workaround for bootstrap losing tabindex on autocomplete popup.
- if ((!op || op != 'empty') && this.input.value) {
-
- var inputs = $(this.input).closest('form').find(':input:visible');
- var index = inputs.index($(this.input));
- //inputs.eq(index + 1).focus();
-
- }
-
- };
-
- /**
- * Fills the suggestion popup with any matches received.
- */
- Drupal.jsAC.prototype.found = function (matches) {
-
- // If no value in the textfield, do not show the popup.
- if (!this.input.value.length) {
- return false;
- }
-
- // Prepare matches.
- var ul = $('');
- var ac = this;
- for (key in matches) {
-
- var row = matches[key];
-
- if (typeof(row) == "string") {
-
- $(' ')
- .html($('
').html(matches[key]))
- .mousedown(function () {
- ac.select(this);
- })
- .mouseover(function () {
- ac.highlight(this);
- })
- .mouseout(function () {
- ac.unhighlight(this);
- })
- .data('autocompleteValue', key)
- .appendTo(ul);
-
- }
-
- else if (typeof(row) == "object") {
-
- $(' ')
- .html($('
').html(row.locationTitle))
- .mousedown(function () {
- ac.select(this);
- })
- .mouseover(function () {
- ac.highlight(this);
- })
- .mouseout(function () {
- ac.unhighlight(this);
- })
- .data('autocompleteTitle', row.title)
- .data('autocompleteValue', row.key)
- .appendTo(ul);
-
- }
-
- }
-
- // Show popup with matches, if any.
- if (this.popup) {
-
- if (ul.children().length) {
-
- $(this.popup).empty().append(ul).show();
- $(this.ariaLive).html(Drupal.t('Autocomplete popup'));
-
- if (this.input.name == 'organiser[actor][organiser_actor_label]') {
- $('#edit-organiser-add-new-actor').css({ display: 'none' });
- }
- if (this.input.name == 'location[location_control][asset][label]') {
- $('#location_custom_add').hide();
- }
-
- }
-
- else {
-
- $(this.popup).css({ visibility: 'hidden' });
- this.hidePopup();
-
- if (this.input.name == 'organiser[actor][organiser_actor_label]') {
- $('#edit-organiser-add-new-actor').css({ display: 'block' });
- $('#organiser_actor_id').val('');
- }
- if (this.input.name == 'location[location_control][asset][label]') {
- $('#location_custom_add').show();
- $('#location_actor_id').val('');
- }
-
- }
-
- }
-
- };
-
- /**
- * Puts the currently highlighted suggestion into the autocomplete field.
- */
- Drupal.jsAC.prototype.select = function (node) {
-
- if ($(node).data('autocompleteTitle') != undefined) {
-
- this.input.value = $(node).data('autocompleteTitle');
-
- if (this.input.name == 'location[location_control][asset][label]') {
- $('#location_actor_id').val($(node).data('autocompleteValue'));
- $('#location_asset_remove').show();
- $(this.input).attr('readonly', 'readonly');
- }
-
- if (this.input.name == 'organiser[actor][organiser_actor_label]') {
- $('#organiser_actor_id').val($(node).data('autocompleteValue'));
- }
-
- }
-
- else {
- this.input.value = $(node).data('autocompleteValue');
- }
-
- };
-
- /**
- * Performs a cached and delayed search.
- */
- Drupal.ACDB.prototype.search = function (searchString) {
- var db = this;
- searchString = searchString.replace(/^\s+|\s+$/, '');
- this.searchString = searchString;
-
- // See if this string needs to be searched for anyway.
- if (searchString.length <= 0 ||
- searchString.charAt(searchString.length - 1) == ',') {
- return;
- }
-
- // See if this key has been searched for before.
- if (this.cache[searchString]) {
- return this.owner.found(this.cache[searchString]);
- }
-
- // Initiate delayed search.
- if (this.timer) {
- clearTimeout(this.timer);
- }
- this.timer = setTimeout(function () {
- db.owner.setStatus('begin');
-
- // Ajax GET request for autocompletion. We use Drupal.encodePath instead of
- // encodeURIComponent to allow autocomplete search terms to contain slashes.
- $.ajax({
- type: 'GET',
- url: db.uri + '/' + Drupal.encodePath(searchString),
- dataType: 'json',
- success: function (matches) {
- if (typeof matches.status == 'undefined' || matches.status != 0) {
- db.cache[searchString] = matches;
- // Verify if these are still the matches the user wants to see.
- //if (db.searchString == searchString) {
- db.owner.found(matches);
- //}
- db.owner.setStatus('found');
- }
- },
- error: function (xmlhttp) {
- alert(Drupal.ajaxError(xmlhttp, db.uri));
- }
- });
- }, this.delay);
- };
-
-})(jQuery);
diff --git a/culturefeed_entry_ui/js/maxlength/jquery.maxlength-de.js b/culturefeed_entry_ui/js/maxlength/jquery.maxlength-de.js
deleted file mode 100644
index 1b0f3e3c..00000000
--- a/culturefeed_entry_ui/js/maxlength/jquery.maxlength-de.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* http://keith-wood.name/maxlength.html
- German initialisation for the jQuery Max Length extension */
-(function($) { // hide the namespace
-
-$.maxlength.regionalOptions['de'] = {
- feedbackText: '{r} verbleibende Zeichen ({m} maximum)',
- overflowText: '{o} Zeichen Überschuss ({m} maximum)'
-};
-$.maxlength.setDefaults($.maxlength.regionalOptions['de']);
-
-})(jQuery);
diff --git a/culturefeed_entry_ui/js/maxlength/jquery.maxlength-fr.js b/culturefeed_entry_ui/js/maxlength/jquery.maxlength-fr.js
deleted file mode 100644
index e7cf26a3..00000000
--- a/culturefeed_entry_ui/js/maxlength/jquery.maxlength-fr.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* http://keith-wood.name/maxlength.html
- French initialisation for the jQuery Max Length extension
- Written by Keith Wood (kbwood{at}iinet.com.au) April 2012. */
-(function($) { // hide the namespace
-
-$.maxlength.regionalOptions['fr'] = {
- feedbackText: '{r} de caractères restants ({m} maximum)',
- overflowText: '{o} de caractères trop ({m} maximum)'
-};
-$.maxlength.setDefaults($.maxlength.regionalOptions['fr']);
-
-})(jQuery);
diff --git a/culturefeed_entry_ui/js/maxlength/jquery.maxlength-nl.js b/culturefeed_entry_ui/js/maxlength/jquery.maxlength-nl.js
deleted file mode 100644
index 5a879d76..00000000
--- a/culturefeed_entry_ui/js/maxlength/jquery.maxlength-nl.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/* http://keith-wood.name/maxlength.html
- Dutch initialisation for the jQuery Max Length extension */
-(function($) { // hide the namespace
-
-$.maxlength.regionalOptions['nl'] = {
- feedbackText: '{r} karakters resterend ({m} maximum)',
- overflowText: '{o} karakters teveel ({m} maximum)'
-};
-$.maxlength.setDefaults($.maxlength.regionalOptions['nl']);
-
-})(jQuery);
diff --git a/culturefeed_entry_ui/js/maxlength/jquery.maxlength.css b/culturefeed_entry_ui/js/maxlength/jquery.maxlength.css
deleted file mode 100644
index b4b3ed06..00000000
--- a/culturefeed_entry_ui/js/maxlength/jquery.maxlength.css
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Styles for Max Length plugin v2.0.0 */
-.maxlength-feedback {
- margin-left: 0.5em;
- font-size: 75%;
-}
-.maxlength-full {
- background-color: #fee;
-}
-.maxlength-overflow {
- background-color: #fcc;
-}
-.maxlength-disabled {
- opacity: 0.5;
-}
diff --git a/culturefeed_entry_ui/js/maxlength/jquery.maxlength.js b/culturefeed_entry_ui/js/maxlength/jquery.maxlength.js
deleted file mode 100644
index 71cd0da5..00000000
--- a/culturefeed_entry_ui/js/maxlength/jquery.maxlength.js
+++ /dev/null
@@ -1,230 +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($) { // hide the namespace
-
- var pluginName = 'maxlength';
-
- /** Create the maxlength plugin.
- 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 in inst.options[name]
, new value in options[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[] = '' . t('No permission to edit event') . ' ';
- }
-
- // 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 '';
- }
- }
-
-}
From f0c3835cdd733833b6691a45c08f1bca19773ada Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 5 Nov 2019 14:06:43 +0100
Subject: [PATCH 03/16] Moved culturefeed_messages to
https://github.com/cultuurnet/culturefeed_messages
---
.../culturefeed_messages.info | 7 -
.../culturefeed_messages.module | 308 -----------------
culturefeed_messages/includes/blocks.inc | 36 --
culturefeed_messages/includes/pages.inc | 308 -----------------
...lturefeed-messages-message-booking.tpl.php | 15 -
...ed-messages-message-contactmembers.tpl.php | 15 -
...efeed-messages-message-contactpage.tpl.php | 15 -
...lturefeed-messages-message-default.tpl.php | 15 -
...urefeed-messages-message-list-item.tpl.php | 15 -
.../culturefeed-messages-message-list.tpl.php | 12 -
...ulturefeed-messages-message-report.tpl.php | 15 -
...feed-messages-message-requestadmin.tpl.php | 15 -
...turefeed-messages-new-message-form.tpl.php | 25 --
.../theme/culturefeed-messages-thread.tpl.php | 13 -
culturefeed_messages/theme/theme.inc | 314 ------------------
.../translations/culturefeed_messages.de.po | 179 ----------
.../translations/culturefeed_messages.fr.po | 180 ----------
.../translations/culturefeed_messages.nl.po | 203 -----------
18 files changed, 1690 deletions(-)
delete mode 100644 culturefeed_messages/culturefeed_messages.info
delete mode 100644 culturefeed_messages/culturefeed_messages.module
delete mode 100644 culturefeed_messages/includes/blocks.inc
delete mode 100644 culturefeed_messages/includes/pages.inc
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-message-booking.tpl.php
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-message-contactmembers.tpl.php
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-message-contactpage.tpl.php
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-message-default.tpl.php
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-message-list-item.tpl.php
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-message-list.tpl.php
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-message-report.tpl.php
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-message-requestadmin.tpl.php
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-new-message-form.tpl.php
delete mode 100644 culturefeed_messages/theme/culturefeed-messages-thread.tpl.php
delete mode 100644 culturefeed_messages/theme/theme.inc
delete mode 100755 culturefeed_messages/translations/culturefeed_messages.de.po
delete mode 100755 culturefeed_messages/translations/culturefeed_messages.fr.po
delete mode 100644 culturefeed_messages/translations/culturefeed_messages.nl.po
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') . ' ' : '' ?>
-
- ' : '' ; ?>
-
-
\ No newline at end of file
diff --git a/culturefeed_messages/theme/culturefeed-messages-message-list.tpl.php b/culturefeed_messages/theme/culturefeed-messages-message-list.tpl.php
deleted file mode 100644
index 2045a678..00000000
--- a/culturefeed_messages/theme/culturefeed-messages-message-list.tpl.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- +
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_messages/theme/culturefeed-messages-message-report.tpl.php b/culturefeed_messages/theme/culturefeed-messages-message-report.tpl.php
deleted file mode 100644
index e1c64045..00000000
--- a/culturefeed_messages/theme/culturefeed-messages-message-report.tpl.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- :
-
- :
-
-
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 @@
- |
-:
-:
-:
-
-
-
-
-
-
-
diff --git a/culturefeed_messages/theme/theme.inc b/culturefeed_messages/theme/theme.inc
deleted file mode 100644
index 8750a595..00000000
--- a/culturefeed_messages/theme/theme.inc
+++ /dev/null
@@ -1,314 +0,0 @@
-total == 0) {
- $items[] = array('data' => t('You have no messages'), 'class' => 'message');
- }
- else {
-
- if (arg(0) == 'pages') {
- $active_message = arg(3);
- }
- else {
- $active_message = arg(2);
- }
-
-
- $selected_id = 0;
- foreach ($variables['messages']->objects as $i => $message) {
- if ($message->id == $active_message) {
- $selected_id = $i;
- }
- }
-
- foreach ($variables['messages']->objects as $i => $message) {
-
- $class = 'message';
- $class_name = '';
- if ($i == $selected_id) {
- $class .= ' active';
- $class_name = 'active';
- }
-
- $items[] = array(
- 'data' => theme('culturefeed_messages_message_list_item', array('message' => $message, 'class_name' => $class_name)),
- 'class' => $class,
- );
-
- }
-
- }
-
- $variables['items'] = $items;
-
- if ($variables['add_new_allowed']) {
- if (arg(0) == 'pages') {
- $variables['add_new_url'] = url('pages/' . arg(1) . '/messages/new');
- }
- else {
- $variables['add_new_url'] = url('culturefeed/messages/new');
- }
- }
-
-}
-
-/**
- * Preprocess a message list item.
- * @see culturefeed-messages-message-list-item.tpl.php
- */
-function culturefeed_messages_preprocess_culturefeed_messages_message_list_item(&$variables) {
-
- _culturefeed_messages_preprocess_message($variables);
- _culturefeed_messages_preprocess_message_recipients($variables);
-
- $classes = array('message', 'message-' . $variables['status']);
- if (!empty($variables['class_name'])) {
- $classes[] = $variables['class_name'];
- }
- $variables['class_names'] = implode(" ", $classes);
-
- if (arg(0) == 'pages') {
- $variables['url'] = url('pages/' . arg(1) . '/messages/' . $variables['message']->id);
- }
- else {
- $variables['url'] = url('culturefeed/messages/' . $variables['message']->id);
- }
-
-}
-
-/**
- * Preprocess a message thread.
- * @see culturefeed-messages-thread.tpl.php
- */
-function culturefeed_messages_preprocess_culturefeed_messages_thread(&$variables) {
-
- $thread = $variables['thread'];
-
- $variables['message_count'] = 1;
-
- $recipient_links = array();
- $recipients = $thread->recipients;
- $sender_id = $thread->sender->id;
-
- // Build link to profile of every recipient.
- $variables['recipient_links'] = '';
- $variables['recipient'] = '';
- if (!empty($recipients)) {
-
- $accounts = culturefeed_get_uids_for_cf_uids($recipients);
- foreach ($recipients as $uid => $recipient) {
-
- // Don't show the sender in the list.
- if ($uid == $sender_id || !isset($accounts[$uid])) {
- $sender_link = l($recipient->nick, 'user/' . $accounts[$uid]);
- continue;
- }
-
- $recipient_links[] = l($recipient->nick, 'user/' . $accounts[$uid]);
-
- }
- $variables['recipient_links'] = implode(', ', $recipient_links);
- $variables['recipient'] = $variables['recipient_links'];
- }
-
- if (!empty($thread->recipientPage)) {
- $variables['recipient_page'] = check_plain($thread->recipientPage->getName());
- $variables['recipient_page_link'] = culturefeed_search_detail_l('page', $thread->recipientPage->getId(), $thread->recipientPage->getName());
- $variables['recipient'] = t('!name of !page', array('!name' => $variables['recipient_links'], '!page' => $variables['recipient_page_link']));
- }
-
- $variables['sender_link'] = $sender_link;
- $variables['sender'] = check_plain($thread->sender->nick);
- if (!empty($thread->senderPage)) {
- $variables['sender_page'] = check_plain($thread->senderPage->getName());
- $variables['sender_page_link'] = culturefeed_search_detail_l('page', $thread->senderPage->getId(), $thread->senderPage->getName());
- $variables['sender'] = t('!name of !page', array('!name' => $variables['sender_link'], '!page' => $variables['sender_page_link']));
- }
-
- $variables['messages'] = array();
- $thread_type = empty($thread->type) ? 'default' : $thread->type;
- $variables['messages'][] = theme('culturefeed_messages_message_' . $thread_type, array('message' => $thread));
-
- $thread_children = $thread->children;
- if (!empty($thread_children)) {
- $variables['message_count'] += count($thread_children);
- foreach ($thread_children as $message) {
- $message_type = empty($message->type) ? 'default' : $message->type;
- $variables['messages'][] = theme('culturefeed_messages_message_' . $message_type, array('message' => $message));
- }
- }
-
- $variables['delete_link'] = l(t('Delete conversation'), 'culturefeed/messages/' . $thread->id . '/delete/nojs');
-
- $variables['subject'] = $thread->subject;
-
-}
-
-/**
- * Preprocess a message item with empty type.
- * @see culturefeed-messages-message-default.tpl.php
- */
-function culturefeed_messages_preprocess_culturefeed_messages_message_default(&$variables) {
-
- _culturefeed_messages_preprocess_message($variables);
- _culturefeed_messages_preprocess_message_recipients($variables);
-
-}
-
-/**
- * Preprocess a message item of type contactmembers.
- * @see culturefeed-messages-message-contactmembers.tpl.php
- */
-function culturefeed_messages_preprocess_culturefeed_messages_message_contactmembers(&$variables) {
-
- _culturefeed_messages_preprocess_message($variables);
- _culturefeed_messages_preprocess_message_recipients($variables);
-
-}
-
-/**
- * Preprocess a message item of type contactpage.
- * @see culturefeed-messages-message-contactpage.tpl.php
- */
-function culturefeed_messages_preprocess_culturefeed_messages_message_contactpage(&$variables) {
-
- _culturefeed_messages_preprocess_message($variables);
- _culturefeed_messages_preprocess_message_recipients($variables);
-
-}
-
-/**
- * Preprocess a message item of type booking.
- * @see culturefeed-messages-message-booking.tpl.php
- */
-function culturefeed_messages_preprocess_culturefeed_messages_message_booking(&$variables) {
-
- _culturefeed_messages_preprocess_message($variables);
- _culturefeed_messages_preprocess_message_recipients($variables);
-
-}
-
-/**
- * Preprocess a message item of type report.
- * @see culturefeed-messages-message-report.tpl.php
- */
-function culturefeed_messages_preprocess_culturefeed_messages_message_report(&$variables) {
-
- _culturefeed_messages_preprocess_message($variables);
- _culturefeed_messages_preprocess_message_recipients($variables);
-
-}
-
-/**
- * Preprocess a message item of type requestadmin.
- * @see culturefeed-messages-message-requestadmin.tpl.php
- */
-function culturefeed_messages_preprocess_culturefeed_messages_message_requestadmin(&$variables) {
-
- _culturefeed_messages_preprocess_message($variables);
- _culturefeed_messages_preprocess_message_recipients($variables);
-
-}
-
-/**
- * Preprocess recipients for a message.
- */
-function _culturefeed_messages_preprocess_message_recipients(&$variables) {
-
- $message = $variables['message'];
- $recipient_links = array();
- $recipients = $message->recipients;
- $sender_id = $message->sender->id;
-
- // Build link to profile of every recipient.
- $variables['recipient_links'] = '';
- if (!empty($recipients)) {
-
- $accounts = culturefeed_get_uids_for_cf_uids($recipients);
- foreach ($recipients as $uid => $recipient) {
-
- // Don't show the sender in the list.
- if ($uid == $sender_id || !isset($accounts[$uid])) {
- continue;
- }
-
- $recipient_links[] = l($recipient->nick, 'user/' . $accounts[$uid]);
-
- }
- $variables['recipient_links'] = implode(', ', $recipient_links);
-
- }
-
- if (!empty($message->recipientPage)) {
- $variables['recipient_page'] = check_plain($message->recipientPage->getName());
- }
-
-}
-
-/**
- * Helper function to preprocess the general variables for a message.
- */
-function _culturefeed_messages_preprocess_message(&$variables) {
-
- $message = $variables['message'];
-
- $variables['id'] = $message->id;
- $variables['status'] = $message->status;
- $variables['subject'] = $message->subject;
-
- // Body can be a json. If it is, add the array to the variables.
- $body = drupal_json_decode($message->body);
- if ($body && is_array($body)) {
- $variables += $body;
- }
- else {
- $variables['body'] = $message->body;
- }
-
- if (isset($variables['body'])) {
- $variables['body'] = check_markup($variables['body'], 'filtered_html');
- }
-
- $variables['sender'] = check_plain($message->sender->nick);
- if (!empty($message->senderPage)) {
- $variables['sender_page'] = check_plain($message->senderPage->getName());
- }
-
- $variables['picture'] = !empty($message->sender->depiction) ? theme('image', array('path' => $message->sender->depiction . '?maxwidth=100')) : '';
-
- $date = empty($message->lastReply) ? $message->creationDate : $message->lastReply;
- $time_zone = new DateTimeZone('Europe/Brussels');
- $last_reply = new DateTime();
- $last_reply->setTimestamp($date);
- $last_reply->setTimezone($time_zone);
-
- // Check if we should show x minutes ago, or not.
- $time_ago = $_SERVER['REQUEST_TIME'] - $date;
- if ($time_ago < (60 * 60)) {
- $minutes_ago = $last_reply->diff(new DateTime('now', $time_zone))->i;
- $variables['date'] = format_plural($minutes_ago, '@count minute ago', '@count minutes ago');
- }
- else {
-
- if ($date >= strtotime("today")) {
- $variables['date'] = t('Today at') . ' ' . $last_reply->format('H:i') . ' ' . t('hour');
- }
- else if ($date >= strtotime("yesterday")) {
- $variables['date'] = t('Yesterday at') . ' ' . $last_reply->format('H:i') . ' ' . t('hour');
- }
- else {
- $variables['date'] = format_date($date, 'custom', 'd M \o\m H:i') . ' ' . t('hour');
- }
-
- }
-}
diff --git a/culturefeed_messages/translations/culturefeed_messages.de.po b/culturefeed_messages/translations/culturefeed_messages.de.po
deleted file mode 100755
index f2b622c9..00000000
--- a/culturefeed_messages/translations/culturefeed_messages.de.po
+++ /dev/null
@@ -1,179 +0,0 @@
-# $Id$
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_messages.module: n/a
-# includes/pages.inc: n/a
-# culturefeed_messages.info: n/a
-# theme/theme.inc: n/a
-# theme/culturefeed-messages-message-list.tpl.php: n/a
-# theme/culturefeed-messages-thread.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-07-24 10:25+0200\n"
-"PO-Revision-Date: 2013-11-21 16:47+0100\n"
-"Last-Translator: Frontend CultuurNet \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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_messages.module:106;163;286
-msgid "My messages"
-msgstr "Meine Nachrichten"
-
-#: culturefeed_messages.module:116 includes/pages.inc:238
-msgid "Delete message"
-msgstr "Nachricht löschen"
-
-#: culturefeed_messages.module:128;139;150;172;270
-msgid "Messages"
-msgstr "Nachrichten"
-
-#: culturefeed_messages.module:192
-msgid "Culturefeed messages: user inbox"
-msgstr ""
-
-#: culturefeed_messages.module:198
-msgid "Culturefeed messages: page inbox"
-msgstr ""
-
-#: culturefeed_messages.module:272;288
-msgid "Read and reply to your messages"
-msgstr "Ihre Nachrichten lesen und beantworten"
-
-#: culturefeed_messages.info:0
-msgid "CultureFeed Messages"
-msgstr "CultureFeed Nachrichten"
-
-#: culturefeed_messages.info:0
-msgid "CultureFeed Messages adds the ability to send messages to other users."
-msgstr ""
-"Mit CultureFeed Nachrichten können Sie anderen Nutzern Nachrichten senden."
-
-#: culturefeed_messages.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/pages.inc:20 theme/theme.inc:15
-msgid "You have no messages"
-msgstr "Sie haben keine Nachrichten"
-
-#: includes/pages.inc:29
-msgid "Something went wrong while getting your message."
-msgstr "Beim Abholen Ihrer Nachrichten hat etwas nicht geklappt."
-
-#: includes/pages.inc:52 theme/culturefeed-messages-message-list.tpl.php:3
-msgid "New message"
-msgstr "Neue Nachricht"
-
-#: includes/pages.inc:88
-msgid "Send new message to:"
-msgstr "Eine neue Nachricht senden an:"
-
-#: includes/pages.inc:90
-msgid "all administrators of my page"
-msgstr "alle Administratoren meiner Seite"
-
-#: includes/pages.inc:91
-msgid "all members of my page"
-msgstr "alle Mitglieder meiner Seite"
-
-#: includes/pages.inc:106
-msgid "Reply"
-msgstr "Reaktion"
-
-#: includes/pages.inc:113
-msgid "Subject"
-msgstr "Betreff"
-
-#: includes/pages.inc:118
-msgid "Message"
-msgstr "Nachricht"
-
-#: includes/pages.inc:133
-msgid "Send message as"
-msgstr "Verschicken als"
-
-#: includes/pages.inc:147
-msgid "Send"
-msgstr "Versenden"
-
-#: includes/pages.inc:190
-msgid "Something went wrong while sending your message."
-msgstr "Beim Versenden Ihrer Nachrichten hat etwas nicht geklappt."
-
-#: includes/pages.inc:201
-msgid "Message send"
-msgstr "Nachricht verschickt"
-
-#: includes/pages.inc:251
-msgid "This action cannot be undone"
-msgstr "Diese Aktion können Sie nicht rückgängig machen"
-
-#: includes/pages.inc:252
-msgid "Are you sure you want to delete this message?"
-msgstr "Sind Sie sicher, dass Sie diese Nachricht löschen möchten?"
-
-#: includes/pages.inc:263
-msgid "Delete"
-msgstr "Löschen"
-
-#: includes/pages.inc:269
-msgid "Cancel"
-msgstr "Abbrechen"
-
-#: includes/pages.inc:292
-msgid "Message \"@message\" is deleted."
-msgstr "Nachricht \"@message\" wurde gelöscht."
-
-#: includes/pages.inc:296
-msgid "Something went wrong while deleting your message."
-msgstr "Beim Löschen Ihrer Nachricht hat etwas nicht geklappt."
-
-#: theme/culturefeed-messages-thread.tpl.php:2
-msgid "@count message"
-msgstr "@count Nachricht"
-
-#: theme/culturefeed-messages-thread.tpl.php:2
-msgid "@count messages"
-msgstr "@count Nachrichten"
-
-#: theme/theme.inc:110
-msgid "Delete conversation"
-msgstr "Unterhaltung löschen"
-
-#: theme/theme.inc:114;121
-msgid "!name of !page"
-msgstr "!name von !page"
-
-#: theme/theme.inc:252
-msgid "@count minute ago"
-msgstr "vor @count Minute"
-
-#: theme/theme.inc:252
-msgid "@count minutes ago"
-msgstr "vor @count Minuten"
-
-#: theme/theme.inc:258
-msgid "Yesterday at"
-msgstr "Gestern um"
-
-#: theme/theme.inc:258;261;264
-msgid "hour"
-msgstr "Uhr"
-
-#: theme/theme.inc:261
-msgid "Today at"
-msgstr "Heute um"
-
-#: theme/theme.inc:313
-msgid "@count new message"
-msgid_plural "@count new messages"
-msgstr[0] "@count neue Nachricht"
-msgstr[1] "@count neueu Nachrichten"
\ No newline at end of file
diff --git a/culturefeed_messages/translations/culturefeed_messages.fr.po b/culturefeed_messages/translations/culturefeed_messages.fr.po
deleted file mode 100755
index b1660d42..00000000
--- a/culturefeed_messages/translations/culturefeed_messages.fr.po
+++ /dev/null
@@ -1,180 +0,0 @@
-# $Id$
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_messages.module: n/a
-# includes/pages.inc: n/a
-# culturefeed_messages.info: n/a
-# theme/theme.inc: n/a
-# theme/culturefeed-messages-message-list.tpl.php: n/a
-# theme/culturefeed-messages-thread.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-07-24 10:25+0200\n"
-"PO-Revision-Date: 2013-11-05 15:44+0100\n"
-"Last-Translator: Frontend CultuurNet \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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_messages.module:106;163;286
-msgid "My messages"
-msgstr "Mes messages"
-
-#: culturefeed_messages.module:116 includes/pages.inc:238
-msgid "Delete message"
-msgstr "Supprimer le message"
-
-#: culturefeed_messages.module:128;139;150;172;270
-msgid "Messages"
-msgstr "Messages"
-
-#: culturefeed_messages.module:192
-msgid "Culturefeed messages: user inbox"
-msgstr ""
-
-#: culturefeed_messages.module:198
-msgid "Culturefeed messages: page inbox"
-msgstr ""
-
-#: culturefeed_messages.module:272;288
-msgid "Read and reply to your messages"
-msgstr "Lire vos messages et y répondre"
-
-#: culturefeed_messages.info:0
-msgid "CultureFeed Messages"
-msgstr "Messages CultureFeed"
-
-#: culturefeed_messages.info:0
-msgid "CultureFeed Messages adds the ability to send messages to other users."
-msgstr ""
-"Les Messages CultureFeed vous permettent de communiquer avec les autres "
-"utilisateurs."
-
-#: culturefeed_messages.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/pages.inc:20 theme/theme.inc:15
-msgid "You have no messages"
-msgstr "Vous n'avez pas de messages"
-
-#: includes/pages.inc:29
-msgid "Something went wrong while getting your message."
-msgstr "Une erreur s'est produite lors du relevé de vos messages."
-
-#: includes/pages.inc:52 theme/culturefeed-messages-message-list.tpl.php:3
-msgid "New message"
-msgstr "Nouveau message"
-
-#: includes/pages.inc:88
-msgid "Send new message to:"
-msgstr "Envoyer un nouveau message à :"
-
-#: includes/pages.inc:90
-msgid "all administrators of my page"
-msgstr "l'ensemble des administrateurs de ma page"
-
-#: includes/pages.inc:91
-msgid "all members of my page"
-msgstr "l'ensemble des membres de ma page"
-
-#: includes/pages.inc:106
-msgid "Reply"
-msgstr "Réagir"
-
-#: includes/pages.inc:113
-msgid "Subject"
-msgstr "Sujet"
-
-#: includes/pages.inc:118
-msgid "Message"
-msgstr "Message"
-
-#: includes/pages.inc:133
-msgid "Send message as"
-msgstr "Envoyer en tant que"
-
-#: includes/pages.inc:147
-msgid "Send"
-msgstr "Envoyer"
-
-#: includes/pages.inc:190
-msgid "Something went wrong while sending your message."
-msgstr "Une erreur s'est produite lors de l'envoi de votre message."
-
-#: includes/pages.inc:201
-msgid "Message send"
-msgstr "Message envoyé"
-
-#: includes/pages.inc:251
-msgid "This action cannot be undone"
-msgstr "Cette action ne peut être annulée"
-
-#: includes/pages.inc:252
-msgid "Are you sure you want to delete this message?"
-msgstr "Êtes-vous sûr de vouloir supprimer ce message ?"
-
-#: includes/pages.inc:263
-msgid "Delete"
-msgstr "Supprimer"
-
-#: includes/pages.inc:269
-msgid "Cancel"
-msgstr "Annuler"
-
-#: includes/pages.inc:292
-msgid "Message \"@message\" is deleted."
-msgstr "Message \"@message\" supprimé. "
-
-#: includes/pages.inc:296
-msgid "Something went wrong while deleting your message."
-msgstr "Une erreur s'est produite lors de la suppression de votre message."
-
-#: theme/culturefeed-messages-thread.tpl.php:2
-msgid "@count message"
-msgstr "@count message"
-
-#: theme/culturefeed-messages-thread.tpl.php:2
-msgid "@count messages"
-msgstr "@count messages"
-
-#: theme/theme.inc:110
-msgid "Delete conversation"
-msgstr "Supprimer la conversation"
-
-#: theme/theme.inc:114;121
-msgid "!name of !page"
-msgstr "!name de !page"
-
-#: theme/theme.inc:252
-msgid "@count minute ago"
-msgstr "il y a @count minute"
-
-#: theme/theme.inc:252
-msgid "@count minutes ago"
-msgstr "il y a @count minutes"
-
-#: theme/theme.inc:258
-msgid "Yesterday at"
-msgstr "Hier à"
-
-#: theme/theme.inc:258;261;264
-msgid "hour"
-msgstr "heures"
-
-#: theme/theme.inc:261
-msgid "Today at"
-msgstr "Aujourd'hui à"
-
-#: theme/theme.inc:313
-msgid "@count new message"
-msgid_plural "@count new messages"
-msgstr[0] "@count nouveau message"
-msgstr[1] "@count nouveaux messages"
diff --git a/culturefeed_messages/translations/culturefeed_messages.nl.po b/culturefeed_messages/translations/culturefeed_messages.nl.po
deleted file mode 100644
index 641b62f3..00000000
--- a/culturefeed_messages/translations/culturefeed_messages.nl.po
+++ /dev/null
@@ -1,203 +0,0 @@
-# $Id$
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_messages.module: n/a
-# includes/pages.inc: n/a
-# culturefeed_messages.info: n/a
-# theme/theme.inc: n/a
-# theme/culturefeed-messages-message-list.tpl.php: n/a
-# theme/culturefeed-messages-message-booking.tpl.php: n/a
-# theme/culturefeed-messages-message-contactmembers.tpl.php: n/a
-# theme/culturefeed-messages-message-contactpage.tpl.php: n/a
-# theme/culturefeed-messages-message-default.tpl.php: n/a
-# theme/culturefeed-messages-message-report.tpl.php: n/a
-# theme/culturefeed-messages-message-requestadmin.tpl.php: n/a
-# theme/culturefeed-messages-thread.tpl.php: n/a
-# theme/culturefeed-messages-message-list-item.tpl.php: n/a
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2014-03-18 16:26+0100\n"
-"PO-Revision-Date: 2014-03-18 16:26+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"
-
-#: culturefeed_messages.module:111;168;284
-msgid "My messages"
-msgstr "Mijn berichten"
-
-#: culturefeed_messages.module:121 includes/pages.inc:250
-msgid "Delete message"
-msgstr "Verwijder bericht"
-
-#: culturefeed_messages.module:133;144;155;177;268
-msgid "Messages"
-msgstr "Berichten"
-
-#: culturefeed_messages.module:197
-msgid "Culturefeed messages: user inbox"
-msgstr ""
-
-#: culturefeed_messages.module:203
-msgid "Culturefeed messages: page inbox"
-msgstr ""
-
-#: culturefeed_messages.module:270;286
-msgid "Read and reply to your messages"
-msgstr "Lees en beantwoord jouw berichten"
-
-#: culturefeed_messages.info:0
-msgid "CultureFeed Messages"
-msgstr "CultureFeed Berichten"
-
-#: culturefeed_messages.info:0
-msgid "CultureFeed Messages adds the ability to send messages to other users."
-msgstr ""
-"Met CultureFeed Berichten kan je berichten sturen naar andere "
-"gebruikers."
-
-#: culturefeed_messages.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/pages.inc:20 theme/theme.inc:15
-msgid "You have no messages"
-msgstr "Je hebt geen berichten"
-
-#: includes/pages.inc:29
-msgid "Something went wrong while getting your message."
-msgstr "Er is iets misgegaan bij het ophalen van je berichten. "
-
-#: includes/pages.inc:52 theme/culturefeed-messages-message-list.tpl.php:3
-msgid "New message"
-msgstr "Nieuw bericht"
-
-#: includes/pages.inc:56 theme/culturefeed-messages-message-booking.tpl.php:13 theme/culturefeed-messages-message-contactmembers.tpl.php:13 theme/culturefeed-messages-message-contactpage.tpl.php:13 theme/culturefeed-messages-message-default.tpl.php:13 theme/culturefeed-messages-message-report.tpl.php:13 theme/culturefeed-messages-message-requestadmin.tpl.php:13 theme/culturefeed-messages-thread.tpl.php:4
-msgid "Subject"
-msgstr "Onderwerp"
-
-#: includes/pages.inc:61
-msgid "Message"
-msgstr "Bericht"
-
-#: includes/pages.inc:99
-msgid "Send new message to:"
-msgstr "Stuur een nieuw bericht naar:"
-
-#: includes/pages.inc:101
-msgid "all administrators of my page"
-msgstr "alle beheerders van mijn pagina"
-
-#: includes/pages.inc:102
-msgid "all members of my page"
-msgstr "alle leden van mijn pagina"
-
-#: includes/pages.inc:117
-msgid "Reply"
-msgstr "reactie"
-
-#: includes/pages.inc:138
-msgid "Send message as"
-msgstr "Verzend als"
-
-#: includes/pages.inc:152
-msgid "Send"
-msgstr "Versturen"
-
-#: includes/pages.inc:202
-msgid "Something went wrong while sending your message."
-msgstr "Er is iets misgegaan bij het verzenden van je bericht."
-
-#: includes/pages.inc:213
-msgid "Message send"
-msgstr "Bericht verzonden"
-
-#: includes/pages.inc:263
-msgid "This action cannot be undone"
-msgstr "Deze actie kan je niet ongedaan maken"
-
-#: includes/pages.inc:264
-msgid "Are you sure you want to delete this message?"
-msgstr "Ben je zeker dat je dit bericht wilt verwijderen?"
-
-#: includes/pages.inc:275
-msgid "Delete"
-msgstr "Verwijderen"
-
-#: includes/pages.inc:281
-msgid "Cancel"
-msgstr "Annuleren"
-
-#: includes/pages.inc:304
-msgid "Message \"@message\" is deleted."
-msgstr "Bericht \"@message\" is verwijderd. "
-
-#: includes/pages.inc:308
-msgid "Something went wrong while deleting your message."
-msgstr "Er is iets misgegaan bij het verwijderen van je bericht."
-
-#: theme/culturefeed-messages-message-booking.tpl.php:11 theme/culturefeed-messages-message-contactmembers.tpl.php:11 theme/culturefeed-messages-message-contactpage.tpl.php:11 theme/culturefeed-messages-message-default.tpl.php:11 theme/culturefeed-messages-message-list-item.tpl.php:4 theme/culturefeed-messages-message-report.tpl.php:11 theme/culturefeed-messages-message-requestadmin.tpl.php:11 theme/culturefeed-messages-thread.tpl.php:3
-msgid "To"
-msgstr ""
-
-#: theme/culturefeed-messages-message-list-item.tpl.php:2
-msgid "New"
-msgstr ""
-
-#: theme/culturefeed-messages-message-list.tpl.php:2
-msgid "Inbox"
-msgstr ""
-
-#: theme/culturefeed-messages-thread.tpl.php:2
-msgid "From"
-msgstr ""
-
-#: theme/culturefeed-messages-thread.tpl.php:4
-msgid "No subject"
-msgstr ""
-
-#: theme/culturefeed-messages-thread.tpl.php:1
-msgid "@count message"
-msgid_plural "@count messages"
-msgstr[0] "@count bericht"
-msgstr[1] "@count berichten"
-
-#: theme/theme.inc:114;121
-msgid "!name of !page"
-msgstr "!name van !page"
-
-#: theme/theme.inc:144
-msgid "Delete conversation"
-msgstr "Verwijder conversatie"
-
-#: theme/theme.inc:297
-msgid "Today at"
-msgstr "Vandaag om"
-
-#: theme/theme.inc:297;300;303
-msgid "hour"
-msgstr "uur"
-
-#: theme/theme.inc:300
-msgid "Yesterday at"
-msgstr "Gisteren om"
-
-#: theme/theme.inc:292
-msgid "@count minute ago"
-msgid_plural "@count minutes ago"
-msgstr[0] "@count minuut geleden"
-msgstr[1] "@count minuten geleden"
-
-#: theme/theme.inc:313
-msgid "@count new message"
-msgid_plural "@count new messages"
-msgstr[0] "@count nieuw bericht"
-msgstr[1] "@count nieuwe berichten"
From 0634751e98cc7c56f1cb7c3984f674944be6a841 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 5 Nov 2019 14:09:37 +0100
Subject: [PATCH 04/16] Moved culturefeed_pages to
https://github.com/cultuurnet/culturefeed_pages
---
culturefeed_pages/culturefeed_pages.info | 10 -
culturefeed_pages/culturefeed_pages.install | 95 -
culturefeed_pages/culturefeed_pages.module | 1234 -------------
culturefeed_pages/includes/admin.inc | 42 -
culturefeed_pages/includes/blocks.inc | 590 -------
culturefeed_pages/includes/helpers.inc | 596 -------
culturefeed_pages/includes/members.inc | 709 --------
culturefeed_pages/includes/pages.inc | 1551 -----------------
culturefeed_pages/js/page_suggestions.js | 21 -
.../lib/Drupal/PagesSearchPage.php | 122 --
.../theme/culturefeed-page-invisible.tpl.php | 1 -
.../theme/culturefeed-page-summary.tpl.php | 56 -
.../theme/culturefeed-page.tpl.php | 77 -
...ulturefeed-pages-basic-search-page.tpl.php | 23 -
...eed-pages-basic-search-result-item.tpl.php | 43 -
...turefeed-pages-block-admin-options.tpl.php | 33 -
...efeed-pages-block-page-suggestions.tpl.php | 15 -
...turefeed-pages-block-page-timeline.tpl.php | 14 -
...ulturefeed-pages-events-admin-page.tpl.php | 18 -
...urefeed-pages-fellow-members-block.tpl.php | 27 -
.../culturefeed-pages-followers-block.tpl.php | 24 -
.../culturefeed-pages-members-block.tpl.php | 25 -
.../culturefeed-pages-nearby-pages.tpl.php | 22 -
.../culturefeed-pages-news-admin-page.tpl.php | 31 -
.../culturefeed-pages-page-agenda.tpl.php | 16 -
.../culturefeed-pages-page-menu-item.tpl.php | 5 -
.../culturefeed-pages-page-my-pages.tpl.php | 27 -
...ed-pages-page-suggestion-list-item.tpl.php | 56 -
...urefeed-pages-page-suggestion-list.tpl.php | 17 -
...ges-request-admin-membership-block.tpl.php | 10 -
...lturefeed-pages-user-search-result.tpl.php | 21 -
culturefeed_pages/theme/theme.inc | 806 ---------
.../translations/culturefeed_pages.de.po | 914 ----------
.../translations/culturefeed_pages.fr.po | 913 ----------
.../translations/culturefeed_pages.nl.po | 913 ----------
35 files changed, 9077 deletions(-)
delete mode 100644 culturefeed_pages/culturefeed_pages.info
delete mode 100644 culturefeed_pages/culturefeed_pages.install
delete mode 100644 culturefeed_pages/culturefeed_pages.module
delete mode 100644 culturefeed_pages/includes/admin.inc
delete mode 100644 culturefeed_pages/includes/blocks.inc
delete mode 100644 culturefeed_pages/includes/helpers.inc
delete mode 100644 culturefeed_pages/includes/members.inc
delete mode 100644 culturefeed_pages/includes/pages.inc
delete mode 100644 culturefeed_pages/js/page_suggestions.js
delete mode 100644 culturefeed_pages/lib/Drupal/PagesSearchPage.php
delete mode 100644 culturefeed_pages/theme/culturefeed-page-invisible.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-page-summary.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-page.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-basic-search-page.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-basic-search-result-item.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-block-admin-options.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-block-page-suggestions.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-block-page-timeline.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-events-admin-page.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-fellow-members-block.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-followers-block.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-members-block.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-nearby-pages.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-news-admin-page.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-page-agenda.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-page-menu-item.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-page-my-pages.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-page-suggestion-list-item.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-page-suggestion-list.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-request-admin-membership-block.tpl.php
delete mode 100644 culturefeed_pages/theme/culturefeed-pages-user-search-result.tpl.php
delete mode 100644 culturefeed_pages/theme/theme.inc
delete mode 100755 culturefeed_pages/translations/culturefeed_pages.de.po
delete mode 100755 culturefeed_pages/translations/culturefeed_pages.fr.po
delete mode 100644 culturefeed_pages/translations/culturefeed_pages.nl.po
diff --git a/culturefeed_pages/culturefeed_pages.info b/culturefeed_pages/culturefeed_pages.info
deleted file mode 100644
index 0c8dad80..00000000
--- a/culturefeed_pages/culturefeed_pages.info
+++ /dev/null
@@ -1,10 +0,0 @@
-name = CultureFeed Pages
-description = CultureFeed Pages makes it possible to view / manage pages.
-package = CultureFeed
-version = VERSION
-core = 7.x
-
-dependencies[] = culturefeed_search
-dependencies[] = culturefeed
-
-files[] = lib/Drupal/PagesSearchPage.php
\ No newline at end of file
diff --git a/culturefeed_pages/culturefeed_pages.install b/culturefeed_pages/culturefeed_pages.install
deleted file mode 100644
index 375bbfdf..00000000
--- a/culturefeed_pages/culturefeed_pages.install
+++ /dev/null
@@ -1,95 +0,0 @@
-import();
-
- // Run update to set all actortypes as default.
- culturefeed_pages_update_7003();
-
-}
-
-/**
- * Change block cache settings for 'admin options block'.
- */
-function culturefeed_pages_update_7001() {
- db_update('block')
- ->condition('module', 'culturefeed_pages')
- ->condition('delta', 'pages-admin-options')
- ->fields(array('cache' => DRUPAL_NO_CACHE))
- ->execute();
-}
-
-/**
- * Change block cache settings for 'agenda block'.
- */
-function culturefeed_pages_update_7002() {
- db_update('block')
- ->condition('module', 'culturefeed_pages')
- ->condition('delta', 'page-agenda')
- ->fields(array('cache' => DRUPAL_CACHE_PER_PAGE))
- ->execute();
-}
-
-/**
- * Set variable default to all actor types available.
- */
-function culturefeed_pages_update_7003() {
- module_load_include('module', 'culturefeed_search');
- $actortypes = culturefeed_search_get_actortype_categories();
- variable_set('culturefeed_pages_actor_types', array_keys($actortypes));
-}
-
-/**
- * Remove empty actor type values in variable.
- */
-function culturefeed_pages_update_7004() {
-
- $actor_types = variable_get('culturefeed_pages_actor_types', array());
- if ($actor_types) {
-
- // Remove empty values. If this results in an empty array, delete the variable.
- $actor_types = array_filter($actor_types);
- if ($actor_types) {
- variable_set('culturefeed_pages_actor_types', $actor_types);
- }
- else {
- variable_del('culturefeed_pages_actor_types');
- }
- }
-}
-
-/**
- * Change block cache settings for timeline block.
- */
-function culturefeed_pages_update_7005() {
- db_update('block')
- ->condition('module', 'culturefeed_pages')
- ->condition('delta', 'page-timeline')
- ->fields(array('cache' => DRUPAL_NO_CACHE))
- ->execute();
-}
-
-/**
- * Remove block cache of timeline and page agenda.
- */
-function culturefeed_pages_update_7006() {
- db_update('block')
- ->condition('delta', 'page-timeline')
- ->fields(array('cache' => DRUPAL_NO_CACHE))
- ->execute();
-
- db_update('block')
- ->condition('delta', 'page-agenda')
- ->fields(array('cache' => DRUPAL_NO_CACHE))
- ->execute();
-}
diff --git a/culturefeed_pages/culturefeed_pages.module b/culturefeed_pages/culturefeed_pages.module
deleted file mode 100644
index 61a47196..00000000
--- a/culturefeed_pages/culturefeed_pages.module
+++ /dev/null
@@ -1,1234 +0,0 @@
- array(
- 'variables' => array(
- 'form' => NULL,
- 'results' => array(),
- 'total_results' => 0,
- 'search' => '',
- 'zipcode' => '',
- 'keyword' => '',
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-pages-basic-search-page',
- ),
- 'culturefeed_pages_basic_search_result_item' => array(
- 'variables' => array('item' => NULL),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-pages-basic-search-result-item',
- ),
- 'culturefeed_page' => array(
- 'variables' => array('item' => NULL),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-page',
- ),
- 'culturefeed_page_summary' => array(
- 'variables' => array('item' => NULL),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-page-summary',
- ),
- 'culturefeed_page_invisible' => array(
- 'variables' => array('page' => NULL),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-page-invisible',
- ),
- 'culturefeed_pages_fellow_members_block' => array(
- 'variables' => array(
- 'account' => NULL,
- 'page' => NULL,
- 'members' => array(),
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-pages-fellow-members-block',
- ),
- 'culturefeed_pages_request_admin_membership_block' => array(
- 'variables' => array(
- 'page' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-pages-request-admin-membership-block',
-
- ),
- 'culturefeed_pages_following_pages_block' => array(
- 'variables' => array('following' => array()),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_block_admin_options' => array(
- 'variables' => array(
- 'admin_menu' => NULL,
- 'logged_in_as_page_admin' => FALSE,
- 'account' => NULL,
- 'page' => NULL,
- 'page_notifications' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-pages-block-admin-options',
- ),
- 'culturefeed_pages_page_menu_item' => array(
- 'variables' => array('title' => '', 'url' => '', 'description' => ''),
- 'template' => 'culturefeed-pages-page-menu-item',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_user_search_result' => array(
- 'variables' => array(
- 'result' => NULL,
- 'page' => NULL,
- 'user_list' => NULL,
- ),
- 'template' => 'culturefeed-pages-user-search-result',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_followers_block' => array(
- 'variables' => array(
- 'page' => NULL,
- 'followers' => array(),
- 'num_followers' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-pages-followers-block',
- ),
- 'culturefeed_pages_members_block' => array(
- 'variables' => array(
- 'page' => NULL,
- 'members' => array(),
- 'num_members' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-pages-members-block',
- ),
- 'culturefeed_pages_nearby_pages' => array(
- 'variables' => array(
- 'results' => array(),
- 'results_found' => 0,
- 'show_more' => FALSE,
- 'more_text' => '',
- 'more_url' => '',
- 'tooltip_text' => '',
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-pages-nearby-pages',
- ),
- 'culturefeed_pages_events_admin_page' => array(
- 'variables' => array('results' => array(), 'page' => NULL),
- 'template' => 'culturefeed-pages-events-admin-page',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_page_agenda' => array(
- 'variables' => array(
- 'items' => array(),
- 'page' => NULL,
- 'is_admin' => FALSE,
- 'read_more_path' => '',
- ),
- 'template' => 'culturefeed-pages-page-agenda',
- 'path' => $path,
- ),
- 'culturefeed_pages_follow_success_message' => array(
- 'variables' => array(
- 'page' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_unfollow_success_message' => array(
- 'variables' => array(
- 'page' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_page_my_pages' => array(
- 'variables' => array(
- 'build' => array(),
- 'user' => NULL,
- ),
- 'path' => $path,
- 'template' => 'culturefeed-pages-page-my-page',
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_login_required_message' => array(
- 'variables' => array('page' => NULL, 'action' => ''),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_admin_request_link' => array(
- 'variables' => array('page' => NULL, 'cf_user' => NULL),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_membership_delete_not_possible' => array(
- 'variables' => array('page' => NULL),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_block_page_suggestions' => array(
- 'variables' => array('suggestions' => '', 'filter_form' => NULL),
- 'template' => 'culturefeed-pages-block-page-suggestions',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_page_suggestion_list' => array(
- 'variables' => array('suggestions' => array()),
- 'template' => 'culturefeed-pages-page-suggestion-list',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_page_suggestion_list_item' => array(
- 'variables' => array('item' => NULL),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-pages-page-suggestion-list-item',
- ),
- 'culturefeed_pages_block_page_timeline' => array(
- //'variables' => array('time_line' => NULL, 'page' => NULL),
- 'variables' => array('filter_form' => NULL, 'time_line' => NULL, 'page' => NULL),
- 'path' => $path,
- 'template' => 'culturefeed-pages-block-page-timeline',
- 'file' => 'theme.inc',
- ),
- 'culturefeed_pages_news_admin_page' => array(
- 'variables' => array('results' => array(), 'page' => NULL),
- 'template' => 'culturefeed-pages-news-admin-page',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- );
-
-}
-
-/**
- * Implements hook_menu().
- */
-function culturefeed_pages_menu() {
-
- $items = array();
-
- $items['pages/search'] = array(
- 'title callback' => 'culturefeed_pages_basic_search_title',
- 'page callback' => 'culturefeed_pages_page_basic_search',
- 'access arguments' => array('access content'),
- 'file' => 'includes/pages.inc',
- );
-
- $items['pages/add'] = array(
- 'title' => 'Create your own page',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_pages_add_form'),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'file' => 'includes/pages.inc',
- );
-
- $items['agenda/g/%/%culturefeed_pages_page'] = array(
- 'title callback' => 'culturefeed_pages_detail_title',
- 'title arguments' => array(3),
- 'page callback' => 'culturefeed_pages_detail_page',
- 'page arguments' => array(3),
- 'access arguments' => array('access content'),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['pages/%culturefeed_pages_page/edit'] = array(
- 'title' => 'Edit page',
- 'title callback' => 'culturefeed_pages_detail_title',
- 'title arguments' => array(1, 'edit'),
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_pages_edit_page_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/remove/%'] = array(
- 'title' => 'Delete page',
- 'page callback' => 'culturefeed_pages_remove_page_confirm',
- 'page arguments' => array(1, 3),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['pages/%culturefeed_pages_page/publish/%'] = array(
- 'title' => 'Publish page',
- 'page callback' => 'culturefeed_pages_publish_page_confirm',
- 'page arguments' => array(1),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['pages/%culturefeed_pages_page/configuration'] = array(
- 'title' => 'Settings',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_pages_configuration_page_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/events'] = array(
- 'title' => 'Activities',
- 'page callback' => 'culturefeed_pages_page_events',
- 'page arguments' => array(1),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['pages/%culturefeed_pages_page/news'] = array(
- 'title' => 'News',
- 'page callback' => 'culturefeed_pages_page_manage_news',
- 'page arguments' => array(1),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['pages/%culturefeed_pages_page/news/add'] = array(
- 'title' => 'Add a news item',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_pages_add_news_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/news/delete/%culturefeed_social_news_item'] = array(
- 'title' => 'Delete news item',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_pages_delete_news_form', 1, 4),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['pages/%culturefeed_pages_page/members/%'] = array(
- 'title' => 'Members',
- 'page callback' => 'culturefeed_pages_page_manage_members',
- 'page arguments' => array(1, 3),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/members.inc',
- );
-
- $items['pages/%culturefeed_pages_page/membership/%cf_user/edit/%'] = array(
- 'title' => 'Members',
- 'page callback' => 'culturefeed_pages_page_manage_members',
- 'page arguments' => array(1, 5, 3),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/members.inc',
- );
-
- $items['pages/%culturefeed_pages_page/membership/%cf_user/delete/%'] = array(
- 'title' => 'Delete member',
- 'page callback' => 'culturefeed_pages_page_delete_member',
- 'page arguments' => array(1, 3, 5),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/members.inc',
- );
-
- $items['pages/%culturefeed_pages_page/membership/add/%cf_user/%'] = array(
- 'title' => 'Add member',
- 'page callback' => 'culturefeed_pages_page_add_member',
- 'page arguments' => array(1, 4, 5),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/members.inc',
- );
-
- $items['pages/%culturefeed_pages_page/membership/request-admin/%'] = array(
- 'title' => 'Application for administrator of the page',
- 'page callback' => 'culturefeed_pages_page_request_admin_membership',
- 'page arguments' => array(1, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/members.inc',
- );
-
- $items['pages/%culturefeed_pages_page/membership/delete/%'] = array(
- 'title' => 'Remove myself as a member',
- 'page callback' => 'culturefeed_pages_page_delete_member',
- 'page arguments' => array(1, NULL, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/members.inc',
- );
-
- $items['pages/%culturefeed_pages_page/membership/request-approve/%cf_user'] = array(
- 'title' => 'Add member as administrator',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_pages_page_request_admin_membership_approved', 1, 4),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/members.inc',
- );
-
- $items['pages/%culturefeed_pages_page/membership/request-validated-admin/%'] = array(
- 'title' => 'Request to become validated admin',
- 'page callback' => 'culturefeed_pages_page_request_validated_admin',
- 'page arguments' => array(1, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/members.inc',
- );
-
- $items['pages/switch/%culturefeed_pages_page'] = array(
- 'title' => 'Change active page',
- 'page callback' => 'culturefeed_pages_switch_page',
- 'page arguments' => array(2),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['ajax/culturefeed/pages/page-suggestion'] = array(
- 'page callback' => 'culturefeed_pages_page_suggestion_autocomplete_page',
- 'page arguments' => array(4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['ajax/culturefeed/pages/page-suggestion/ids'] = array(
- 'page callback' => 'culturefeed_pages_page_suggestion_autocomplete_page',
- 'page arguments' => array(5, TRUE),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/pages/join/%/%culturefeed_pages_page'] = array(
- 'page callback' => 'culturefeed_pages_page_join',
- 'page arguments' => array(3, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/pages/follow/%/%culturefeed_pages_page'] = array(
- 'title' => 'Follow page',
- 'page callback' => 'culturefeed_pages_page_follow',
- 'page arguments' => array(3, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/pages/defollow/%/%culturefeed_pages_page'] = array(
- 'title' => 'Unfollow page',
- 'page callback' => 'culturefeed_pages_page_follow',
- 'page arguments' => array(3, 4, FALSE),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/pages'] = array(
- 'title' => 'My pages',
- 'page callback' => 'culturefeed_pages_page_my_pages',
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/ajax/page/agenda/%culturefeed_pages_page'] = array(
- 'page callback' => 'culturefeed_pages_page_ajax_get_agenda',
- 'page arguments' => array(4),
- 'access arguments' => array('access content'),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['admin/config/culturefeed/pages-ui'] = array(
- 'title' => 'CultureFeed Pages UI',
- 'description' => t('Change CultureFeed Pages UI settings'),
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_pages_admin_settings'),
- 'access arguments' => array('administer site configuration'),
- 'file' => 'includes/admin.inc',
- );
-
- return $items;
-
-}
-
-/**
- * Implements hook_block_info().
- */
-function culturefeed_pages_block_info() {
-
- $blocks = array();
-
- $blocks['user-fellow-members'] = array(
- 'info' => t('Culturefeed pages: fellow members from user'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['pages-user-follows'] = array(
- 'info' => t("Culturefeed pages: pages i'm following"),
- 'cache' => DRUPAL_CACHE_PER_PAGE,
- );
-
- $blocks['pages-admin-options'] = array(
- 'info' => t("Culturefeed pages: page options"),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['pages-request-admin-membership'] = array(
- 'info' => t("Culturefeed pages: request to become admin member"),
- 'cache' => DRUPAL_CACHE_PER_PAGE,
- );
-
- $blocks['pages-admin-menu'] = array(
- 'info' => t("Culturefeed pages: page admin menu"),
- 'cache' => DRUPAL_CACHE_PER_PAGE,
- );
-
- $blocks['followers'] = array(
- 'info' => t('Culturefeed pages: followers'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['members'] = array(
- 'info' => t('Culturefeed pages: members'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['nearby-pages'] = array(
- 'info' => t('Culturefeed pages: nearby pages'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['page-suggestions'] = array(
- 'info' => t('Culturefeed pages: page suggestions'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- if (module_exists('culturefeed_social')) {
- $blocks['page-timeline'] = array(
- 'info' => t("Culturefeed pages: page timeline"),
- 'cache' => DRUPAL_NO_CACHE,
- );
- }
-
- if (module_exists('culturefeed_agenda')) {
- $blocks['page-agenda'] = array(
- 'info' => t('Culturefeed pages: page agenda'),
- 'cache' => DRUPAL_NO_CACHE,
- );
- }
-
- return $blocks;
-
-}
-
-/**
- * Implements hook_block_configure().
- */
-function culturefeed_pages_block_configure($delta) {
-
- $form = array();
-
- if ($delta == 'page-agenda') {
- $form['pages_block_agenda_total_items'] = array(
- '#title' => t('Items to show per page'),
- '#type' => 'textfield',
- '#default_value' => variable_get('pages_block_agenda_total_items', 20),
- );
- }
- elseif ($delta == 'page-suggestions') {
- $form['pages_block_page_suggestions_query'] = array(
- '#title' => t('Query to use for the suggestions'),
- '#type' => 'textfield',
- '#default_value' => variable_get('pages_block_page_suggestions_query', ''),
- '#description' => t('Example: category_id:("8.11.0.0.0") '),
- );
- $form['pages_block_page_suggestions_total'] = array(
- '#title' => t('Total of suggestions to show'),
- '#type' => 'textfield',
- '#default_value' => variable_get('pages_block_page_suggestions_total', 10),
- );
- $form['pages_block_page_suggestions_distance'] = array(
- '#title' => t('Distance range of suggestions to search'),
- '#type' => 'textfield',
- '#default_value' => variable_get('pages_block_page_suggestions_distance', 5),
- );
- }
-
- return $form;
-
-}
-
-/**
- * Implements hook_block_save().
- */
-function culturefeed_pages_block_save($delta, $edit) {
-
- if ($delta == 'page-agenda') {
- variable_set('pages_block_agenda_total_items', $edit['pages_block_agenda_total_items']);
- }
- elseif ($delta == 'page-suggestions') {
- variable_set('pages_block_page_suggestions_query', $edit['pages_block_page_suggestions_query']);
- variable_set('pages_block_page_suggestions_total', $edit['pages_block_page_suggestions_total']);
- variable_set('pages_block_page_suggestions_distance', $edit['pages_block_page_suggestions_distance']);
- }
-}
-
-/**
- * Implements hook_block_view().
- */
-function culturefeed_pages_block_view($delta) {
-
- module_load_include('inc', 'culturefeed_pages', 'includes/blocks');
-
- switch ($delta) {
-
- case 'user-fellow-members':
- $account = menu_get_object('user');
- return culturefeed_pages_block_fellow_members($account);
-
- case 'pages-user-follows':
- $account = menu_get_object('user');
- return culturefeed_pages_block_pages_user_follows($account);
-
- case 'pages-admin-options':
- return culturefeed_pages_block_pages_admin_options();
-
- case 'pages-admin-menu':
- return culturefeed_pages_block_pages_admin_menu();
-
- case 'pages-request-admin-membership':
- $page = menu_get_object('culturefeed_pages_page', 3);
- return culturefeed_pages_block_pages_request_admin_membership($page);
-
- case 'page-timeline':
- $page = culturefeed_pages_get_viewed_page();
- return culturefeed_pages_block_page_timeline($page);
-
- case 'followers':
- $page = culturefeed_pages_get_viewed_page();
- return culturefeed_pages_block_followers($page);
-
- case 'members':
- $page = culturefeed_pages_get_viewed_page();
- return culturefeed_pages_block_members($page);
-
- case 'nearby-pages':
- $page = culturefeed_pages_get_viewed_page();
- return culturefeed_pages_block_nearby_pages($page);
-
- case 'page-agenda':
- $page = culturefeed_pages_get_viewed_page();
- return culturefeed_pages_block_page_agenda($page);
-
- case 'page-suggestions':
- return culturefeed_pages_block_page_suggestions();
- }
-
-}
-
-/**
- * Implements hook_user_login().
- *
- * @param $edit
- * The array of form values submitted by the user.
- * @param $account
- * The user object on which the operation was just performed.
- */
-function culturefeed_pages_user_login(&$edit, $account) {
-
- // If it's your first membership and you don't have an active page yet,
- // also login as that page.
- try {
-
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- if (!$cf_user) {
- return;
- }
-
- $memberships = $cf_user->pageMemberships;
- if (count($memberships) > 0) {
-
- $ids = array();
- foreach ($memberships as $membership) {
- $ids[] = $membership->page->getId();
- }
-
- $page = NULL;
- $account = DrupalCultureFeed::getLoggedInAccount();
- if (isset($account->data['culturefeed_pages_id']) && in_array($account->data['culturefeed_pages_id'], $ids)) {
- $preferred_page = culturefeed_pages_page_load($account->data['culturefeed_pages_id']);
- // Check if this page was not deleted.
- if ($preferred_page && $preferred_page->isVisible()) {
- $page = $preferred_page;
- }
- }
-
- // If there is no recollection of a previous state,
- // take the first membership as active one.
- if (empty($page)) {
- $membership = reset($memberships);
- $page = $membership->page;
- }
-
- culturefeed_pages_set_active_page($page);
-
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_box_dropdown_items().
- */
-function culturefeed_pages_culturefeed_ui_profile_box_dropdown_items(CultureFeed_User $cultureFeedUser) {
-
- $items = array();
-
- $has_memberships = count($cultureFeedUser->pageMemberships);
-
- $items['my-page'] = array(
- 'data' => t('My page'),
- 'class' => 'my-page',
- 'children' => array(
- ),
- 'weight' => -19,
- );
-
- $items['manage-pages'] = array(
- 'data' => l(t('Manage pages'), 'culturefeed/pages'),
- 'class' => 'settings',
- 'weight' => 20,
- );
-
- // The user is member of at least one page, login as ...
- if ($has_memberships) {
-
- $active_page = culturefeed_pages_get_active_page();
- $active_page_id = 0;
-
- if ($active_page) {
-
- $active_page_id = $active_page->getId();
-
- $items['my-page']['children'] = array(
- array('data' => culturefeed_search_detail_l('page', $active_page->getId(), $active_page->getName())),
- );
-
- }
- else {
- $items['my-page']['children'] = array(
- array('data' => l(t('Search your page'), 'pages/search')),
- );
- }
-
- // If the user has more than 1 membership, allow him to switch pages.
- if ($has_memberships > 1) {
-
- $items['switch-page'] = array(
- 'data' => t('Change active page'),
- 'class' => 'switch-page',
- 'children' => array(),
- 'weight' => -18,
- );
-
- foreach ($cultureFeedUser->pageMemberships as $membership) {
- if ($active_page_id != $membership->page->getId()) {
- $items['switch-page']['children'][] = array(
- 'data' => l($membership->page->getName(), 'pages/switch/' . $membership->page->getId())
- );
- }
- }
- }
-
- }
- // Provide the user with interesting pages so they can login as Page.
- else {
- $items['my-page']['children'] = array(
- array('data' => l(t('Search your page'), 'pages/search')),
- );
- }
-
- return $items;
-
-}
-
-/**
- * Implements hook_culturefeed_pages_page_admin_menu().
- */
-function culturefeed_pages_culturefeed_pages_page_admin_menu(CultureFeed_Cdb_Item_Page $page) {
-
- return array(
- 'info' => array(
- 'title' => t('Details & Layout'),
- 'url' => 'pages/' . $page->getId() . '/edit',
- 'description' => t('Manage page information, contact details, layout ... .'),
- 'weight' => -20,
- ),
- 'settings' => array(
- 'title' => t('Features'),
- 'url' => 'pages/' . $page->getId() . '/configuration',
- 'description' => t('Allow users to follow your page, request membership, add comments, ... .'),
- 'weight' => -19,
- ),
- 'members' => array(
- 'title' => t('Members, Rights & Roles'),
- 'url' => 'pages/' . $page->getId() . '/members/nojs',
- 'description' => t('Manage members, roles and rights.'),
- 'weight' => -18,
- ),
- 'events' => array(
- 'title' => t('Activities'),
- 'url' => 'pages/' . $page->getId() . '/events',
- 'description' => t('Manage your activities and comments.'),
- 'weight' => -17,
- ),
- 'news' => array(
- 'title' => t('News'),
- 'url' => 'pages/' . $page->getId() . '/news',
- 'description' => t('Manage your news.'),
- 'weight' => -16,
- ),
- );
-
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_menu().
- */
-function culturefeed_pages_culturefeed_ui_profile_menu() {
-
- return array(
- 'pages' => array(
- 'title' => t('My pages'),
- 'url' => 'culturefeed/pages',
- 'description' => t('Manage the pages where you\'re member off or that you follow'),
- 'weight' => -17,
- ),
- );
-
-}
-
-/**
- * Implements hook_culturefeed_search_page_info().
- */
-function culturefeed_pages_culturefeed_search_page_info() {
- return array(
- 'pages' => array(
- 'id' => 'pages',
- 'path' => 'agenda/pages',
- 'page_title' => t('Pages'),
- 'search_title' => t('Pages'),
- 'class_name' => 'CultureFeedPagesSearchPage',
- 'sort_default' => 0, // key for follow count
- 'sort_options' => array(
- array(
- 'value' => 'pagefollow_count',
- 'label' => t('Number of followers'),
- 'exposed' => TRUE,
- 'query' => 'pagefollow_count desc',
- ),
- array(
- 'value' => 'pagemember',
- 'label' => t('Number of members'),
- 'exposed' => TRUE,
- 'query' => 'pagemember_count desc',
- ),
- ),
- ),
- );
-}
-
-/**
- * Load a culturefeed page.
- * @param $id
- * Id to load.
- * @return mixed
- * FALSE if not found, otherwise CultuurNet\Search\ActivityStatsExtendedEntity.
- */
-function culturefeed_pages_page_load($id) {
-
- $pages = &drupal_static('culturefeed_search_items_load', array());
-
- if (isset($pages[$id])) {
- return $pages[$id];
- }
-
- try {
-
- $cf_pages = DrupalCultureFeed::getConsumerInstance()->pages();
- $pages[$id] = $cf_pages->getPage($id);
- return $pages[$id];
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
- return FALSE;
-
-}
-
-/**
- * Title callback for the join search page.
- */
-function culturefeed_pages_basic_search_title() {
- return format_string(t('Your page on @sitename'), array('@sitename' => variable_get('site_name')));
-}
-
-/**
- * Title callback for the 'page' detail page.
- */
-function culturefeed_pages_detail_title($page, $op = 'view') {
-
- if ($op == 'view') {
- return $page->getName();
- }
- else {
- $title = $page->getName();
-
- $address = $page->getAddress();
- if (!empty($address)) {
- $city = $address->getCity();
- if (!empty($city)) {
- $title .= ' - ' . $address->getCity();
- }
- }
-
- return $title;
- }
-}
-
-/**
- * Access callback to indicate whether the current has can administer
- * the page.
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_edit_page_access($page) {
-
- $cultureFeedUser = DrupalCultureFeed::getLoggedInUser();
- if (empty($cultureFeedUser)) {
- return FALSE;
- }
-
- // Calculate the number of pages where the current user is ADMIN.
- if ($cultureFeedUser->adminPagesCount > 0) {
- $adminMemberships = $cultureFeedUser->getMembershipsByRole(CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN);
- }
-
- // If the user is connecting an organization, attempt to switch the active page to the page being edited.
- $query_params = drupal_get_query_parameters();
-
- if (isset($query_params['connect-organization']) && isset($adminMemberships[$page->getId()])) {
- culturefeed_pages_set_active_page($page);
- }
-
- // Check the current page against the current active admin page.
- return isset($adminMemberships[$page->getId()]) && $page->getId() === culturefeed_pages_get_active_page_id();
-
-}
-
-/**
- * Access callback to indicate whether the current user can see the page
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_view_page_access($page) {
- return $page->isVisible();
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_box_nick_alter().
- * @param unknown_type $culture_feed_profile_name
- */
-function culturefeed_pages_culturefeed_ui_profile_box_nick_alter(&$culture_feed_profile_name) {
-
- $active_page = culturefeed_pages_get_active_page();
-
- if (isset($active_page)) {
- // Extend the current nickname.
- $nick = $culture_feed_profile_name['nick'] . ' ' . t('from') . ' ' . $active_page->getName();
- $culture_feed_profile_name['nick'] = $nick;
-
- // Create a new link for the same properties.
- $culture_feed_profile_name['link'] = l($nick, 'user/' . $culture_feed_profile_name['uid']);
- }
-
-}
-
-/**
- * Submit the edit membership form through ajax.
- */
-function culturefeed_pages_edit_membership_ajax_form_submit($form, &$form_state) {
-
- // If the submit was successfully done. Show the non-form row again.
- if (isset($form_state['#success'])) {
-
- $build = array();
- try {
-
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- $user_list = $cf_pages->getUserList($form['#membership']->page->getId(), array(CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN, CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER));
- $build = culturefeed_pages_manage_members_list($form['#membership']->page, $user_list);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
- $commands = array(
- ajax_command_html('#manage-members', render($build)),
- ajax_command_prepend('#manage-members', theme('status_messages')),
- );
-
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
- exit;
-
- }
-
- return $form;
-
-}
-
-
-/**
- * Implements hook_form_{culturefeed_social_base_comment_form}_alter().
- */
-function culturefeed_pages_form_culturefeed_social_base_comment_form_alter(&$form, &$form_state) {
-
- if (!culturefeed_is_culturefeed_user()) {
- return;
- }
-
- try {
-
- $cultureFeedUser = DrupalCultureFeed::getLoggedInUser();
-
- if (!empty($cultureFeedUser->pageMemberships)) {
- $options = array();
- foreach ($cultureFeedUser->pageMemberships as $membership) {
- $options[$membership->page->getId()] = $membership->page->getName();
- }
-
- $form['on_behalf_of'] = array(
- '#type' => 'select',
- '#title' => $form_state['config']->onBehalfOfMessage,
- '#default_value' => culturefeed_pages_get_active_page_id(),
- '#options' => $options,
- '#attributes' => array('class' => array('on-behalf-of')),
- '#weight' => 0,
- );
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-}
-
-/**
- * Show a filter form for the page suggestions block.
- */
-function culturefeed_pages_page_suggestions_filter_form() {
-
- $postal = '';
- if (!empty($_COOKIE['culturefeed_pages_suggestions_postal'])) {
- $postal = $_COOKIE['culturefeed_pages_suggestions_postal'];
- }
- elseif (culturefeed_is_culturefeed_user()) {
-
- try {
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- $postal = $cf_user->zip;
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
- }
-
- $form = array();
-
- $form['city'] = array(
- '#type' => 'textfield',
- '#title' => t('Find pages nearby'),
- '#autocomplete_path' => 'autocomplete/culturefeed/city-suggestion',
- '#attributes' => array(
- 'placeholder' => t('Zipcode or city'),
- // This class is used to enable the autosubmit.
- 'class' => array('auto-submit'),
- ),
- '#default_value' => $postal,
- );
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Save location'),
- '#ajax' => array(
- 'callback' => 'culturefeed_pages_page_suggestions_ajax_filter_submit',
- ),
- );
-
- return $form;
-}
-
-/**
- * Show a filter form for the timeline.
- */
-function culturefeed_pages_timeline_filter_form($form, $form_state, $default_filter, $page_id) {
-
- $types = culturefeed_social_get_activity_filter_options(TRUE);
-
- $options = array(
- 'all' => t('All'),
- );
-
- foreach ($types as $key => $type) {
- if ($key == CultureFeed_Activity::TYPE_IK_GA) {
- $options[$key] = $type->subject;
- } else {
- $options[$key] = $type->label;
- }
- }
-
- // Options we don't need here
- unset($options[CultureFeed_Activity::TYPE_PAGE_CREATED]);
-
- $form['filter'] = array(
- '#type' => 'select',
- '#options' => $options,
- '#title' => t('Filter timeline on'),
- '#default_value' => $default_filter,
- '#ajax' => array(
- 'callback' => 'culturefeed_pages_ajax_timeline_filter',
- ),
- );
-
- $form['page_id'] = array(
- '#type' => 'hidden',
- '#value' => $page_id,
- );
-
- return $form;
-}
-
-/**
- * Submit the ajax filter form for suggestions. Return the new list.
- */
-function culturefeed_pages_page_suggestions_ajax_filter_submit($form, $form_state) {
-
- // Also set $_COOKIE for later use in code.
- setcookie('culturefeed_pages_suggestions_city', $form_state['values']['city'], $_SERVER['REQUEST_TIME'] + 60 * 60 * 24 * 30, '/');
- $_COOKIE['culturefeed_pages_suggestions_city'] = $form_state['values']['city'];
-
- $build = array();
- $build[] = array(
- '#markup' => culturefeed_pages_get_page_suggestions_list(),
- );
-
- $commands = array(ajax_command_html('#page-suggestions', render($build)));
-
- return array(
- '#type' => 'ajax',
- '#commands' => $commands,
- );
-}
-
-/**
- * Ajax callback, filter the timeline filter.
- */
-function culturefeed_pages_ajax_timeline_filter($form, $form_state) {
-
- try {
- $type = $form_state['values']['filter'] == 'all' ? NULL : array($form_state['values']['filter']);
- $time_line = DrupalCultureFeed::getConsumerInstance()->pages()->getTimeline($form_state['values']['page_id'], NULL, $type);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return;
- }
-
- if ($time_line->total == 0) {
- $activities = t('No activities found');
- }
- else {
- $activities = theme('culturefeed_social_user_activity_wall', array('activities' => $time_line));
- }
-
- $commands = array();
- $commands[] = ajax_command_html('#timeline', $activities);
-
- return array('#type' => 'ajax', '#commands' => $commands);
-}
-
-/**
- * Load callback for a news item of a page.
- */
-function culturefeed_news_item_load($news_item_id) {
- $news_item = DrupalCultureFeed::loadActivity($news_item_id);
- return empty($news_item) ? FALSE : $news_item;
-}
\ No newline at end of file
diff --git a/culturefeed_pages/includes/admin.inc b/culturefeed_pages/includes/admin.inc
deleted file mode 100644
index 370e7c81..00000000
--- a/culturefeed_pages/includes/admin.inc
+++ /dev/null
@@ -1,42 +0,0 @@
- 'checkboxes',
- '#title' => t('Enabled actor types'),
- '#description' => t('All actor types available for this site. If no type selected all will be activated.'),
- '#options' => $actortypes,
- '#default_value' => $defaults,
- );
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Save configuration')
- );
-
- return $form;
-}
-
-/**
- * Save the general settings form.
- */
-function culturefeed_pages_admin_settings_submit($form, $form_state) {
- variable_set('culturefeed_pages_actor_types', array_filter($form_state['values']['culturefeed_pages_actor_types']));
-}
diff --git a/culturefeed_pages/includes/blocks.inc b/culturefeed_pages/includes/blocks.inc
deleted file mode 100644
index af41fc62..00000000
--- a/culturefeed_pages/includes/blocks.inc
+++ /dev/null
@@ -1,590 +0,0 @@
-culturefeed_uid)) {
- return;
- }
-
- try {
- $cf_account = DrupalCultureFeed::getUser($account->culturefeed_uid);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return;
- }
-
- $build = array();
- // Render colleagues from first 3 memberships.
- if (empty($cf_account->pageMemberships)) {
- return;
- }
-
- foreach ($cf_account->pageMemberships as $i => $membership) {
-
- if ($i == 3) {
- break;
- }
-
- $memberships = array();
- $memberships = culturefeed_pages_get_members_of_page($membership->page, $cf_account);
-
- $build[] = array(
- '#theme' => 'culturefeed_pages_fellow_members_block',
- '#page' => $membership->page,
- '#members' => $memberships,
- '#account' => $cf_account,
- );
-
- }
-
- $block = array();
- if ($account->uid != $GLOBALS['user']->uid) {
- $block['subject'] = t('Colleague\'s of @username', array('@username' => $account->name));
- }
- else {
- $block['subject'] = t('My colleague\'s');
- }
- $block['content'] = $build;
-
- return $block;
-
-}
-
-/**
- * Show the pages that a given user follows in a block.
- */
-function culturefeed_pages_block_pages_user_follows($account) {
-
- if (empty($account->culturefeed_uid)) {
- return;
- }
-
- try {
- $cf_account = DrupalCultureFeed::getUser($account->culturefeed_uid);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return;
- }
-
- if (empty($cf_account->following)) {
- return;
- }
-
- $block = array();
- if ($GLOBALS['user']->uid == $account->uid) {
- $block['subject'] = t('Pages I follow');
- }
- else {
- $block['subject'] = t('@username follows', array('@username' => $account->name));
- }
-
- $block['content'] = array(
- '#theme' => 'culturefeed_pages_following_pages_block',
- '#following' => $cf_account->following,
- );
-
- return $block;
-
-}
-
-/**
- * Show the administrative options for the current page.
- */
-function culturefeed_pages_block_pages_admin_options() {
-
- $page = culturefeed_pages_get_viewed_page();
-
- if (!$page || !culturefeed_is_culturefeed_user()) {
- return;
- }
-
- $is_page_admin = culturefeed_pages_is_user_admin_of_page($page->getId());
-
- if (!$is_page_admin) {
- return;
- }
-
- try {
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return;
- }
-
- $notifications = NULL;
- $admin_menu = '';
- $loggedin_as_page_admin = $page->getId() === culturefeed_pages_get_active_page_id();
-
- // If the users active page is the current page, show the admin menu.
- if ($loggedin_as_page_admin) {
-
- $admin_menu = _culturefeed_pages_block_pages_admin_menu($page);
-
- if (module_exists('culturefeed_social')) {
-
- $params = array(
- 'max' => CULTUREFEED_SOCIAL_BLOCK_NOTIFICATIONS_COUNT,
- 'dateFrom' => date('Y-m-d', strtotime('-1 year')),
- );
-
- try {
- $notifications = DrupalCultureFeed::getLoggedInUserInstance()->pages()->getNotifications($page->getId(), $params);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
- }
-
-
- }
-
- $block = array();
- $block['subject'] = t('Manage pages');
- $block['content'] = array(
- '#theme' => 'culturefeed_pages_block_admin_options',
- '#admin_menu' => $admin_menu,
- '#account' => $cf_user,
- '#page' => $page,
- '#logged_in_as_page_admin' => $loggedin_as_page_admin,
- '#page_notifications' => $notifications,
- );
-
- return $block;
-
-}
-
-/**
- * Show the administration menu for the current page.
- */
-function culturefeed_pages_block_pages_admin_menu() {
-
- $page = menu_get_object('culturefeed_pages_page', 1);
-
- if (!$page) {
- return;
- }
-
- if (!culturefeed_pages_edit_page_access($page)) {
- return;
- }
-
- $block = array();
- $block['subject'] = t('Manage pages');
- $block['content'] = _culturefeed_pages_block_pages_admin_menu($page);
-
- return $block;
-
-}
-
-/**
- * Helper function to output the admin menu for a page.
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function _culturefeed_pages_block_pages_admin_menu(CultureFeed_Cdb_Item_Page $page) {
-
- $menu = module_invoke_all('culturefeed_pages_page_admin_menu', $page);
- drupal_alter('culturefeed_pages_page_admin_menu', $menu, $page);
-
- uasort($menu, 'drupal_sort_weight');
-
- $items = array();
-
- foreach ($menu as $menu_item) {
- $vars = array(
- 'title' => $menu_item['title'],
- 'url' => $menu_item['url'],
- 'description' => $menu_item['description'],
- );
-
- $data = theme('culturefeed_pages_page_menu_item', $vars);
-
- $class = $_GET['q'] == $menu_item['url'] ? array('active') : array();
-
- $items[] = array(
- 'data' => $data,
- 'class' => $class,
- );
- }
-
- $admin_menu = theme('item_list', array('items' => $items, 'attributes' => array('class' => 'dropdown-menu', 'role' => 'menu')));
-
- return $admin_menu;
-
-}
-
-/**
- * Block with a request-link to become admin member of a page.
- *
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_block_pages_request_admin_membership(CultureFeed_Cdb_Item_Page $page) {
-
- $block = array();
- $block['subject'] = '';
- $block['content'] = culturefeed_pages_block_request_admin_membership($page, FALSE);
-
- return $block;
-}
-
-/**
- * Show the timeline of a page in a block.
- */
-function culturefeed_pages_block_page_timeline($page) {
-
- if (!$page || !$page instanceof CultureFeed_Cdb_Item_Page || !module_exists('culturefeed_social')) {
- return;
- }
-
- try {
- $active_types = array_keys(culturefeed_social_get_activity_filter_options(TRUE));
- $time_line = DrupalCultureFeed::getConsumerInstance()->pages()->getTimeline($page->getId(), NULL, $active_types);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return;
- }
-
- if ($time_line->total == 0) {
- return;
- }
-
- $filter_form = drupal_get_form('culturefeed_pages_timeline_filter_form', 'all', $page->getId());
-
- $block = array();
- $block['subject'] = t('Timeline');
- $block['content'] = array(
- '#theme' => 'culturefeed_pages_block_page_timeline',
- '#time_line' => $time_line,
- '#page' => $page,
- '#filter_form' => $filter_form,
- );
-
- return $block;
-
-}
-
-/**
- * Show the agenda of a page in a block.
- */
-function culturefeed_pages_block_page_agenda($page) {
-
- if (!$page || !$page instanceof CultureFeed_Cdb_Item_Page || !module_exists('culturefeed_agenda')) {
- return;
- }
-
- // Only an organisation has an agenda.
- $categories = $page->getCategories();
- if (!in_array(CULTUREFEED_ACTORTYPE_ORGANISATION, $categories)) {
- return;
- }
-
- $is_admin = culturefeed_pages_get_active_page_id() == $page->getId();
- $max_results = variable_get('pages_block_agenda_total_items', 20);
-
- // 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));
- }
-
- $block = array();
- $block['subject'] = t('Activities');
-
- $block['content'] = array(
- '#theme' => 'culturefeed_pages_page_agenda',
- '#items' => $items,
- '#is_admin' => $is_admin,
- '#page' => $page,
- '#class' => 'page-activities',
- );
-
- if ($result->getTotalCount() > $max_results) {
- $block['content']['#read_more_path'] = 'agenda/search';
- }
-
- return $block;
-
-}
-
-/**
- * Returns a block with followers of a certain type of content.
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_block_followers($page) {
-
- if (empty($page) || !($page instanceof CultureFeed_Cdb_Item_Page)) {
- return;
- }
-
- $user_list = NULL;
- try {
- $cf_pages = DrupalCultureFeed::getConsumerInstance()->pages();
- $user_list = $cf_pages->getUserList($page->getId(), array(CultureFeed_Pages_Follower::ROLE), FALSE);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return;
- }
-
- $build = array();
-
- $followers = array();
-
- $build['items_list'] = array(
- '#theme' => 'culturefeed_pages_followers_block',
- '#page' => $page,
- '#followers' => $user_list->followers,
- '#num_followers' => count($user_list->followers),
- );
-
- $block['subject'] = t('Page followers');
- $block['content'] = $build;
-
- return $block;
-}
-
-/**
- * Returns a block with members of a certain type of content.
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_block_members($page) {
-
- if (empty($page) || !($page instanceof CultureFeed_Cdb_Item_Page)) {
- return;
- }
-
- $member_list = NULL;
- try {
- $cf_pages = DrupalCultureFeed::getConsumerInstance()->pages();
- $member_list = $cf_pages->getUserList($page->getId(), array(CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER, CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN), FALSE);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return;
- }
-
- $build = array();
-
- $build['items_list'] = array(
- '#theme' => 'culturefeed_pages_members_block',
- '#page' => $page,
- '#members' => $member_list->memberships,
- '#num_members' => count($member_list->memberships),
- );
-
- $block['subject'] = t('Members');
- $block['content'] = $build;
-
- return $block;
-}
-
-/**
- * Block callback to show the related activities of a page.
- */
-function culturefeed_pages_block_related_activities($page) {
-
- if (!$page) {
- return;
- }
-
- $parameters = array();
- $parameters[] = new \CultuurNet\Search\Parameter\Query('*:*');
- $parameters[] = new \CultuurNet\Search\Parameter\Rows(variable_get('page_related_actitivities_total_items', 5));
- $parameters[] = new \CultuurNet\Search\Parameter\FilterQuery('type:event');
- $parameters[] = new \CultuurNet\Search\Parameter\Group();
-
- // Add the context filter.
- $context = variable_get('page_related_actitivities_context');
- if ($context) {
-
- $categories = $item->getEntity()->getCategories()->getCategoriesByType($context);
- if ($categories) {
- $context_filter = array();
- foreach ($categories as $category) {
- $context_filter[] = $category->getId();
- }
- $parameters[] = new \CultuurNet\Search\Parameter\FilterQuery('category_id' . ':(' . implode(' OR ', $context_filter) . ')');
- }
-
- }
-
- // Add the sort.
- if ($sort_field = variable_get('agenda_related_activities_sort', '')) {
- $parameters[] = new \CultuurNet\Search\Parameter\Sort($sort_field, variable_get('agenda_related_activities_sort_direction', \CultuurNet\Search\Parameter\Sort::DIRECTION_ASC));
- }
-
- // Add extra query.
- if ($filter_query = variable_get('agenda_related_activities_extra_query', '')) {
- $parameters[] = new \CultuurNet\Search\Parameter\FilterQuery($filter_query);
- }
-
- // Add spatial search.
- if ($item->getType() == 'event' && variable_get('agenda_related_activities_range', 0)) {
-
- $address = $item->getEntity()->getLocation()->getAddress();
- if ($address) {
- $coordinates = $address->getPhysicalAddress()->getGeoInformation();
- if ($coordinates) {
- $distance = new \CultuurNet\Search\Parameter\Spatial\Distance(variable_get('agenda_related_activities_range', 0));
- $point = new \CultuurNet\Search\Parameter\Spatial\Point($coordinates->getYCoordinate(), $coordinates->getXCoordinate());
- $field = new \CultuurNet\Search\Parameter\Spatial\SpatialField('physical_gis');
- $parameters[] = new \CultuurNet\Search\Parameter\Spatial\GeoFilterQuery($point, $distance, $field);
- }
- }
-
- }
-
- // Execute search.
- try {
-
- $result = culturefeed_get_search_service()->search($parameters);
-
- if ($result->getTotalCount() == 0) {
- return;
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_agenda', $e);
- }
-
- global $language;
- $search_results = $result->getItems();
- // Render the results.
- $items = array();
- foreach ($search_results as $search_result) {
-
- // Don't add current activity to the list.
- if ($search_result->getEntity()->getCdbId() == $item->getEntity()->getCdbid()) {
- continue;
- }
-
- $items[] = theme('culturefeed_' . $search_result->getType() . '_short_summary', array('item' => $search_result));
- }
-
- $block = array();
- $block['subject'] = t('Related activities');
- $block['content'] = array(
- '#theme' => 'item_list',
- '#items' => $items,
- '#class' => 'related-activities'
- );
-
- return $block;
-
-}
-
-/**
- * Show block with a list of pages nearby given page.
- */
-function culturefeed_pages_block_nearby_pages($page) {
-
- if (empty($page)) {
- return;
- }
-
- $actortypes = variable_get('culturefeed_pages_actor_types', array());
-
- $parameters = array();
- $parameters[] = new \CultuurNet\Search\Parameter\Query('*:*');
- $parameters[] = new \CultuurNet\Search\Parameter\Rows(CULTUREFEED_PAGE_NEARBY_PAGES_COUNT);
- $parameters[] = new \CultuurNet\Search\Parameter\FilterQuery('!cdbid' . ':' . $page->getId());
- $parameters[] = new \CultuurNet\Search\Parameter\FilterQuery('category_id' . ':(' . implode(' OR ', $actortypes) . ')');
-
- // If no address information, don't show nearby activities.
- $address = $page->getAddress();
- if (!$address) {
- return;
- }
-
- // Add proximity search.
- $coordinates = $address->getGeoInformation();
- $zip = $address->getZip();
- if ($coordinates) {
- $distance = new \CultuurNet\Search\Parameter\Spatial\Distance(CULTUREFEED_PAGE_NEARBY_PAGES_RANGE);
- $point = new \CultuurNet\Search\Parameter\Spatial\Point($coordinates->getYCoordinate(), $coordinates->getXCoordinate());
- $field = new \CultuurNet\Search\Parameter\Spatial\SpatialField('physical_gis');
- $parameters[] = new \CultuurNet\Search\Parameter\Spatial\GeoFilterQuery($point, $distance, $field);
-
- $more_query['coordinates'] = $coordinates->getYCoordinate() . ',' . $coordinates->getXCoordinate();
- }
-
- // Use zip as fallback for missing coordinates
- elseif ($zip) {
- $parameters[] = new \CultuurNet\Search\Parameter\FilterQuery('zipcode' . ':' . $zip);
- $more_query['location'] = $zip;
- }
-
- // Execute search.
- $show_more_link = FALSE;
- try {
-
- $searchService = culturefeed_get_search_service();
- $result = $searchService->searchPages($parameters);
-
- if ($result->getTotalCount() == 0) {
- return;
- }
-
- $show_more_link = $result->getTotalCount() > CULTUREFEED_PAGE_NEARBY_PAGES_COUNT;
-
- }
- catch (Exception $e) {
- watchdog_exception('cultuurkuur', $e);
- return;
- }
- $more_query['facet'] = array();
- //$more_query['facet']['category_actortype_id'][0] = $context_id;
-
- $block = array();
- $block['subject'] = t('Nearby Pages');
- $block['content'] = array(
- '#class' => 'nearby-pages',
- '#theme' => 'culturefeed_pages_nearby_pages',
- '#results' => $result->getItems(),
- '#show_more' => $show_more_link,
- '#more_text' => t('More nearby pages'),
- '#more_url' => url('agenda/pages', array('query' => $more_query)),
- );
-
- return $block;
-
-}
-
-/**
- * Show a block with suggestions of pages for current user.
- */
-function culturefeed_pages_block_page_suggestions() {
-
- // Start with an empty list. On page load, the suggestions will be loaded through ajax.
- return array(
- 'subject' => t('Discover these pages'),
- 'content' => array(
- '#theme' => 'culturefeed_pages_block_page_suggestions',
- '#filter_form' => drupal_get_form('culturefeed_pages_page_suggestions_filter_form'),
- '#attached' => array(
- 'js' => array(
- drupal_get_path('module', 'culturefeed_pages') . '/js/page_suggestions.js',
- )
- ),
- ),
- );
-}
diff --git a/culturefeed_pages/includes/helpers.inc b/culturefeed_pages/includes/helpers.inc
deleted file mode 100644
index 1fde665f..00000000
--- a/culturefeed_pages/includes/helpers.inc
+++ /dev/null
@@ -1,596 +0,0 @@
- $page, 'action' => CultureFeed_Pages_Default::ACTION_FOLLOW));
- }
-
- $is_following = culturefeed_pages_is_user_following_page($page->getId());
-
- $options = array(
- 'query' => array(
- 'destination' => culturefeed_search_detail_path('page', $page->getId(), $page->getName())
- ),
- );
-
- if ($use_ajax) {
- drupal_add_library('system', 'drupal.ajax');
- $options['attributes'] = array('class' => array('use-ajax'));
- }
-
- if ($is_following) {
- return l(t('Unfollow page'), 'culturefeed/pages/defollow/nojs/' . $page->getId(), $options);
- }
- elseif ($page->getPermissions()->allowFollowers) {
- return l(t('Follow page'), 'culturefeed/pages/follow/nojs/' . $page->getId(), $options);
- }
-
-}
-
-/**
- * Get the correct member url for current user.
- * If he already is a member, it will return a become no member link, otherwise a become member.
- * @param Culturefeed_Cdb_Item_Page $page
- * Page to become member / become no member.
- * @param $use_ajax
- * Should the member link use ajax or not.
- */
-function culturefeed_pages_member_link(CultureFeed_Cdb_Item_Page $page, $use_ajax = FALSE) {
-
- if (!DrupalCultureFeed::isCultureFeedUser()) {
- return theme('culturefeed_pages_login_required_message', array('page' => $page, 'action' => CultureFeed_Pages_Default::ACTION_BECOME_MEMBER));
- }
-
- $is_member = culturefeed_pages_is_user_member_of_page($page->getId());
-
- $options = array(
- 'query' => array(
- 'destination' => culturefeed_search_detail_path('page', $page->getId(), $page->getName())
- ),
- );
-
- if ($use_ajax) {
- drupal_add_library('system', 'drupal.ajax');
- $options['attributes'] = array('class' => array('use-ajax'));
- }
-
- if ($is_member) {
- return l(t('Remove membership'), 'pages/' . $page->getId() . '/membership/delete/nojs', $options);
- }
- elseif ($page->getPermissions()->allowMembers) {
- return l(t('Become a member'), 'culturefeed/pages/join/nojs/' . $page->getId(), $options);
- }
-
-}
-
-/**
- * Is the current user member of a given page.
- * @return bool
- */
-function culturefeed_pages_is_user_member_of_page($page_id) {
-
- try {
- $cf_account = DrupalCultureFeed::getLoggedInUser();
-
- if (!empty($cf_account->pageMemberships)) {
- foreach ($cf_account->pageMemberships as $membership) {
- if ($membership->page->getId() == $page_id) {
- return TRUE;
- }
- }
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
- return FALSE;
-
-}
-
-/**
- * Is the current user admin of a given page.
- * @return bool
- */
-function culturefeed_pages_is_user_admin_of_page($page_id, $cf_account = NULL) {
-
- try {
-
- if (empty($cf_account)) {
- $cf_account = DrupalCultureFeed::getLoggedInUser();
- }
-
- if (!empty($cf_account->pageMemberships)) {
- foreach ($cf_account->pageMemberships as $membership) {
- if ($membership->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN && $membership->page->getId() == $page_id) {
- return TRUE;
- }
- }
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
- return FALSE;
-
-}
-
-/**
- * Is the given user validated admin of a given page.
- * @return bool
- */
-function culturefeed_pages_is_user_validated_admin_of_page($page_id, $cf_account = NULL) {
-
- try {
-
- if (empty($cf_account)) {
- $cf_account = DrupalCultureFeed::getLoggedInUser();
- }
-
- if (!empty($cf_account->pageMemberships)) {
- foreach ($cf_account->pageMemberships as $membership) {
- if ($membership->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN && $membership->page->getId() == $page_id && $membership->validated) {
- return TRUE;
- }
- }
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
- return FALSE;
-
-}
-
-/**
- * Is the current user following a given page id.
- * @param string $page_id
- */
-function culturefeed_pages_is_user_following_page($page_id) {
-
- try {
-
- $cf_account = DrupalCultureFeed::getLoggedInUser();
-
- if (!empty($cf_account->following)) {
- foreach ($cf_account->following as $follower) {
- if ($follower->page->getId() == $page_id) {
- return TRUE;
- }
- }
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return FALSE;
- }
-
- return FALSE;
-
-}
-
-/**
- * Check if current page is a validated page.
- *
- * @param CultureFeed_Cdb_Item_Page $page
- * Page to check
- * @return bool
- */
-function culturefeed_pages_page_is_validated_page(CultureFeed_Cdb_Item_Page $page) {
- $validated_admins = culturefeed_pages_get_validated_admins_of_page($page);
- return count($validated_admins) > 0;
-}
-
-/**
- * Get the page that currently is beïng viewed. This can be via a news item, or via the page itself.
- */
-function culturefeed_pages_get_viewed_page() {
-
- if (arg(0) == 'news') {
- $activity = menu_get_object('culturefeed_social_news_item', 2);
- if ($activity && $activity->contentType == CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE) {
- return culturefeed_pages_page_load($activity->nodeId);
- }
- }
- else {
- return menu_get_object('culturefeed_pages_page', 3);
- }
-
-}
-
-/**
- * Sets all the pages where the loggedIn user is ADMIN.
- */
-function culturefeed_pages_set_pages($pages) {
- $_SESSION['culturefeed']['pages'] = $pages;
-}
-
-/**
- * Checks if the loggedIn user has an active page (yet).
- *
- * @return Boolean hasActivePage.
- */
-function culturefeed_pages_has_active_page() {
- return isset($_SESSION['culturefeed']['page']);
-}
-
-/**
- * Get the current page of the loggedIn user.
- *
- * @return CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_get_active_page() {
- return isset($_SESSION['culturefeed']['page']) ? $_SESSION['culturefeed']['page'] : NULL;
-}
-
-/**
- * Get the current page ID of the loggedIn user.
- *
- * @return String $id
- */
-function culturefeed_pages_get_active_page_id() {
- return isset($_SESSION['culturefeed']['page']) ? $_SESSION['culturefeed']['page']->getId() : '';
-}
-
-/**
- * Sets the current page of the loggedIn user.
- */
-function culturefeed_pages_set_active_page(CultureFeed_Cdb_Item_Page $page) {
-
- $_SESSION['culturefeed']['page'] = $page;
-
- $account = DrupalCultureFeed::getLoggedInAccount();
- $data = isset($account->data) ? $account->data : array();
- $data['culturefeed_pages_id'] = $page->getId();
- $account->data = $data;
-
- user_save($account);
-
-}
-
-/**
- * Remove the current page of the loggedIn user.
- */
-function culturefeed_pages_remove_active_page() {
-
- unset($_SESSION['culturefeed']['page']);;
-
- $account = DrupalCultureFeed::getLoggedInAccount();
- $data = isset($account->data) ? $account->data : array();
- unset($data['culturefeed_pages_id']);
- $account->data = $data;
-
- user_save($account);
-
-}
-
-/**
- * Set the breadcrumb to the given page.
- * @param CultureFeed_Cdb_Item_Page $page
- * Page to set the breadcrumb to.
- */
-function culturefeed_pages_set_page_breadcrumb(CultureFeed_Cdb_Item_Page $page, $title = NULL) {
-
- // Set the breadcrumb.
- $active_trail = array();
-
- $active_trail[] = array(
- 'title' => t('Home'),
- 'href' => '',
- 'link_path' => '',
- 'localized_options' => array(),
- 'type' => 0,
- );
-
- $categories = $page->getCategories();
- $actor_types = culturefeed_search_get_actortype_categories(array('tid' => $categories));
- $facet = array();
- if ($actor_types) {
-
- $facet['category_actortype_id'] = array(key($actor_types));
-
- $active_trail[] = array(
- 'title' => current($actor_types),
- 'href' => 'agenda/pages',
- 'link_path' => '',
- 'localized_options' => array(
- 'query' => array(
- 'facet' => $facet,
- ),
- ),
- 'type' => 0,
- );
-
- }
-
- $address = $page->getAddress();
- if ($address) {
- $city = $address->getCity();
- $postal = $address->getZip();
- if ($city && $postal) {
- $active_trail[] = array(
- 'title' => $postal . ' ' . $city,
- 'href' => 'agenda/pages',
- 'link_path' => '',
- 'localized_options' => array(
- 'query' => array(
- 'facet' => $facet,
- 'location' => $postal . ' ' . $city,
- ),
- ),
- 'type' => 0,
- );
- }
- }
-
- $page_path = culturefeed_search_detail_path('page', $page->getId(), $page->getName());
-
- // When we are currently not on the page detail, also add breadcrumb to the page.
- if ($page_path != $_GET['q']) {
- $active_trail[] = array(
- 'title' => $page->getName(),
- 'href' => $page_path,
- 'link_path' => '',
- 'localized_options' => array(),
- 'type' => 0,
- );
- }
-
- $active_trail[] = array(
- 'title' => empty($title) ? $page->getName() : $title,
- 'href' => $_GET['q'],
- 'link_path' => '',
- 'localized_options' => array(),
- 'type' => 0,
- );
-
- menu_set_active_trail($active_trail);
-
-}
-
-/**
- * Search activities that are connected to the given page.
- * @return mixed \CultuurNet\Search\SearchResult or NULL on exception
- */
-function culturefeed_pages_get_activities_from_page(CultureFeed_Cdb_Item_Page $page, $max_results, $page_nr = 0) {
-
- $parameters[] = new \CultuurNet\Search\Parameter\Rows($max_results);
- $parameters[] = new \CultuurNet\Search\Parameter\Group();
- $parameters[] = new \CultuurNet\Search\Parameter\FilterQuery('type:event');
- if ($externalId = $page->getExternalId()) {
- $parameters[] = new \CultuurNet\Search\Parameter\Query('organiser_cdbid:"' . $externalId . '"');
- }
- else {
- $parameters[] = new \CultuurNet\Search\Parameter\Query('"' . $page->getId() . '"');
- }
-
- $parameters[] = new \CultuurNet\Search\Parameter\Start($page_nr);
- $parameters[] = new \CultuurNet\Search\Parameter\Sort('availableto', 'asc');
-
- try {
- return culturefeed_get_search_service()->search($parameters);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return NULL;
- }
-
-}
-
-/**
- * Helper function to create a piece of content to request adminship of a page.
- *
- * @param CultureFeed_Cdb_Item_Page $page
- * @param integer $rendered
- * Indicates whether the output needs to be rendered or not.
- */
-function culturefeed_pages_block_request_admin_membership(CultureFeed_Cdb_Item_Page $page, $rendered = TRUE) {
-
- // Only for pages if the current user is already member of the page AND
- // if the page does not have a default admin yet.
- $account = DrupalCultureFeed::getLoggedInAccount();
- if (!$account) {
- return;
- }
-
-
- $is_admin = culturefeed_pages_is_user_admin_of_page($page->getId());
- if ($is_admin) {
- $is_member = TRUE;
- }
- else {
- $is_member = culturefeed_pages_is_user_member_of_page($page->getId());
- }
-
- // Skip if the user is not even member.
- if (!$is_member) {
- return;
- }
-
- // Skip if the user is already admin.
- if ($is_admin) {
- return;
- }
-
- $build = array(
- '#theme' => 'culturefeed_pages_request_admin_membership_block',
- '#page' => $page,
- );
-
- if ($rendered) {
- return drupal_render($build);
- }
- else {
- return $build;
- }
-}
-
-/**
- * Get all the members of a given page. If a user is given, exclude him from the list.
- * @param CultureFeed_Cdb_Item_Page $page
- * @param mixed $exclude_user NULL or CultureFeed_User
- */
-function culturefeed_pages_get_members_of_page(CultureFeed_Cdb_Item_Page $page, $exclude_user = NULL) {
-
- $user_list = DrupalCultureFeed::getConsumerInstance()->pages()->getUserList(
- $page->getId(), array(CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN, CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER), FALSE
- );
-
- $memberships = array();
- if (!empty($user_list->memberships)) {
- foreach ($user_list->memberships as $user_list_membership) {
- // Exclude requested.
- if ($exclude_user && $user_list_membership->user->id == $exclude_user->id) {
- continue;
- }
- $memberships[] = $user_list_membership;
- }
- }
-
- return $memberships;
-}
-
-/**
- * Get all the admins of a given page.
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_get_admins_of_page(CultureFeed_Cdb_Item_Page $page) {
-
- try {
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- $admin_list = $cf_pages->getUserList($page->getId(), array(CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN), FALSE);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return array();
- }
-
- foreach ($admin_list->memberships as $admin) {
- $admins_of_page[$admin->user->id] = $admin->user->id;
- }
-
- return $admins_of_page;
-}
-
-/**
- * Get all the validated admins of a given page.
- * @param CultureFeed_Cdb_Item_Page $page
- * @param bool $skip_cache
- * Skip the cache.
- */
-function culturefeed_pages_get_validated_admins_of_page(CultureFeed_Cdb_Item_Page $page, $skip_cache = FALSE) {
-
- try {
-
- if (!$skip_cache) {
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- }
- else {
- $cf = DrupalCultureFeed::getLoggedInUserInstance();
- if ($cf instanceof DrupalCultureFeed_Cache) {
- $cf_pages = $cf->getRealCultureFeed()->pages();
- }
- else {
- $cf_pages = $cf->pages();
- }
- }
-
-
- $admin_list = $cf_pages->getUserList($page->getId(), array(CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN), FALSE);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return array();
- }
-
- $admins_of_page = array();
- foreach ($admin_list->memberships as $admin) {
- if ($admin->validated) {
- $admins_of_page[$admin->user->id] = $admin->user->id;
- }
- }
-
- return $admins_of_page;
-}
-
-/**
- * Get the themed list of page suggestions.
- */
-function culturefeed_pages_get_page_suggestions_list() {
-
- $city = '';
- if (!empty($_COOKIE['culturefeed_pages_suggestions_city'])) {
- $city = $_COOKIE['culturefeed_pages_suggestions_city'];
- }
- elseif (culturefeed_is_culturefeed_user()) {
-
- try {
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- $city = $cf_user->zip;
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
- }
-
- $parameters = array();
-
- // Add custom query.
- $query = variable_get('pages_block_page_suggestions_query', '');
- if (!empty($query)) {
- $parameters[] = new CultuurNet\Search\Parameter\Query($query);
- }
- else {
- $parameters[] = new CultuurNet\Search\Parameter\Query('*:*');
- }
-
- // Search on postal / city.
- if (!empty($city)) {
-
- $city_parts = explode(' ', $city);
- if (is_numeric($city_parts[0])) {
- $parameters[] = new CultuurNet\Search\Parameter\Spatial\Zipcode($city_parts[0], variable_get('pages_block_page_suggestions_distance', 5));
- }
- else {
- $parameters[] = new CultuurNet\Search\Parameter\FilterQuery('city:' . $city);
- }
-
- // Sort on proximity.
- $parameters[] = new CultuurNet\Search\Parameter\Sort('geodist()', CultuurNet\Search\Parameter\Sort::DIRECTION_ASC);
-
- }
- else {
- // Sort on total followers.
- $parameters[] = new CultuurNet\Search\Parameter\Sort('pagefollow_count', CultuurNet\Search\Parameter\Sort::DIRECTION_DESC);
- }
-
- // Add max items.
- $parameters[] = new CultuurNet\Search\Parameter\Rows(variable_get('pages_block_page_suggestions_total', 10));
-
- try {
- $search = culturefeed_get_search_service();
- $result = $search->searchPages($parameters);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return;
- }
-
- return theme('culturefeed_pages_page_suggestion_list', array('suggestions' => $result->getItems()));
-}
diff --git a/culturefeed_pages/includes/members.inc b/culturefeed_pages/includes/members.inc
deleted file mode 100644
index 332a4677..00000000
--- a/culturefeed_pages/includes/members.inc
+++ /dev/null
@@ -1,709 +0,0 @@
-pages();
- $user_list = $cf_pages->getUserList($page->getId(), array(CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN, CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER));
-
- $list = culturefeed_pages_manage_members_list($page, $user_list, $cf_user);
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
- if ($request_type == 'ajax') {
-
- $build = array('page' => $list);
- $commands = array(
- ajax_command_html('#manage-members', render($build)),
- );
-
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
- return;
-
- }
-
- // Non-ajax pages should have more data.
- $build['view_page'] = array(
- '#markup' => '' . culturefeed_search_detail_l('page', $page->getId(), $page->getName(), t('View page')) . '
'
- );
- $build['page'] = $list;
- $build['search_form'] = drupal_get_form('culturefeed_pages_search_user_form');
-
- if (isset($_GET['search'])) {
- if (strlen($_GET['search']) >= 3) {
- $build['search_result'] = culturefeed_pages_user_search_result($_GET['search'], $page, $user_list);
- }
- else {
- drupal_set_message(t('Please enter at least 3 characters'), 'error');
- }
- }
-
- culturefeed_pages_set_page_breadcrumb($page);
-
- return $build;
-
-}
-
-/**
- * Show the list of members from a page.
- */
-function culturefeed_pages_manage_members_list(CultureFeed_Cdb_Item_Page $page, CultureFeed_Pages_UserList $user_list, $cf_user = NULL) {
-
- // Get all the uid's in 1 time. Otherwise the theming layer will search it 1 by 1.
- culturefeed_get_uids_for_memberships($user_list->memberships);
-
- $header = array(
- t('Name'),
- t('Function'),
- t('Role'),
- t('Member since'),
- '',
- '',
- );
-
- // Count how many admins.
- $admins = array();
- foreach ($user_list->memberships as $member) {
- if ($member->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN) {
- $admins[] = $member;
- }
- }
- $total_admins = count($admins);
-
- $rows = array();
- // Create row for every member.
- foreach ($user_list->memberships as $member) {
-
- $row = array();
-
- $name = '';
- $depiction = !empty($member->user->depiction) ? $member->user->depiction : 'http://media.uitid.be/fis/rest/download/ce126667652776f0e9e55160f12f5478/uiv/default.png';
- $name = '' . theme('image', array('path' => $depiction . '?width=30&height=30&crop=auto')) . ' ';
- $drupal_uid = culturefeed_get_uid_for_cf_uid($member->user->id, $member->user->nick);
- $name .= l($member->user->nick, 'user/' . $drupal_uid);
-
- $row['name'] = $name;
-
- // Show the user data.
- if (empty($cf_user) || $cf_user->id != $member->user->id) {
-
- $row['function'] = $member->relation;
- switch ($member->role) {
- case CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN:
- $role = t('administrator');
- break;
- case CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER:
- default:
- $role = t('member');
- break;
- }
- $row['role'] = $role;
- $row['member_since'] = date('d/m/Y H:i', $member->creationDate);
- $row['edit'] = l(t('Edit'), 'pages/' . $page->getId() . '/membership/' . $member->user->id . '/edit/nojs', array('attributes' => array('class' => 'use-ajax')));
-
- if ($total_admins == 1 && $member->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN) {
- $row['delete'] = theme('culturefeed_pages_membership_delete_not_possible', array('page' => $page));
- }
- else {
- $delete_options = array(
- 'attributes' => array(
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#page_confirm',
- 'data-remote' => url('pages/' . $page->getId() . '/membership/' . $member->user->id . '/delete/ajax'),
- ),
- );
- $row['delete'] = l(t('Remove as member'), 'pages/' . $page->getId() . '/membership/' . $member->user->id . '/delete/nojs', $delete_options);
- }
- }
- // Show the edit form.
- else {
-
- $form = drupal_get_form('culturefeed_pages_edit_membership_form', $page, $cf_user, $user_list);
- $row['function'] = array(
- 'data' => render($form),
- 'colspan' => 2,
- );
- $row['member_since'] = date('d/m/Y H:i', $member->creationDate);
- $row['cancel'] = array(
- 'data' => l(t('Cancel changes'), 'pages/' . $page->getId() . '/members/nojs', array('attributes' => array('class' => 'use-ajax'))),
- 'colspan' => 2,
- );
-
- }
-
- $rows[] = array('data' => $row, 'id' => 'member-' . $member->user->id);
-
- }
-
- return array(
- '#theme' => 'table',
- '#header' => $header,
- '#rows' => $rows,
- '#empty' => t('No content available.'),
- '#attached' => array('library' => array(array('system', 'drupal.ajax'))),
- '#prefix' => '',
- '#suffix' => '
',
- );
-
-}
-
-/**
- * Show the edit form for a membership.
- */
-function culturefeed_pages_edit_membership_form($form, &$form_state, CultureFeed_Cdb_Item_Page $page, CultureFeed_User $cf_user, CultureFeed_Pages_UserList $user_list) {
-
- $membership = NULL;
- $total_admins = 0;
-
- foreach ($user_list->memberships as $member) {
-
- if ($member->user->id == $cf_user->id) {
- // If the form was submit, and request was succesfull. The new admin state will be set in the form_state.
- if (!empty($form_state['new_role'])) {
- $member->role = $form_state['new_role'];
- }
- $membership = $member;
- }
-
- if ($member->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN) {
- $total_admins++;
- }
-
- }
-
- if (empty($membership)) {
- return;
- }
-
- $membership->page = $page;
- $form = array();
-
- $form['function'] = array(
- '#type' => 'textfield',
- '#default_value' => $membership->relation,
- );
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Save'),
- '#ajax' => array(
- 'callback' => 'culturefeed_pages_edit_membership_ajax_form_submit',
- 'wrapper' => 'membership-ajax-wrapper',
- ),
- );
-
- // Only show toggle when user is not an admin, or he is not the only admin.
- if ($membership->role != CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN || $total_admins != 1) {
- $form['role'] = array(
- '#type' => 'button',
- '#name' => 'toggle_role',
- '#value' => $membership->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN ? t('Remove administrator') : t('Make administrator'),
- '#ajax' => array(
- 'callback' => 'culturefeed_pages_edit_membership_ajax_form_submit',
- 'wrapper' => 'membership-ajax-wrapper',
- ),
- );
- }
-
- $form['#membership'] = $membership;
- $form['#prefix'] = '';
- $form['#suffix'] = '
';
-
- return $form;
-
-}
-
-/**
- * Submit the edit membership form.
- */
-function culturefeed_pages_edit_membership_form_validate($form, &$form_state) {
-
- try {
-
- // Toggle admin role was clicked.
- if ($form_state['input']['_triggering_element_name'] == 'toggle_role') {
-
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- if ($form['#membership']->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN) {
-
- $cf_pages->removeAdmin($form['#membership']->page->getId(), $form['#membership']->user->id);
-
- // If he was removed as admin, he is also removed as member. Re-add him as member.
- $params = array(
- 'relation' => $form['#membership']->relation,
- 'activityPrivate' => FALSE,
- );
-
- $cf_pages->addMember($form['#membership']->page->getId(), $form['#membership']->user->id, $params);
- $form_state['new_role'] = CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER;
-
- }
- else {
- $cf_pages->addAdmin($form['#membership']->page->getId(), $form['#membership']->user->id, array('activityPrivate' => FALSE));
- $form_state['new_role'] = CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN;
- }
-
- }
- // Normal submit.
- else {
-
- $params = array('relation' => $form_state['values']['function']);
-
- $page = $form['#membership']->page;
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- if ($form['#membership']->role == CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN) {
- $cf_pages->updateAdmin($page->getId(), $form['#membership']->user->id, $params);
- }
- else {
- $cf_pages->updateMember($page->getId(), $form['#membership']->user->id, $params);
- }
-
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- form_set_error('', t('Something went wrong while saving. Please try again or contact an administrator.'));
- }
-
-}
-
-/**
- * Submit the edit membership form.
- */
-function culturefeed_pages_edit_membership_form_submit(&$form, &$form_state) {
-
- $form_state['#success'] = TRUE; // This boolean will be checked at in the ajax callback.
- drupal_set_message(t('Membership changed'));
-
-}
-
-/**
- * Form callback for the search user form.
- */
-function culturefeed_pages_search_user_form() {
-
- $form = array();
-
- $form['title'] = array(
- '#markup' => t('Add new members'),
- '#weight' => -999,
- );
-
- $form['search'] = array(
- '#title' => t('Keyword'),
- '#type' => 'textfield',
- '#default_value' => isset($_GET['search']) ? $_GET['search'] : '',
- );
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Search User'),
- );
-
- return $form;
-
-}
-
-/**
- * Submit the search users form.
- */
-function culturefeed_pages_search_user_form_submit($form, &$form_state) {
-
- $form_state['redirect'] = array(
- $_GET['q'],
- array('query' => array('search' => $form_state['values']['search'])),
- );
-
-}
-
-/**
- * Show the user search result.
- */
-function culturefeed_pages_user_search_result($search_key, CultureFeed_Cdb_Item_Page $page, CultureFeed_Pages_UserList $user_list) {
-
- $query = new CultureFeed_SearchUsersQuery();
- $query->name = $search_key;
-
- $result = DrupalCultureFeed::searchUsers($query);
-
- return array(
- '#theme' => 'culturefeed_pages_user_search_result',
- '#result' => $result,
- '#page' => $page,
- '#user_list' => $user_list
- );
-
-}
-
-/**
- * Page callback to add a new member to the page.
- */
-function culturefeed_pages_page_add_member(CultureFeed_Cdb_Item_Page $page, CultureFeed_User $user, $request_type = 'nojs') {
-
- $form = drupal_get_form('culturefeed_pages_add_member_form', $page, $user, $request_type);
-
- if ($request_type == 'ajax') {
- $output = drupal_render($form);
- print $output;
- }
- else {
- return $form;
- }
-
-}
-
-/**
- * Show the add member confirmation form.
- */
-function culturefeed_pages_add_member_form($form, &$form_state, $page, $user, $request_type) {
-
- if ($request_type == 'ajax') {
- $form['#prefix'] = '' . t('Add member') . ' ';
- }
-
- $form_state['page'] = $page;
- $form_state['user'] = $user;
- $form_state['query'] = drupal_get_query_parameters();
-
- $form['add_confirm'] = array(
- '#type' => 'markup',
- '#markup' => format_string('' . t('Sure you want to add @nick as a member?') . '
', array('@nick' => $user->nick)),
- );
-
- $form['remove'] = array(
- '#type' => 'submit',
- '#value' => t('Add'),
- '#attributes' => array('class' => array('button-add')),
- );
-
- $form['decline'] = array(
- '#type' => 'link',
- '#title' => t('Cancel'),
- '#href' => 'pages/' . $page->getId() . '/members/nojs',
- '#attributes' => array('class' => array('button-decline')),
- );
-
- return $form;
-
-}
-
-/**
- * Validate the add member form. Try to send the request to culturefeed.
- */
-function culturefeed_pages_add_member_form_submit($form, &$form_state) {
-
- $page = $form_state['page'];
-
- $form_state['redirect'] = array(
- 'pages/' . $page->getId() . '/members/nojs',
- array('query' => $form_state['query']),
- );
-
- try {
- $params = array('activityPrivate' => FALSE);
- DrupalCultureFeed::getLoggedInUserInstance()->pages()->addMember($form_state['page']->getId(), $form_state['user']->id, $params);
- $message = t('@nick is member of @page now.', array('@nick' => $form_state['user']->nick, '@page' => $page->getName()));
- drupal_set_message($message);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- drupal_set_message(t('There was an error while saving. Please try again, or contact an administrator.'), 'error');
- }
-
-}
-
-/**
- * Page callback to confirm deletion of a membership.
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_page_delete_member(CultureFeed_Cdb_Item_Page $page, $user = NULL, $request_type = 'nojs') {
-
- $my_pages = FALSE;
- if (empty($user)) {
- try {
- $user = DrupalCultureFeed::getLoggedInUser();
- $my_pages = TRUE;
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- return;
- }
- }
-
- $form = drupal_get_form('culturefeed_pages_delete_member_form', $page, $user, $request_type, $my_pages);
-
- 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 page.
- * @param CultureFeed_Cdb_Item_Page $page
- * Page to remove membership.
- * @param CultureFeed_User $user
- * User to delete membership
- * @param string $request_type
- * Output beïng requested, ajax or nojs
- * @param $my_pages
- * Is this page beïng called from the my pages screen, or the manage members screen.
- */
-function culturefeed_pages_delete_member_form($form, &$form_state, CultureFeed_Cdb_Item_Page $page, CultureFeed_User $user, $request_type, $my_pages) {
-
- if ($request_type == 'ajax') {
- $form['#prefix'] = '' . t('Remove member') . ' ';
- }
-
- $form_state['page'] = $page;
- $form_state['user'] = $user;
- $form_state['my_pages'] = $my_pages;
-
- $form['remove_confirm'] = array(
- '#type' => 'markup',
- '#markup' => '
- ' . 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?') . '
';
- }
- else {
- $form['remove_confirm']['#markup'] .= '' . t('Are you sure you want to remove this member?') . '
';
- }
-
- $form['remove'] = array(
- '#type' => 'submit',
- '#value' => t('Remove'),
- '#attributes' => array('class' => array('button-remove')),
- );
-
- $form['decline'] = array(
- '#type' => 'link',
- '#title' => t('Cancel'),
- '#href' => 'pages/' . $page->getId() . '/configuration',
- '#attributes' => array('class' => array('button-decline')),
- );
-
- return $form;
-
-}
-
-/**
- * Validate the delete member form. Send the request to culturefeed.
- */
-function culturefeed_pages_delete_member_form_validate($form, &$form_state) {
-
- // Send request to remove the membership.
- try {
-
- // Check if the user is admin or member.
- if (culturefeed_pages_is_user_admin_of_page($form_state['page']->getId(), $form_state['user'])) {
- DrupalCultureFeed::getLoggedInUserInstance()->pages()->removeAdmin($form_state['page']->getId(), $form_state['user']->id);
- }
- else {
- DrupalCultureFeed::getLoggedInUserInstance()->pages()->removeMember($form_state['page']->getId(), $form_state['user']->id);
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- form_set_error('', t('There was an error while removing the member.'));
- }
-
-}
-
-/**
- * Submit the delete member form. Redirect to correct page.
- */
-function culturefeed_pages_delete_member_form_submit($form, &$form_state) {
-
- if ($form_state['my_pages']) {
- $form_state['redirect'] = 'culturefeed/pages';
- $message = t('You are not longer a member of @page.', array(
- '@page' => $form_state['page']->getName())
- );
- }
- else {
- $form_state['redirect'] = 'pages/' . $form_state['page']->getId() . '/members/nojs';
- $message = t('User @nick is removed as member of page @page.', array(
- '@nick' => $form_state['user']->nick,
- '@page' => $form_state['page']->getName())
- );
- }
-
- drupal_set_message($message);
-
-}
-
-/**
- * Page to request approval to become admin member of the page.
- *
- * @param CultureFeed_Cdb_Item_Page $page
- * @param CultureFeed_User $cf_user
- * @param String $type
- */
-function culturefeed_pages_page_request_admin_membership($page, $cf_user, $type = 'ajax') {
-
- $success = TRUE;
-
- try {
- $instance = DrupalCultureFeed::getLoggedInUserInstance();
- $messages = $instance->messages();
- $data = array(
- 'senderPage' => $page->getId(),
- 'recipientPage' => $page->getId(),
- 'role' => CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN,
- 'type' => 'requestadmin',
- 'subject' => t('Request to become an administrator'),
- 'body' => '{"link":"' . url('pages/' . $page->getId() . '/membership/request-approve/' . $cf_user, array('absolute' => TRUE)) . '"}',
- );
-
- $messages->sendMessage($data);
- }
- catch (Exception $e) {
- $success = FALSE;
- watchdog_exception('culturefeed_pages', $e);
- }
-
- $message = t('Your request to become an administrator of this page is sent');
-
- if ($type == 'ajax') {
- $commands = array();
-
- if ($success) {
- $commands[] = ajax_command_html('#request_adminship_link_' . $page->getId() . '_wrapper', $message);
- }
-
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
- }
- else {
- drupal_set_message($message);
- drupal_goto();
- }
-
-}
-
-/**
- * Page callback to approve admin membership.
- *
- * @param array $form
- * @param array $form_state
- * @param CultureFeed_Cdb_Item_Page $page
- * @param CultureFeed_User $cf_user
- */
-function culturefeed_pages_page_request_admin_membership_approved($form, &$form_state, $page, $cf_user) {
-
- $form_state['page'] = $page;
- $form_state['cf_user'] = $cf_user;
-
- $drupal_uid = culturefeed_get_uid_for_cf_uid($cf_user->id, $cf_user->nick);
- $page_title = $page->getName();
- $message = t('!username wants to be an administrator of !page.', array(
- '!username' => l($cf_user->nick, 'user/' . $drupal_uid),
- '!page' => l($page_title, culturefeed_search_detail_path('page', $page->getId(), $page_title)),
- ));
-
- $form['message'] = array('#type' => 'markup', '#markup' => $message);
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('OK'),
- );
-
- return $form;
-
-}
-
-/**
- * Submit callback to approve admin membership.
- *
- * @param array $form
- * @param array $form_state
- */
-function culturefeed_pages_page_request_admin_membership_approved_submit($form, $form_state) {
-
- $page = $form_state['page'];
- $cf_user = $form_state['cf_user'];
-
- $drupal_uid = culturefeed_get_uid_for_cf_uid($cf_user->id, $cf_user->nick);
-
- $page_title = $page->getName();
- $page_path = culturefeed_search_detail_path('page', $page->getId(), $page_title);
-
- $message = t('!username successfully added as administrator of page !page.', array(
- '!username' => l($cf_user->nick, 'user/' . $drupal_uid),
- '!page' => l($page_title, $page_path),
- ));
-
- $success = TRUE;
- try {
- $instance = DrupalCultureFeed::getLoggedInUserInstance();
- $cf_pages = $instance->pages();
- $cf_pages->addAdmin($page->getId(), $cf_user->id, array('activityPrivate' => FALSE));
- }
- catch (Exception $e) {
- $success = FALSE;
- watchdog_exception('culturefeed_pages', $e);
- }
-
- if ($success) {
- drupal_set_message($message);
- }
-
- drupal_goto($page_path);
-
-}
-
-/**
- * Sent a request to become validated admin.
- */
-function culturefeed_pages_page_request_validated_admin($page, $request_type) {
-
- // Send request to become a validated admin.
- $success = FALSE;
- try {
-
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- $cf_pages->addValidatedadmin($page->getId());
- $message = t('Your request to become a validated administrator of this page is sent');
- $success = TRUE;
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- $message = t('The request could not be sent.');
- }
-
- if ($request_type == 'ajax') {
- $commands = array();
-
- if ($success) {
- $commands[] = ajax_command_html('#request_validated_adminship_link_' . $page->getId() . '_wrapper', $message);
- }
-
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
- }
- else {
- drupal_set_message($message, $success ? 'status': 'error');
- drupal_goto();
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_pages/includes/pages.inc b/culturefeed_pages/includes/pages.inc
deleted file mode 100644
index d9337b0a..00000000
--- a/culturefeed_pages/includes/pages.inc
+++ /dev/null
@@ -1,1551 +0,0 @@
-searchPages($parameters);
- $items = $result->getItems();
- $total_results = $result->getTotalCount();
- }
- catch (Exception\ClientErrorResponseException $e) {
- watchdog_exception('culturefeed_pages', $e);
- return t('There was an error while loading the search results.');
- }
- catch (Exception\CurlException $e) {
- watchdog_exception('culturefeed_pages', $e);
- return t('There was an error while loading the search results.');
- }
-
- }
-
- pager_default_initialize($total_results, CULTUREFEED_PAGES_BASIC_ITEMS_PER_PAGE);
-
- $build = array();
- $build['page'] = array(
- '#theme' => 'culturefeed_pages_basic_search_page',
- '#form' => $form,
- '#results' => $items,
- '#total_results' => $total_results,
- '#search' => isset($_GET['search']) ? $_GET['search'] : NULL,
- '#zipcode' => isset($_GET['zipcode']) ? $_GET['zipcode'] : NULL,
- '#category' => isset($_GET['category']) ? $_GET['category'] : NULL,
- '#keyword' => isset($_GET['keyword']) ? $_GET['keyword'] : NULL,
- );
-
- $build['pager'] = array(
- '#theme' => 'pager',
- '#quantity' => 5
- );
-
- return $build;
-}
-
-/**
- * Form callback for the basic search form.
- */
-function culturefeed_pages_basic_search_form() {
-
- $form = array();
-
- $form['zipcode'] = array(
- '#type' => 'textfield',
- '#title' => t('Zipcode'),
- '#size' => 4,
- '#maxlength' => 4,
- '#default_value' => isset($_GET['zipcode']) ? $_GET['zipcode'] : '',
- );
-
- $form['category'] = array(
- '#type' => 'hidden',
- '#default_value' => isset($_GET['category']) ? $_GET['category'] : '',
- );
-
- $form['keyword'] = array(
- '#type' => 'hidden',
- '#default_value' => isset($_GET['keyword']) ? $_GET['keyword'] : '',
- );
-
- $form['page'] = array(
- '#type' => 'textfield',
- '#title' => t('Term'),
- '#autocomplete_path' => 'ajax/culturefeed/pages/page-suggestion',
- '#default_value' => isset($_GET['search']) ? $_GET['search'] : '',
- );
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Search'),
- );
-
- return $form;
-
-}
-
-/**
- * Submit the basic search form.
- */
-function culturefeed_pages_basic_search_form_submit($form, &$form_state) {
-
- if ($form_state['values']['page']) {
- $query['search'] = $form_state['values']['page'];
- }
- if ($form_state['values']['zipcode']) {
- $query['zipcode'] = $form_state['values']['zipcode'];
- }
- if ($form_state['values']['category']) {
- $query['category'] = $form_state['values']['category'];
- }
- if ($form_state['values']['keyword']) {
- $query['keyword'] = $form_state['values']['keyword'];
- }
- $form_state['redirect'] = array(
- $_GET['q'],
- array('query' => $query),
- );
-
-}
-
-/**
- * Page callback to show the details of a culturefeed page.
- */
-function culturefeed_pages_detail_page(CultureFeed_Cdb_Item_Page $page) {
-
- culturefeed_pages_set_page_breadcrumb($page);
-
- if (!$page->isVisible() && !culturefeed_pages_is_user_admin_of_page($page->getId())) {
- return array(
- '#theme' => 'culturefeed_page_invisible',
- '#item' => $page,
- );
- }
- else {
- return array(
- '#theme' => 'culturefeed_page',
- '#item' => $page,
- );
- }
-
-}
-
-/**
- * Page callback to join a page.
- * @param string $request_type
- * Request type. Ajax or nojs
- * @param CultureFeed_Cdb_Item_Page $page
- * Page to add membership to.
- */
-function culturefeed_pages_page_join($request_type, $page) {
-
- $message = '';
- $status_code = 'error';
-
- // Send request to join.
- try {
-
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- $cf_pages->addMember($page->getId(), DrupalCultureFeed::getLoggedInUserId(), array('activityPrivate' => FALSE));
- $message = format_string(t('You are now a member of @page. Manage your membership of this and other pages with') . ' ' . l(t('My pages'), 'culturefeed/pages'), array('@page' => $page->getName()));
- $status_code = 'status';
-
- // If it's your first membership and you don't have an active page yet,
- // also login as that page.
- $memberships = DrupalCultureFeed::getLoggedInUser()->pageMemberships;
- if (count($memberships) > 0 && !culturefeed_pages_has_active_page()) {
- culturefeed_pages_set_active_page($page);
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
-
- if ($e->getCode() == CultureFeed_Pages_Default::ACTION_NOT_ALLOWED) {
- $message = format_string(t('It is not allowed to join @page as a member. Please contact the administrator of the page to become a member.'), array('@page' => $page->getName()));
- }
- else {
- $message = format_string(t('You could not be added to @page.'), array('@page' => $page->getName()));
- }
- }
-
- // Deliver as ajax callback or normal page.
- if ($request_type != 'ajax') {
- drupal_set_message($message, $status_code);
- drupal_goto();
- }
- else {
- $commands[] = ajax_command_html('#join-' . $page->getId(), $message);
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
- }
-
-}
-
-/**
- * Page callback to follow a page.
- * @param string $request_type
- * Request type. Ajax or nojs
- * @param CultureFeed_Cdb_Item_Page $page
- * Page to follow.
- * @param Boolean $follow
- * action is follow, false to defollow.
- */
-function culturefeed_pages_page_follow($request_type, $page, $follow = TRUE) {
-
- $message = '';
-
- // Send request to follow.
- try {
-
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- if ($follow) {
- $cf_pages->follow($page->getId(), array('activityPrivate' => FALSE));
-
- $message = theme('culturefeed_pages_follow_success_message', array('page' => $page));
-
- }
- else {
- $cf_pages->defollow($page->getId(), DrupalCultureFeed::getLoggedInUserId());
- $message = theme('culturefeed_pages_unfollow_success_message', array('page' => $page));
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- $message = format_string(t('You could not be added to @page.'), array('@page' => $page->getName()));
- }
-
- // Deliver as ajax callback or normal page.
- if ($request_type != 'ajax') {
- drupal_set_message($message);
- drupal_goto(culturefeed_search_detail_path('page', $page->getId(), $page->getName()));
- }
- else {
- $commands[] = ajax_command_html('.follow-' . $page->getId(), $message);
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
- }
-}
-
-/**
- * Page callback for the page suggestions autocomplete.
- */
-function culturefeed_pages_page_suggestion_autocomplete_page($search_string, $return_ids = FALSE) {
-
- $matches = array();
- if ($search_string) {
-
- try {
-
- $actortypes = variable_get('culturefeed_pages_actor_types', array());
-
- $parameters = array();
- $parameters[] = new Parameter\FilterQuery('category_actortype_id' . ':(' . implode(' OR ', $actortypes) . ')');
-
- // Get the list of suggestions from service.
- $suggestions = culturefeed_get_search_service()->searchSuggestions($search_string, array('page'), FALSE, $parameters);
- if ($suggestions->hasSuggestions()) {
- foreach ($suggestions as $suggestion) {
- $page = culturefeed_pages_page_load($suggestion->getCdbid());
- if ($return_ids) {
- $matches[$suggestion->getCdbid()] = check_plain($suggestion->getTitle());
- } else {
- $matches[$suggestion->getTitle()] = check_plain($suggestion->getTitle());
- }
- }
-
- }
-
- }
- catch (ClientErrorResponseException $e) {
- watchdog_exception('culturefeed_search', $e);
- }
-
- }
-
- drupal_json_output($matches);
-
- // Cache if possible per request.
- drupal_page_footer();
-}
-
-/**
- * Creates form elements to add a page.
- */
-function culturefeed_pages_add_form($form, &$form_state) {
-
- $form = array();
-
- $query = drupal_get_query_parameters();
- $page_name = !empty($query['search']) ? $query['search'] : '';
-
- $form['name'] = array(
- '#type' => 'textfield',
- '#title' => t('Name'),
- '#default_value' => $page_name,
- '#weight' => -7,
- );
-
- $form['tagline'] = array(
- '#type' => 'textfield',
- '#title' => t('Baseline'),
- '#default_value' => '',
- '#weight' => -6,
- );
-
- $form['cover'] = array(
- '#type' => 'managed_file',
- '#title' => t('Cover Photo'),
- '#description' => t('Allowed extensions: jpg, jpeg, gif or png'),
- '#size' => 26,
- '#default_value' => '',
- '#weight' => -5,
- '#process' => array('file_managed_file_process', 'culturefeed_image_file_process'),
- '#upload_validators' => array(
- 'file_validate_extensions' => array('jpg jpeg png gif'),
- ),
- '#upload_location' => 'public://pages',
- );
-
- $actortypes = culturefeed_search_get_actortype_categories();
- $available_actortypes = variable_get('culturefeed_pages_actor_types', array());
- $options = empty($available_actortypes) ? $actortypes : array_intersect_key($actortypes, $available_actortypes);
-
- $form['categoryId'] = array(
- '#type' => 'select',
- '#title' => t('Type'),
- '#options' => $options,
- // Pages can have multiple actortypes but we need to fix this in addPage and updatePage first
- // '#multiple' => TRUE,
- '#default_value' => CULTUREFEED_ACTORTYPE_ORGANISATION,
- '#weight' => -4,
- );
-
- $form['description'] = array(
- '#type' => 'textarea',
- '#title' => t('Description'),
- '#description' => t('Maximum 400 characters'),
- '#default_value' => '',
- '#maxlength' => 400,
- '#weight' => -3,
- );
-
- // Form alters can use weight -2 -> 0 here.
-
- $form['street'] = array(
- '#type' => 'textfield',
- '#title' => t('Street and number'),
- '#default_value' => '',
- '#weight' => 1,
- );
-
- $form['zip'] = array(
- '#type' => 'textfield',
- '#title' => t('Zipcode'),
- '#default_value' => '',
- '#weight' => 2,
- );
-
- $form['city'] = array(
- '#type' => 'textfield',
- '#title' => t('City'),
- '#default_value' => '',
- '#weight' => 3,
- );
-
- // Form alters can use weight 5 -> 9 here.
-
- $form['contactInfoTel'] = array(
- '#type' => 'textfield',
- '#title' => t('Phone'),
- '#default_value' => '',
- '#weight' => 10,
- );
-
- $form['contactInfoEmail'] = array(
- '#type' => 'textfield',
- '#title' => t('Email address'),
- '#default_value' => '',
- '#weight' => 11,
- );
-
- $form['linkWebsite'] = array(
- '#type' => 'textfield',
- '#title' => t('Website'),
- '#default_value' => '',
- '#weight' => 12,
- );
-
- $form['otherWebsites'] = array(
- '#type' => 'fieldset',
- '#title' => t('Other websites'),
- '#default_value' => '',
- '#weight' => 13,
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
-
- $form['otherWebsites']['linkTicketing'] = array(
- '#type' => 'textfield',
- '#title' => t('Ticketing'),
- '#default_value' => '',
- );
-
- $form['otherWebsites']['linkFacebook'] = array(
- '#type' => 'textfield',
- '#title' => t('Facebook'),
- '#default_value' => '',
- );
-
- $form['otherWebsites']['linkTwitter'] = array(
- '#type' => 'textfield',
- '#title' => t('Twitter'),
- '#default_value' => '',
- );
-
- $form['otherWebsites']['linkYouTube'] = array(
- '#type' => 'textfield',
- '#title' => t('YouTube'),
- '#default_value' => '',
- );
-
- $form['otherWebsites']['linkBlog'] = array(
- '#type' => 'textfield',
- '#title' => t('Blog'),
- '#default_value' => '',
- );
-
- $form['image'] = array(
- '#type' => 'managed_file',
- '#title' => t('Picture or logo'),
- '#description' => t('Allowed extensions: jpg, jpeg, gif or png'),
- '#size' => 26,
- '#default_value' => '',
- '#weight' => 16,
- '#process' => array('file_managed_file_process', 'culturefeed_image_file_process'),
- '#upload_validators' => array(
- 'file_validate_extensions' => array('jpg jpeg png gif'),
- ),
- '#upload_location' => 'public://pages',
- );
-
- $form['visible'] = array(
- '#type' => 'hidden',
- '#value' => "true",
- );
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Save'),
- '#weight' => 20,
- );
-
- $form['#validate'] = array(
- 'culturefeed_pages_add_arguments_prepare',
- 'culturefeed_pages_add_request_send'
- );
-
- $form['#submit'] = array(
- 'culturefeed_pages_add_form_submit'
- );
-
- return $form;
-
-}
-
-/**
- * Validator to create and prepare all post parameters to create a culturefeed page.
- * @param array $form
- * @param array $form_state
- */
-function culturefeed_pages_add_arguments_prepare(& $form, & $form_state) {
-
- // Basic validation.
- if (empty($form_state['values']['name'])) {
- form_set_error('name', t('Title is required'));
- }
-
- if (strlen($form_state['values']['description']) > 400) {
- form_set_error('description', t('The maximum is 400 characters'));
- }
-
- // Add the post params to the form so other modules can add their params.
- $post = $form_state['values'];
- unset($post['form_id'], $post['form_token'], $post['form_build_id'], $post['submit'], $post['op'], $post['image']);
-
- // Make sure people don't save only http://
- $link_fields = array(
- 'linkWebsite',
- 'linkTicketing',
- 'linkFacebook',
- 'linkTwitter',
- 'linkYouTube',
- 'linkBlog',
- );
- foreach ($link_fields as $link_field) {
- if ($post[$link_field] == 'http://') {
- $post[$link_field] = '';
- }
- }
-
- $form_state['post_params'] = $post;
-
-}
-
-/**
- * Validator which sends the request to create the page.
- * @param array $form
- * @param array $form_state
- */
-function culturefeed_pages_add_request_send(& $form, & $form_state) {
-
- // If a previous validation function failed, don't send the request.
- $errors = form_get_errors();
- if ($errors) {
- return;
- }
-
- // Local storage of the universal id.
- $page_id = NULL;
-
- // Send request to add a page.
- try {
- /** @var CultureFeed_Pages $cf_pages */
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- $page_id = $cf_pages->addPage($form_state['post_params']);
-
- // Create activity for the page creation.
- $activity = new CultureFeed_Activity();
- $activity->nodeId = $page_id;
- $activity->nodeTitle = $form_state['values']['name'];
- $activity->contentType = CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE;
- $activity->type = CultureFeed_Activity::TYPE_PAGE_CREATED;
- $activity->userId = DrupalCultureFeed::getLoggedInUserId();
- DrupalCultureFeed::createActivity($activity);
-
- drupal_set_message(format_string(t('Page "@page" has been created.'), array('@page' => $form_state['values']['name'])));
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- form_set_error('', t('There was an error while creating the page.'));
- }
-
- if ($page_id) {
-
- $form_state['page_id'] = $page_id;
- $form_state['page_title'] = $form_state['values']['name'];
-
- // Upload Page image.
- if (!empty($form_state['values']['image'])) {
-
- $file = file_load($form_state['values']['image']);
- if ($file) {
- try {
- $file_upload = culturefeed_prepare_curl_upload_from_file($file);
- $cf_pages->addImage($page_id, array('image' => $file_upload));
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- drupal_set_message(t('An error occurred when uploading your image.'), 'error');
- }
- }
- }
-
- // Upload Page cover.
- if (!empty($form_state['values']['cover'])) {
-
- $file_cover = file_load($form_state['values']['cover']);
- if ($file_cover) {
- try {
- $file_upload = culturefeed_prepare_curl_upload_from_file($file_cover);
- $cf_pages->addCover($page_id, array('image' => $file_upload));
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- drupal_set_message(t('An error occurred when uploading your cover.'), 'error');
- }
- }
- }
-
- }
-
-}
-
-/**
- * Submit handler to create a culturefeed page.
- * @param array $form
- * @param array $form_state
- */
-function culturefeed_pages_add_form_submit(& $form, & $form_state) {
-
- // Redirect the user to the created page detail.
- drupal_goto('pages/switch/' . $form_state['page_id']);
-
-}
-
-/**
- * Form to edit a page.
- * @param array $form
- * @param array $form_state
- */
-function culturefeed_pages_edit_page_form($form, & $form_state, CultureFeed_Cdb_Item_Page $page) {
-
- $form = culturefeed_pages_add_form($form, $form_state);
- $form_state['page'] = $page;
-
- // Link to the detail page.
- $form['detail_link'] = array(
- '#type' => 'markup',
- '#markup' => culturefeed_search_detail_l("page", $page->getId(), $page->getName(), t('View page')),
- '#weight' => -25,
- );
-
- // Hidden page ID.
- $form['pageId'] = array(
- '#type' => 'hidden',
- '#value' => $page->getId(),
- );
-
- $form['name']['#default_value'] = $page->getName();
- $form['description']['#default_value'] = $page->getDescription();
- $form['categoryId']['#default_value'] = $page->getCategories();
-
- // Address.
- $address = $page->getAddress();
- if (!empty($address)) {
- $form['street']['#default_value'] = $address->getStreet();
- $form['zip']['#default_value'] = $address->getZip();
- $form['city']['#default_value'] = $address->getCity();
- }
-
- // Contact information.
- $form['contactInfoTel']['#default_value'] = $page->getTelephone();
- $form['contactInfoEmail']['#default_value'] = $page->getEmail();
-
- // Websites list.
- $links = $page->getLinks();
- if (!empty($links)) {
- $form['linkWebsite']['#default_value'] = isset($links['linkWebsite']) ? $links['linkWebsite'] : '';
- $form['otherWebsites']['linkTicketing']['#default_value'] = isset($links['linkTicketing']) ? $links['linkTicketing'] : '';
- $form['otherWebsites']['linkFacebook']['#default_value'] = isset($links['linkFacebook']) ? $links['linkFacebook'] : '';
- $form['otherWebsites']['linkTwitter']['#default_value'] = isset($links['linkTwitter']) ? $links['linkTwitter'] : '';
- $form['otherWebsites']['linkYouTube']['#default_value'] = isset($links['linkYouTube']) ? $links['linkYouTube'] : '';
- $form['otherWebsites']['linkBlog']['#default_value'] = isset($links['linkBlog']) ? $links['linkBlog'] : '';
- }
-
- // The image.
- $image = $page->getImage();
- $form_state['#old_image'] = 0;
- if (!empty($image)) {
-
- // Create temp file to preview the external image.
- $file = culturefeed_create_temporary_image($image, file_default_scheme() . '://pages');
- if ($file) {
- $form_state['#old_image'] = $file->fid;
- $form['image']['#default_value'] = $file->fid;
- }
-
- $form['image']['#title'] = t('Select another Image or Logo');
-
- }
-
- // The cover.
- $cover = $page->getCover();
- $form_state['#old_cover'] = 0;
- if (!empty($cover)) {
-
- // Creat temp file to preview the external cover.
- $file_cover = culturefeed_create_temporary_image($cover, file_default_scheme() . '://pages');
- if ($file_cover) {
- $form_state['#old_cover'] = $file_cover->fid;
- $form['cover']['#default_value'] = $file_cover->fid;
- }
-
- $form['cover']['#title'] = t('Select another Cover Photo');
- }
-
- // Baseline
- $tagline = $page->getTagline();
- if (!empty($tagline)) {
- $form['tagline']['#default_value'] = isset($tagline) ? $tagline : '';
- }
-
- $form['#validate'] = array(
- 'culturefeed_pages_add_arguments_prepare',
- 'culturefeed_pages_edit_request_send',
- );
-
- $form['#submit'] = array(
- 'culturefeed_pages_add_form_submit'
- );
-
- return $form;
-
-}
-/**
- * Validator which sends the request to update a page.
- * @param array $form
- * @param array $form_state
- */
-function culturefeed_pages_edit_request_send(& $form, & $form_state) {
- // Don't send the request if the form contains errors.
- if (!empty(form_get_errors())) {
- return;
- }
-
- // Local storage of the universal id.
- $uid = $form_state['values']['pageId'];
-
- // Send request to add a page.
- try {
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- $uid = $cf_pages->updatePage($uid, $form_state['post_params']);
- drupal_set_message(format_string(t('Page "@page" is updated.'), array('@page' => $form_state['values']['name'])));
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- form_set_error('', t('There was an error while updating the page.'));
- }
-
- if ($uid) {
-
- $form_state['page_id'] = $uid;
- $form_state['page_title'] = $form_state['values']['name'];
-
- // Remove the image if requested.
- if (empty($form_state['values']['image']) && $form_state['#old_image'] > 0) {
- try {
- $cf_pages->removeImage($uid);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
- }
-
- // Upload new page image.
- if ($form_state['values']['image'] && $form_state['#old_image'] != $form_state['values']['image']) {
-
- $file = file_load($form_state['values']['image']);
- if ($file) {
- $file_upload = culturefeed_prepare_curl_upload_from_file($file);
- try {
- $cf_pages->addImage($uid, array('image' => $file_upload));
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- drupal_set_message(t('An error occurred when uploading your image.'), 'error');
- }
- }
- }
-
- // Remove the cover if requested.
- if (empty($form_state['values']['cover']) && $form_state['#old_cover'] > 0) {
- try {
- $cf_pages->removeCover($uid);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
- }
-
- // Upload new page cover.
- if ($form_state['values']['cover'] && $form_state['#old_cover'] != $form_state['values']['cover']) {
-
- $file_cover = file_load($form_state['values']['cover']);
- if ($file_cover) {
- try {
- $file_upload = culturefeed_prepare_curl_upload_from_file($file_cover);
- $cf_pages->addCover($uid, array('image' => $file_upload));
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- drupal_set_message(t('An error occurred when uploading/editing your cover.'), 'error');
- }
- }
- }
-
- }
-
-}
-
-/**
- * Form callback to render a page to configure a page.
- * E.g. delete a page.
- * @param array $form
- * @param array $form_state
- */
-function culturefeed_pages_configuration_page_form($form, & $form_state, CultureFeed_Cdb_Item_Page $page){
-
- $form_state['page'] = $page;
-
- // Link to the detail page.
- $form['detail_link'] = array(
- '#type' => 'markup',
- '#markup' => culturefeed_search_detail_l("page", $page->getId(), $page->getName(), t('View page'), array('attributes' => array('class' => array('view-link')))),
- '#weight' => -25,
- );
-
- // General information.
- $form['basic'] = array(
- '#type' => 'markup',
- '#markup' => '' . t('Features') . ' ',
- '#weight' => -20,
- );
-
- // Hidden page ID.
- $form['pageId'] = array(
- '#type' => 'hidden',
- '#value' => $page->getId(),
- );
-
- $permissions = $page->getPermissions();
-
- $form['allow_followers'] = array(
- '#type' => 'checkbox',
- '#title' => t('Allow users to follow my page'),
- '#description' => t('Followers receive a notification when your page is updated, so that they stay informed of new activities, threads, ...'),
- '#default_value' => !empty($permissions->allowFollowers),
- );
-
- $form['allow_members'] = array(
- '#type' => 'checkbox',
- '#title' => t('Allow users to request membership'),
- '#description' => t('Members can, depending on the roles or rights, collaborate to maintain and update your page. Furthermore, page memberships are added to user profiles and can be used as an alias to add comments.'),
- '#default_value' => !empty($permissions->allowMembers),
- );
-
- $form['allow_comments'] = array(
- '#type' => 'checkbox',
- '#title' => t('Allow users to add comments to my activities'),
- '#description' => t('Only available for organizations who added their activities via www.uitdatabank.be.'),
- '#default_value' => !empty($permissions->allowComments),
- );
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Update'),
- );
-
- if ($page->isVisible()) {
- $form['remove_link'] = array(
- '#type' => 'link',
- '#title' => t('Remove page'),
- '#href' => 'pages/' . $page->getId() . '/remove/nojs',
- '#attributes' => array(
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#page_confirm',
- 'data-remote' => url('pages/' . $page->getId() . '/remove/ajax'),
- ),
- );
- }
- else {
- // @todo We can use this to quickly reinvoke the status.
- /*$form['publish_link'] = array(
- '#type' => 'link',
- '#title' => 'Pagina opnieuw publiceren',
- '#href' => 'pages/' . $page->getId() . '/publish/nojs',
- '#attributes' => array(
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#page_confirm',
- 'data-remote' => url('pages/' . $page->getId() . '/publish/ajax'),
- ),
- );*/
- }
-
- culturefeed_pages_set_page_breadcrumb($page);
-
- return $form;
-
-}
-
-/**
- * Submit handler to save the permissions of the configuration page.
- * @param array $form
- * @param array $form_state
- */
-function culturefeed_pages_configuration_page_form_submit($form, &$form_state) {
-
- $params = array(
- 'allowFollowers' => empty($form_state['values']['allow_followers']) ? "false" : "true",
- 'allowMembers' => empty($form_state['values']['allow_members']) ? "false" : "true",
- 'allowComments' => empty($form_state['values']['allow_comments']) ? "false" : "true",
- );
-
- // Send request to change permissions for a page.
- try {
- $cf_pages = DrupalCultureFeed::getLoggedInUserInstance()->pages();
- $uid = $cf_pages->changePermissions($form_state['values']['pageId'], $params);
- drupal_set_message(format_string(t('Page settings has been saved.')));
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- form_set_error('', t('There was an error while saving the settings page.'));
- }
-
-}
-
-/**
- * Switch to another CultureFeed Page.
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_switch_page(CultureFeed_Cdb_Item_Page $page) {
- culturefeed_pages_set_active_page($page);
- drupal_goto(culturefeed_search_detail_path('page', $page->getId(), $page->getName()));
-}
-
-/**
- * Page callback to add a confirimation to the
- * @param CultureFeed_Cdb_Item_Page $page
- */
-function culturefeed_pages_remove_page_confirm($page, $request_type = 'ajax') {
-
- $form = drupal_get_form('culturefeed_pages_remove_page_confirm_form', $page, $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 page.
- */
-function culturefeed_pages_remove_page_confirm_form($form, &$form_state, $page, $request_type) {
-
- if ($request_type == 'ajax') {
- $form['#prefix'] = '';
- }
-
- $form_state['page_id'] = $page->getId();
- $form_state['page'] = $page;
-
- $form['body_wrapper'] = array(
- '#type' => 'markup',
- '#prefix' => '',
- '#suffix' => '
',
- );
- $form['body_wrapper']['page_remove_confirm'] = array(
- '#type' => 'markup',
- '#markup' => '
- ' . 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' => '',
- '#suffix' => '
',
- );
- $form['wrapper']['page_confirm'] = array(
- '#type' => 'markup',
- '#markup' => '
- ' . 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 @@
-
-
-
-
-
-
- 0): ?>
-
-
-
- 0): ?>
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-page.tpl.php b/culturefeed_pages/theme/culturefeed-page.tpl.php
deleted file mode 100644
index a74eecb0..00000000
--- a/culturefeed_pages/theme/culturefeed-page.tpl.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-pages-basic-search-page.tpl.php b/culturefeed_pages/theme/culturefeed-pages-basic-search-page.tpl.php
deleted file mode 100644
index 5768e5ee..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-basic-search-page.tpl.php
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-pages-basic-search-result-item.tpl.php b/culturefeed_pages/theme/culturefeed-pages-basic-search-result-item.tpl.php
deleted file mode 100644
index da8ba5df..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-basic-search-result-item.tpl.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
- ()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
-
-
-
-
-
-
-
-
-
- -
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-pages-block-admin-options.tpl.php b/culturefeed_pages/theme/culturefeed-pages-block-admin-options.tpl.php
deleted file mode 100644
index c3241f27..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-block-admin-options.tpl.php
+++ /dev/null
@@ -1,33 +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 @@
-
-
-
-
-
-
-
- Loading
-
\ No newline at end of file
diff --git a/culturefeed_pages/theme/culturefeed-pages-block-page-timeline.tpl.php b/culturefeed_pages/theme/culturefeed-pages-block-page-timeline.tpl.php
deleted file mode 100644
index d1ca6992..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-block-page-timeline.tpl.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-pages-events-admin-page.tpl.php b/culturefeed_pages/theme/culturefeed-pages-events-admin-page.tpl.php
deleted file mode 100644
index 4c0086d9..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-events-admin-page.tpl.php
+++ /dev/null
@@ -1,18 +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 @@
-
-
-
-
-
-
-
-
-
- $colleague['picture'] . '?maxwidth=100')) ?>
-
-
-
-
-
-
-
.
-
-
-
-
-
-
?
-
-
-
-
\ 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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_pages/theme/culturefeed-pages-news-admin-page.tpl.php b/culturefeed_pages/theme/culturefeed-pages-news-admin-page.tpl.php
deleted file mode 100644
index 5a229b53..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-news-admin-page.tpl.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-getId() . '/news/add'); ?>
\ No newline at end of file
diff --git a/culturefeed_pages/theme/culturefeed-pages-page-agenda.tpl.php b/culturefeed_pages/theme/culturefeed-pages-page-agenda.tpl.php
deleted file mode 100644
index ae09a98d..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-page-agenda.tpl.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
www.uitdatabank.be.'); ?>
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-pages-page-menu-item.tpl.php b/culturefeed_pages/theme/culturefeed-pages-page-menu-item.tpl.php
deleted file mode 100644
index 5482d8ca..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-page-menu-item.tpl.php
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-pages-page-my-pages.tpl.php b/culturefeed_pages/theme/culturefeed-pages-page-my-pages.tpl.php
deleted file mode 100644
index badd822b..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-page-my-pages.tpl.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
- You are not a member of any page. Search (or create) the page of your employer and become a member. If you create a new page, you automatically become a member and administrator of the page.'); ?>
-
-
-
-
-
-
-
- You follow no pages. Find and follow pages that interest you and receive a notification when there are relevant updates.'); ?>
-
-
-
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-pages-page-suggestion-list-item.tpl.php b/culturefeed_pages/theme/culturefeed-pages-page-suggestion-list-item.tpl.php
deleted file mode 100644
index b6d5aa24..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-page-suggestion-list-item.tpl.php
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
- 0): ?>
-
-
-
- 0): ?>
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-pages-page-suggestion-list.tpl.php b/culturefeed_pages/theme/culturefeed-pages-page-suggestion-list.tpl.php
deleted file mode 100644
index df99eed2..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-page-suggestion-list.tpl.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
- $suggestion)); ?>
-
-
-
-
-
diff --git a/culturefeed_pages/theme/culturefeed-pages-request-admin-membership-block.tpl.php b/culturefeed_pages/theme/culturefeed-pages-request-admin-membership-block.tpl.php
deleted file mode 100644
index 0c937f1b..00000000
--- a/culturefeed_pages/theme/culturefeed-pages-request-admin-membership-block.tpl.php
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
\ 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 @@
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_pages/theme/theme.inc b/culturefeed_pages/theme/theme.inc
deleted file mode 100644
index 1f1813c5..00000000
--- a/culturefeed_pages/theme/theme.inc
+++ /dev/null
@@ -1,806 +0,0 @@
- $item));
- }
-
- }
-
- if ($variables['total_results'] > 0) {
- $variables['total_results_message'] = t("@total pages found for '@search'", array('@total' => $variables['total_results'], '@search' => $variables['search']));
- }
- else {
- $variables['total_results_message'] = t("No pages found for '@search'", array('@search' => $variables['search']));
- }
-
- $query = drupal_get_query_parameters();
- $variables['create_message'] = l(t('Create your own page'), 'pages/add', array('query' => $query));
-
- $variables['site'] = check_plain(variable_get('site_name', ''));
- $variables['search'] = check_plain($variables['search']);
- $variables['zipcode'] = check_plain($variables['zipcode']);
- $variables['keyword'] = check_plain($variables['keyword']);
-
-}
-
-/**
- * Preprocess a culturefeed page basic search result item.
- * @see culturefeed-pages-basic-search-result-item.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_basic_search_result_item(&$variables) {
-
- $page = $variables['item']->getEntity();
-
- $variables['title'] = $page->getName();
-
- culturefeed_pages_preprocess_culturefeed_page_summary($variables);
- $variables['description'] = truncate_utf8($variables['description'], 125, FALSE, TRUE);
-
- drupal_add_library('system', 'drupal.ajax');
-
- // Local storage of the followers for the current user.
- $i_follow_pages = array();
- try {
-
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- if ($cf_user && $cf_user->following) {
- foreach ($cf_user->following as $cfp_follower) {
- $i_follow_pages[] = $cfp_follower->page->getId();
- }
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
- $query = array('destination' => culturefeed_search_detail_path('page', $page->getId(), $page->getName()));
-
- // Anonymous user.
- $variables['logged_in'] = !empty($cf_user);
- $variables['following'] = FALSE;
- if (empty($cf_user)) {
- $variables['follow_text'] = theme('culturefeed_pages_login_required_message', array('page' => $page, 'action' => CultureFeed_Pages_Default::ACTION_FOLLOW));
- $variables['member_text'] = theme('culturefeed_pages_login_required_message', array('page' => $page, 'action' => CultureFeed_Pages_Default::ACTION_BECOME_MEMBER));
- }
- // Logged in user.
- else {
-
- // Member link.
- if (!culturefeed_pages_is_user_member_of_page($page->getId())) {
- $variables['become_member_url'] = url('culturefeed/pages/join/nojs/' . $page->getId(), array('query' => $query));
- }
-
- // Follow link.
- if (in_array($page->getId(), $i_follow_pages)) {
- $variables['following'] = TRUE;
- $variables['follow_url'] = url('culturefeed/pages/defollow/nojs/' . $page->getId(), array('query' => $query));
- $variables['follow_text'] = t('Unfollow');
- }
- else {
- $variables['follow_url'] = url('culturefeed/pages/follow/nojs/' . $page->getId(), array('query' => $query));
- $variables['follow_text'] = t('Follow');
- }
- }
-}
-
-/**
- * Preprocess the variables for the page summary.
- * @see culturefeed-page-summary.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_page_summary(&$variables) {
-
- _culturefeed_pages_preprocess_culturefeed_page($variables);
-
- $page = $variables['item']->getEntity();
- $variables['more_text'] = t('More info');
- $variables['url'] = culturefeed_search_detail_url('page', $page->getId(), $page->getName());
-
- $variables['member_count'] = $variables['item']->getActivityCount(\CultuurNet\Search\ActivityStatsExtendedEntity::ACTIVITY_COUNT_PAGE_MEMBER);
- $variables['follower_count'] = $variables['item']->getActivityCount(\CultuurNet\Search\ActivityStatsExtendedEntity::ACTIVITY_COUNT_PAGE_FOLLOW);
-
-}
-
-/**
- * Preprocess the variables for the page detail.
- * @see culturefeed-page.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_page(&$variables) {
-
- _culturefeed_pages_preprocess_culturefeed_page($variables);
-
- $page = $variables['item'];
-
- $cf_pages = DrupalCultureFeed::getConsumerInstance()->pages();
- $user_list = $cf_pages->getUserList($page->getId(), array(CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN, CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_MEMBER), FALSE);
- $variables['user_list'] = $user_list;
-
- // First put all memberships in an array, so we can get the drupal uids for it.
- $variables['members'] = array();
- if (!empty($user_list->memberships)) {
-
- foreach ($user_list->memberships as $user_list_membership) {
- $memberships[] = $user_list_membership;
- }
-
- $uids = culturefeed_get_uids_for_memberships($memberships);
-
- // Add every membership to the variables.
- foreach ($memberships as $membership) {
-
- // If user was not found in drupal, don't show it.
- if (!isset($uids[$membership->user->id])) {
- continue;
- }
-
- $member = array();
- $member['url'] = url('user/' . $uids[$membership->user->id]);
- $member['name'] = check_plain($membership->user->nick);
- $member['relation'] = check_plain($membership->relation);
- $member['role'] = check_plain($membership->role);
- $member['picture'] = check_plain($membership->user->depiction);
- $member['validated'] = $membership->validated;
-
- $variables['members'][] = $member;
- }
-
- }
-
- _culturefeed_pages_preprocess_page_metatags($variables);
-
-}
-
-/**
- * Preprocess the general variables for a culturefeed page.
- */
-function _culturefeed_pages_preprocess_culturefeed_page(&$variables) {
-
- $item = $variables['item'];
- if ($item instanceof CultureFeed_Cdb_Item_Page) {
- $page = $item;
- }
- else {
- $page = $item->getEntity();
- }
-
- $variables['title'] = check_plain($page->getName());
- $variables['id'] = $page->getId();
- $variables['description'] = check_markup($page->getDescription(), 'filtered_html');
- $variables['links'] = $page->getLinks();
- $variables['image'] = $page->getImage();
- $variables['thumbnail'] = $page->getImage();
- $variables['baseline'] = $page->getTagline();
- $variables['cover'] = $page->getCover();
-
- foreach ($variables['links'] as &$link) {
- $link = preg_replace('#^http://|^https://#', "", $link);
- }
-
- $logged_in = $variables['logged_in'];
-
- // Add join link if user is logged in and not a member yet.
- if (!culturefeed_pages_is_user_member_of_page($page->getId()) && $page->getPermissions()->allowMembers && $logged_in) {
- $query = array('destination' => culturefeed_search_detail_path('page', $page->getId(), $page->getName()), '/');
- $variables['become_member_link'] = l(t('Become a member'), 'culturefeed/pages/join/nojs/' . $page->getId(), array('query' => $query));
- }
- else {
- if (culturefeed_pages_is_user_member_of_page($page->getId()) && !culturefeed_pages_is_user_validated_admin_of_page($page->getId())) {
- $query = array('destination' => culturefeed_search_detail_path('page', $page->getId(), $page->getName()), '/');
- $variables['become_validated_admin_url'] = url('pages/' . $page->getId() . '/membership/request-validated-admin/nojs', array('query' => $query));
- }
- }
-
- // Address information
- $address = $page->getAddress();
- if (!empty($address)) {
-
- $variables['address'] = array();
-
- $variables['address']['street'] = '';
- if ($address->getStreet()) {
- $variables['address']['street'] = check_plain($address->getStreet() . ' ' . $address->getHouseNumber());
- }
-
- $variables['address']['city'] = check_plain($address->getCity());
- $variables['address']['zip'] = check_plain($address->getZip());
-
- $coordinates = $address->getGeoInformation();
- if ($coordinates) {
- $variables['coordinates'] = array(
- 'lat' => $coordinates->getYCoordinate(),
- 'lng' => $coordinates->getXCoordinate(),
- );
- }
-
- }
-
- // Contact information.
- $variables['contact'] = array();
- if ($page->getTelephone()) {
- $variables['contact']['tel'] = check_plain($page->getTelephone());
- }
- if ($page->getEmail()) {
- $variables['contact']['mail'] = check_plain($page->getEmail());
- }
-
- // Check if page has activities if we are bot on a searchable page.
- $current_search_page = culturefeed_get_searchable_type_by_path();
- $variables['has_activities'] = FALSE;
- if (module_exists('culturefeed_agenda' && !$current_search_page)) {
- $result = culturefeed_pages_get_activities_from_page($page, variable_get('pages_block_agenda_total_items', 5));
- $variables['has_activities'] = ($result && $result->getTotalCount() > 0);
- }
-
- // Check if current user already follows this page
- $i_follow_pages = array();
- try {
-
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- if ($cf_user && $cf_user->following) {
- foreach ($cf_user->following as $cfp_follower) {
- $i_follow_pages[] = $cfp_follower->page->getId();
- }
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_pages', $e);
- }
-
- $variables['following'] = FALSE;
- if (!empty($cf_user) && in_array($page->getId(), $i_follow_pages)) {
- $variables['following'] = TRUE;
- }
-
-}
-
-/**
- * Preprocess the variables for the page detail when invisible.
- * @see culturefeed-page-invisible.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_page_invisible(&$variables) {
-
- $page = $variables['page'];
-
-}
-
-/**
- * Theme 1 fellow members block.
- * @param $variables
- */
-function culturefeed_pages_preprocess_culturefeed_pages_fellow_members_block(&$variables) {
-
- $uids = culturefeed_get_uids_for_memberships($variables['members']);
-
- $colleagues = array();
- foreach ($variables['members'] as $membership) {
-
- // If user was not found in drupal, don't show it.
- if (!isset($uids[$membership->user->id])) {
- continue;
- }
-
- $colleague = array();
- $colleague['url'] = url('user/' . $uids[$membership->user->id]);
- $colleague['name'] = check_plain($membership->user->nick);
- $colleague['picture'] = check_plain($membership->user->depiction);
-
- $colleagues[] = $colleague;
-
- }
-
- $variables['colleagues'] = $colleagues;
- $variables['nick'] = check_plain($variables['account']->nick);
- $variables['title'] = $variables['page']->getName();
-
- if (culturefeed_pages_is_user_member_of_page($variables['page']->getId())) {
- $variables['is_member'] = TRUE;
- }
- else {
- $variables['is_member'] = FALSE;
- $query = array('destination' => culturefeed_search_detail_url('page', $variables['page']->getId(), $variables['page']->getName()));
- $variables['become_member_url'] = url('culturefeed/pages/join/nojs/' . $variables['page']->getId(), array('query' => $query));
- }
-
-}
-
-/**
- * Theme 1 followers block.
- * @param $variables
- */
-function culturefeed_pages_preprocess_culturefeed_pages_followers_block(&$variables) {
-
- $page = $variables['page'];
- $variables['title'] = $page->getName();
-
- $uids = culturefeed_get_uids_for_memberships($variables['followers']);
-
- $followers = array();
- foreach ($variables['followers'] as $cf_follower) {
-
- // If user was not found in drupal, don't show it.
- if (!isset($uids[$cf_follower->user->id])) {
- continue;
- }
-
- $follower = array();
- $follower['url'] = url('user/' . $uids[$cf_follower->user->id]);
- $follower['name'] = check_plain($cf_follower->user->nick);
- $follower['picture'] = check_plain($cf_follower->user->depiction);
-
- $followers[] = $follower;
-
- }
-
- $variables['followers'] = $followers;
- $variables['follow_link'] = culturefeed_pages_follow_link($page);
-
-}
-
-/**
- * Theme 1 members block.
- * @param $variables
- */
-function culturefeed_pages_preprocess_culturefeed_pages_members_block(&$variables) {
-
- $page = $variables['page'];
- $variables['title'] = $page->getName();
-
- $uids = culturefeed_get_uids_for_memberships($variables['members']);
-
- $members = array();
- foreach ($variables['members'] as $cf_member) {
-
- // If user was not found in drupal, don't show it.
- if (!isset($uids[$cf_member->user->id])) {
- continue;
- }
-
- $member = array();
- $member['url'] = url('user/' . $uids[$cf_member->user->id]);
- $member['name'] = check_plain($cf_member->user->nick);
- $member['picture'] = check_plain($cf_member->user->depiction);
- $member['relation'] = check_plain($cf_member->relation);
- $member['role'] = check_plain($cf_member->role);
-
- $members[] = $member;
-
- }
-
- $variables['members'] = $members;
- $variables['member_link'] = culturefeed_pages_member_link($page);
- //$variables['member_url'] = url('culturefeed/pages/join/nojs/' . $variables['page']->getId(), array('query' => $query));
- $variables['member_url'] = url('culturefeed/pages/join/nojs/' . $variables['page']->getId());
-
-}
-
-
-/**
- * Preprocess the variables for the page administration options.
- * @see culturefeed-pages-block-admin-options.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_block_admin_options(&$variables) {
-
- $page = $variables['page'];
- $variables['switch_link'] = l(t('Login as') . ' ' . $page->getName(), 'pages/switch/' . $page->getId(), array('attributes' => array('class' => array('button'))));
-
- $variables['page_id'] = $page->getId();
-
- if ($variables['logged_in_as_page_admin']) {
-
- // Default to true, so message doesn't show when we have no agenda enabled.
- $variables['has_activities'] = TRUE;
- if (module_exists('culturefeed_agenda')) {
- // Use same item count as the block, so we hit the same cache.
- $result = culturefeed_pages_get_activities_from_page($page, variable_get('pages_block_agenda_total_items', 5));
- $variables['has_activities'] = ($result && $result->getTotalCount() > 0);
- }
-
- if ($variables['page_notifications'] && $variables['page_notifications']->total > 0) {
- $notification_variables = array(
- 'activities' => $variables['page_notifications'],
- 'class' => 'notifications',
- 'read_more_url' => url('pages/' . $page->getId() . '/notifications'),
- 'read_more_text' => t('View all notifications'),
- );
- $variables['notifications'] = theme('culturefeed_social_user_activity_list', $notification_variables);
- }
- else {
- $variables['notifications'] = t('Your page has no notifications yet');
- }
-
- }
-
-}
-
-/**
- * Preprocess the variables for the page administration block detail.
- * @see culturefeed-pages-page-menu-item.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_page_menu_item(&$variables) {
- $variables['link'] = l($variables['title'], $variables['url']);
-}
-
-/**
- * Preprocess the search results on a user.
- * @see culturefeed-pages-user-search-result.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_user_search_result(&$variables) {
-
- $variables['total'] = $variables['result']->total;
- $accounts = culturefeed_get_uids_for_users($variables['result']->objects);
-
- $members = array();
- foreach ($variables['user_list']->memberships as $membership) {
- $members[] = $membership->user->id;
- }
-
- $add_options = array(
- 'attributes' => array(
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#page_confirm',
- ),
- 'query' => drupal_get_query_parameters(),
- );
-
- $variables['results'] = array();
- foreach ($variables['result']->objects as $object) {
-
- if (!isset($accounts[$object->id])) {
- continue;
- }
-
- $result = array();
- $result['nick'] = check_plain($object->nick);
- $result['profile_link'] = l(t('View profile'), 'user/' . $accounts[$object->id]);
- $result['profile_url'] = url('user/' . $accounts[$object->id]);
- $add_options['attributes']['data-remote'] = url('pages/' . $variables['page']->getId() . '/membership/add/' . $object->id . '/ajax', array('query' => $add_options['query']));
- $result['add_link'] = in_array($object->id, $members) ? t('Member') : l(t('Add as member'), 'pages/' . $variables['page']->getId() . '/membership/add/' . $object->id . '/nojs', $add_options);
- $variables['results'][] = $result;
-
- }
-
-}
-
-/**
- * Preprocess the culturefeed pages events admin page.
- * @see culturefeed-pages-events-admin-page.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_events_admin_page(&$variables) {
-
- $rows = array();
-
- foreach ($variables['results'] as $result) {
-
- $row = array();
-
- $detail = $result->getEntity()->getDetails()->getDetailByLanguage(culturefeed_search_get_preferred_language());
- if ($detail) {
-
- $path = culturefeed_search_detail_path($result->getType(), $result->getId(), $detail->getTitle());
- $row['title'] = l($detail->getTitle(), $path);
- $row['date'] = check_plain($detail->getCalendarSummary());
- $comment_count = $result->getActivityCount(\CultuurNet\Search\ActivityStatsExtendedEntity::ACTIVITY_COUNT_COMMENT);
- if ($comment_count) {
- $row['comment_count'] = l(format_plural($comment_count, '@count comment', '@count comments'), $path, array('fragment' => t('Read comments')));
- }
- else {
- $row['comment_count'] = t('No comments');
- }
- $row['edit_url'] = l(t('Edit via UiTdatabank.be'), CULTUREFEED_PAGES_UITDATABANK_EVENT_URL . $result->getEntity()->getCdbid(), array('attributes' => array('target' => '_blank')));
-
- $rows[] = $row;
-
- }
-
- }
-
- if (!empty($rows)) {
-
- $header = array(
- array('data' => t('Title'), 'field' => 'title', 'sort' => 'asc'),
- array('data' => t('Date'), 'field' => 'startdate', 'sort' => 'asc'),
- array('data' => t('Reactions'), 'field' => 'comment_count', 'sort' => 'desc'),
- '',
- );
- $variables['items'] = theme('table', (array('header' => $header, 'rows' => $rows)));
-
- }
-
- $variables['view_page_link'] = culturefeed_search_detail_l('page', $variables['page']->getId(), $variables['page']->getName(), t('View page'));
- $variables['page_link'] = culturefeed_search_detail_l('page', $variables['page']->getId(), $variables['page']->getName(), $variables['page']->getName());
-
-}
-
-/**
- * Preprocess the variables for the block to become admin member.
- * @see culturefeed-page.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_request_admin_membership_block(&$variables) {
-
- $page = $variables['page'];
- $cf_account_id = DrupalCultureFeed::getLoggedInUserId();
-
- $path = 'pages/' . $page->getId() . '/membership/request-admin/' . $cf_account_id . '/nojs';
-
- $variables['url'] = url($path, array('query' => drupal_get_destination()));
- $variables['link'] = '' . l(t('Send a request to become administrator'), $path, array('query' => drupal_get_destination(), 'attributes' => array('class' => array('use-ajax')))) . ' ';
-
-}
-
-/**
- * Preprocess the variables for my pages overview.
- * @see culturefeed-pages-page-my-pages.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_page_my_pages(&$variables) {
-
- $build = $variables['build'];
- $drupal_uid = culturefeed_get_uid_for_cf_uid($variables['user']->id, $variables['user']->nick);
- $variables['user_url'] = url('user/' . $drupal_uid);
-
- if (!empty($build['member_pages'])) {
- $variables['my_pages'] = drupal_render($build['member_pages']);
- }
-
- if (!empty($build['followed-pages'])) {
- $variables['i_follow'] = drupal_render($build['followed-pages']);
- }
-
- $variables['search_pages'] = drupal_render($build['search-pages']);
-
-}
-
-/**
- * Preprocess the variables for the page activities overview.
- * @see culturefeed-pages-page-agenda.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_page_agenda(&$variables) {
-
- if (!empty($variables['read_more_path'])) {
- $query = array('organiser' => $variables['page']->getId());
- $variables['read_more'] = l(t('All activities of this organiser'), $variables['read_more_path'], array('query' => $query));
- }
-
- $variables['follow_link'] = culturefeed_pages_follow_link($variables['page']);
-
- $variables['is_following'] = culturefeed_pages_is_user_following_page($variables['page']->getId());
-
-}
-
-/**
- * Preprocess the variables for a suggestion list item.
- * @see
- */
-function culturefeed_pages_preprocess_culturefeed_pages_page_suggestion_list_item(&$variables) {
- culturefeed_pages_preprocess_culturefeed_pages_basic_search_result_item($variables);
-}
-
-/**
- * Theme the overview of pages that a user follows in a block.
- */
-function theme_culturefeed_pages_following_pages_block($variables) {
-
- $items = array();
- foreach ($variables['following'] as $following) {
- $items[] = culturefeed_search_detail_l('page', $following->page->getId(), $following->page->getName());
- }
-
- return theme('item_list', array('items' => $items, 'attributes' => array('class' => array('pages-following'))));
-
-}
-
-/**
- * Theme the edit membership form.
- */
-function theme_culturefeed_pages_edit_membership_form($variables) {
-
- $cf_user = $variables['form']['#membership']->user;
- $page = $variables['form']['#membership']->page;
-
- $output = '' . theme('image', array('path' => $cf_user->depiction . '?maxwidth=100')) . $cf_user->nick . ' ';
- $output .= '' . date('d/m/Y H:i', $variables['form']['#membership']->creationDate) . ' ';
-
- $output .= '' . drupal_render_children($variables['form']) . ' ';
-
- return $output;
-
-}
-
-/**
- * Theme the message when a follow action was succesfull.
- */
-function theme_culturefeed_pages_follow_success_message($variables) {
-
- $message = '' . 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 '' . $message . '
';
-}
-
-/**
- * Theme the link to request administratorship for a page.
- */
-function theme_culturefeed_pages_admin_request_link($variables) {
-
- $page = $variables['page'];
- $cf_user = $variables['cf_user'];
-
- $output = '';
- $output .= l(t('Become an administrator'), 'pages/' . $page->getId() . '/membership/request-admin/' . $cf_user->id . '/nojs', array(
- 'query' => drupal_get_destination(),
- 'attributes' => array(
- 'class' => array('use-ajax button')
- )
- ));
- $output .= '
';
-
- return $output;
-}
-
-/**
- * Theme the message shown when a user can not delete his membership.
- */
-function theme_culturefeed_pages_membership_delete_not_possible($variables) {
-
- $output = t('Not possible to remove');
-
- return $output;
-}
-
-/**
- * Helper preprocessor to add meta description tag.
- * @param type $variables
- */
-function _culturefeed_pages_preprocess_page_metatags(&$variables) {
-
- $title_parts = array();
- $description_parts = array();
-
- if (!empty($variables['title'])) {
- $title_parts[] = $variables['title'];
- }
- if (!empty($variables['address'])) {
- $location = '';
- if (!empty($variables['address']['street'])) {
- $location .= $variables['address']['street'] . ', ';
- }
- if (!empty($variables['address']['zip'])) {
- $location .= $variables['address']['zip'];
- }
- if (!empty($variables['address']['city'])) {
- $location .= ' ' . $variables['address']['city'];
- }
- if (!empty($variables['address']['city'])) {
- $title_parts[] = $variables['address']['city'];
- }
- $description_parts[] = t('Address: @location', array('@location' => $location));
- }
- if (!empty($variables['contact']) && !empty($variables['contact']['tel'])) {
- $description_parts[] = t('Phone number: @number', array('@number' => $variables['contact']['tel']));
- }
- if (!empty($variables['description'])) {
- $description_parts[] = strip_tags($variables['description']);
- }
-
- // Add meta title tag.
- drupal_set_title(implode(' | ', $title_parts));
-
- // Add meta description field.
- drupal_add_html_head(array(
- '#tag' => 'meta',
- '#attributes' => array(
- 'name' => 'description',
- 'content' => implode(' - ', $description_parts),
- ),
- ), 'meta_description');
-
-}
-
-/**
- * Preprocess a related items block.
- */
-function culturefeed_pages_preprocess_culturefeed_pages_nearby_pages(&$variables) {
-
- global $language;
- global $base_url;
- // Render the results.
- $items = array();
- foreach ($variables['results'] as $key => $search_result) {
- $entity = $search_result->getEntity();
-
- $image = $entity->getImage();
- $location = $entity->getAddress()->getCity();
- $items[$key]['link'] = culturefeed_search_detail_l($search_result->getType(), $search_result->getId(), $search_result->getTitle($language->language));
- $items[$key]['image'] = $image;
- $items[$key]['location'] = $location;
- }
- $variables['items'] = $items;
-}
-
-/**
- * Preprocess the culturefeed pages news admin page.
- * @see culturefeed-pages-news-admin-page.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_news_admin_page(&$variables) {
-
- $rows = array();
- $page_id = $variables['page']->getId();
-
- foreach ($variables['results'] as $activity) {
-
- // Use node title as default.
- $title = $activity->nodeTitle;
-
- // Real title is stored in the json.
- $content = json_decode($activity->value);
- if ($content && !empty($content->title)) {
- $title = $content->title;
- }
-
- $row = array();
- $row['title'] = $title;
- $row['url'] = url(culturefeed_search_detail_path('news', $activity->id, $row['title']));
- $row['date'] = format_date($activity->creationDate, 'custom', 'd M \o\m H:i');
- $row['delete_url'] = url('pages/' . $page_id . '/news/delete/' . $activity->id);
-
- $rows[] = $row;
- }
-
- $variables['items'] = $rows;
- $variables['view_page_link'] = culturefeed_search_detail_l('page', $variables['page']->getId(), $variables['page']->getName(), t('View page'));
- $variables['page_link'] = culturefeed_search_detail_l('page', $variables['page']->getId(), $variables['page']->getName(), $variables['page']->getName());
-}
-
-/**
- * Preprocess the page timeline block.
- * @see culturefeed-pages-block-page-timeline.tpl.php
- */
-function culturefeed_pages_preprocess_culturefeed_pages_block_page_timeline(&$variables) {
-
- $variables['activities'] = theme('culturefeed_social_user_activity_wall', array('activities' => $variables['time_line']));
- $variables['page_admin'] = culturefeed_pages_is_user_admin_of_page($variables['page']->getId());
- $variables['page_id'] = $variables['page']->getId();
-}
diff --git a/culturefeed_pages/translations/culturefeed_pages.de.po b/culturefeed_pages/translations/culturefeed_pages.de.po
deleted file mode 100755
index c186000f..00000000
--- a/culturefeed_pages/translations/culturefeed_pages.de.po
+++ /dev/null
@@ -1,914 +0,0 @@
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_pages.module: n/a
-# includes/blocks.inc: n/a
-# includes/pages.inc: n/a
-# theme/culturefeed-page.tpl.php: n/a
-# includes/members.inc: n/a
-# includes/helpers.inc: n/a
-# theme/theme.inc: n/a
-# culturefeed_pages.info: n/a
-# theme/culturefeed-pages-page-my-page.tpl.php: n/a
-# theme/culturefeed-page-summary.tpl.php: n/a
-# theme/culturefeed-pages-fellow-members-block.tpl.php: n/a
-# theme/culturefeed-page-invisible.tpl.php: n/a
-# theme/culturefeed-pages-block-admin-options.tpl.php: n/a
-# theme/culturefeed-pages-events-admin-page.tpl.php: n/a
-# theme/culturefeed-pages-followers-block.tpl.php: n/a
-# theme/culturefeed-pages-join-page.tpl.php: n/a
-# theme/culturefeed-pages-join-search-result-item.tpl.php: n/a
-# theme/culturefeed-pages-page-agenda.tpl.php: n/a
-# theme/culturefeed-pages-request-admin-membership-block.tpl.php: n/a
-# theme/culturefeed-pages-user-search-result.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-08-02 09:32+0200\n"
-"PO-Revision-Date: 2013-11-22 09:16+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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_pages.module:425
-msgid "Culturefeed pages: fellow members from user"
-msgstr ""
-
-#: culturefeed_pages.module:430
-msgid "Culturefeed pages: pages i'm following"
-msgstr ""
-
-#: culturefeed_pages.module:435
-msgid "Culturefeed pages: page options"
-msgstr ""
-
-#: culturefeed_pages.module:440
-msgid "Culturefeed pages: request to become admin member"
-msgstr ""
-
-#: culturefeed_pages.module:445
-msgid "Culturefeed pages: page admin menu"
-msgstr ""
-
-#: culturefeed_pages.module:450
-msgid "Culturefeed pages: followers"
-msgstr ""
-
-#: culturefeed_pages.module:456
-msgid "Culturefeed pages: page timeline"
-msgstr ""
-
-#: culturefeed_pages.module:463
-msgid "Culturefeed pages: page agenda"
-msgstr ""
-
-#: culturefeed_pages.module:481
-msgid "Items to show"
-msgstr "Anzuzeigende Items"
-
-#: culturefeed_pages.module:605
-msgid "My page"
-msgstr "Meine Seiten"
-
-#: culturefeed_pages.module:613 includes/blocks.inc:139;169
-msgid "Manage pages"
-msgstr "Seiten verwalten"
-
-#: culturefeed_pages.module:635;662
-msgid "Search your page"
-msgstr "Ihre Seite suchen"
-
-#: culturefeed_pages.module:643;360
-msgid "Change active page"
-msgstr "Aktive Seite ändern"
-
-#: culturefeed_pages.module:677
-msgid "Change settings"
-msgstr "Angaben ändern"
-
-#: culturefeed_pages.module:679
-msgid "Edit contact info, photos, description, website,..."
-msgstr "Bearbeiten Sie Kontaktinfo, Foto, Beschreibung, Website..."
-
-#: culturefeed_pages.module:683;263 includes/pages.inc:649
-msgid "Settings"
-msgstr "Einstellungen"
-
-#: culturefeed_pages.module:685
-msgid "Allow users to follow your page, write comments, suggest activities,..."
-msgstr ""
-"Dürfen Nutzer Ihrer Seite folgen, Reaktionen schreiben, Aktivitäten "
-"empfehlen..."
-
-#: culturefeed_pages.module:689
-msgid "Members & roles"
-msgstr "Mitglieder & Rollen"
-
-#: culturefeed_pages.module:691
-msgid "Manage members and access rights"
-msgstr "Mitglieder und Zugriffsrechte verwalten"
-
-#: culturefeed_pages.module:695;274 includes/blocks.inc:291
-msgid "Activities"
-msgstr "Aktivitäten"
-
-#: culturefeed_pages.module:697
-msgid "Manage your activities and reactions"
-msgstr "Ihre Aktivitäten und Reaktionen verwalten"
-
-#: culturefeed_pages.module:711;406 includes/pages.inc:119
-msgid "My pages"
-msgstr "Meine Seiten"
-
-#: culturefeed_pages.module:713
-msgid "Manage the pages where you're member off or that you follow"
-msgstr "Die Seiten verwalten, deren Mitglied Sie sind, oder denen Sie folgen"
-
-#: culturefeed_pages.module:727;728
-msgid "Pages"
-msgstr "Seiten"
-
-#: culturefeed_pages.module:732
-msgid "Relevancy"
-msgstr "Relevanz"
-
-#: culturefeed_pages.module:733
-msgid "Alphabetical"
-msgstr "Alphabetisch"
-
-#: culturefeed_pages.module:734
-msgid "Number of members"
-msgstr "Anzahl Mitglieder"
-
-#: culturefeed_pages.module:735
-msgid "Number of followers"
-msgstr "Anzahl Followers"
-
-#: culturefeed_pages.module:775
-msgid "Your page in @sitename"
-msgstr "Ihre Seite auf @sitename"
-
-#: culturefeed_pages.module:838
-msgid "from"
-msgstr "von"
-
-#: culturefeed_pages.module:210
-msgid "Create your own page"
-msgstr "Erstellen Sie Ihre eigene Seite"
-
-#: culturefeed_pages.module:228
-msgid "Edit page"
-msgstr "Seite bearbeiten"
-
-#: culturefeed_pages.module:241
-msgid "Delete page"
-msgstr "Seite löschen"
-
-#: culturefeed_pages.module:252
-msgid "Publish page"
-msgstr "Seite veröffentlichen"
-
-#: culturefeed_pages.module:285;296 theme/culturefeed-page.tpl.php:15
-msgid "Members"
-msgstr "Mitglieder"
-
-#: culturefeed_pages.module:307
-msgid "Delete member"
-msgstr "Mitglied löschen"
-
-#: culturefeed_pages.module:318 includes/members.inc:345
-msgid "Add member"
-msgstr "Mitglied hinzufügen"
-
-#: culturefeed_pages.module:329
-msgid "Application for administrator of the page"
-msgstr "Antrag, um Administrator der Seite zu werden"
-
-#: culturefeed_pages.module:339
-msgid "Remove myself as a member"
-msgstr "Mich selbst als Mitglied löschen"
-
-#: culturefeed_pages.module:349
-msgid "Add member as administrator"
-msgstr "Mitglied als Administrator hinzufügen"
-
-#: culturefeed_pages.module:386 includes/helpers.inc:38 theme/theme.inc:69
-msgid "Followe"
-msgstr "Folgen"
-
-#: culturefeed_pages.module:396 includes/helpers.inc:35
-msgid "Unfollow page"
-msgstr "Seite nicht mehr folgen"
-
-#: culturefeed_pages.info:0
-msgid "CultureFeed Pages"
-msgstr "CultureFeed Seiten"
-
-#: culturefeed_pages.info:0
-msgid "CultureFeed Pages makes it possible to view / manage pages."
-msgstr "Mit CultureFeed Seiten können Sie sich Seiten ansehen und verwalten."
-
-#: culturefeed_pages.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/blocks.inc:49
-msgid "My colleague's"
-msgstr "Meine Kollegen"
-
-#: includes/blocks.inc:78 theme/culturefeed-pages-page-my-page.tpl.php:13
-msgid "Pages I follow"
-msgstr "Seiten, denen ich folge"
-
-#: includes/blocks.inc:248
-msgid "Timeline"
-msgstr "Chronik"
-
-#: includes/blocks.inc:342
-msgid "Page followers"
-msgstr "Dieser Seite folgen"
-
-#: includes/blocks.inc:433
-msgid "Related activities"
-msgstr "Verbundene Aktivitäten"
-
-#: includes/helpers.inc:201
-msgid "Home"
-msgstr "Home"
-
-#: includes/members.inc:38 includes/pages.inc:506;642 theme/theme.inc:71
-msgid "View page"
-msgstr "Seite ansehen"
-
-#: includes/members.inc:48
-msgid "Please enter at least 3 characters"
-msgstr "Bitte geben Sie mindestens 3 Zeichen ein"
-
-#: includes/members.inc:66 includes/pages.inc:239
-msgid "Name"
-msgstr "Name"
-
-#: includes/members.inc:67
-msgid "Function"
-msgstr "Funktion"
-
-#: includes/members.inc:68
-msgid "Role"
-msgstr "Rolle"
-
-#: includes/members.inc:69 includes/pages.inc:1096
-msgid "Member since"
-msgstr "Mitglied seit"
-
-#: includes/members.inc:93
-msgid "Edit"
-msgstr "Bearbeiten"
-
-#: includes/members.inc:103
-msgid "Delete as member"
-msgstr "Als Mitglied löschen"
-
-#: includes/members.inc:115
-msgid "Cancel changes"
-msgstr "Bearbeitungen abbrechen"
-
-#: includes/members.inc:129
-msgid "No content available."
-msgstr "Kein Inhalt verfügbar."
-
-#: includes/members.inc:177 includes/pages.inc:370;684
-msgid "Save"
-msgstr "Speichern"
-
-#: includes/members.inc:189
-msgid "Remove administrator"
-msgstr "Als Administrator löschen"
-
-#: includes/members.inc:189
-msgid "Make administrator"
-msgstr "Administrator erstellen"
-
-#: includes/members.inc:255
-msgid ""
-"Something went wrong while saving. Please try again or contact an "
-"administrator."
-msgstr ""
-"Beim Speichern hat etwas nicht geklappt. Bitte erneut versuchen oder einen "
-"Administrator kontaktieren."
-
-#: includes/members.inc:266
-msgid "Membership changed"
-msgstr "Die Mitgliedschaft wurde geändert"
-
-#: includes/members.inc:277
-msgid "Search users"
-msgstr "Nutzer suchen"
-
-#: includes/members.inc:284
-msgid "Search"
-msgstr "Suchen"
-
-#: includes/members.inc:359
-msgid "Sure you want to add @nick as a member?"
-msgstr "Sind Sie sicher, dass Sie @nick als Mitglied hinzufügen möchten?"
-
-#: includes/members.inc:370
-msgid "Add"
-msgstr "Hinzufügen"
-
-#: includes/members.inc:376;497 includes/pages.inc:820;911
-msgid "Cancel"
-msgstr "Abbrechen"
-
-#: includes/members.inc:404
-msgid "@nick is member of @page now."
-msgstr "@nick ist jetzt Mitglied von @page."
-
-#: includes/members.inc:409
-msgid ""
-"There was an error while saving. Please try again, or contact an "
-"administrator."
-msgstr ""
-"Beim Hinzufügen hat etwas nicht geklappt. Bitte erneut versuchen oder einen "
-"Administrator kontaktieren."
-
-#: includes/members.inc:458
-msgid "Remove member"
-msgstr "Mitglied löschen"
-
-#: includes/members.inc:473
-msgid "This action cannot be undone."
-msgstr "Diese Aktion kann nicht rückgängig gemacht werden."
-
-#: includes/members.inc:477
-msgid "Are you sure you want to remove yourself as a member?"
-msgstr "Sind Sie sicher, dass Sie sich selbst als Mitglied löschen möchten?"
-
-#: includes/members.inc:480
-msgid "Are you sure you want to remove this member?"
-msgstr "Sind Sie sicher, dass Sie dieses Mitglied löschen möchten?"
-
-#: includes/members.inc:491
-msgid "Remove"
-msgstr "Löschen"
-
-#: includes/members.inc:529
-msgid "There was an error while removing the member."
-msgstr "Beim Löschen des Mitglieds ist ein Fehler aufgetreten."
-
-#: includes/members.inc:541
-msgid "You are not longer a member of @page."
-msgstr "Sie sind nicht mehr Mitglied von @page."
-
-#: includes/members.inc:547
-msgid "User @nick is removed as member of page @page."
-msgstr "Der Nutzer @nick wurde als Mitglied von @page gelöscht."
-
-#: includes/members.inc:576
-msgid "Request to become an administrator"
-msgstr "Antrag darauf, Administrator zu werden"
-
-#: includes/members.inc:587
-msgid "Your request to become an administrator of this page is sent"
-msgstr ""
-"Ihr Antrag darauf, Administrator dieser Seite zu werden, wurde verschickt"
-
-#: includes/members.inc:620
-msgid "!username wants to be an administrator of !page."
-msgstr "!username möchte Administrator von !page werden."
-
-#: includes/members.inc:629 includes/pages.inc:61
-msgid "OK"
-msgstr "Ok"
-
-#: includes/members.inc:652
-msgid "!username successfully added as administrator of page !page."
-msgstr "!username wurde erfolgreich als Administrator von !page hinzugefügt."
-
-#: includes/pages.inc:27;31
-msgid "There was an error while loading the search results."
-msgstr "Beim Laden der Suchergebnisse ist ein Fehler aufgetreten."
-
-#: includes/pages.inc:54
-msgid "Name of your page"
-msgstr "Name Ihrer Seite"
-
-#: includes/pages.inc:119
-msgid ""
-"You are now a member of @page. Manage your membership "
-"of this and other pages with"
-msgstr ""
-"Sie sind jetzt Mitglied von @page. Verwalten Sie Ihre "
-"Mitgliedschaft dieser und anderer Seiten über"
-
-#: includes/pages.inc:134
-msgid ""
-"It is not allowed to join @page as a member. Please contact the "
-"administrator of the page to become a member."
-msgstr ""
-"Es ist nicht gestattet, Mitglied von @page zu werden. Bitte einen "
-"Administrator kontaktieren, um trotzdem Mitglied zu werden."
-
-#: includes/pages.inc:137;184
-msgid "You could not be added to @page."
-msgstr "Sie konnten @page nicht hinzugefügt werden."
-
-#: includes/pages.inc:246
-msgid "Type"
-msgstr "Art"
-
-#: includes/pages.inc:254
-msgid "Description"
-msgstr "Beschreibung"
-
-#: includes/pages.inc:255
-msgid "Maximum 400 characters"
-msgstr "Höchstens 400 Zeichen"
-
-#: includes/pages.inc:265 theme/culturefeed-page-summary.tpl.php:32
-#: theme/culturefeed-page.tpl.php:36
-msgid "Address"
-msgstr "Adresse"
-
-#: includes/pages.inc:291
-msgid "Phone"
-msgstr "Telefon"
-
-#: includes/pages.inc:298
-msgid "Email address"
-msgstr "E-Mail-Adresse"
-
-#: includes/pages.inc:305 theme/culturefeed-page.tpl.php:50
-msgid "Website"
-msgstr "Website"
-
-#: includes/pages.inc:312
-msgid "Other websites"
-msgstr "Andere Websites"
-
-#: includes/pages.inc:321
-msgid "Ticketing"
-msgstr "Tickets"
-
-#: includes/pages.inc:327
-msgid "Facebook"
-msgstr "Facebook"
-
-#: includes/pages.inc:333
-msgid "Twitter"
-msgstr "Twitter"
-
-#: includes/pages.inc:339
-msgid "Google+"
-msgstr "Google+"
-
-#: includes/pages.inc:345
-msgid "YouTube"
-msgstr "YouTube"
-
-#: includes/pages.inc:351
-msgid "Blog"
-msgstr "Blog"
-
-#: includes/pages.inc:357
-msgid "Picture or logo"
-msgstr "Bild oder Logo"
-
-#: includes/pages.inc:396
-msgid "Title is required"
-msgstr "Der Titel muss eingetragen sein"
-
-#: includes/pages.inc:401
-msgid "The maximum is 400 characters"
-msgstr "Die maximale Zeichenanzahl beträgt 400"
-
-#: includes/pages.inc:448
-msgid "Page \"@page\" has been created."
-msgstr "Die Seite \"@page\" wurde angelegt."
-
-#: includes/pages.inc:452
-msgid "There was an error while creating the page."
-msgstr "Beim Anlegen der Seite ist ein Fehler aufgetreten."
-
-#: includes/pages.inc:472;620
-msgid "An error occurred when uploading your image."
-msgstr "Beim Hochladen Ihres Bildes ist ein Fehler aufgetreten."
-
-#: includes/pages.inc:551
-msgid "Select another photo"
-msgstr "Anderes Foto auswählen"
-
-#: includes/pages.inc:555
-msgid "Remove photo"
-msgstr "Foto löschen"
-
-#: includes/pages.inc:586
-msgid "Page \"@page\" is updated."
-msgstr "Die Seite \"@page\" wurde geändert."
-
-#: includes/pages.inc:590
-msgid "There was an error while updating the page."
-msgstr "Beim Bearbeiten der Seite ist ein Fehler aufgetreten."
-
-#: includes/pages.inc:663
-msgid "follow my page"
-msgstr "meiner Seite folgen"
-
-#: includes/pages.inc:664
-msgid "This allows users to stay informed of any updates on this page."
-msgstr ""
-"Auf diese Weise können Nutzer über alle Updates zu dieser Seite auf dem "
-"Laufenden bleiben."
-
-#: includes/pages.inc:670
-msgid "become a member of my page"
-msgstr "Mitglied meiner Seite werden"
-
-#: includes/pages.inc:671
-msgid ""
-"In this way, your page can also be accessed via the profiles, comments and "
-"reactions of all colleagues who are active on this site."
-msgstr ""
-"Auf diese Weise kann auch über die Profile, Reaktionen und Reaktionen aller "
-"Kollegen, die auf dieser Seite aktiv sind, auf Ihre Seite zugegriffen werden."
-
-#: includes/pages.inc:677
-msgid "write comments about my activities"
-msgstr "Reaktionen zu meinen Aktivitäten schreiben"
-
-#: includes/pages.inc:678
-msgid ""
-"Only for organizations that provide activities and have entered via www.UiTdatabank.be ."
-msgstr ""
-"Nur für Organisationen, die Aktivitäten organisieren und über www.UiTdatabank.be eingetragen haben."
-
-#: includes/pages.inc:690;785
-msgid "Remove page"
-msgstr "Seite löschen"
-
-#: includes/pages.inc:743
-msgid "Page settings has been saved."
-msgstr "Die Seiteneinstellungen wurden gespeichert."
-
-#: includes/pages.inc:747
-msgid "There was an error while saving the settings page."
-msgstr "Beim Speichern der Seiteneinstellungen ist ein Fehler aufgetreten."
-
-#: includes/pages.inc:799
-msgid ""
-"By deleting a page, the page will no longer appear in search results, but it "
-"will not remove your contact info."
-msgstr ""
-"Wenn Sie eine Seite löschen, erscheint die Seite nicht mehr in den "
-"Suchergebnissen. Ihre sämtlichen Kontaktangaben werden aber nicht gelöscht."
-
-#: includes/pages.inc:800
-msgid ""
-"Members of this page, and activities in the name of this page will not be "
-"deleted."
-msgstr ""
-"Mitglieder dieser Seite und Aktivitäten im Namen dieser Seite werden nicht "
-"gelöscht."
-
-#: includes/pages.inc:801;900
-msgid "Are you sure?"
-msgstr "Sind Sie sicher?"
-
-#: includes/pages.inc:812
-msgid "Delete"
-msgstr "Löschen"
-
-#: includes/pages.inc:845
-msgid "Page \"@page\" is deleted."
-msgstr "Die Seite \"@page\" wurde gelöscht."
-
-#: includes/pages.inc:862
-msgid "There was an error while deleting the page."
-msgstr "Beim Löschen der Seite ist ein Fehler aufgetreten."
-
-#: includes/pages.inc:898
-msgid "By publishing a page, the page will re-appear in the search results."
-msgstr ""
-"Wenn Sie eine Seite veröffentlichen, erscheint die Seite erneut in den "
-"Suchergebnissen."
-
-#: includes/pages.inc:899
-msgid ""
-"Members of this page, and activities in the name of this page will be "
-"recreated."
-msgstr ""
-"Mitglieder dieser Seite und Aktivitäten im Namen dieser Seite werden erneut "
-"aktiviert."
-
-#: includes/pages.inc:905
-msgid "Publish"
-msgstr "Veröffentlichen"
-
-#: includes/pages.inc:933
-msgid "Page \"@page\" is recreated."
-msgstr "Die Seite \"@page\" wurde wiederhergestellt."
-
-#: includes/pages.inc:937
-msgid "There was an error while recreating the page."
-msgstr "Beim Wiederherstellen der Seite ist ein Fehler aufgetreten."
-
-#: includes/pages.inc:971 theme/theme.inc:406
-msgid "Title"
-msgstr "Titel"
-
-#: includes/pages.inc:975 theme/theme.inc:407
-msgid "Date"
-msgstr "Datum"
-
-#: includes/pages.inc:979 theme/theme.inc:408
-msgid "Reactions"
-msgstr "Reaktionen"
-
-#: includes/pages.inc:1005
-msgid "There was an error while loading the activities."
-msgstr "Beim Laden der Aktivitäten ist ein Fehler aufgetreten."
-
-#: includes/pages.inc:1041;1119
-msgid "Administer page"
-msgstr "Seite verwalten"
-
-#: includes/pages.inc:1060
-msgid "Become an administrator"
-msgstr "Administrator werden"
-
-#: includes/pages.inc:1061
-msgid "This is a request sent to the administrator of this page."
-msgstr ""
-"Damit wird ein Antrag an den jetzigen Administrator dieser Seite gestellt."
-
-#: includes/pages.inc:1067
-msgid "Not possible to remove"
-msgstr "Löschen nicht möglich"
-
-#: includes/pages.inc:1067
-msgid ""
-"You're the only administrator of this page. You can not remove yourself as a "
-"member"
-msgstr ""
-"Sie sind der einzige Administrator dieser Seite. Sie können sich selbst "
-"nicht als Mitglied löschen"
-
-#: includes/pages.inc:1096;1138
-msgid "Page"
-msgstr "Seite"
-
-#: includes/pages.inc:1112 theme/theme.inc:66
-msgid "Unfollow"
-msgstr "Nicht mehr folgen"
-
-#: includes/pages.inc:1113
-msgid "You are a member of this page"
-msgstr "Sie sind Mitglied dieser Seite"
-
-#: includes/pages.inc:1115
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:24
-#: theme/theme.inc:161;496
-msgid "Become a member"
-msgstr "Mitglied werden"
-
-#: includes/pages.inc:1122 theme/theme.inc:431
-msgid "Send request to become administrator"
-msgstr "Antrag darauf, Administrator zu werden, versenden"
-
-#: includes/pages.inc:1138
-msgid "Following since"
-msgstr "Folgt seit"
-
-#: theme/culturefeed-page-invisible.tpl.php:1
-msgid "The content of this page was removed by the administrator of the page."
-msgstr "Der Inhalt dieser Seite wurde vom Administrator der Seite gelöscht."
-
-#: theme/culturefeed-page-summary.tpl.php:16
-msgid "View members"
-msgstr "Mitglieder ansehen"
-
-#: theme/culturefeed-page-summary.tpl.php:20
-msgid "@count follower"
-msgstr "@count Follower"
-
-#: theme/culturefeed-page-summary.tpl.php:20
-msgid "@count followers"
-msgstr "@count followers"
-
-#: theme/culturefeed-page-summary.tpl.php:15
-msgid "@count member"
-msgid_plural "@count members"
-msgstr[0] "@count Mitglied"
-msgstr[1] "@count Mitglieder"
-
-#: theme/culturefeed-page.tpl.php:43
-msgid "Contact"
-msgstr "Kontakt"
-
-#: theme/culturefeed-page.tpl.php:45
-msgid "or"
-msgstr "oder"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:20
-msgid "Your page has published no activities yet."
-msgstr "Ihre Seite hat noch keine Aktivitäten"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:21
-msgid "Add new activities."
-msgstr "Eine neue Aktivität hinzufügen"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:26
-msgid "Latest notifications"
-msgstr "Neueste Meldungen"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:36
-msgid ""
-"You are manager on this page, but not logged in"
-"strong> as this page. Do you want to continue working as this page"
-"strong>?"
-msgstr ""
-"Sie sind Administrator dieser Seite, aber nicht "
-"angemeldet als diese Seite. Möchten Sie als diese Seite "
-"weiterarbeiten ?"
-
-#: theme/culturefeed-pages-events-admin-page.tpl.php:14
-msgid ""
-"This list shows only the activities that are currently online. You can find "
-"past or unpublished activities on UiT "
-"database a>."
-msgstr ""
-"Diese Liste zeigt nur die Aktivitäten an, die zurzeit online stehen. "
-"Vergangene oder nicht veröffentlichte Aktivitäten können Sie nachlesen in "
-"der Uitdatabank ."
-
-#: theme/culturefeed-pages-events-admin-page.tpl.php:18
-msgid "Add a new activity"
-msgstr "Eine neue Aktivität hinzufügen"
-
-#: theme/culturefeed-pages-events-admin-page.tpl.php:20
-msgid ""
-"Add new activities with the UiTdatabank. You can sign in with the same "
-"account and add activities immediately. Add new activity ."
-msgstr ""
-"Das geht über die Uitdatabank. Sie können sich dort auch mit diesem Konto "
-"anmelden, um direkt loszulegen. Neue "
-"Aktivität hinzufügen ."
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:17
-msgid "is at the moment the only member of the page"
-msgstr "ist derzeit das einzige Mitglied von Seite"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:21
-msgid "You are a member of"
-msgstr "Sie sind Mitglied von"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:21
-msgid "You are the only member of"
-msgstr "Sie sind das einzige Mitglied von"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:23
-msgid "Are you a colleague of"
-msgstr "Sind Sie ein Kollege von"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:23
-msgid "of"
-msgstr "von"
-
-#: theme/culturefeed-pages-followers-block.tpl.php:20
-msgid "This page has no followers yet."
-msgstr "Diese Seite hat noch keine Followers."
-
-#: theme/culturefeed-pages-join-page.tpl.php:9
-msgid "There doesn't exists a page of"
-msgstr "Es existiert noch keine Seite von"
-
-#: theme/culturefeed-pages-join-page.tpl.php:10
-msgid "on"
-msgstr "auf"
-
-#: theme/culturefeed-pages-join-search-result-item.tpl.php:9
-msgid "You are already a member"
-msgstr "Sie sind bereits Mitglied"
-
-#: theme/culturefeed-pages-join-search-result-item.tpl.php:15
-msgid "You follow this page"
-msgstr "Sie folgen dieser Seite"
-
-#: theme/culturefeed-pages-page-agenda.tpl.php:11
-msgid "You page has published no activities yet."
-msgstr "Ihre Seite hat noch keine Aktivitäten veröffentlicht."
-
-#: theme/culturefeed-pages-page-agenda.tpl.php:12
-msgid ""
-"Add new activities on www.uitdatabank."
-"be ."
-msgstr ""
-"Neue Aktivitäten hinzufügen über www."
-"uitdatabank.be ."
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:2 theme/theme.inc:361
-msgid "View profile"
-msgstr "Profil ansehen"
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:5
-msgid "Pages where I am a member of"
-msgstr "Seiten, deren Mitglied ich bin"
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:9
-msgid ""
-"You are not a member of any page. Search (or create) "
-"the page of your employer and become a member. If you create a new page, you "
-"automatically become a member and administrator of the page."
-msgstr ""
-"Sie sind noch kein Mitglied einer Seite. Suchen (oder "
-"erstellen) Sie die Seite Ihres Arbeitgebers und werden Sie Mitglied. Wenn "
-"Sie eine neue Seite erstellen, sind Sie automatisch ein Mitglied und "
-"Administrator der Seite."
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:17
-msgid ""
-" You follow no pages. Find and follow pages that "
-"interest you and receive a notification when there are relevant updates."
-msgstr ""
-"Sie folgen noch keinen Seiten. Suchen und folgen Sie "
-"Seiten, die Sie interessieren, und erhalten Sie eine Meldung, wenn es dort "
-"relevante Updates gibt."
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:20
-msgid "Search new pages:"
-msgstr "Neue Seiten suchen:"
-
-#: theme/culturefeed-pages-request-admin-membership-block.tpl.php:9
-msgid "Mistake seen?"
-msgstr "Fehler gesehen?"
-
-#: theme/culturefeed-pages-request-admin-membership-block.tpl.php:10
-msgid ""
-"This page has no administrator. As an administrator, you can change the "
-"information on this page and manage the members."
-msgstr ""
-"Diese Seite hat noch keinen Administrator. Als Administrator können Sie die "
-"Info auf dieser Seite ändern und die Mitglieder verwalten."
-
-#: theme/culturefeed-pages-request-admin-membership-block.tpl.php:11
-msgid "Send application to become an administrator"
-msgstr "Antrag darauf, Administrator zu werden, versenden"
-
-#: theme/culturefeed-pages-user-search-result.tpl.php:2
-msgid "No users found"
-msgstr "Keine Nutzer gefunden"
-
-#: theme/theme.inc:84
-msgid "More info"
-msgstr "Mehr Info"
-
-#: theme/theme.inc:290
-msgid "Login as"
-msgstr "Anmelden als"
-
-#: theme/theme.inc:309
-msgid "View all notifications"
-msgstr "Alle Meldungen ansehen"
-
-#: theme/theme.inc:314
-msgid "Your page has no notifications yet"
-msgstr "Ihre Seite hat noch keine Meldungen"
-
-#: theme/theme.inc:363
-msgid "Add as a member"
-msgstr "Als Mitglied hinzufügen"
-
-#: theme/theme.inc:393
-msgid "No reactions yet"
-msgstr "Noch keine Reaktionen"
-
-#: theme/theme.inc:395
-msgid "Edit in the UiTdatabank"
-msgstr "In der UiTdatabank bearbeiten"
-
-#: theme/theme.inc:492
-msgid "You are following this page now"
-msgstr "Sie folgen jetzt dieser Seite"
-
-#: theme/theme.inc:495
-msgid "Want to join this page?"
-msgstr "Möchten Sie Mitglied dieser Seite werden?"
-
-#: theme/theme.inc:508
-msgid "You are no longer following this page anymore"
-msgstr "Sie folgen dieser Seite nicht mehr"
-
-#: theme/theme.inc:390
-msgid "@count reaction"
-msgid_plural "@count reactions"
-msgstr[0] "@count Reaktion"
-msgstr[1] "@count Reaktionen"
\ No newline at end of file
diff --git a/culturefeed_pages/translations/culturefeed_pages.fr.po b/culturefeed_pages/translations/culturefeed_pages.fr.po
deleted file mode 100755
index 6eef90a7..00000000
--- a/culturefeed_pages/translations/culturefeed_pages.fr.po
+++ /dev/null
@@ -1,913 +0,0 @@
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_pages.module: n/a
-# includes/blocks.inc: n/a
-# includes/pages.inc: n/a
-# theme/culturefeed-page.tpl.php: n/a
-# includes/members.inc: n/a
-# includes/helpers.inc: n/a
-# theme/theme.inc: n/a
-# culturefeed_pages.info: n/a
-# theme/culturefeed-pages-page-my-page.tpl.php: n/a
-# theme/culturefeed-page-summary.tpl.php: n/a
-# theme/culturefeed-pages-fellow-members-block.tpl.php: n/a
-# theme/culturefeed-page-invisible.tpl.php: n/a
-# theme/culturefeed-pages-block-admin-options.tpl.php: n/a
-# theme/culturefeed-pages-events-admin-page.tpl.php: n/a
-# theme/culturefeed-pages-followers-block.tpl.php: n/a
-# theme/culturefeed-pages-join-page.tpl.php: n/a
-# theme/culturefeed-pages-join-search-result-item.tpl.php: n/a
-# theme/culturefeed-pages-page-agenda.tpl.php: n/a
-# theme/culturefeed-pages-request-admin-membership-block.tpl.php: n/a
-# theme/culturefeed-pages-user-search-result.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-08-02 09:32+0200\n"
-"PO-Revision-Date: 2013-11-06 13:17+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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_pages.module:425
-msgid "Culturefeed pages: fellow members from user"
-msgstr ""
-
-#: culturefeed_pages.module:430
-msgid "Culturefeed pages: pages i'm following"
-msgstr ""
-
-#: culturefeed_pages.module:435
-msgid "Culturefeed pages: page options"
-msgstr ""
-
-#: culturefeed_pages.module:440
-msgid "Culturefeed pages: request to become admin member"
-msgstr ""
-
-#: culturefeed_pages.module:445
-msgid "Culturefeed pages: page admin menu"
-msgstr ""
-
-#: culturefeed_pages.module:450
-msgid "Culturefeed pages: followers"
-msgstr ""
-
-#: culturefeed_pages.module:456
-msgid "Culturefeed pages: page timeline"
-msgstr ""
-
-#: culturefeed_pages.module:463
-msgid "Culturefeed pages: page agenda"
-msgstr ""
-
-#: culturefeed_pages.module:481
-msgid "Items to show"
-msgstr "Eléments à afficher"
-
-#: culturefeed_pages.module:605
-msgid "My page"
-msgstr "Ma page"
-
-#: culturefeed_pages.module:613 includes/blocks.inc:139;169
-msgid "Manage pages"
-msgstr "Gérer mes pages"
-
-#: culturefeed_pages.module:635;662
-msgid "Search your page"
-msgstr "Chercher votre page"
-
-#: culturefeed_pages.module:643;360
-msgid "Change active page"
-msgstr "Modifier la page active"
-
-#: culturefeed_pages.module:677
-msgid "Change settings"
-msgstr "Modifier les données"
-
-#: culturefeed_pages.module:679
-msgid "Edit contact info, photos, description, website,..."
-msgstr "Modifier les coordonnées, les photos, la description, le site web…"
-
-#: culturefeed_pages.module:683;263 includes/pages.inc:649
-msgid "Settings"
-msgstr "Réglages"
-
-#: culturefeed_pages.module:685
-msgid "Allow users to follow your page, write comments, suggest activities,..."
-msgstr ""
-"Autoriser des utilisateurs à suivre votre page, écrire des commentaires, "
-"recommander des activités…"
-
-#: culturefeed_pages.module:689
-msgid "Members & roles"
-msgstr "Membres & rôles"
-
-#: culturefeed_pages.module:691
-msgid "Manage members and access rights"
-msgstr "Gérer les membres et les droits d'accès"
-
-#: culturefeed_pages.module:695;274 includes/blocks.inc:291
-msgid "Activities"
-msgstr "Activités"
-
-#: culturefeed_pages.module:697
-msgid "Manage your activities and reactions"
-msgstr "Gérer vos activités et vos réactions"
-
-#: culturefeed_pages.module:711;406 includes/pages.inc:119
-msgid "My pages"
-msgstr "Mes pages"
-
-#: culturefeed_pages.module:713
-msgid "Manage the pages where you're member off or that you follow"
-msgstr "Gérer les pages dont vous êtes membres et que vous suivez"
-
-#: culturefeed_pages.module:727;728
-msgid "Pages"
-msgstr "Pages"
-
-#: culturefeed_pages.module:732
-msgid "Relevancy"
-msgstr "Pertinence"
-
-#: culturefeed_pages.module:733
-msgid "Alphabetical"
-msgstr "Alphabétique"
-
-#: culturefeed_pages.module:734
-msgid "Number of members"
-msgstr "Nombre de membres"
-
-#: culturefeed_pages.module:735
-msgid "Number of followers"
-msgstr "Nombre de personnes que vous suivent"
-
-#: culturefeed_pages.module:775
-msgid "Your page in @sitename"
-msgstr "Votre page sur @sitename"
-
-#: culturefeed_pages.module:838
-msgid "from"
-msgstr "de"
-
-#: culturefeed_pages.module:210
-msgid "Create your own page"
-msgstr "Créer votre propre page"
-
-#: culturefeed_pages.module:228
-msgid "Edit page"
-msgstr "Modifier la page"
-
-#: culturefeed_pages.module:241
-msgid "Delete page"
-msgstr "Supprimer la page"
-
-#: culturefeed_pages.module:252
-msgid "Publish page"
-msgstr "Publier la page"
-
-#: culturefeed_pages.module:285;296 theme/culturefeed-page.tpl.php:15
-msgid "Members"
-msgstr "Membres"
-
-#: culturefeed_pages.module:307
-msgid "Delete member"
-msgstr "Supprimer le membre"
-
-#: culturefeed_pages.module:318 includes/members.inc:345
-msgid "Add member"
-msgstr "Ajouter un membre"
-
-#: culturefeed_pages.module:329
-msgid "Application for administrator of the page"
-msgstr "Demander à devenir administrateur de page"
-
-#: culturefeed_pages.module:339
-msgid "Remove myself as a member"
-msgstr "Me supprimer en tant que membre"
-
-#: culturefeed_pages.module:349
-msgid "Add member as administrator"
-msgstr "Ajouter un membre à la liste des administateurs"
-
-#: culturefeed_pages.module:386 includes/helpers.inc:38 theme/theme.inc:69
-msgid "Follow"
-msgstr "Suivre"
-
-#: culturefeed_pages.module:396 includes/helpers.inc:35
-msgid "Unfollow page"
-msgstr "Ne plus suivre la page"
-
-#: culturefeed_pages.info:0
-msgid "CultureFeed Pages"
-msgstr "Pages CultureFeed"
-
-#: culturefeed_pages.info:0
-msgid "CultureFeed Pages makes it possible to view / manage pages."
-msgstr ""
-"Les pages CultureFeed vous permettent de gérer et de consulter des pages."
-
-#: culturefeed_pages.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/blocks.inc:49
-msgid "My colleague's"
-msgstr "Mes collègues"
-
-#: includes/blocks.inc:78 theme/culturefeed-pages-page-my-page.tpl.php:13
-msgid "Pages I follow"
-msgstr "Les pages que je suis"
-
-#: includes/blocks.inc:248
-msgid "Timeline"
-msgstr "Ligne du temps"
-
-#: includes/blocks.inc:342
-msgid "Page followers"
-msgstr "Suivre cette page"
-
-#: includes/blocks.inc:433
-msgid "Related activities"
-msgstr "Activités liées"
-
-#: includes/helpers.inc:201
-msgid "Home"
-msgstr "Accueil"
-
-#: includes/members.inc:38 includes/pages.inc:506;642 theme/theme.inc:71
-msgid "View page"
-msgstr "Consulter la page"
-
-#: includes/members.inc:48
-msgid "Please enter at least 3 characters"
-msgstr "Veuillez indiquer au minimum 3 caractères"
-
-#: includes/members.inc:66 includes/pages.inc:239
-msgid "Name"
-msgstr "Nom"
-
-#: includes/members.inc:67
-msgid "Function"
-msgstr "Fonction"
-
-#: includes/members.inc:68
-msgid "Role"
-msgstr "Rôle"
-
-#: includes/members.inc:69 includes/pages.inc:1096
-msgid "Member since"
-msgstr "Membre depuis"
-
-#: includes/members.inc:93
-msgid "Edit"
-msgstr "Modifier"
-
-#: includes/members.inc:103
-msgid "Delete as member"
-msgstr "Supprimer en tant que membre"
-
-#: includes/members.inc:115
-msgid "Cancel changes"
-msgstr "Annuler les opérations"
-
-#: includes/members.inc:129
-msgid "No content available."
-msgstr "Aucun contenu disponible."
-
-#: includes/members.inc:177 includes/pages.inc:370;684
-msgid "Save"
-msgstr "Enregistrer"
-
-#: includes/members.inc:189
-msgid "Remove administrator"
-msgstr "Supprimer en tant qu'administrateur"
-
-#: includes/members.inc:189
-msgid "Make administrator"
-msgstr "Créer un administrateur"
-
-#: includes/members.inc:255
-msgid ""
-"Something went wrong while saving. Please try again or contact an "
-"administrator."
-msgstr ""
-"Une erreur s'est produite au cours de l'enregistrement. Veuillez réessayer "
-"ou contacter un administrateur."
-
-#: includes/members.inc:266
-msgid "Membership changed"
-msgstr "L'affiliation a été modifiée"
-
-#: includes/members.inc:277
-msgid "Search users"
-msgstr "Chercher des utilisateurs"
-
-#: includes/members.inc:284
-msgid "Search"
-msgstr "Chercher"
-
-#: includes/members.inc:359
-msgid "Sure you want to add @nick as a member?"
-msgstr "Êtes-vous sûr de vouloir ajouter @nick en tant que membre ?"
-
-#: includes/members.inc:370
-msgid "Add"
-msgstr "Ajouter"
-
-#: includes/members.inc:376;497 includes/pages.inc:820;911
-msgid "Cancel"
-msgstr "Annuler"
-
-#: includes/members.inc:404
-msgid "@nick is member of @page now."
-msgstr "@nick est désormais membre de @page."
-
-#: includes/members.inc:409
-msgid ""
-"There was an error while saving. Please try again, or contact an "
-"administrator."
-msgstr ""
-"Une erreur s'est produite au cours de l'ajout. Veuillez réessayer ou "
-"contacter un administrateur."
-
-#: includes/members.inc:458
-msgid "Remove member"
-msgstr "Supprimer le membre"
-
-#: includes/members.inc:473
-msgid "This action cannot be undone."
-msgstr "Cette action ne peut être supprimée."
-
-#: includes/members.inc:477
-msgid "Are you sure you want to remove yourself as a member?"
-msgstr "Êtes-vous sûr de vouloir vous supprimer en tant que membre ?"
-
-#: includes/members.inc:480
-msgid "Are you sure you want to remove this member?"
-msgstr "Êtes-vous sûr de vouloir supprimer ce membre ?"
-
-#: includes/members.inc:491
-msgid "Remove"
-msgstr "Supprimer"
-
-#: includes/members.inc:529
-msgid "There was an error while removing the member."
-msgstr "Une erreur s'est produite lors de la suppression du membre."
-
-#: includes/members.inc:541
-msgid "You are not longer a member of @page."
-msgstr "Vous n'êtes plus membre de @page."
-
-#: includes/members.inc:547
-msgid "User @nick is removed as member of page @page."
-msgstr "L'utilisateur @nick a été supprimé en tant que membre de @page."
-
-#: includes/members.inc:576
-msgid "Request to become an administrator"
-msgstr "Demander à devenir administrateur"
-
-#: includes/members.inc:587
-msgid "Your request to become an administrator of this page is sent"
-msgstr ""
-"Votre demande destinée à devenir administrateur de cette page a été envoyée"
-
-#: includes/members.inc:620
-msgid "!username wants to be an administrator of !page."
-msgstr "!username veut devenir membre de !page."
-
-#: includes/members.inc:629 includes/pages.inc:61
-msgid "OK"
-msgstr "Ok"
-
-#: includes/members.inc:652
-msgid "!username successfully added as administrator of page !page."
-msgstr ""
-"!username a été correctement ajouté en tant qu'administrateur de !page."
-
-#: includes/pages.inc:27;31
-msgid "There was an error while loading the search results."
-msgstr ""
-"Une erreur s'est produite durant le chargement des résultats de la recherche."
-
-#: includes/pages.inc:54
-msgid "Name of your page"
-msgstr "Nom de votre page"
-
-#: includes/pages.inc:119
-msgid ""
-"You are now a member of @page. Manage your membership "
-"of this and other pages with"
-msgstr ""
-"Vous êtes désormais membre de @page. Gérer votre "
-"affiliation à cette page et à d'autres pages via"
-
-#: includes/pages.inc:134
-msgid ""
-"It is not allowed to join @page as a member. Please contact the "
-"administrator of the page to become a member."
-msgstr ""
-"Vous n'êtes pas autorisé à devenir membre de la page @page. Veuillez "
-"contacter un administrateur si vous souhaitez tout de même devenir membre."
-
-#: includes/pages.inc:137;184
-msgid "You could not be added to @page."
-msgstr "Vous ne pouviez pas être ajouté à @page."
-
-#: includes/pages.inc:246
-msgid "Type"
-msgstr "Type"
-
-#: includes/pages.inc:254
-msgid "Description"
-msgstr "Description"
-
-#: includes/pages.inc:255
-msgid "Maximum 400 characters"
-msgstr "Maximum 400 caractères"
-
-#: includes/pages.inc:265 theme/culturefeed-page-summary.tpl.php:32
-#: theme/culturefeed-page.tpl.php:36
-msgid "Address"
-msgstr "Adresse"
-
-#: includes/pages.inc:291
-msgid "Phone"
-msgstr "Téléphone"
-
-#: includes/pages.inc:298
-msgid "Email address"
-msgstr "Adresse de courrier électronique"
-
-#: includes/pages.inc:305 theme/culturefeed-page.tpl.php:50
-msgid "Website"
-msgstr "Site web"
-
-#: includes/pages.inc:312
-msgid "Other websites"
-msgstr "Autres sites web"
-
-#: includes/pages.inc:321
-msgid "Ticketing"
-msgstr "Tickets"
-
-#: includes/pages.inc:327
-msgid "Facebook"
-msgstr "Facebook"
-
-#: includes/pages.inc:333
-msgid "Twitter"
-msgstr "Twitter"
-
-#: includes/pages.inc:339
-msgid "Google+"
-msgstr "Google+"
-
-#: includes/pages.inc:345
-msgid "YouTube"
-msgstr "YouTube"
-
-#: includes/pages.inc:351
-msgid "Blog"
-msgstr "Blog"
-
-#: includes/pages.inc:357
-msgid "Picture or logo"
-msgstr "Image ou logo"
-
-#: includes/pages.inc:396
-msgid "Title is required"
-msgstr "Le champ réservé au titre ne peut être vide"
-
-#: includes/pages.inc:401
-msgid "The maximum is 400 characters"
-msgstr "Le nombre maximum est fixé à 400 charactères"
-
-#: includes/pages.inc:448
-msgid "Page \"@page\" has been created."
-msgstr "La page \"@page\" a été créée."
-
-#: includes/pages.inc:452
-msgid "There was an error while creating the page."
-msgstr "Une erreur s'est produite lors de la création de cette page."
-
-#: includes/pages.inc:472;620
-msgid "An error occurred when uploading your image."
-msgstr "Une erreur s'est produite lors du chargement de votre illustration."
-
-#: includes/pages.inc:551
-msgid "Select another photo"
-msgstr "Sélectionner une autre photo"
-
-#: includes/pages.inc:555
-msgid "Remove photo"
-msgstr "Supprimer la photo"
-
-#: includes/pages.inc:586
-msgid "Page \"@page\" is updated."
-msgstr "La page \"@page\" a été modifiée."
-
-#: includes/pages.inc:590
-msgid "There was an error while updating the page."
-msgstr "Une erreur s'est produite lors de la modification de cette page."
-
-#: includes/pages.inc:663
-msgid "follow my page"
-msgstr "suivre ma page"
-
-#: includes/pages.inc:664
-msgid "This allows users to stay informed of any updates on this page."
-msgstr ""
-"Les utilisateurs peuvent ainsi rester informés des mises à jour de cette "
-"page."
-
-#: includes/pages.inc:670
-msgid "become a member of my page"
-msgstr "devenir membre de ma page"
-
-#: includes/pages.inc:671
-msgid ""
-"In this way, your page can also be accessed via the profiles, comments and "
-"reactions of all colleagues who are active on this site."
-msgstr ""
-"Votre page est ainsi également accessible via les profils, réactions et "
-"commentaires des collègues actifs sur ce site."
-
-#: includes/pages.inc:677
-msgid "write comments about my activities"
-msgstr "Écrire des commentaires à propos de mes activités"
-
-#: includes/pages.inc:678
-msgid ""
-"Only for organizations that provide activities and have entered via www.UiTdatabank.be ."
-msgstr ""
-"Uniquement pour les organisations qui organisent et ont ajouté des activités "
-"via www.UiTdatabank.be ."
-
-#: includes/pages.inc:690;785
-msgid "Remove page"
-msgstr "Supprimer la page"
-
-#: includes/pages.inc:743
-msgid "Page settings has been saved."
-msgstr "Les réglages de la page ont été sauvegardés."
-
-#: includes/pages.inc:747
-msgid "There was an error while saving the settings page."
-msgstr ""
-"Une erreur s'est produite durant l'enregistrement de la page des réglages."
-
-#: includes/pages.inc:799
-msgid ""
-"By deleting a page, the page will no longer appear in search results, but it "
-"will not remove your contact info."
-msgstr ""
-"Lorsqu'une page est supprimée, celle-ci n'apparaît plus dans les résultats "
-"de la recherche et l'ensemble de vos contacts ne sont pas supprimés."
-
-#: includes/pages.inc:800
-msgid ""
-"Members of this page, and activities in the name of this page will not be "
-"deleted."
-msgstr ""
-"Les membres de cette page et les activités en son nom ne sont pas supprimés."
-
-#: includes/pages.inc:801;900
-msgid "Are you sure?"
-msgstr "Êtes-vous sûr ?"
-
-#: includes/pages.inc:812
-msgid "Delete"
-msgstr "Supprimer"
-
-#: includes/pages.inc:845
-msgid "Page \"@page\" is deleted."
-msgstr "La page \"@page\" a été supprimée."
-
-#: includes/pages.inc:862
-msgid "There was an error while deleting the page."
-msgstr "Une erreur s'est produite lors de la suppression de la page."
-
-#: includes/pages.inc:898
-msgid "By publishing a page, the page will re-appear in the search results."
-msgstr ""
-"Lorsqu'une page est publiée, celle-ci apparaît de nouveau dans les résultats."
-
-#: includes/pages.inc:899
-msgid ""
-"Members of this page, and activities in the name of this page will be "
-"recreated."
-msgstr "Les membres de cette page et les activités en son nom réapparaissent."
-
-#: includes/pages.inc:905
-msgid "Publish"
-msgstr "Publier"
-
-#: includes/pages.inc:933
-msgid "Page \"@page\" is recreated."
-msgstr "La page \"@page\" a été restaurée."
-
-#: includes/pages.inc:937
-msgid "There was an error while recreating the page."
-msgstr "Une erreur s'est produite durant la restauration de la page."
-
-#: includes/pages.inc:971 theme/theme.inc:406
-msgid "Title"
-msgstr "Titre"
-
-#: includes/pages.inc:975 theme/theme.inc:407
-msgid "Date"
-msgstr "Date"
-
-#: includes/pages.inc:979 theme/theme.inc:408
-msgid "Reactions"
-msgstr "Réactions"
-
-#: includes/pages.inc:1005
-msgid "There was an error while loading the activities."
-msgstr "Une erreur s'est produite durant le chargement des activités."
-
-#: includes/pages.inc:1041;1119
-msgid "Administer page"
-msgstr "Gèrer la page"
-
-#: includes/pages.inc:1060
-msgid "Become an administrator"
-msgstr "Devenir administrateur"
-
-#: includes/pages.inc:1061
-msgid "This is a request sent to the administrator of this page."
-msgstr "Une demande envoyée à l'administrateur de cette page."
-
-#: includes/pages.inc:1067
-msgid "Not possible to remove"
-msgstr "Suppression impossible"
-
-#: includes/pages.inc:1067
-msgid ""
-"You're the only administrator of this page. You can not remove yourself as a "
-"member"
-msgstr ""
-"Vous êtes le seul administrateur de cette page. Vous ne pouvez pas vous "
-"supprimer en tant que membre"
-
-#: includes/pages.inc:1096;1138
-msgid "Page"
-msgstr "Page"
-
-#: includes/pages.inc:1112 theme/theme.inc:66
-msgid "Unfollow"
-msgstr "Ne plus suivre"
-
-#: includes/pages.inc:1113
-msgid "You are a member of this page"
-msgstr "Vous êtes membre de cette page"
-
-#: includes/pages.inc:1115
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:24
-#: theme/theme.inc:161;496
-msgid "Become a member"
-msgstr "Devenez membre"
-
-#: includes/pages.inc:1122 theme/theme.inc:431
-msgid "Send request to become administrator"
-msgstr "Envoyer une demande afin de devenir membre"
-
-#: includes/pages.inc:1138
-msgid "Following since"
-msgstr "Suivi depuis"
-
-#: theme/culturefeed-page-invisible.tpl.php:1
-msgid "The content of this page was removed by the administrator of the page."
-msgstr "Le contenu de cette page a été supprimé par son administrateur."
-
-#: theme/culturefeed-page-summary.tpl.php:16
-msgid "View members"
-msgstr "Consulter la liste des membres"
-
-#: theme/culturefeed-page-summary.tpl.php:20
-msgid "@count follower"
-msgstr "@count personne qui suit"
-
-#: theme/culturefeed-page-summary.tpl.php:20
-msgid "@count followers"
-msgstr "@count personnes qui suivent"
-
-#: theme/culturefeed-page-summary.tpl.php:15
-msgid "@count member"
-msgid_plural "@count members"
-msgstr[0] "@count membre"
-msgstr[1] "@count membres"
-
-#: theme/culturefeed-page.tpl.php:43
-msgid "Contact"
-msgstr "Contact"
-
-#: theme/culturefeed-page.tpl.php:45
-msgid "or"
-msgstr "ou"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:20
-msgid "Your page has published no activities yet."
-msgstr "Votre page ne compte pas encore d'activités"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:21
-msgid "Add new activities."
-msgstr "Ajouter une nouvelle activité"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:26
-msgid "Latest notifications"
-msgstr "Derniers messages"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:36
-msgid ""
-"You are manager on this page, but not logged in"
-"strong> as this page. Do you want to continue working as this page"
-"strong>?"
-msgstr ""
-"Vous êtes administrateur de cette page, mais vous "
-"n'êtes pas inscrit à cette page. Souhaitez-vous "
-"continuer sur cette page ?"
-
-#: theme/culturefeed-pages-events-admin-page.tpl.php:14
-msgid ""
-"This list shows only the activities that are currently online. You can find "
-"past or unpublished activities on UiT "
-"database a>."
-msgstr ""
-"Les activités se trouvant en ligne actuellement apparaissent uniquement sur "
-"cette liste. Vous pouvez consulter les dernières activités ou celles qui "
-"n'ont pas été publiées via Uitdatabank ."
-
-#: theme/culturefeed-pages-events-admin-page.tpl.php:18
-msgid "Add a new activity"
-msgstr "Ajouter une nouvelle activité"
-
-#: theme/culturefeed-pages-events-admin-page.tpl.php:20
-msgid ""
-"Add new activities with the UiTdatabank. You can sign in with the same "
-"account and add activities immediately. Add new activity ."
-msgstr ""
-"Vous pouvez procéder via Uitdatabank. Vous pouvez vous y inscrire avec le "
-"même compte afin de démarrer immédiatement. Ajouter une nouvelle activité ."
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:17
-msgid "is at the moment the only member of the page"
-msgstr "est actuellement le seul membre de la page"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:21
-msgid "You are a member of"
-msgstr "Vous êtes membre de"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:21
-msgid "You are the only member of"
-msgstr "Vous êtes le seul membre de"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:23
-msgid "Are you a colleague of"
-msgstr "Vous êtes un collègue de"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:23
-msgid "of"
-msgstr "de"
-
-#: theme/culturefeed-pages-followers-block.tpl.php:20
-msgid "This page has no followers yet."
-msgstr "Aucune personne ne suit actuellement cette page."
-
-#: theme/culturefeed-pages-join-page.tpl.php:9
-msgid "There doesn't exists a page of"
-msgstr "pour l'instant, il n'existe pas de page sur"
-
-#: theme/culturefeed-pages-join-page.tpl.php:10
-msgid "on"
-msgstr "le"
-
-#: theme/culturefeed-pages-join-search-result-item.tpl.php:9
-msgid "You are already a member"
-msgstr "Vous êtes déjà membre"
-
-#: theme/culturefeed-pages-join-search-result-item.tpl.php:15
-msgid "You follow this page"
-msgstr "Vous suivez cette page"
-
-#: theme/culturefeed-pages-page-agenda.tpl.php:11
-msgid "You page has published no activities yet."
-msgstr "Aucune activité n'a été publiée sur votre page."
-
-#: theme/culturefeed-pages-page-agenda.tpl.php:12
-msgid ""
-"Add new activities on www.uitdatabank."
-"be ."
-msgstr ""
-"Ajouter de nouvelles activités via www."
-"uitdatabank.be ."
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:2 theme/theme.inc:361
-msgid "View profile"
-msgstr "Consulter le profil"
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:5
-msgid "Pages where I am a member of"
-msgstr "Les pages dont je suis membre"
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:9
-msgid ""
-"You are not a member of any page. Search (or create) "
-"the page of your employer and become a member. If you create a new page, you "
-"automatically become a member and administrator of the page."
-msgstr ""
-"Vous n'êtes affilié à aucune page. Cherchez (ou créez) "
-"la page de votre employeur et affiliez-vous. Lorsque vous créez une nouvelle "
-"page, vous en devenez automatiquement membre et administrateur."
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:17
-msgid ""
-" You follow no pages. Find and follow pages that "
-"interest you and receive a notification when there are relevant updates."
-msgstr ""
-"Vous ne suivez aucune page. Cherchez et suivez les "
-"pages qui vous intéressent et recevez un message en cas de mises à jour "
-"intéressantes."
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:20
-msgid "Search new pages:"
-msgstr "Chercher de nouvelles pages :"
-
-#: theme/culturefeed-pages-request-admin-membership-block.tpl.php:9
-msgid "Mistake seen?"
-msgstr "Une erreur a été identifiée ?"
-
-#: theme/culturefeed-pages-request-admin-membership-block.tpl.php:10
-msgid ""
-"This page has no administrator. As an administrator, you can change the "
-"information on this page and manage the members."
-msgstr ""
-"Cette page ne compte pas d'administrateur. En tant qu'administrateur, vous "
-"pouvez modifier les informations sur cette page et gérer les membres."
-
-#: theme/culturefeed-pages-request-admin-membership-block.tpl.php:11
-msgid "Send application to become an administrator"
-msgstr "Envoyer une demande afin de devenir administrateur"
-
-#: theme/culturefeed-pages-user-search-result.tpl.php:2
-msgid "No users found"
-msgstr "Aucun utilisateur n'a été trouvé"
-
-#: theme/theme.inc:84
-msgid "More info"
-msgstr "Plus d'infos"
-
-#: theme/theme.inc:290
-msgid "Login as"
-msgstr "S'identifier en tant que"
-
-#: theme/theme.inc:309
-msgid "View all notifications"
-msgstr "Consulter l'ensemble des messages"
-
-#: theme/theme.inc:314
-msgid "Your page has no notifications yet"
-msgstr "Votre page ne compte pas encore de commentaires"
-
-#: theme/theme.inc:363
-msgid "Add as a member"
-msgstr "Ajouter en tant que membre"
-
-#: theme/theme.inc:393
-msgid "No reactions yet"
-msgstr "Pas encore de réactions"
-
-#: theme/theme.inc:395
-msgid "Edit in the UiTdatabank"
-msgstr "Modifier dans UiTdatabank"
-
-#: theme/theme.inc:492
-msgid "You are following this page now"
-msgstr "Vous suivez actuellement cette page"
-
-#: theme/theme.inc:495
-msgid "Want to join this page?"
-msgstr "Vous désirez devenir membre de cette page ?"
-
-#: theme/theme.inc:508
-msgid "You are no longer following this page anymore"
-msgstr "Vous ne suivez plus cette page"
-
-#: theme/theme.inc:390
-msgid "@count reaction"
-msgid_plural "@count reactions"
-msgstr[0] "@count réaction"
-msgstr[1] "@count réactions"
\ No newline at end of file
diff --git a/culturefeed_pages/translations/culturefeed_pages.nl.po b/culturefeed_pages/translations/culturefeed_pages.nl.po
deleted file mode 100644
index a88b4968..00000000
--- a/culturefeed_pages/translations/culturefeed_pages.nl.po
+++ /dev/null
@@ -1,913 +0,0 @@
-# $Id$
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_pages.module: n/a
-# includes/blocks.inc: n/a
-# includes/pages.inc: n/a
-# theme/culturefeed-page.tpl.php: n/a
-# includes/members.inc: n/a
-# includes/helpers.inc: n/a
-# theme/theme.inc: n/a
-# culturefeed_pages.info: n/a
-# theme/culturefeed-pages-page-my-page.tpl.php: n/a
-# theme/culturefeed-page-summary.tpl.php: n/a
-# theme/culturefeed-pages-fellow-members-block.tpl.php: n/a
-# theme/culturefeed-page-invisible.tpl.php: n/a
-# theme/culturefeed-pages-block-admin-options.tpl.php: n/a
-# theme/culturefeed-pages-events-admin-page.tpl.php: n/a
-# theme/culturefeed-pages-followers-block.tpl.php: n/a
-# theme/culturefeed-pages-join-page.tpl.php: n/a
-# theme/culturefeed-pages-join-search-result-item.tpl.php: n/a
-# theme/culturefeed-pages-page-agenda.tpl.php: n/a
-# theme/culturefeed-pages-request-admin-membership-block.tpl.php: n/a
-# theme/culturefeed-pages-user-search-result.tpl.php: n/a
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-08-02 09:32+0200\n"
-"PO-Revision-Date: 2013-08-02 09:32+0200\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"
-
-#: culturefeed_pages.module:425
-msgid "Culturefeed pages: fellow members from user"
-msgstr ""
-
-#: culturefeed_pages.module:430
-msgid "Culturefeed pages: pages i'm following"
-msgstr ""
-
-#: culturefeed_pages.module:435
-msgid "Culturefeed pages: page options"
-msgstr ""
-
-#: culturefeed_pages.module:440
-msgid "Culturefeed pages: request to become admin member"
-msgstr ""
-
-#: culturefeed_pages.module:445
-msgid "Culturefeed pages: page admin menu"
-msgstr ""
-
-#: culturefeed_pages.module:450
-msgid "Culturefeed pages: followers"
-msgstr ""
-
-#: culturefeed_pages.module:456
-msgid "Culturefeed pages: page timeline"
-msgstr ""
-
-#: culturefeed_pages.module:463
-msgid "Culturefeed pages: page agenda"
-msgstr ""
-
-#: culturefeed_pages.module:481
-msgid "Items to show"
-msgstr "Weer te geven items"
-
-#: culturefeed_pages.module:605
-msgid "My page"
-msgstr "Mijn pagina's"
-
-#: culturefeed_pages.module:613 includes/blocks.inc:139;169
-msgid "Manage pages"
-msgstr "Beheer pagina's"
-
-#: culturefeed_pages.module:635;662
-msgid "Search your page"
-msgstr "Zoek jouw pagina"
-
-#: culturefeed_pages.module:643;360
-msgid "Change active page"
-msgstr "Wijzig actieve pagina"
-
-#: culturefeed_pages.module:677
-msgid "Change settings"
-msgstr "Wijzig gegevens"
-
-#: culturefeed_pages.module:679
-msgid "Edit contact info, photos, description, website,..."
-msgstr "Bewerk contactinfo, foto, beschrijving, website,..."
-
-#: culturefeed_pages.module:683;263 includes/pages.inc:649
-msgid "Settings"
-msgstr "Instellingen"
-
-#: culturefeed_pages.module:685
-msgid "Allow users to follow your page, write comments, suggest activities,..."
-msgstr ""
-"Mogen gebruikers jouw pagina volgen, reacties schrijven, activiteiten "
-"aanraden,..."
-
-#: culturefeed_pages.module:689
-msgid "Members & roles"
-msgstr "Leden & rollen"
-
-#: culturefeed_pages.module:691
-msgid "Manage members and access rights"
-msgstr "Beheer leden en toegangsrechten"
-
-#: culturefeed_pages.module:695;274 includes/blocks.inc:291
-msgid "Activities"
-msgstr "Activiteiten"
-
-#: culturefeed_pages.module:697
-msgid "Manage your activities and reactions"
-msgstr "Beheer je activiteiten en reacties"
-
-#: culturefeed_pages.module:711;406 includes/pages.inc:119
-msgid "My pages"
-msgstr "Mijn pagina's"
-
-#: culturefeed_pages.module:713
-msgid "Manage the pages where you're member off or that you follow"
-msgstr "Beheer de pagina's waar je lid van bent of die je volgt"
-
-#: culturefeed_pages.module:727;728
-msgid "Pages"
-msgstr "Pagina's"
-
-#: culturefeed_pages.module:732
-msgid "Relevancy"
-msgstr "Relevantie"
-
-#: culturefeed_pages.module:733
-msgid "Alphabetical"
-msgstr "Alfabetisch"
-
-#: culturefeed_pages.module:734
-msgid "Number of members"
-msgstr "Aantal leden"
-
-#: culturefeed_pages.module:735
-msgid "Number of followers"
-msgstr "Aantal volgers"
-
-#: culturefeed_pages.module:775
-msgid "Your page in @sitename"
-msgstr "Jouw pagina op @sitename"
-
-#: culturefeed_pages.module:838
-msgid "from"
-msgstr "van"
-
-#: culturefeed_pages.module:210
-msgid "Create your own page"
-msgstr "Maak je eigen pagina"
-
-#: culturefeed_pages.module:228
-msgid "Edit page"
-msgstr "Bewerk pagina"
-
-#: culturefeed_pages.module:241
-msgid "Delete page"
-msgstr "Pagina verwijderen"
-
-#: culturefeed_pages.module:252
-msgid "Publish page"
-msgstr "Pagina publiceren"
-
-#: culturefeed_pages.module:285;296 theme/culturefeed-page.tpl.php:15
-msgid "Members"
-msgstr "Leden"
-
-#: culturefeed_pages.module:307
-msgid "Delete member"
-msgstr "Lid verwijderen"
-
-#: culturefeed_pages.module:318 includes/members.inc:345
-msgid "Add member"
-msgstr "Lid toevoegen"
-
-#: culturefeed_pages.module:329
-msgid "Application for administrator of the page"
-msgstr "Aanvraag tot beheerder van de pagina"
-
-#: culturefeed_pages.module:339
-msgid "Remove myself as a member"
-msgstr "Verwijder mijzelf als lid"
-
-#: culturefeed_pages.module:349
-msgid "Add member as administrator"
-msgstr "Lid toevoegen als beheerder"
-
-#: culturefeed_pages.module:386 includes/helpers.inc:38 theme/theme.inc:69
-msgid "Follow"
-msgstr "Volgen"
-
-#: culturefeed_pages.module:396 includes/helpers.inc:35
-msgid "Unfollow page"
-msgstr "Pagina niet meer volgen"
-
-#: culturefeed_pages.info:0
-msgid "CultureFeed Pages"
-msgstr "CultureFeed pagina's"
-
-#: culturefeed_pages.info:0
-msgid "CultureFeed Pages makes it possible to view / manage pages."
-msgstr "Met CultureFeed pagina's kan je pagina's bekijken en beheren. "
-
-#: culturefeed_pages.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/blocks.inc:49
-msgid "My colleague's"
-msgstr "Mijn collega's"
-
-#: includes/blocks.inc:78 theme/culturefeed-pages-page-my-page.tpl.php:13
-msgid "Pages I follow"
-msgstr "Pagina's die ik volg"
-
-#: includes/blocks.inc:248
-msgid "Timeline"
-msgstr "Tijdslijn"
-
-#: includes/blocks.inc:342
-msgid "Page followers"
-msgstr "Volgen deze pagina"
-
-#: includes/blocks.inc:433
-msgid "Related activities"
-msgstr "Gerelateerde activiteiten"
-
-#: includes/helpers.inc:201
-msgid "Home"
-msgstr "Home"
-
-#: includes/members.inc:38 includes/pages.inc:506;642 theme/theme.inc:71
-msgid "View page"
-msgstr "Bekijk pagina"
-
-#: includes/members.inc:48
-msgid "Please enter at least 3 characters"
-msgstr "Gelieve minstens 3 karakters in te geven"
-
-#: includes/members.inc:66 includes/pages.inc:239
-msgid "Name"
-msgstr "Naam"
-
-#: includes/members.inc:67
-msgid "Function"
-msgstr "Functie"
-
-#: includes/members.inc:68
-msgid "Role"
-msgstr "Rol"
-
-#: includes/members.inc:69 includes/pages.inc:1096
-msgid "Member since"
-msgstr "Lid sinds"
-
-#: includes/members.inc:93
-msgid "Edit"
-msgstr "Bewerken"
-
-#: includes/members.inc:103
-msgid "Delete as member"
-msgstr "Verwijder als lid"
-
-#: includes/members.inc:115
-msgid "Cancel changes"
-msgstr "Annuleer bewerkingen"
-
-#: includes/members.inc:129
-msgid "No content available."
-msgstr "Geen inhoud beschikbaar."
-
-#: includes/members.inc:177 includes/pages.inc:370;684
-msgid "Save"
-msgstr "Opslaan"
-
-#: includes/members.inc:189
-msgid "Remove administrator"
-msgstr "Verwijder als beheerder"
-
-#: includes/members.inc:189
-msgid "Make administrator"
-msgstr "Maak beheerder"
-
-#: includes/members.inc:255
-msgid "Something went wrong while saving. Please try again or contact an administrator."
-msgstr ""
-"Er ging iets fout tijdens het bewaren. Gelieve opnieuw te proberen of "
-"een administrator te contacteren."
-
-#: includes/members.inc:266
-msgid "Membership changed"
-msgstr "Het lidmaatschap werd aangepast"
-
-#: includes/members.inc:277
-msgid "Search users"
-msgstr "Zoek gebruikers"
-
-#: includes/members.inc:284
-msgid "Search"
-msgstr "Zoeken"
-
-#: includes/members.inc:359
-msgid "Sure you want to add @nick as a member?"
-msgstr "Ben je zeker dat u @nick wil toevoegen als lid?"
-
-#: includes/members.inc:370
-msgid "Add"
-msgstr "Toevoegen"
-
-#: includes/members.inc:376;497 includes/pages.inc:820;911
-msgid "Cancel"
-msgstr "Annuleren"
-
-#: includes/members.inc:404
-msgid "@nick is member of @page now."
-msgstr "@nick is nu lid van @page."
-
-#: includes/members.inc:409
-msgid "There was an error while saving. Please try again, or contact an administrator."
-msgstr ""
-"Er ging iets fout tijdens het toevoegen. Gelieve opnieuw te proberen, "
-"of een administrator te contacteren."
-
-#: includes/members.inc:458
-msgid "Remove member"
-msgstr "Lid verwijderen"
-
-#: includes/members.inc:473
-msgid "This action cannot be undone."
-msgstr "Deze actie kan niet ongedaan worden gemaakt."
-
-#: includes/members.inc:477
-msgid "Are you sure you want to remove yourself as a member?"
-msgstr "Ben je zeker dat je jezelf als lid wil verwijderen?"
-
-#: includes/members.inc:480
-msgid "Are you sure you want to remove this member?"
-msgstr "Ben je zeker dat je dit lid wil verwijderen?"
-
-#: includes/members.inc:491
-msgid "Remove"
-msgstr "Verwijderen"
-
-#: includes/members.inc:529
-msgid "There was an error while removing the member."
-msgstr "Er is een fout opgetreden tijdens het verwijderen van het lid."
-
-#: includes/members.inc:541
-msgid "You are not longer a member of @page."
-msgstr "Je ben niet langer lid van @page."
-
-#: includes/members.inc:547
-msgid "User @nick is removed as member of page @page."
-msgstr "De gebruiker @nick is verwijderd als lid van @page."
-
-#: includes/members.inc:576
-msgid "Request to become an administrator"
-msgstr "Aanvraag om beheerder te worden"
-
-#: includes/members.inc:587
-msgid "Your request to become an administrator of this page is sent"
-msgstr "Jouw aanvraag om beheerder te worden van deze pagina is verzonden"
-
-#: includes/members.inc:620
-msgid "!username wants to be an administrator of !page."
-msgstr "!username wil beheerder worden van !page."
-
-#: includes/members.inc:629 includes/pages.inc:61
-msgid "OK"
-msgstr "Ok"
-
-#: includes/members.inc:652
-msgid "!username successfully added as administrator of page !page."
-msgstr "!username werd succesvol toegevoegd als beheerder van !page."
-
-#: includes/pages.inc:27;31
-msgid "There was an error while loading the search results."
-msgstr "Er is een fout opgetreden tijdens het laden van de zoekresultaten."
-
-#: includes/pages.inc:54
-msgid "Name of your page"
-msgstr "Naam van jouw pagina"
-
-#: includes/pages.inc:119
-msgid "You are now a member of @page. Manage your membership of this and other pages with"
-msgstr ""
-"Je bent nu lid van @page. Beheer je lidmaatschap "
-"van deze en andere pagina's via"
-
-#: includes/pages.inc:134
-msgid "It is not allowed to join @page as a member. Please contact the administrator of the page to become a member."
-msgstr ""
-"Het is niet toegelaten om lid te worden van @page. Gelieve een "
-"beheerder te contacteren om toch lid te worden."
-
-#: includes/pages.inc:137;184
-msgid "You could not be added to @page."
-msgstr "U kon niet toegevoegd worden aan @page."
-
-#: includes/pages.inc:246
-msgid "Type"
-msgstr "Type"
-
-#: includes/pages.inc:254
-msgid "Description"
-msgstr "Beschrijving"
-
-#: includes/pages.inc:255
-msgid "Maximum 400 characters"
-msgstr "Maximum 400 karakters"
-
-#: includes/pages.inc:265 theme/culturefeed-page-summary.tpl.php:32 theme/culturefeed-page.tpl.php:36
-msgid "Address"
-msgstr "Adres"
-
-#: includes/pages.inc:291
-msgid "Phone"
-msgstr "Telefoon"
-
-#: includes/pages.inc:298
-msgid "Email address"
-msgstr "E-mailadres"
-
-#: includes/pages.inc:305 theme/culturefeed-page.tpl.php:50
-msgid "Website"
-msgstr "Website"
-
-#: includes/pages.inc:312
-msgid "Other websites"
-msgstr "Andere websites"
-
-#: includes/pages.inc:321
-msgid "Ticketing"
-msgstr "Tickets"
-
-#: includes/pages.inc:327
-msgid "Facebook"
-msgstr "Facebook"
-
-#: includes/pages.inc:333
-msgid "Twitter"
-msgstr "Twitter"
-
-#: includes/pages.inc:339
-msgid "Google+"
-msgstr "Google+"
-
-#: includes/pages.inc:345
-msgid "YouTube"
-msgstr "YouTube"
-
-#: includes/pages.inc:351
-msgid "Blog"
-msgstr "Blog"
-
-#: includes/pages.inc:357
-msgid "Picture or logo"
-msgstr "Afbeelding of logo"
-
-#: includes/pages.inc:396
-msgid "Title is required"
-msgstr "De titel moet ingevuld zijn"
-
-#: includes/pages.inc:401
-msgid "The maximum is 400 characters"
-msgstr "Het maximum karakters bedraagt 400"
-
-#: includes/pages.inc:448
-msgid "Page \"@page\" has been created."
-msgstr "De pagina \"@page\" is aangemaakt."
-
-#: includes/pages.inc:452
-msgid "There was an error while creating the page."
-msgstr "Er is een fout opgetreden tijdens het aanmaken van de pagina."
-
-#: includes/pages.inc:472;620
-msgid "An error occurred when uploading your image."
-msgstr "Er is een fout opgetreden bij het opladen van jouw afbeelding."
-
-#: includes/pages.inc:551
-msgid "Select another photo"
-msgstr "Selecteer andere foto"
-
-#: includes/pages.inc:555
-msgid "Remove photo"
-msgstr "Verwijder foto"
-
-#: includes/pages.inc:586
-msgid "Page \"@page\" is updated."
-msgstr "De pagina \"@page\" is aangepast."
-
-#: includes/pages.inc:590
-msgid "There was an error while updating the page."
-msgstr "Er is een fout opgetreden tijdens het bewerken van de pagina."
-
-#: includes/pages.inc:663
-msgid "follow my page"
-msgstr "mijn pagina volgen"
-
-#: includes/pages.inc:664
-msgid "This allows users to stay informed of any updates on this page."
-msgstr ""
-"Op die manier kunnen gebruikers op de hoogte blijven van alle updates "
-"over deze pagina."
-
-#: includes/pages.inc:670
-msgid "become a member of my page"
-msgstr "lid worden van mijn pagina"
-
-#: includes/pages.inc:671
-msgid "In this way, your page can also be accessed via the profiles, comments and reactions of all colleagues who are active on this site."
-msgstr ""
-"Op die manier wordt je pagina ook toegankelijk via de profielen, "
-"reacties en reacties van alle collega's die actief zijn op deze site."
-
-#: includes/pages.inc:677
-msgid "write comments about my activities"
-msgstr "reacties schrijven over mijn activiteiten"
-
-#: includes/pages.inc:678
-msgid "Only for organizations that provide activities and have entered via www.UiTdatabank.be ."
-msgstr ""
-"Enkel voor organisaties die activiteiten organiseren en ingevoerd "
-"hebben via www.UiTdatabank.be ."
-
-#: includes/pages.inc:690;785
-msgid "Remove page"
-msgstr "Verwijder pagina"
-
-#: includes/pages.inc:743
-msgid "Page settings has been saved."
-msgstr "De pagina instellingen zijn bewaard."
-
-#: includes/pages.inc:747
-msgid "There was an error while saving the settings page."
-msgstr ""
-"Er is een fout opgetreden tijdens het bewaren van de pagina "
-"instellingen."
-
-#: includes/pages.inc:799
-msgid "By deleting a page, the page will no longer appear in search results and all contact info will be removed."
-msgstr ""
-"Door een pagina te verwijderen, zal de pagina niet meer verschijnen in "
-"de zoekresultaten en worden al je contactgegevens verwijderd."
-
-#: includes/pages.inc:800
-msgid "Members of this page, and activities in the name of this page will not be deleted."
-msgstr ""
-"Leden van deze pagina en activiteiten in naam van deze pagina worden "
-"niet verwijderd."
-
-#: includes/pages.inc:801;900
-msgid "Are you sure?"
-msgstr "Ben je zeker?"
-
-#: includes/pages.inc:812
-msgid "Delete"
-msgstr "Verwijderen"
-
-#: includes/pages.inc:845
-msgid "Page \"@page\" is deleted."
-msgstr "De pagina \"@page\" is verwijderd."
-
-#: includes/pages.inc:862
-msgid "There was an error while deleting the page."
-msgstr "Er is een fout opgetreden tijdens het verwijderen van de pagina."
-
-#: includes/pages.inc:898
-msgid "By publishing a page, the page will re-appear in the search results."
-msgstr ""
-"Door een pagina te publiceren, zal de pagina opnieuw verschijnen in de "
-"zoekresultaten."
-
-#: includes/pages.inc:899
-msgid "Members of this page, and activities in the name of this page will be recreated."
-msgstr ""
-"Leden van deze pagina en activiteiten in naam van deze pagina worden "
-"opnieuw in het leven geroepen."
-
-#: includes/pages.inc:905
-msgid "Publish"
-msgstr "Publiceer"
-
-#: includes/pages.inc:933
-msgid "Page \"@page\" is recreated."
-msgstr "De pagina \"@page\" is hersteld."
-
-#: includes/pages.inc:937
-msgid "There was an error while recreating the page."
-msgstr "Er is een fout opgetreden tijdens het herstellen van de pagina."
-
-#: includes/pages.inc:971 theme/theme.inc:406
-msgid "Title"
-msgstr "Titel"
-
-#: includes/pages.inc:975 theme/theme.inc:407
-msgid "Date"
-msgstr "Datum"
-
-#: includes/pages.inc:979 theme/theme.inc:408
-msgid "Reactions"
-msgstr "Reacties"
-
-#: includes/pages.inc:1005
-msgid "There was an error while loading the activities."
-msgstr "Er is een fout opgetreden tijdens het laden van de activiteiten."
-
-#: includes/pages.inc:1041;1119
-msgid "Administer page"
-msgstr "Pagina beheren"
-
-#: includes/pages.inc:1060
-msgid "Become an administrator"
-msgstr "Beheerder worden"
-
-#: includes/pages.inc:1061
-msgid "This is a request sent to the administrator of this page."
-msgstr ""
-"Hiermee wordt een aanvraag gestuurd naar de huidige beheerder van deze "
-"pagina."
-
-#: includes/pages.inc:1067
-msgid "Not possible to remove"
-msgstr "Verwijderen niet mogelijk"
-
-#: includes/pages.inc:1067
-msgid "You're the only administrator of this page. You can not remove yourself as a member"
-msgstr ""
-"Je bent de enige beheerder van deze pagina. Je kan jezelf niet "
-"verwijderen als lid"
-
-#: includes/pages.inc:1096;1138
-msgid "Page"
-msgstr "Pagina"
-
-#: includes/pages.inc:1112 theme/theme.inc:66
-msgid "Unfollow"
-msgstr "Niet meer volgen"
-
-#: includes/pages.inc:1113
-msgid "You are a member of this page"
-msgstr "Je bent lid van deze pagina"
-
-#: includes/pages.inc:1115 theme/culturefeed-pages-fellow-members-block.tpl.php:24 theme/theme.inc:161;496
-msgid "Become a member"
-msgstr "Word lid"
-
-#: includes/pages.inc:1122 theme/theme.inc:431
-msgid "Send request to become administrator"
-msgstr "Stuur aanvraag om beheerder te worden"
-
-msgid "Send request"
-msgstr "Stuur aanvraag"
-
-#: includes/pages.inc:1125
-msgid "Remove membership"
-msgstr "Verwijder mij als lid"
-
-#: includes/pages.inc:1138
-msgid "Following since"
-msgstr "Volgend sinds"
-
-#: theme/culturefeed-page-invisible.tpl.php:1
-msgid "The content of this page was removed by the administrator of the page."
-msgstr ""
-"De inhoud van deze pagina werd verwijderd door de beheerder van de "
-"pagina."
-
-#: theme/culturefeed-page-summary.tpl.php:16
-msgid "View members"
-msgstr "Bekijk leden"
-
-#: theme/culturefeed-page-summary.tpl.php:20
-msgid "@count follower"
-msgstr "@count volger"
-
-#: theme/culturefeed-page-summary.tpl.php:20
-msgid "@count followers"
-msgstr "@count volgers"
-
-#: theme/culturefeed-page-summary.tpl.php:15
-msgid "@count member"
-msgid_plural "@count members"
-msgstr[0] "@count lid"
-msgstr[1] "@count leden"
-
-#: theme/culturefeed-page.tpl.php:43
-msgid "Contact"
-msgstr "Contact"
-
-#: theme/culturefeed-page.tpl.php:45
-msgid "or"
-msgstr "of"
-
-#: theme/culturefeed-page.tpl.php
-msgid "Show members"
-msgstr "Toon leden"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:20
-msgid "Your page has published no activities yet."
-msgstr "Je pagina heeft nog geen activiteiten"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:21
-msgid "Add new activities."
-msgstr "Een nieuwe activiteit toevoegen"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:26
-msgid "Latest notifications"
-msgstr "Laatste meldingen"
-
-#: theme/culturefeed-pages-block-admin-options.tpl.php:36
-msgid "You are manager on this page, but not logged in as this page. Do you want to continue working as this page ?"
-msgstr ""
-"Je bent beheerder van deze pagina, maar niet "
-"aangemeld als deze pagina. Wil je verder werken als "
-"deze pagina ?"
-
-#: theme/culturefeed-pages-events-admin-page.tpl.php:14
-msgid "This list shows only the activities that are currently online. You can find past or unpublished activities on UiT database a>."
-msgstr ""
-"Deze lijst toont enkel de activiteiten die momenteel online staan. "
-"Afgelopen of niet gepubliceerde activeiten kan je raadplegen via de Uitdatabank ."
-
-#: theme/culturefeed-pages-events-admin-page.tpl.php:18
-msgid "Add a new activity"
-msgstr "Een nieuwe activiteit toevoegen"
-
-#: theme/culturefeed-pages-events-admin-page.tpl.php:20
-msgid "Add new activities with the UiTdatabank. You can sign in with the same account and add activities immediately. Add new activity ."
-msgstr ""
-"Dat kan via de Uitdatabank. Je kan er aanmelden met dezelfde account "
-"als deze om onmiddelijk aan de slag te gaan. Voeg nieuwe activiteit toe ."
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:17
-msgid "is at the moment the only member of the page"
-msgstr "is momenteel het enige lid van de pagina"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:21
-msgid "You are a member of"
-msgstr "Je bent lid van"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:21
-msgid "You are the only member of"
-msgstr "Je bent het enige lid van"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:23
-msgid "Are you a colleague of"
-msgstr "Ben jij een collega van"
-
-#: theme/culturefeed-pages-fellow-members-block.tpl.php:23
-msgid "of"
-msgstr "van"
-
-#: theme/culturefeed-pages-followers-block.tpl.php:20
-msgid "This page has no followers yet."
-msgstr "Deze pagina heeft nog geen volgers."
-
-#: theme/culturefeed-pages-join-page.tpl.php:9
-msgid "There doesn't exists a page of"
-msgstr "Er bestaat nog geen pagina van"
-
-#: theme/culturefeed-pages-join-page.tpl.php:10
-msgid "on"
-msgstr "op"
-
-#: theme/culturefeed-pages-join-search-result-item.tpl.php:9
-msgid "You are already a member"
-msgstr "Je bent reeds lid"
-
-#: theme/culturefeed-pages-join-search-result-item.tpl.php:15
-msgid "You follow this page"
-msgstr "Je volgt deze pagina"
-
-#: theme/culturefeed-pages-page-agenda.tpl.php:11
-msgid "You page has published no activities yet."
-msgstr "Jouw pagina heeft nog geen activiteiten gepubliceerd."
-
-#: theme/culturefeed-pages-page-agenda.tpl.php:12
-msgid "Add new activities on www.uitdatabank.be ."
-msgstr ""
-"Voeg nieuwe activiteiten toe via www.uitdatabank.be ."
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:2 theme/theme.inc:361
-msgid "View profile"
-msgstr "Bekijk profiel"
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:5
-msgid "Pages where I am a member of"
-msgstr "Pagina's waar ik lid van ben"
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:9
-msgid "You are not a member of any page. Search (or create) the page of your employer and become a member. If you create a new page, you automatically become a member and administrator of the page."
-msgstr ""
-"Je bent nog geen lid van een pagina. Zoek (of "
-"maak) de pagina van je werkgever en word lid. als je een nieuwe pagina "
-"maakt, ben je automatische en lid en beheerder van de pagina."
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:17
-msgid " You follow no pages. Find and follow pages that interest you and receive a notification when there are relevant updates."
-msgstr ""
-"Je volgt nog geen pagina's. Zoek en volg "
-"pagina's die je interesseren en ontvang een melding als er relevante "
-"updates zijn."
-
-#: theme/culturefeed-pages-page-my-page.tpl.php:20
-msgid "Search new pages:"
-msgstr "Zoek nieuwe pagina's:"
-
-#: theme/culturefeed-pages-request-admin-membership-block.tpl.php:9
-msgid "Mistake seen?"
-msgstr "Foutje gezien?"
-
-#: theme/culturefeed-pages-request-admin-membership-block.tpl.php:10
-msgid "This page has no administrator. As an administrator, you can change the information on this page and manage the members."
-msgstr ""
-"Deze pagina heeft nog geen beheerder. Als beheerder kan je de info op "
-"deze pagina wijzigen en de leden beheren."
-
-#: theme/culturefeed-pages-request-admin-membership-block.tpl.php:11
-msgid "Send application to become an administrator"
-msgstr "Stuur aanvraag om beheerder te worden"
-
-#: theme/culturefeed-pages-user-search-result.tpl.php:2
-msgid "No users found"
-msgstr "Geen gebruikers gevonden"
-
-#: theme/theme.inc:84
-msgid "More info"
-msgstr "Meer info"
-
-#: theme/theme.inc:290
-msgid "Login as"
-msgstr "Meld aan als"
-
-#: theme/theme.inc:309
-msgid "View all notifications"
-msgstr "Bekijk alle meldingen"
-
-#: theme/theme.inc:314
-msgid "Your page has no notifications yet"
-msgstr "Jouw pagina heeft nog geen meldingen"
-
-#: theme/theme.inc:363
-msgid "Add as a member"
-msgstr "Voeg toe als lid"
-
-#: theme/theme.inc:393
-msgid "No reactions yet"
-msgstr "Nog geen reacties"
-
-#: theme/theme.inc:395
-msgid "Edit in the UiTdatabank"
-msgstr "Bewerk in de UiTdatabank"
-
-#: theme/theme.inc:492
-msgid "You are following this page now"
-msgstr "Je volgt nu deze pagina"
-
-#: theme/theme.inc:495
-msgid "Want to join this page?"
-msgstr "Wil je lid worden van deze pagina?"
-
-#: theme/theme.inc:508
-msgid "You are no longer following this page anymore"
-msgstr "Je volgt deze pagina niet meer"
-
-#: theme/theme.inc:390
-msgid "@count reaction"
-msgid_plural "@count reactions"
-msgstr[0] "@count reactie"
-msgstr[1] "@count reacties"
-
-msgid "Allowed extensions: jpg, jpeg, gif or png"
-msgstr "Toegelaten formaten: jpg, jpeg, gif of png"
-
-msgid "Administrator"
-msgstr "Beheerder"
-
-msgid "Member"
-msgstr "Lid"
-
-#: includes/pages.inc
-msgid "Baseline"
-msgstr "Slogan"
-
-#: includes/pages.inc
-msgid "Cover Photo"
-msgstr "Omslagfoto"
-
-#: includes/pages.inc
-msgid "Select another cover"
-msgstr "Selecteer andere omslagfoto"
-
-msgid "This page currently has no administrator. As an administrator, you can update page details, layout and manage members."
-msgstr "Deze pagina heeft nog geen beheerder. Als beheerder kan je info op deze pagina wijzigen en de leden beheren."
From 00e86a032462930b496061cfb95ba42b2095ae55 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 5 Nov 2019 14:12:56 +0100
Subject: [PATCH 05/16] Moved culturefeed_roles to
https://github.com/cultuurnet/culturefeed_roles
---
culturefeed_roles/culturefeed_roles.admin.inc | 30 ------------
culturefeed_roles/culturefeed_roles.drush.inc | 46 -------------------
culturefeed_roles/culturefeed_roles.info | 7 ---
culturefeed_roles/culturefeed_roles.module | 43 -----------------
4 files changed, 126 deletions(-)
delete mode 100644 culturefeed_roles/culturefeed_roles.admin.inc
delete mode 100644 culturefeed_roles/culturefeed_roles.drush.inc
delete mode 100644 culturefeed_roles/culturefeed_roles.info
delete mode 100644 culturefeed_roles/culturefeed_roles.module
diff --git a/culturefeed_roles/culturefeed_roles.admin.inc b/culturefeed_roles/culturefeed_roles.admin.inc
deleted file mode 100644
index 305b65d0..00000000
--- a/culturefeed_roles/culturefeed_roles.admin.inc
+++ /dev/null
@@ -1,30 +0,0 @@
- 'container',
- '#tree' => TRUE,
- );
-
- foreach (user_roles(TRUE) as $role_id => $role_name) {
- if ($role_id == DRUPAL_AUTHENTICATED_RID) {
- continue;
- }
- $form['culturefeed_roles'][$role_id] = array(
- '#title' => check_plain($role_name),
- '#type' => 'textarea',
- '#default_value' => $pre_assigned_roles[$role_id] ?: '',
- '#description' => t('The uid of the UiTID users that should get the role %role assigned the first time they log in. Enter one uid per line.', array('%role' => $role_name)),
- );
- }
-
- return system_settings_form($form);
-}
diff --git a/culturefeed_roles/culturefeed_roles.drush.inc b/culturefeed_roles/culturefeed_roles.drush.inc
deleted file mode 100644
index c85884bc..00000000
--- a/culturefeed_roles/culturefeed_roles.drush.inc
+++ /dev/null
@@ -1,46 +0,0 @@
- 'Pre-assign roles to UiTID users.',
- 'arguments' => array(
- 'role' => 'The role RID or name',
- 'uid' => 'The remote id of the UiTID user',
- ),
- 'required-arguments' => 2,
- );
-
- return $items;
-}
-
-function drush_culturefeed_roles_culturefeed_pre_assign_role($role_id, $uid) {
- $role = NULL;
- if (ctype_digit($role_id)) {
- $role = user_role_load($role_id);
- }
-
- if (!$role) {
- $role = user_role_load_by_name($role_id);
- }
-
- if (!$role) {
- return drush_set_error('', 'Undefined role');
- }
-
- $pre_assigned_roles = variable_get('culturefeed_roles', array());
-
- if (isset($pre_assigned_roles[$role->rid])) {
- $pre_assigned_roles[$role->rid] .= "\r" . $uid;
- }
- else {
- $pre_assigned_roles[$role->rid] = $uid;
- }
-
- variable_set('culturefeed_roles', $pre_assigned_roles);
-}
diff --git a/culturefeed_roles/culturefeed_roles.info b/culturefeed_roles/culturefeed_roles.info
deleted file mode 100644
index 25655dde..00000000
--- a/culturefeed_roles/culturefeed_roles.info
+++ /dev/null
@@ -1,7 +0,0 @@
-name = CultureFeed Roles
-description = Pre-assign roles to UiTID users that have not logged in yet
-package = CultureFeed
-core = 7.x
-dependencies[] = culturefeed
-
-configure = admin/config/culturefeed/roles
diff --git a/culturefeed_roles/culturefeed_roles.module b/culturefeed_roles/culturefeed_roles.module
deleted file mode 100644
index 13e467ee..00000000
--- a/culturefeed_roles/culturefeed_roles.module
+++ /dev/null
@@ -1,43 +0,0 @@
- 'Roles',
- 'description' => 'Pre-assign roles',
- 'access arguments' => array('administer site configuration'),
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_roles_settings_form'),
- 'file' => 'culturefeed_roles.admin.inc',
- );
-
- return $items;
-}
-
-/**
- * Implements hook_culturefeed_user_create().
- */
-function culturefeed_roles_culturefeed_user_create($account, $cf_account) {
- $pre_assigned_roles = variable_get('culturefeed_roles', array());
-
- $original_roles = $account->roles;
-
- foreach ($pre_assigned_roles as $rid => $uid_string) {
- $uids = preg_split('/[\r\n]+/', $uid_string);
-
- if (in_array($cf_account->id, $uids)) {
- $account->roles[$rid] = $rid;
- }
- }
-
- if ($account->roles != $original_roles) {
- user_save($account);
- }
-}
From 8d310f50036ff790d040905d725cc28030069ebd Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 5 Nov 2019 14:15:45 +0100
Subject: [PATCH 06/16] Moved culturefeed_social to
https://github.com/cultuurnet/culturefeed_social
---
culturefeed_social/culturefeed_social.api.php | 14 -
culturefeed_social/culturefeed_social.info | 33 -
culturefeed_social/culturefeed_social.module | 1022 -----------------
culturefeed_social/includes/admin.inc | 43 -
culturefeed_social/includes/blocks.inc | 404 -------
culturefeed_social/includes/helpers.inc | 699 -----------
culturefeed_social/includes/pages.inc | 725 ------------
culturefeed_social/js/activities.js | 128 ---
culturefeed_social/js/culturefeed-social.js | 44 -
culturefeed_social/js/social-links.js | 29 -
.../Drupal/CultureFeedActivityConfigBase.php | 181 ---
.../CultureFeedActivityConfigCashin.php | 21 -
.../CultureFeedActivityConfigCheckin.php | 21 -
.../CultureFeedActivityConfigComment.php | 41 -
...ultureFeedActivityConfigConnectChannel.php | 21 -
.../CultureFeedActivityConfigDetail.php | 28 -
.../CultureFeedActivityConfigFacebook.php | 35 -
.../CultureFeedActivityConfigFollow.php | 32 -
.../Drupal/CultureFeedActivityConfigGo.php | 31 -
.../Drupal/CultureFeedActivityConfigLike.php | 41 -
.../Drupal/CultureFeedActivityConfigMail.php | 28 -
.../CultureFeedActivityConfigMediaPhoto.php | 28 -
.../CultureFeedActivityConfigMediaVideo.php | 28 -
.../CultureFeedActivityConfigMoreInfo.php | 30 -
.../CultureFeedActivityConfigNewEvent.php | 22 -
.../Drupal/CultureFeedActivityConfigNews.php | 23 -
.../CultureFeedActivityConfigPageAdmin.php | 21 -
.../CultureFeedActivityConfigPageCreated.php | 23 -
.../CultureFeedActivityConfigPageMember.php | 22 -
.../Drupal/CultureFeedActivityConfigPrint.php | 30 -
.../CultureFeedActivityConfigRecommend.php | 40 -
.../CultureFeedActivityConfigReview.php | 28 -
.../Drupal/CultureFeedActivityConfigRoute.php | 30 -
.../CultureFeedActivityConfigTwitter.php | 34 -
.../Drupal/CultureFeedActivityConfigView.php | 29 -
...ulturefeed-social-activity-summary.tpl.php | 38 -
.../culturefeed-social-comment-form.tpl.php | 21 -
...lturefeed-social-comment-list-item.tpl.php | 48 -
.../culturefeed-social-comment-list.tpl.php | 16 -
.../culturefeed-social-comment-teaser.tpl.php | 32 -
.../culturefeed-social-event-teaser.tpl.php | 19 -
.../culturefeed-social-news-detail.tpl.php | 23 -
.../culturefeed-social-news-teaser.tpl.php | 14 -
...efeed-social-page-activity-summary.tpl.php | 39 -
...lturefeed-social-production-teaser.tpl.php | 19 -
...lturefeed-social-report-abuse-form.tpl.php | 25 -
...turefeed-social-user-activity-list.tpl.php | 25 -
...efeed-social-user-activity-summary.tpl.php | 34 -
...eed-social-user-activity-wall-item.tpl.php | 43 -
...turefeed-social-user-activity-wall.tpl.php | 24 -
...ocial-user-list-block-for-activity.tpl.php | 19 -
...eed-social-user-notifications-page.tpl.php | 19 -
culturefeed_social/theme/theme.inc | 714 ------------
.../translations/culturefeed_social.de.po | 930 ---------------
.../translations/culturefeed_social.fr.po | 930 ---------------
.../translations/culturefeed_social.nl.po | 919 ---------------
56 files changed, 7960 deletions(-)
delete mode 100644 culturefeed_social/culturefeed_social.api.php
delete mode 100644 culturefeed_social/culturefeed_social.info
delete mode 100644 culturefeed_social/culturefeed_social.module
delete mode 100644 culturefeed_social/includes/admin.inc
delete mode 100644 culturefeed_social/includes/blocks.inc
delete mode 100644 culturefeed_social/includes/helpers.inc
delete mode 100644 culturefeed_social/includes/pages.inc
delete mode 100644 culturefeed_social/js/activities.js
delete mode 100644 culturefeed_social/js/culturefeed-social.js
delete mode 100644 culturefeed_social/js/social-links.js
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigBase.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigCashin.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigCheckin.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigComment.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigConnectChannel.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigDetail.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigFacebook.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigFollow.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigGo.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigLike.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigMail.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigMediaPhoto.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigMediaVideo.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigMoreInfo.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigNewEvent.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigNews.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageAdmin.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageCreated.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageMember.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigPrint.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigRecommend.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigReview.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigRoute.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigTwitter.php
delete mode 100644 culturefeed_social/lib/Drupal/CultureFeedActivityConfigView.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-activity-summary.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-comment-form.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-comment-list-item.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-comment-list.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-comment-teaser.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-event-teaser.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-news-detail.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-news-teaser.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-page-activity-summary.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-production-teaser.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-report-abuse-form.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-user-activity-list.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-user-activity-summary.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-user-activity-wall-item.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-user-activity-wall.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-user-list-block-for-activity.tpl.php
delete mode 100644 culturefeed_social/theme/culturefeed-social-user-notifications-page.tpl.php
delete mode 100644 culturefeed_social/theme/theme.inc
delete mode 100644 culturefeed_social/translations/culturefeed_social.de.po
delete mode 100644 culturefeed_social/translations/culturefeed_social.fr.po
delete mode 100644 culturefeed_social/translations/culturefeed_social.nl.po
diff --git a/culturefeed_social/culturefeed_social.api.php b/culturefeed_social/culturefeed_social.api.php
deleted file mode 100644
index 90023762..00000000
--- a/culturefeed_social/culturefeed_social.api.php
+++ /dev/null
@@ -1,14 +0,0 @@
- 'culturefeed_social_page_ajax_get_activities',
- 'access arguments' => array('access content'),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['admin/config/culturefeed/social'] = array(
- 'title' => 'CultureFeed Social',
- 'description' => 'Change CultureFeed Social settings',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_social_admin_settings_form'),
- 'access arguments' => array('administer site configuration'),
- 'file' => 'includes/admin.inc',
- );
-
- $items['culturefeed/activities'] = array(
- 'title' => 'User history',
- 'page callback' => 'culturefeed_social_page_activities',
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/activity/delete/%/%'] = array(
- 'title' => 'Undo action',
- 'page callback' => 'culturefeed_social_page_activity_delete',
- 'page arguments' => array(3, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/activity/comment/%/%'] = array(
- 'title' => 'Leave your comment',
- 'page callback' => 'culturefeed_social_page_activity_comment',
- 'page arguments' => array(3, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/activity/report-abuse/%/%'] = array(
- 'title' => 'Abuse form',
- 'page callback' => 'culturefeed_social_page_activity_report_abuse',
- 'page arguments' => array(3, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/activity/privacy/%/%/%'] = array(
- 'title' => 'Edit privacy settings',
- 'page callback' => 'culturefeed_social_page_activity_privacy',
- 'page arguments' => array(3, 4, 5),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/node/unfollow/%/%/%'] = array(
- 'title' => 'Unfollow node',
- 'page callback' => 'culturefeed_social_page_node_unfollow',
- 'page arguments' => array(3, 4, 5),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- // Activity.
- $items['culturefeed/do/%/%/%'] = array(
- 'title' => 'Perform action',
- 'page callback' => 'culturefeed_social_page_do',
- 'page arguments' => array(2, 3, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/do/%/%/%/noredirect'] = array(
- 'title' => 'Do action',
- 'page callback' => 'culturefeed_social_page_do',
- 'page arguments' => array(2, 3, 4, 'noredirect'),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/do/%/%/%/advanced'] = array(
- 'title' => 'Do action',
- 'page callback' => 'culturefeed_social_page_do',
- 'page arguments' => array(2, 3, 4, 'advanced'),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/undo/%/%/%'] = array(
- 'title' => 'Undo action',
- 'page callback' => 'culturefeed_social_page_undo',
- 'page arguments' => array(2, 3, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/undo/%/%/%/noredirect'] = array(
- 'title' => 'Undo action',
- 'page callback' => 'culturefeed_social_page_undo',
- 'page arguments' => array(2, 3, 4, 'noredirect'),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/undo/%/%/%/advanced'] = array(
- 'title' => 'Undo action',
- 'page callback' => 'culturefeed_social_page_undo',
- 'page arguments' => array(2, 3, 4, 'advanced'),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/activities/recent'] = array(
- 'title' => 'Most recent actions',
- 'page callback' => 'culturefeed_social_page_recent_activities',
- 'access arguments' => array('access content'),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- // Detailpages of an activity.
- $items['news/%/%culturefeed_social_news_item'] = array(
- 'title callback' => 'culturefeed_social_activity_title',
- 'title arguments' => array(2),
- 'page callback' => 'culturefeed_social_page_activity_detail',
- 'page arguments' => array(2, 'news'),
- 'access arguments' => array('access content'),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- // Notifications
- if (variable_get('culturefeed_social_notifications_enabled', FALSE)) {
- $items['culturefeed/notifications'] = array(
- 'title' => 'My notifications',
- 'page callback' => 'culturefeed_social_page_notifications',
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
-
- if (module_exists('culturefeed_pages')) {
- $items['pages/%culturefeed_pages_page/notifications'] = array(
- 'title' => 'Notifications',
- 'page callback' => 'culturefeed_social_page_notifications',
- 'page arguments' => array(1),
- 'access callback' => 'culturefeed_pages_edit_page_access',
- 'access arguments' => array(1),
- 'type' => MENU_CALLBACK,
- 'file' => 'includes/pages.inc',
- );
- }
- }
-
- return $items;
-}
-
-/**
- * Implements hook_theme().
- */
-function culturefeed_social_theme() {
-
- $path = drupal_get_path('module', 'culturefeed_social') . '/theme';
-
- return array(
- 'culturefeed_social_user_activity_list' => array(
- 'variables' => array(
- 'activities' => array(),
- 'class' => NULL,
- 'read_more_url' => NULL,
- 'read_more_text' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-social-user-activity-list',
- ),
- 'culturefeed_social_user_activity_wall' => array(
- 'variables' => array(
- 'activities' => array(),
- 'class' => NULL,
- 'read_more_url' => NULL,
- 'read_more_text' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-social-user-activity-wall',
- ),
- 'culturefeed_social_user_activity_summary' => array(
- 'variables' => array(
- 'activity' => NULL,
- 'uid' => 0,
- ),
- 'template' => 'culturefeed-social-user-activity-summary',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_user_activity_wall_item' => array(
- 'variables' => array(
- 'activity' => NULL,
- 'uid' => 0,
- ),
- 'template' => 'culturefeed-social-user-activity-wall-item',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_event_teaser' => array(
- 'variables' => array(
- 'activity' => NULL,
- 'uid' => 0,
- ),
- 'template' => 'culturefeed-social-event-teaser',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_production_teaser' => array(
- 'variables' => array(
- 'activity' => NULL,
- 'uid' => 0,
- ),
- 'template' => 'culturefeed-social-production-teaser',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_news_teaser' => array(
- 'variables' => array(
- 'activity' => NULL,
- 'uid' => 0,
- ),
- 'template' => 'culturefeed-social-news-teaser',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_comment_teaser' => array(
- 'variables' => array(
- 'activity' => NULL,
- 'uid' => 0,
- ),
- 'template' => 'culturefeed-social-comment-teaser',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_comment_form' => array(
- 'template' => 'culturefeed-social-comment-form',
- 'render element' => 'form',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_comment_list' => array(
- 'variables' => array(
- 'activities' => NULL,
- 'accounts' => NULL,
- 'object' => NULL,
- 'total' => NULL,
- ),
- 'template' => 'culturefeed-social-comment-list',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_comment_list_item' => array(
- 'variables' => array(
- 'activity' => NULL,
- 'accounts' => NULL,
- 'object' => NULL,
- 'uid' => NULL,
- 'child_activities' => NULL,
- 'level' => 0,
- ),
- 'template' => 'culturefeed-social-comment-list-item',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_report_abuse_form' => array(
- 'template' => 'culturefeed-social-report-abuse-form',
- 'render element' => 'form',
- 'path' => $path,
- ),
- 'culturefeed_social_user_notifications_page' => array(
- 'variables' => array(
- 'notifications' => NULL,
- ),
- 'template' => 'culturefeed-social-user-notifications-page',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_activity_summary' => array(
- 'variables' => array(
- 'totals' => NULL,
- 'private' => NULL,
- 'account_name' => NULL,
- ),
- 'template' => 'culturefeed-social-activity-summary',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_page_activity_summary' => array(
- 'variables' => array(
- 'totals' => NULL,
- ),
- 'template' => 'culturefeed-social-page-activity-summary',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_login_required_message' => array(
- 'variables' => array('activity_type' => NULL, 'item' => NULL, 'url' => ''),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_profile_box_item_notifications' => array(
- 'variables' => array('total' => 0),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_user_list_block_for_activity' => array(
- 'variables' => array(
- 'activities_total' => NULL,
- 'activity_link' => NULL,
- 'activity_type' => NULL,
- 'list' => NULL,
- ),
- 'template' => 'culturefeed-social-user-list-block-for-activity',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_social_news_detail' => array(
- 'variables' => array('activity' => NULL),
- 'template' => 'culturefeed-social-news-detail',
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- );
-}
-
-/**
- * Implements hook_image_default_styles().
- */
-function culturefeed_social_image_default_styles() {
-
- $styles = array();
-
- $styles['culturefeed_activity_image'] = array(
- 'effects' => array(
- array(
- 'name' => 'image_scale',
- 'data' => array('width' => 450, 'height' => 450, 'upscale' => 0),
- 'weight' => 0,
- ),
- )
- );
-
- $styles['culturefeed_activity_image_teaser'] = array(
- 'effects' => array(
- array(
- 'name' => 'image_scale',
- 'data' => array('width' => 150, 'height' => 150, 'upscale' => 0),
- 'weight' => 0,
- ),
- )
- );
-
- return $styles;
-
-}
-
-/**
- * Implements hook_block_info().
- */
-function culturefeed_social_block_info() {
-
- $blocks = array();
-
- $blocks['recent-activities'] = array(
- 'info' => t('Culturefeed social: recent site activities'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['user-activities'] = array(
- 'info' => t('Culturefeed social: user activities'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['recommended-by'] = array(
- 'info' => t('Culturefeed social: Users who recommended this'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['liked-by'] = array(
- 'info' => t('Culturefeed social: Users who liked this'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['attended-by'] = array(
- 'info' => t('Culturefeed social: Users who will attend this'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['comments'] = array(
- 'info' => t('Culturefeed social: comments'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- if (variable_get('culturefeed_social_notifications_enabled', FALSE)) {
- $blocks['my-notifications'] = array(
- 'info' => t('Culturefeed social: my notifications (on user profile)'),
- 'cache' => DRUPAL_NO_CACHE,
- );
- }
-
- $blocks['my-activity-summary'] = array(
- 'info' => t('Culturefeed social: summary of my activities (on user profile)'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['loggedinuser-activity-summary'] = array(
- 'info' => t('Culturefeed social: summary of loggedin users activities'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['page-activity-summary'] = array(
- 'info' => t('Culturefeed social: summary of page activities'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- return $blocks;
-}
-
-/**
- * Implements hook_block_configure().
- */
-function culturefeed_social_block_configure($delta) {
-
- $form = array();
-
- if ($delta == 'recent-activities') {
-
- $form['culturefeed_social_recent_activities_total_items'] = array(
- '#title' => t('Items to show'),
- '#type' => 'textfield',
- '#default_value' => variable_get('culturefeed_social_recent_activities_total_items', CULTUREFEED_SOCIAL_RECENT_ACTIVITIES_COUNT),
- );
-
- }
-
- return $form;
-
-}
-
-/**
- * Implements hook_block_save().
- */
-function culturefeed_social_block_save($delta, $edit) {
-
- if ($delta == 'recent-activities') {
- variable_set('culturefeed_social_recent_activities_total_items', $edit['culturefeed_social_recent_activities_total_items']);
- }
-
-}
-
-/**
- * Implements hook_block_view().
- */
-function culturefeed_social_block_view($delta) {
-
- module_load_include('inc', 'culturefeed_social', 'includes/blocks');
- $block = array();
-
- switch ($delta) {
-
- case 'recent-activities':
- return culturefeed_social_block_recent_activities();
-
- case 'user-activities':
- $account = menu_get_object('user');
- return culturefeed_social_block_user_activities($account);
-
- case 'recommended-by':
- $object = culturefeed_search_get_active_object();
- return culturefeed_social_user_list_block_for_activity($object, CultureFeed_Activity::TYPE_RECOMMEND);
-
- case 'liked-by':
- $object = culturefeed_search_get_active_object();
- return culturefeed_social_user_list_block_for_activity($object, CultureFeed_Activity::TYPE_LIKE);
-
- case 'attended-by':
- $object = culturefeed_search_get_active_object();
- if (!$object || !method_exists($object, 'getType') || $object->getType() == 'node') {
- return;
- }
- return culturefeed_social_user_list_block_for_activity($object, CultureFeed_Activity::TYPE_IK_GA);
-
- case 'comments':
- $object = culturefeed_search_get_active_object();
- return culturefeed_social_block_comments($object);
-
- case 'my-notifications':
- if (variable_get('culturefeed_social_notifications_enabled', FALSE)) {
- return culturefeed_social_block_my_notifications();
- }
-
- case 'my-activity-summary':
- $account = menu_get_object('user');
- return culturefeed_social_block_my_activity_summary($account);
-
- case 'loggedinuser-activity-summary':
- return culturefeed_social_block_my_activity_summary(DrupalCultureFeed::getLoggedInAccount());
-
- case 'page-activity-summary':
- $page = culturefeed_pages_get_viewed_page();
- return culturefeed_social_block_page_activity_summary($page);
- }
-
- return $block;
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_menu().
- */
-function culturefeed_social_culturefeed_ui_profile_menu() {
-
- return array(
- 'activities' => array(
- 'title' => t('User history'),
- 'url' => 'culturefeed/activities',
- 'description' => t('Set which user actions are visible to others on your profile page.'),
- 'weight' => -15,
- ),
- );
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_box_dropdown_items().
- */
-function culturefeed_social_culturefeed_ui_profile_box_dropdown_items($cf_account) {
-
- $items['user-history'] = array(
- 'data' => l(t('User history'), 'culturefeed/activities'),
- 'class' => 'user-history',
- 'weight' => -19,
- );
-
- return $items;
-
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_box_main_items().
- */
-function culturefeed_social_culturefeed_ui_profile_box_main_items() {
-
- if (!variable_get('culturefeed_social_notifications_enabled', FALSE)) {
- return;
- }
-
- $items = array();
- try {
-
- $notification_count = DrupalCultureFeed::getNotificationsCount(DrupalCultureFeed::getLoggedInUserId());
- $items['notifications'] = array(
- 'data' => theme('culturefeed_social_profile_box_item_notifications', array(
- 'total' => isset($notification_count[Culturefeed::NOTIFICATION_TYPE_NEW]) ? $notification_count[Culturefeed::NOTIFICATION_TYPE_NEW] : 0,
- )),
- 'class' => 'notifications',
- 'weight' => -20,
- );
-
- } catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- }
-
- return $items;
-}
-
-/**
- * Implements hook_forms().
- * This is needed to show multiple comment / abuse forms on 1 page.
- */
-function culturefeed_social_forms($form_id, $args) {
-
- $forms = array();
- if (strstr($form_id, 'culturefeed_social_comment_form')) {
- $forms[$form_id] = array('callback' => 'culturefeed_social_base_comment_form');
- } elseif (strstr($form_id, 'culturefeed_social_report_abuse_form')) {
- $forms[$form_id] = array('callback' => 'culturefeed_social_base_report_abuse_form');
- }
-
- return $forms;
-}
-
-/**
- * Form to filter on user activities.
- */
-function culturefeed_social_user_activity_filter_form($form, $form_state, $active_filter = 'all', $in_block = FALSE, $account = NULL) {
-
- $form = array();
- $activity_filters = culturefeed_social_get_activity_filter_options(TRUE);
- if (!$activity_filters) {
- return;
- }
-
- $options = array('all' => t('Everything'));
- foreach ($activity_filters as $activity_id => $activity_config) {
- $options[$activity_id] = $activity_config->label;
- }
-
- $form['filter'] = array(
- '#type' => 'select',
- '#options' => $options,
- '#title' => t('Filter actions'),
- '#default_value' => $active_filter,
- );
-
- $query = array();
- if ($account) {
- $query['culturefeed_uid'] = $account->culturefeed_uid;
- }
-
- // If the form is shown in a block. Filtering is done by ajax.
- if ($in_block) {
- $form['filter_url'] = array(
- '#type' => 'hidden',
- '#value' => url('culturefeed/ajax/user/activities', array('query' => $query)),
- );
- } else {
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Filter'),
- );
- }
-
- $form['#attached']['js'][] = drupal_get_path('module', 'culturefeed_social') . '/js/activities.js';
-
- return $form;
-}
-
-/**
- * Submit the user activity filter.
- */
-function culturefeed_social_user_activity_filter_form_submit($form, &$form_state) {
-
- $type = $form_state['values']['filter'];
-
- if ($type > -1 && $type != 'all') {
- drupal_goto('culturefeed/activities/' . $type);
- } else {
- drupal_goto('culturefeed/activities');
- }
-}
-
-/**
- * Base form to write a comment.
- * This is called by culturefeed_social_forms().
- *
- * @param misc $object (ExtendedEntity of a Culturefeed page, event, book, ...)
- * @param CultureFeed_Activity $activity
- * Optional activity if the comment needs to target the activity as parent.
- */
-function culturefeed_social_base_comment_form($form, &$form_state, $object, $activity = NULL) {
-
- $form_state['object'] = $object;
-
- $activity_content_type = culturefeed_get_content_type($object->getType());
- $node_id = culturefeed_social_get_activity_node_id($activity_content_type, $object);
-
- // Default is the status false.
- try {
- $status = FALSE;
- $cf_id = DrupalCultureFeed::getLoggedInUserId();
- if ($cf_id) {
- $status = DrupalCultureFeed::getNodeStatus($activity_content_type, $node_id, $cf_id);
- }
- } catch (Exception $e) {
- $status = FALSE;
- watchdog_exception('culturefeed_social', $e);
- }
-
- $config = culturefeed_social_activity_get_config(CultureFeed_Activity::TYPE_COMMENT);
- $form_state['config'] = $config;
-
- $form = array(
- '#theme' => 'culturefeed_social_comment_form'
- );
-
- $form['message'] = array(
- '#type' => 'textarea',
- '#title' => $config->titleDo,
- '#default_value' => '',
- '#attributes' => array('class' => array('comment-message')),
- '#weight' => -5,
- '#required' => TRUE,
- );
-
- if ($status == TRUE) {
-
- $link = l(t('Remove from list'), 'culturefeed/node/unfollow/' . $object->getType() . '/' . urlencode($node_id) . '/nojs', array('query' => drupal_get_destination()));
- $message = format_string(t('You\'re currently receiving updates of new comments. !link to get no more posts.'), array('!link' => $link));
-
- $form['update_optin'] = array(
- '#type' => 'markup',
- '#markup' => $message,
- '#prefix' => '',
- );
- } else {
- $form['update_optin'] = array(
- '#type' => 'checkbox',
- '#title' => t('Receive email about new comments'),
- '#default_value' => isset($status) ? $status : TRUE,
- '#attributes' => array('class' => array('comment-updates')),
- '#weight' => 1,
- );
- }
-
- if (isset($activity)) {
-
- $form['parent_id'] = array(
- '#type' => 'hidden',
- '#default_value' => $activity->id,
- );
- }
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Submit'),
- '#attributes' => array('class' => array('comment-button')),
- '#weight' => 5,
- );
-
- return $form;
-}
-
-/**
- * Validate the comment form => Submit it to service.
- */
-function culturefeed_social_base_comment_form_validate($form, &$form_state) {
-
- $object = $form_state['object'];
- $config = $form_state['config'];
-
- $social_content_type = culturefeed_get_content_type($object->getType());
- $detail_path = culturefeed_social_detail_path($social_content_type, $object->getId(), $object->getTitle(culturefeed_search_get_preferred_language()));
-
- // Send a comment.
- if (!empty($form_state['values']['message']) && strlen($form_state['values']['message']) <= 1000) {
-
- $activity = new CultureFeed_Activity();
- $activity->type = $activity::TYPE_COMMENT;
- $activity->nodeTitle = $object->getTitle(culturefeed_search_get_preferred_language());
- $activity->userId = DrupalCultureFeed::getLoggedInUserId();
- $activity->value = $form_state['values']['message'];
- $activity->onBehalfOf = !empty($form_state['values']['on_behalf_of']) ? $form_state['values']['on_behalf_of'] : '';
-
- // If user is replying on another comment. Node id and content type is different.
- if (!empty($form_state['values']['parent_id'])) {
- $activity->nodeId = $form_state['values']['parent_id'];
- $activity->contentType = CultureFeed_Activity::CONTENT_TYPE_ACTIVITY;
- } else {
- $activity_content_type = culturefeed_get_content_type($object->getType());
- $activity->nodeId = culturefeed_social_get_activity_node_id($activity_content_type, $object);
- $activity->contentType = $activity_content_type;
- }
-
- try {
- $form_state['activity_result'] = DrupalCultureFeed::createActivity($activity);
- } catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- form_set_error('', format_string(t('Due to technical problems it is currently not possible to send your message. Do not hesitate to directly contact via @site'), array('@site' => variable_get('site_email', ''))));
- }
- } else {
- form_set_error('message', t('Your response should not exceed 1000 characters.'));
- }
-
- // Temp fix untill cnet decides to swap to ctools modal.
- if (form_get_errors()) {
- drupal_goto($detail_path);
- }
-}
-
-/**
- * Submit handler to post a comment.
- */
-function culturefeed_social_base_comment_form_submit($form, $form_state) {
-
- $object = $form_state['object'];
- $activity_content_type = culturefeed_get_content_type($object->getType());
- $node_id = culturefeed_social_get_activity_node_id($activity_content_type, $object);
- $config = $form_state['config'];
-
- if (!empty($form_state['activity_result'])) {
-
- // Send a message to the user.
- $goto_link = l($config->action, culturefeed_social_detail_path($object->getType(), $object->getId(), $object->getTitle(culturefeed_search_get_preferred_language())), array(
- 'absolute' => TRUE,
- 'fragment' => 'activity-' . $form_state['activity_result']->id,
- ));
- drupal_set_message(format_string(t('Your !comment has been sent.'), array('!comment' => $goto_link)));
-
- // Clear the cache.
- _culturefeed_search_flush_caches(TRUE);
-
- // Follow updates.
- if (!empty($form_state['values']['update_optin'])) {
-
- try {
- $id = DrupalCultureFeed::followNode($activity_content_type, $node_id, DrupalCultureFeed::getLoggedInUserId());
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- }
- }
- }
-}
-
-/**
- * Base form to report an activity as abuse.
- * This is called by culturefeed_social_forms().
- *
- * @param $activity
- * Activity to report.
- * @param $context
- * Context where the activity is done on. (event, book, production ... )
- */
-function culturefeed_social_base_report_abuse_form($form, &$form_state, $activity, $context) {
-
- // If we have a cdb item, a page can be connected.
- $page_id = 0;
- if ($context->getType() == 'page') {
- $page_id = $context->getId();
- } elseif ($context->getType() != 'bibnet_book') {
- $page_id = culturefeed_agenda_get_connected_page_id_of_item($context->getEntity());
- }
-
- if ($page_id) {
- $form_state['post_params']['recipientPage'] = $page_id;
- $form_state['post_params']['role'] = CultureFeed_Pages_Membership::MEMBERSHIP_ROLE_ADMIN;
- }
-
- // If there was no page, the message should go to the admin.
- if (!isset($form_state['post_params']['recipientPage'])) {
- $form_state['post_params']['recipient'] = variable_get('culturefeed_social_report_destination_uid');
- // If no uid was set. Don't show a form.
- if (empty($form_state['post_params']['recipient'])) {
- return;
- }
- }
-
- $form = array();
-
- $form['message'] = array(
- '#type' => 'textarea',
- '#title' => t('Inappropriate response'),
- '#attributes' => array('placeholder' => t('Please tell us why you think this is an inappropriate response')),
- '#required' => TRUE,
- );
-
- // Add select to choose the 'send as'.
- try {
-
- $cultureFeedUser = DrupalCultureFeed::getLoggedInUser();
-
- if (!empty($cultureFeedUser->pageMemberships)) {
- $send_as_options = array();
- foreach ($cultureFeedUser->pageMemberships as $membership) {
- $send_as_options[$membership->page->getId()] = $membership->page->getName();
- }
-
- $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_state['context'] = $context;
- $form_state['activity'] = $activity;
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Submit'),
- '#attributes' => array('style' => array('float:left')),
- );
-
- $destination = drupal_get_destination();
-
- $form['cancel'] = array(
- '#type' => 'link',
- '#title' => t('Cancel'),
- '#href' => url($GLOBALS['base_url'] . '/' . $destination['destination']),
- '#attributes' => array('class' => array('abuse-button-decline')),
- );
-
- $form['#theme'] = 'culturefeed_social_report_abuse_form';
-
- 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_social_base_report_abuse_form_validate($form, &$form_state) {
-
- $context = $form_state['context'];
-
- $activity = $form_state['activity'];
-
- $social_content_type = culturefeed_get_content_type($context->getType());
- $detail_path = culturefeed_social_detail_path($social_content_type, $context->getId(), $context->getTitle(culturefeed_search_get_preferred_language()));
-
- if (!empty($form_state['values']['message'])) {
- $body = array(
- 'body' => $form_state['values']['message'],
- 'commentUserId' => $activity->userId,
- $social_content_type . 'Id' => $context->getId(),
- 'comment' => $activity->value,
- 'linkUser' => url('user/' . culturefeed_get_uid_for_cf_uid($activity->userId, ''), array('absolute' => TRUE)),
- 'linkComment' => url($detail_path, array('absolute' => TRUE, 'fragment' => 'activity-' . $activity->id))
- );
-
- $params = $form_state['post_params'];
- $params['subject'] = $context->getTitle(culturefeed_search_get_preferred_language());
- $params['type'] = CultureFeed_Messages_Message::TYPE_REPORT;
- $params['body'] = drupal_json_encode($body);
-
- if (!empty($form_state['values']['send_as'])) {
- $params['senderPage'] = $form_state['values']['send_as'];
- }
- }
-
- try {
- $message_id = DrupalCultureFeed::getLoggedInUserInstance()->messages()->sendMessage($params);
- } catch (Exception $e) {
- form_set_error('', t('Something went wrong while sending'));
- watchdog_exception('culturefeed_social', $e);
- }
-
- // Temp fix untill cnet decides to swap to ctools modal.
- if ($errors = form_get_errors()) {
- drupal_goto($detail_path);
- }
-}
-
-/**
- * Submit the new message form.
- */
-function culturefeed_social_base_report_abuse_form_submit($form, &$form_state) {
- drupal_set_message(t('Message sent'));
-}
-
-/**
- * Load callback for a, activity.
- */
-function culturefeed_social_activity_item_load($activity_id, $type_id) {
-
- $item = DrupalCultureFeed::loadActivity($activity_id);
- if (!empty($item)) {
- return ($item->type == $type_id) ? $item : FALSE;
- }
-
- return FALSE;
-}
-
-/**
- * Load callback for a news item of a page.
- */
-function culturefeed_social_news_item_load($news_item_id) {
- return culturefeed_social_activity_item_load($news_item_id, CultureFeed_Activity::TYPE_NEWS);
-}
-
-/**
- * Title callback for detailpages of activities.
- */
-function culturefeed_social_activity_title($activity) {
-
- $title = $activity->nodeTitle;
-
- // Check if the activity was a json.
- $content = json_decode($activity->value);
- if (!empty($content) && !empty($content->title)) {
- $title = $content->title;
- }
-
- return $title;
-}
diff --git a/culturefeed_social/includes/admin.inc b/culturefeed_social/includes/admin.inc
deleted file mode 100644
index a479ed9c..00000000
--- a/culturefeed_social/includes/admin.inc
+++ /dev/null
@@ -1,43 +0,0 @@
- $activity_config) {
- $options[$activity_id] = $activity_config->label;
- }
-
- $form = array();
-
- $form['culturefeed_social_activities_page_intro'] = array(
- '#type' => 'textarea',
- '#title' => t('Activities page intro'),
- '#default_value' => variable_get('culturefeed_social_activities_page_intro'),
- );
-
- $form['culturefeed_social_notifications_enabled'] = array(
- '#type' => 'checkbox',
- '#title' => t('Enable notifications'),
- '#default_value' => variable_get('culturefeed_social_notifications_enabled', FALSE),
- );
-
- $form['culturefeed_social_report_destination_uid'] = array(
- '#type' => 'textfield',
- '#title' => t('Report as abuse messages destination uid (Drupal)'),
- '#default_value' => variable_get('culturefeed_social_report_destination_uid'),
- '#description' => t('Report as abuse messages will be sent to this account.
- Only if no destination page was available. Otherwise the message will be sent to all the admins of the page'
- ),
- );
-
- return system_settings_form($form);
-
-}
diff --git a/culturefeed_social/includes/blocks.inc b/culturefeed_social/includes/blocks.inc
deleted file mode 100644
index b6a2fe1c..00000000
--- a/culturefeed_social/includes/blocks.inc
+++ /dev/null
@@ -1,404 +0,0 @@
-max = variable_get('culturefeed_social_recent_activities_total_items', CULTUREFEED_SOCIAL_RECENT_ACTIVITIES_COUNT);
- $query->type = array_keys(culturefeed_social_get_activity_filter_options(TRUE));
- $query->consumer = variable_get('culturefeed_api_application_key', '');
-
- try {
- $activities = DrupalCultureFeed::searchActivities($query);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- return;
- }
-
- if ($activities->total == 0) {
- return;
- }
-
- $content = array();
- $content['activities'] = array(
- '#theme' => 'culturefeed_social_user_activity_list',
- '#activities' => $activities,
- '#class' => 'site-activity-list',
- '#read_more_text' => t('All actions'),
- '#read_more_url' => 'culturefeed/activities/recent',
- );
-
- $block['subject'] = t('Recent actions');
- $block['content'] = $content;
-
- return $block;
-
-}
-
-/**
- * Show the users recent activities.
- */
-function culturefeed_social_block_user_activities($account) {
-
- if (empty($account->culturefeed_uid)) {
- return;
- }
-
- $active_types = culturefeed_social_get_activity_filter_options(TRUE);
- $query = new CultureFeed_SearchActivitiesQuery();
- $query->max = CULTUREFEED_SOCIAL_BLOCK_USER_ACTIVITIES_COUNT;
- $query->type = array_keys($active_types);
- $query->userId = $account->culturefeed_uid;
- $query->private = FALSE;
- $query->consumer = variable_get('culturefeed_api_application_key', '');
-
- try {
- $activities = DrupalCultureFeed::searchActivities($query);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- return;
- }
-
- if (empty($activities->objects)) {
- $content['activities'] = array(
- '#markup' => '' . 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' => '' . t('You have no notifications'). '
');
-
- try {
-
- $params = array(
- 'max' => CULTUREFEED_SOCIAL_BLOCK_NOTIFICATIONS_COUNT,
- 'dateFrom' => date('Y-m-d', strtotime('-1 year')),
- );
-
- $notifications = DrupalCultureFeed::getNotifications(DrupalCultureFeed::getLoggedInUserId(), $params);
- if ($notifications->total > 0) {
- $block['content'] = array(
- '#theme' => 'culturefeed_social_user_activity_wall',
- '#activities' => $notifications,
- '#class' => 'notifications',
- '#read_more_url' => url('culturefeed/notifications'),
- '#read_more_text' => t('View all notifications'),
- );
- }
-
- }
- catch (Exception $e) {
- return;
- }
-
- return $block;
-
-}
-
-/**
- * Block to show a summary of my activities
- * @param stdClass $account
- */
-function culturefeed_social_block_my_activity_summary($account) {
-
- if (empty($account->culturefeed_uid)) {
- return;
- }
-
- $has_pages = module_exists('culturefeed_pages');
- $has_books = module_exists('bibnet_books');
- $active_types = culturefeed_social_get_activity_filter_options(TRUE);
-
- $types = array();
- foreach ($active_types as $type => $activity_config) {
- $allowed_types = $activity_config->allowedTypes;
- foreach ($allowed_types as $ctype) {
- if ($ctype == 'page' && !$has_pages) {
- continue;
- }
- if ($ctype == 'book' && !$has_books) {
- continue;
- }
- $types[] = $type . '_' . $ctype;
- }
- }
-
- $view_own_activities = $account->uid == $GLOBALS['user']->uid ? TRUE : FALSE;
- $private = FALSE;
- try {
- $totals = DrupalCultureFeed::getTotalActivities($account->culturefeed_uid, $types, $private);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- return;
- }
-
- $content = array();
- if ($totals) {
-
- $content = array(
- '#theme' => 'culturefeed_social_activity_summary',
- '#totals' => $totals,
- '#private' => $view_own_activities,
- '#account_name' => $account->name,
- );
- }
-
- $block['subject'] = '';
- $block['content'] = $content;
-
- return $block;
-
-}
-
-/**
- * Show the activity summary for this page.
- *
- * @page Culturefeed_Page
- */
-function culturefeed_social_block_page_activity_summary($page) {
-
- if (empty($page) || !($page instanceOf CultureFeed_Cdb_Item_Page)) {
- return;
- }
-
- $has_pages = module_exists('culturefeed_pages');
- $active_types = culturefeed_social_get_activity_filter_options(TRUE);
-
- $types = array();
- foreach ($active_types as $type => $activity_config) {
- if (empty($activity_config)) {
- continue;
- }
- $allowed_types = $activity_config->allowedTypes;
- foreach ($allowed_types as $ctype) {
- if ($ctype == 'page' && !$has_pages) {
- continue;
- }
- if ($ctype == 'book' && !$has_pages) {
- continue;
- }
- $types[] = $type . '_' . $ctype;
- }
- }
-
- $private = FALSE;
- try {
- $totals = DrupalCultureFeed::getTotalPageActivities($page->getId(), $types, $private);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- return;
- }
-
- $content = array();
- if ($totals) {
-
- $content = array(
- '#theme' => 'culturefeed_social_page_activity_summary',
- '#totals' => $totals,
- );
- }
-
- $block['subject'] = '';
- $block['content'] = $content;
-
- return $block;
-
-}
-
-/**
- * Return a block build of users that did an activity of a given type on a given object.
- * @param $object
- * Cdb item to build the activity list for.
- * @param string $activity_type
- * Type activity to show a list for.
- */
-function culturefeed_social_user_list_block_for_activity($object, $activity_type) {
-
- if (!$object || !method_exists($object, 'getType')) {
- return;
- }
-
- $config = culturefeed_social_activity_get_config($activity_type);
- $content_type = culturefeed_get_content_type($object->getType());
-
- $query = new CultureFeed_SearchActivitiesQuery();
- $query->type = $activity_type;
- $query->contentType = $content_type;
- $query->consumer = variable_get('culturefeed_api_application_key', '');
-
- switch ($content_type) {
-
- case CultureFeed_Activity::CONTENT_TYPE_BOOK:
- $node_title = $object->getTitle(culturefeed_search_get_preferred_language());
- $id = $object->getId();
- $query->nodeId = url(culturefeed_social_detail_path($content_type, $id, $node_title), array('absolute' => TRUE));
- break;
-
- case CultureFeed_Activity::CONTENT_TYPE_EVENT:
- case CultureFeed_Activity::CONTENT_TYPE_PRODUCTION:
- $node_title = $object->getTitle(culturefeed_search_get_preferred_language());
- $id = $object->getId();
- $query->nodeId = $id;
- break;
- }
-
- try {
- $activities = DrupalCultureFeed::searchActivities($query);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- return;
- }
-
- $content = array();
- $content['#theme'] = 'culturefeed_social_user_list_block_for_activity';
- $content['#activity_type'] = $activity_type;
-
- if ($activities->total > 0) {
-
- $content['#activities_total'] = $activities->total;
-
- $user_objects = array();
- foreach ($activities->objects as $activity_object) {
- $user_object = new stdClass();
- $user_object->nick = $activity_object->nick;
- $user_object->id = $activity_object->userId;
- $user_object->depiction = $activity_object->depiction;
- $user_objects[] = $user_object;
- }
-
- if (count($user_objects) > 0) {
- $content['#list'] = _culturefeed_ui_users_list($user_objects);
- }
- }
-
- // Advanced activity link.
- $content['#activity_link'] = culturefeed_social_activity_link_advanced($activity_type, $object, FALSE);
-
- $content['#attached']['js'][] = drupal_get_path('module', 'culturefeed_social') . '/js/social-links.js';
-
- $block['subject'] = $config->subject;
- $block['content'] = $content;
-
- return $block;
-}
diff --git a/culturefeed_social/includes/helpers.inc b/culturefeed_social/includes/helpers.inc
deleted file mode 100644
index 34c10fce..00000000
--- a/culturefeed_social/includes/helpers.inc
+++ /dev/null
@@ -1,699 +0,0 @@
-userId = DrupalCultureFeed::getLoggedInUserId();
- $query->private = TRUE;
- }
- try {
- $activities = DrupalCultureFeed::searchActivities($query);
- foreach ($activities->objects as $activity) {
-
- if (!in_array($activity->type, array_keys($types))) {
- $activity_config = CultureFeedActivityConfigBase::loadByType($activity->type);
- if ($activity_config) {
- $types[$activity_config->type] = $activity_config;
- }
- }
-
- }
-
- }
- catch (Exception $e) {
- watchdog('culturefeed_social_get_activity_options', $e);
- return array();
- }
-
- return $types;
-
-}
-
-/**
- * Show an advanced do / undo link for a given action, on a given entity.
- *
- * @see culturefeed_social_activity_link()
- */
-function culturefeed_social_activity_link_advanced($activity_type, $extended_entity, $use_ajax = TRUE) {
- return culturefeed_social_activity_link($activity_type, $extended_entity, TRUE, FALSE, '', '', $use_ajax);
-}
-
-/**
- * Show a link to do / undo a given activity on the given entity.
- *
- * @param $activity_type
- * Activity type to perform (Example: CultureFeed_Activity::TYPE_RECOMMEND)
- * @param $activityStatsExtendedEntity
- * The extended entity of the content to create a link for.
- * @param Boolean $advanced
- * Indicates whether the link is advanced (with extra possibilities).
- * @param Boolean $add_count
- * Add the current activity count to the link or not.
- * @param string $title
- * Title you want to use to override the default config title.
- * @param string $undo_title
- * Undo title you want to use to override the default config title.
- * @param $use_ajax
- * Use ajax for the link or not.
- * @return string
- */
-function culturefeed_social_activity_link($activity_type, $extended_entity, $advanced = FALSE, $add_count = FALSE, $title = '', $title_undo = '', $use_ajax = TRUE) {
-
- if (method_exists($extended_entity, 'getId')) {
- $id = $extended_entity->getId();
- $activity_content_type = culturefeed_get_content_type($extended_entity->getType());
- $activity_node_id = culturefeed_social_get_activity_node_id($activity_content_type, $extended_entity);
- $activity_count = $extended_entity->getActivityCount(CultureFeed_Activity::getNameById($activity_type));
- }
- else {
- $id = $extended_entity->id;
- $activity_node_id = $id;
- $activity_content_type = culturefeed_get_content_type(get_class($extended_entity));
- $activity_count = DrupalCultureFeed::activityGetCount($activity_type, $activity_node_id, $activity_content_type);
- }
-
- $current_query = drupal_get_query_parameters();
- $path = current_path();
-
- $identifier = drupal_html_id('activity-element-' . $activity_type);
- $identifier_wrapper = drupal_html_id('activity-wrapper-' . $activity_type);
-
- $config = culturefeed_social_activity_get_config($activity_type);
- $user_did_this = FALSE;
-
- // Anonymous user: redirect him to landing page.
- if (!DrupalCultureFeed::isCultureFeedUser()) {
- $action = 'do';
- $action_url = 'authenticated';
- $destination = 'culturefeed/do/' . $config->type . '/' . $activity_content_type . '/' . urlencode($id) . '/redirect';
- $use_ajax = FALSE;
- }
- else {
-
- // If undo is not allowed. The action is always do.
- if ($config->undoAllowed) {
- try {
- $user_did_this = DrupalCultureFeed::userDidActivity($activity_type, $activity_node_id, $activity_content_type);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- }
- }
-
- $action = $user_did_this ? 'undo' : 'do';
-
- if (!$use_ajax) {
- $action_url = 'culturefeed/' . $action . '/' . $config->type . '/' . $activity_content_type . '/' . urlencode($id) . '/redirect';
- }
- elseif ($advanced) {
- $action_url = 'culturefeed/' . $action . '/' . $config->type . '/' . $activity_content_type . '/' . urlencode($id) . '/advanced';
- }
- else {
- $action_url = 'culturefeed/' . $action . '/' . $config->type . '/' . $activity_content_type . '/' . urlencode($id) . '/noredirect';
- }
-
- $destination = url($path, array('query' => $current_query));
- }
-
- $markup = array();
-
- $markup[$identifier] = array(
- '#id' => $identifier,
- '#type' => 'link',
- '#href' => $action_url,
- '#attributes' => array(
- 'class' => array($action . '-link', $action . '-' . $config->type . '-link'),
- ),
- '#options' => array(
- 'query' => array(
- 'destination' => $destination,
- 'add_count' => $add_count,
- ),
- ),
- '#prefix' => '',
- '#suffix' => '
',
- );
-
- // If ajax is requested, add ajax action.
- if ($use_ajax) {
- $markup[$identifier]['#ajax'] = array(
- 'wrapper' => $identifier_wrapper,
- );
- }
-
- if (!empty($title)) {
- $markup[$identifier]['#options']['query']['title'] = $title;
- $config->titleDoFirst = $title;
- $config->titleDo = $title;
- }
-
- if (!empty($title_undo)) {
- $markup[$identifier]['#options']['query']['title_undo'] = $title_undo;
- $config->subjectUndo = $title_undo;
- }
-
- if (!$user_did_this) {
- $markup[$identifier]['#title'] = (0 == $activity_count) ? $config->titleDoFirst : $config->titleDo;
- }
- else {
- $markup[$identifier]['#title'] = $config->subjectUndo;
- }
-
- if ($activity_count && $add_count || isset($_GET['add_count'])) {
- $markup[$identifier]['#title'] .= ' (' . $activity_count . ')';
- }
-
- drupal_alter('culturefeed_social_activity_link', $markup, $activity_type, $extended_entity);
-
- return drupal_render($markup);
-}
-
-/**
- *
- * @param String $activity_type
- * @param String $type
- * @param Integer $id
- * @return misc boolean false / CultureFeed_Activity on success
- */
-function _culturefeed_social_do($activity_type, $type, $id) {
-
- $activity = new CultureFeed_Activity();
- $activity->contentType = $type;
- $activity->type = $activity_type;
- $activity->userId = DrupalCultureFeed::getLoggedInUserId();
-
- if (module_exists('culturefeed_pages')) {
- $active_page = culturefeed_pages_get_active_page_id();
- if ($active_page) {
- $activity->onBehalfOf = $active_page;
- }
- }
-
- switch ($type) {
-
- // Drupal nodes.
- case $activity::CONTENT_TYPE_NODE:
-
- $node = node_load($id);
- $activity->nodeTitle = $node->title;
- $activity->nodeId = url('node/' . $node->nid, array('absolute' => TRUE));
- $activity->path = 'node/' . $node->nid;
-
- break;
-
- // Bibnet books.
- case $activity::CONTENT_TYPE_BOOK:
-
- $object = bibnet_book_load($id);
- $activity->nodeTitle = bibnet_books_detail_page_title($object);
- $activity->nodeId = url($object->getEntity()->getUri(), array('absolute' => TRUE));
- $activity->path = culturefeed_social_detail_path($object->getType(), $id, $activity->nodeTitle);
-
- break;
-
- // Culturefeed pages.
- case $activity::CONTENT_TYPE_CULTUREFEED_PAGE:
-
- $object = culturefeed_pages_page_load($id);
- $activity->nodeTitle = $object->getEntity()->getDetails()->getDetailByLanguage(culturefeed_search_get_preferred_language())->getTitle();
- $activity->nodeId = culturefeed_search_detail_url('page', $id, $object->getName(), array('absolute' => TRUE));
- $activity->path = culturefeed_search_detail_path('page', $id, $object->getName());
-
- break;
-
- // Normal Cdb items.
- case $activity::CONTENT_TYPE_ACTOR:
- case $activity::CONTENT_TYPE_EVENT:
- case $activity::CONTENT_TYPE_PRODUCTION:
-
- $object = culturefeed_search_item_load($id, $type);
- $activity->nodeTitle = $object->getEntity()->getDetails()->getDetailByLanguage(culturefeed_search_get_preferred_language())->getTitle();
- $activity->nodeId = $id;
- $activity->path = culturefeed_search_detail_path($object->getType(), $id, $activity->nodeTitle);
-
- break;
-
- case $activity::CONTENT_TYPE_ACTIVITY:
-
- try {
- $query = new CultureFeed_SearchActivitiesQuery();
- $query->activityId = $id;
- $activities = DrupalCultureFeed::searchActivities($query);
- if ($activities->total == 0) {
- return FALSE;
- }
-
- $activity->nodeTitle = $activities->objects[0]->nodeTitle;
- $activity->nodeId = $id;
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- return FALSE;
- }
-
- break;
-
- // Generic content.
- case $activity::CONTENT_TYPE_CONTENT:
-
- $genericObject = culturefeed_userpoints_promotion_load($id);
- $activity->nodeTitle = $genericObject->title;
- $activity->nodeId = url('userpoints/promotion/' . $genericObject->id, array('absolute' => TRUE));
- $activity->path = 'userpoints/promotion/' . $genericObject->id;
-
- break;
-
- // Please add your new types here.
- default:
- return FALSE;
-
- }
-
- try {
- // Check session if user has already performed this activity for this event.
- if (isset($_SESSION[$activity->userId]['activities']) && !empty($_SESSION[$activity->userId]['activities']) && in_array($activity_type, ['8', '15'])) {
- foreach ($_SESSION[$activity->userId]['activities'] as $stored_activity) {
- if ($stored_activity['nodeId'] == $activity->nodeId && $stored_activity['type'] == $activity_type) {
- return $activity;
- }
- }
- }
-
- $activity_result = DrupalCultureFeed::createActivity($activity);
- $activity->id = $activity_result->id;
-
- // Store created activity data in session for user.
- $_SESSION[$activity_result->userId]['activities'][] = [
- 'type' => $activity_result->type,
- 'nodeId' => $activity_result->nodeId
- ];
-
- return $activity;
- }
- catch (Exception $e) {
- if ($e->getCode() != 421) {
- watchdog_exception('culturefeed_social', $e);
- return FALSE;
- }
- return TRUE;
- }
-
-}
-
-/**
- *
- * @param String $activity_type
- * @param String $type
- * @param Integer $node_id
- * @return array Deleted activity results.
- */
-function _culturefeed_social_undo($activity_type, $type, $node_id) {
-
- $user_id = DrupalCultureFeed::getLoggedInUserId();
-
- try {
- $delete_activity_result = DrupalCultureFeed::deleteActivities($user_id, $node_id, $type, $activity_type);
-
- // Remove possible stored created activity session data.
- if ($delete_activity_result) {
- if (isset($_SESSION[$user_id]['activities']) && !empty($_SESSION[$user_id]['activities']) && in_array($activity_type, ['8', '15'])) {
- foreach ($_SESSION[$user_id]['activities'] as $i => $stored_activity) {
- if ($stored_activity['nodeId'] == $node_id && $stored_activity['type'] == $activity_type) {
- unset($_SESSION[$user_id]['activities'][$i]);
- }
- }
- }
- }
-
- return $delete_activity_result;
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- }
- //return array();
-}
-
-/**
- * Helper function to create a path to the item
- * @param String $type
- * @param String $id
- * @param String $title
- * @return string
- */
-function culturefeed_social_detail_path($type, $id, $title = '') {
-
- if ($type == CultureFeed_Activity::CONTENT_TYPE_NODE) {
- return 'node/' . $id;
- }
- if ($type == CultureFeed_Activity::CONTENT_TYPE_CONTENT) {
- return 'userpoints/promotion/' . $id;
- }
- if ($type == CultureFeed_Activity::CONTENT_TYPE_BOOK) {
- return 'book/' . urlencode($id);
- }
- else {
- return culturefeed_search_detail_path($type, $id, $title);
- }
-
-}
-
-/**
- * Helper function to create a path to the detail of an activity object
- * @param String $type
- * @param String $id
- * @param String $title
- * @return string
- */
-function culturefeed_social_activity_object_path($type, $id, $title = '') {
-
- if ($type == CultureFeed_Activity::CONTENT_TYPE_NODE
- || $type == CultureFeed_Activity::CONTENT_TYPE_BOOK
- || $type == CultureFeed_Activity::CONTENT_TYPE_CONTENT) {
- return $id;
- }
- else {
- return culturefeed_search_detail_path($type, $id, $title);
- }
-
-}
-
-/**
- * Helper function to load the correct main object.
- *
- * @param CultureFeed_Activity $activity
- * The activity to load the main object of.
- */
-function culturefeed_social_detail_object(CultureFeed_Activity $activity) {
-
- $object = NULL;
-
- switch ($activity->contentType) {
-
- case CultureFeed_Activity::CONTENT_TYPE_NODE:
-
- // Get the node url of the full url. We need it to get the nid.
- global $base_url;
- $path = str_replace($base_url . '/', '', $activity->nodeId);
- $node_path = drupal_get_normal_path($path);
-
- $object = node_load(arg(1, $node_path));
- if (!$object) {
- return NULL;
- }
-
- return new DrupalNodeExtendedEntity($object);
-
- break;
-
- case CultureFeed_Activity::CONTENT_TYPE_BOOK:
- $object = bibnet_book_load(urldecode($activity->nodeId));
- break;
-
- case CultureFeed_Activity::CONTENT_TYPE_CONTENT:
- $object = culturefeed_userpoints_promotion_load($activity->nodeId);
- break;
-
- // Activity type. Load the activity to get the original object.
- case CultureFeed_Activity::CONTENT_TYPE_ACTIVITY:
- try {
- $query = new CultureFeed_SearchActivitiesQuery();
- $query->activityId = $activity->nodeId;
- $query->private = FALSE;
- $activities = DrupalCultureFeed::searchActivities($query);
- if ($activities->total > 0) {
- $parent_activity = $activities->objects[0];
- $object = culturefeed_social_detail_object($parent_activity);
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- }
- break;
-
- case CultureFeed_Activity::CONTENT_TYPE_EVENT:
- case CultureFeed_Activity::CONTENT_TYPE_ACTOR:
- case CultureFeed_Activity::CONTENT_TYPE_PRODUCTION:
- default:
- $object = culturefeed_search_item_load($activity->nodeId, $activity->contentType);
- break;
-
- }
-
- return $object;
-
-}
-
-/**
- * Helper function to create a drupal goto based on activities.
- * @param Culturefeed_Activity $activity
- * @param string $content_type
- * @param string $node_id
- * @param string $title
- */
-function culturefeed_social_goto($activity, $content_type, $node_id, $title = "redirect") {
- drupal_goto(culturefeed_social_detail_path($content_type, $node_id, $title));
-}
-
-/**
- * Helper to get the nodeId used for activity.
- * @param String $activity_content_type
- * @param ActivityStatsExtendedEntity $extended_entity
- */
-function culturefeed_social_get_activity_node_id($activity_content_type, $extended_entity) {
-
- $node_id = 0;
- switch ($activity_content_type) {
-
- case CultureFeed_Activity::CONTENT_TYPE_ACTOR:
- case CultureFeed_Activity::CONTENT_TYPE_PRODUCTION:
- case CultureFeed_Activity::CONTENT_TYPE_EVENT:
- $node_id = $extended_entity->getId();
- break;
-
- case CultureFeed_Activity::CONTENT_TYPE_BOOK:
- $path = culturefeed_social_detail_path($activity_content_type, $extended_entity->getId(), $extended_entity->getTitle(culturefeed_search_get_preferred_language()));
- $node_id = url($path, array('absolute' => TRUE));
- break;
-
- case CultureFeed_Activity::CONTENT_TYPE_CONTENT:
- $path = culturefeed_social_detail_path($activity_content_type, $extended_entity->getId(), $extended_entity->getTitle(culturefeed_search_get_preferred_language()));
- $node_id = url($path, array('absolute' => TRUE));
- break;
-
- case CultureFeed_Activity::CONTENT_TYPE_NODE:
- $node_id = url('node/' . $extended_entity->getId(), array('absolute' => TRUE));
- break;
-
- case CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE:
- $node_id = url(culturefeed_social_detail_path('page', $extended_entity->getId(), $object->getName()), array('absolute' => TRUE));
- break;
-
- }
-
- return $node_id;
-
-}
-
-/**
- * Get the total activity count for the given content.
- * @param $activity_type
- * Type of activity to get the count for.
- * @param $content_type
- * Type of content to get the count for.
- * @param mixed $node_ids
- * Node ID's to get the count for. Can be array or string.
- */
-function culturefeed_social_get_activity_count($activity_type, $content_type, $node_ids) {
-
- try {
- $query = new CultureFeed_SearchActivitiesQuery();
- $query->contentType = $content_type;
- $query->nodeId = $node_ids;
- $query->type = $activity_type;
- $activities = DrupalCultureFeed::searchActivities($query);
-
- return $activities->total;
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- }
-
- return 0;
-
-}
-
-/**
- * Get a list of themed activity summary's.
- */
-function culturefeed_social_activities_list($activities) {
- $items = array();
-
- $accounts = culturefeed_get_uids_for_activities($activities->objects);
-
- foreach ($activities->objects as $activity) {
- if (!isset($accounts[$activity->userId])) {
- continue;
- }
-
- $items[] = theme('culturefeed_ui_activity_summary', array('activity' => $activity, 'uid' => $accounts[$activity->userId]));
- }
-
- return $items;
-}
-
-/**
- * Helper function to create a list of activities of the type COMMENT
- *
- * @param misc $object (Culturefeed_Page, Bibnet_Book, ...
- * @param CultureFeed_ResultSet $activities
- */
-function culturefeed_social_comment_list($object, CultureFeed_ResultSet $activities) {
-
- if ($activities->total < 0) {
- return array();
- }
-
- $activity_list = array();
- $child_activities = array();
- $total = 0;
- foreach ($activities->objects as $activity) {
- if ($activity->contentType != CultureFeed_Activity::CONTENT_TYPE_ACTIVITY) {
- $activity_list[$activity->id] = $activity;
- $total++;
- }
- else {
- $child_activities[] = $activity;
- }
- }
-
- // Most recent activities are on top in result object. But for comments, it should be on bottom.
- $activity_list = array_reverse($activity_list);
- $child_activities = array_reverse($child_activities);
-
- // Place child activities under the parent.
- foreach ($child_activities as $activity) {
- if (isset($activity_list[$activity->nodeId])) {
- $activity_list[$activity->nodeId]->childActivities[$activity->id] = $activity;
- }
- }
-
- $accounts = culturefeed_get_uids_for_activities($activities->objects);
-
- return array(
- '#theme' => 'culturefeed_social_comment_list',
- '#object' => $object,
- '#activities' => $activity_list,
- '#total' => $total,
- '#accounts' => $accounts,
- '#attached' => array(
- 'js' => array(drupal_get_path('module', 'culturefeed_social') . '/js/culturefeed-social.js'),
- )
- );
-
-}
-
-/**
- * Create a form or login link.
- * @param misc $object
- * @param CultureFeed_Activity $activity
- */
-function culturefeed_social_comment_actionbox($object, $activity = NULL) {
-
- if (culturefeed_is_culturefeed_user()) {
- $form_id = ($activity) ? 'culturefeed_social_comment_form_' . $activity->id : 'culturefeed_social_comment_form';
- return drupal_get_form($form_id, $object, $activity);
- }
- else {
- return array(
- '#theme' => 'culturefeed_social_login_required_message',
- '#activity_type' => CultureFeed_Activity::TYPE_COMMENT,
- );
- }
-
-}
-
-/**
- * Prepare all the social activity stats for this user.
- */
-function culturefeed_social_warmup_activities_cache($items) {
-
- // Do an activity search on all found nodeIds.
- $nodeIds = array();
- foreach ($items as $item) {
- $activity_content_type = culturefeed_get_content_type($item->getType());
- $nodeIds[] = culturefeed_social_get_activity_node_id($activity_content_type, $item);
- }
-
- $userDidActivity = &drupal_static('userDidActivity', array());
-
- // Get a list of all activities from this user, on the content to show.
- $userActivities = array();
- try {
-
- $userId = DrupalCultureFeed::getLoggedInUserId();
-
- $query = new CultureFeed_SearchActivitiesQuery();
- $query->nodeId = $nodeIds;
- $query->userId = $userId;
-
- if ($userId) {
- $query->private = TRUE;
- }
-
- $activities = DrupalCultureFeed::searchActivities($query);
- foreach ($activities->objects as $activity) {
- $userActivities[$activity->nodeId][$activity->contentType][] = $activity;
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_search_ui', $e);
- }
-
- // Fill up cache for following content types.
- $contentTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- );
-
- // Fill up the $userDidActivity variable. This is used in DrupalCulturefeed::userDidActivity().
- foreach ($nodeIds as $nodeId) {
- foreach ($contentTypes as $contentType) {
- // If user did this activitiy. Place it in the correct array.
- if (isset($userActivities[$nodeId][$contentType])) {
- $activities = new CultureFeed_ResultSet(count($userActivities[$nodeId][$contentType]), $userActivities[$nodeId][$contentType]);
- }
- // Otherwise create an empty result set.
- else {
- $activities = new CultureFeed_ResultSet(0, array());
- }
- $userDidActivity[$nodeId][$contentType][$userId] = $activities;
- }
- }
-}
diff --git a/culturefeed_social/includes/pages.inc b/culturefeed_social/includes/pages.inc
deleted file mode 100644
index ff8b28a8..00000000
--- a/culturefeed_social/includes/pages.inc
+++ /dev/null
@@ -1,725 +0,0 @@
-max = CULTUREFEED_SOCIAL_BLOCK_USER_ACTIVITIES_COUNT;
- $query->start = $requested_page * CULTUREFEED_SOCIAL_BLOCK_USER_ACTIVITIES_COUNT;
- $query->consumer = variable_get('culturefeed_api_application_key', '');
-
- if (isset($_GET['culturefeed_uid'])) {
- $query->userId = $_GET['culturefeed_uid'];
- }
-
- // Filter on type.
- if (isset($_GET['type'])) {
- $query->type = array($_GET['type']);
- }
- else {
- $types = culturefeed_social_get_activity_filter_options(TRUE);
- $query->type = array_keys($types);
- }
-
- $query->private = FALSE;
-
- $result = new stdClass();
- $result->results = array();
- $result->new_pager_url = '';
- try {
-
- $activities = DrupalCultureFeed::searchActivities($query);
-
- $accounts = culturefeed_get_uids_for_activities($activities->objects);
-
- foreach ($activities->objects as $activity) {
- $result->results[] = theme('culturefeed_social_user_activity_summary', array('activity' => $activity, 'uid' => $accounts[$activity->userId]));
- }
-
- if (($query->max + $query->start) < $activities->total) {
- $query_parameters = drupal_get_query_parameters($_GET, array('q'));
- $query_parameters['page'] = $requested_page + 1;
- $result->new_pager_url = url($_GET['q'], array('query' => $query_parameters));
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_ui', $e);
- }
-
- // If we are applying, and we have no results. Make sure we show a no results message.
- if (isset($_GET['new_filter']) && empty($result->results)) {
- $result->results[] = t('No activities found');
- }
-
- drupal_json_output($result);
-
-}
-
-/**
- * Page callback for the management of the activities of current user.
- */
-function culturefeed_social_page_activities($type = NULL) {
- $types = culturefeed_social_get_activity_filter_options(TRUE);
-
- // If a type was passed, check if it's valid.
- if (!empty($type) && !in_array($type, array_keys($types))) {
- drupal_not_found();
- }
-
- // Set page and pagelength.
- $pagelength = CULTUREFEED_SOCIAL_PAGE_USER_ACTIVITIES_COUNT;
- $page = isset($_GET['page']) ? $_GET['page'] : 0;
-
- // Build the query.
- $query = new CultureFeed_SearchActivitiesQuery();
-
- $query->userId = DrupalCultureFeed::getLoggedInUserId();
- $query->private = TRUE;
- $query->max = $pagelength;
- $query->start = $page * $pagelength;
-
- if (!empty($type)) {
- $query->type = array($type);
- }
- else {
- $query->type = array_keys($types);
- }
-
- $build['intro'] = array(
- '#prefix' => '',
- '#markup' => variable_get('culturefeed_social_activities_page_intro'),
- '#suffix' => '
',
- );
-
- // Do the query.
- try {
- $activities = DrupalCultureFeed::searchActivities($query);
- }
- catch (Exception $e) {
- watchdog('culturefeed_social', $e);
- return $build;
- }
-
- // Initialize the pager.
- pager_default_initialize($activities->total, $pagelength);
-
- // Build the activities table.
- $rows = array();
- foreach ($activities->objects as $activity) {
- // Add the remove link.
- $remove_path = 'culturefeed/activity/delete/' . $activity->id;
- $attributes = array(
- 'class' => array('remove-link'),
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#delete-wrapper-' . $activity->id,
- 'data-remote' => url($remove_path . "/ajax", array('query' => drupal_get_destination())),
- );
-
- // Add the delete link.
- $delete = array(
- '#type' => 'link',
- '#title' => t('Remove activity'),
- '#href' => $remove_path . '/nojs',
- '#attributes' => $attributes,
- '#options' => array('query' => drupal_get_destination(), 'html' => TRUE),
- );
-
- // Add the privacy toggle link.
- $privacy = array(
- '#type' => 'link',
- '#title' => $activity->private ? t('Private') : t('Public'),
- '#href' => 'culturefeed/activity/privacy/' . $activity->id . '/' . ($activity->private ? '0' : '1') . '/nojs',
- '#attributes' => array('id' => 'activity-privacy-' . $activity->id, 'class' => 'privacy-link ' . ($activity->private ? 'status-prive' : 'status-publiek'), 'title' => ($activity->private ? t('Make public') : t('Make private'))),
- '#options' => array('query' => drupal_get_destination(), 'html' => TRUE),
- '#ajax' => array(),
- );
-
- // Add the activity type
- $type_text = isset($types[$activity->type]) ? $types[$activity->type]->label : '';
-
- // Add the activity nodeTitle
- $url = culturefeed_social_activity_object_path($activity->contentType, $activity->nodeId, $activity->nodeTitle);
- if ($url) {
- $data = l($activity->nodeTitle, $url);
- }
- else {
- $data = $activity->nodeTitle;
- }
-
- $wrapper = '
-
';
- $action = '' . $type_text . '
' . $data . '
';
- $rows[] = array(
- 'id' => 'activity-' . $activity->id,
- 'data' => array(
- date('j/m/Y', $activity->creationDate),
- $action,
- $activity->createdVia,
- drupal_render($privacy),
- drupal_render($delete) . $wrapper,
- ),
- );
- }
-
- $activities = array(
- '#theme' => 'table',
- '#header' => array(t('Date'), t('Action'), t('Where'), t('Status'), ''),
- '#rows' => $rows,
- '#empty' => t('You didn\'t perform any actions yet.'),
- '#attributes' => array(
- 'id' => 'activities-table'
- )
- );
-
- // Add the Facebook privacy toggle.
- $facebook_privacy_toggle = NULL;
-
- /* TEMP DISABLED FOR UIV-1619
- $facebook = _culturefeed_ui_facebook_privacy_toggle();
- if ($facebook) {
- $item_list = array(
- '#theme' => 'item_list',
- '#items' => array(
- array(
- 'data' => $facebook,
- 'id' => 'onlineaccount-facebook',
- ),
- ),
- );
- $facebook_privacy_toggle = array(
- '#markup' => drupal_render($item_list),
- );
- }
- */
-
- $build['filter'] = drupal_get_form('culturefeed_social_user_activity_filter_form', $type);
- $build['facebook_privacy_toggle'] = $facebook_privacy_toggle;
- $build['activities'] = $activities;
- $build['pager'] = array(
- '#theme' => 'pager',
- );
-
- return $build;
-}
-
-/**
- * Page callback to delete an activity.
- */
-function culturefeed_social_page_activity_delete($id, $request_type = 'ajax') {
-
- $form = drupal_get_form('culturefeed_social_page_activity_delete_confirm_form', $id, $request_type);
-
- if ($request_type == 'ajax') {
- $output = drupal_render($form);
- print $output;
- }
- else {
- return $form;
- }
-
-}
-
-/**
- * Form callback to delete one activity.
- * @param array $form
- * @param array $form_state
- * @param Integer $id
- * @param String $request_type (nojs/ajax)
- */
-function culturefeed_social_page_activity_delete_confirm_form($form, &$form_state, $id, $request_type) {
-
- try {
- $query = new CultureFeed_SearchActivitiesQuery();
- $query->activityId = $id;
- $data = DrupalCultureFeed::searchActivities($query);
- }
- catch (Exception $e) {
- $success = FALSE;
- watchdog_exception('culturefeed_social', $e);
- }
-
- $config = culturefeed_social_activity_get_config($data->objects[0]->type);
-
- if ($request_type == 'ajax') {
- $form['#prefix'] = '' . t('Remove') . ' ' . $config->action . ' ';
- }
- else {
- drupal_set_title(($config->action ? t('Remove') . ' ' . $config->action : t('Remove action')) . '?');
- }
-
- $destination = drupal_get_destination();
-
- $form_state['id'] = $id;
-
- $form['page_remove_confirm'] = array(
- '#type' => 'markup',
- '#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')) . '?
',
- );
-
- $form['remove'] = array(
- '#type' => 'submit',
- '#value' => t('Remove'),
- '#attributes' => array('class' => array('button-remove')),
- );
-
- $form['decline'] = array(
- '#type' => 'link',
- '#title' => t('Cancel'),
- '#href' => url($GLOBALS['base_url'] . '/' . $destination['destination']),
- '#attributes' => array('class' => array('button-decline')),
- );
-
- return $form;
-
-}
-
-/**
- * Submit handler to actually remove an activity.
- * @param array $form
- * @param array $form_state
- */
-function culturefeed_social_page_activity_delete_confirm_form_submit($form, &$form_state) {
-
- $success = TRUE;
- $id = $form_state['id'];
-
- try {
- DrupalCultureFeed::deleteActivity($id);
- }
- catch (Exception $e) {
- $success = FALSE;
- watchdog_exception('culturefeed_social', $e);
- }
- drupal_goto();
-
-}
-
-/**
- * Render a form in json for ajax requests.
- */
-function culturefeed_social_page_activity_report_abuse($activity_id, $request_type = 'ajax') {
-
- try {
- $query = new CultureFeed_SearchActivitiesQuery();
- $query->activityId = $activity_id;
- $query->private = FALSE;
-
- $activities = DrupalCultureFeed::searchActivities($query);
- $activity = NULL;
- $active_object = NULL;
- if ($activities->total > 0) {
- $activity = $activities->objects[0];
- $active_object = culturefeed_social_detail_object($activity);
- $build = array(drupal_get_form('culturefeed_social_report_abuse_form_' . $activity->id, $activity, $active_object));
- }
-
- }
- catch (Exception $e) {
- $success = FALSE;
- watchdog_exception('culturefeed_social', $e);
- $build[] = array(t('An unexpected error has occurred.'));
- }
-
- if ($request_type == 'ajax') {
- $output = drupal_render($build);
- print $output;
- }
- else {
- return $build;
- }
-
-}
-
-/**
- * Render a comment form to comment on a given activity.
- * @param string $activity_id
- * Activity id to comment on.
- * @param string $request_type
- * Request type, ajax or not.
- */
-function culturefeed_social_page_activity_comment($activity_id, $request_type = 'ajax') {
-
- try {
- $query = new CultureFeed_SearchActivitiesQuery();
- $query->activityId = $activity_id;
- $query->private = FALSE;
-
- $activities = DrupalCultureFeed::searchActivities($query);
- $activity = NULL;
- $active_object = NULL;
- if ($activities->total > 0) {
- $activity = $activities->objects[0];
- $active_object = culturefeed_social_detail_object($activity);
- $build = culturefeed_social_comment_actionbox($active_object, $activity);
- }
- }
- catch (Exception $e) {
- $success = FALSE;
- watchdog_exception('culturefeed_social', $e);
- $build[] = array(t('An unexpected error has occurred.'));
- }
-
- if ($request_type == 'ajax') {
- $output = drupal_render($build);
- print $output;
- } else {
- return $build;
- }
-}
-
-/**
- * Page callback to unfollow a node.
- */
-function culturefeed_social_page_node_unfollow($content_type, $node_id, $request_type = 'ajax') {
-
- $success = TRUE;
- $activity_content_type = culturefeed_get_content_type($content_type);
- $node_id = urldecode($node_id);
-
- try {
- DrupalCultureFeed::unFollowNode($activity_content_type, $node_id, DrupalCultureFeed::getLoggedInUserId());
- }
- catch (Exception $e) {
- $success = FALSE;
- watchdog_exception('culturefeed_social', $e);
- }
-
- if ($request_type == 'ajax') {
- $commands = array();
-
- if ($success) {
- $commands[] = ajax_command_html('#node-status-wrapper', t('You will no longer receive updates of new comments'));
- }
-
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
- }
- else {
- drupal_set_message(t('You will no longer receive updates of new comments'));
- drupal_goto();
- }
-
-}
-
-/**
- * Page callback to change the privacy settings of 1 activity.
- */
-function culturefeed_social_page_activity_privacy($id, $privacy, $type = 'ajax') {
-
- $success = TRUE;
-
- try {
- DrupalCultureFeed::updateActivity($id, $privacy == 1);
- }
- catch (Exception $e) {
- $success = FALSE;
- watchdog_exception('culturefeed_ui', $e);
- }
-
- if ($type == 'ajax') {
- if ($success) {
- $commands = array();
- $privacy = array(
- '#type' => 'link',
- '#title' => $privacy == 1 ? t('Private') : t('Public'),
- '#href' => 'culturefeed/activity/privacy/' . $id . '/' . ($privacy == 1 ? '0' : '1') . '/nojs',
- '#attributes' => array('id' => 'activity-privacy-' . $id, 'class' => 'privacy-link ' . ($privacy == 1 ? 'status-prive' : 'status-publiek'), 'title' => ($privacy == 1 ? t('Make public') : t('Make private'))),
- '#options' => array('query' => drupal_get_destination()),
- '#ajax' => array(),
- );
-
- $commands[] = ajax_command_replace('#activity-privacy-' . $id, drupal_render($privacy));
- }
-
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
- }
- else {
- drupal_goto();
- }
-
-}
-
-/**
- * Page callback to perform an activity (do action).
- */
-function culturefeed_social_page_do($activity_type, $content_type, $node_id, $argument = '') {
-
- $add_count = isset($_GET['add_count']);
- $node_id = urldecode($node_id);
- $activity = _culturefeed_social_do($activity_type, $content_type, $node_id);
- $config = culturefeed_social_activity_get_config($activity_type);
-
- $identifier = drupal_html_id('activity-element');
- $identifier_wrapper = drupal_html_id('activity-wrapper');
-
- $build = array();
- drupal_alter('culturefeed_social_page_do', $activity, $config, $build);
-
- // No redirect if argument is advanced, noredirect.
- $redirect = empty($argument) || $argument == 'redirect';
- if ($redirect) {
- if (empty($activity)) {
- drupal_set_message(t('An unexpected error has occurred.'), 'error');
- }
- $title = empty($activity->nodeTitle) ? '' : $activity->nodeTitle;
- culturefeed_social_goto($activity, $content_type, $node_id, $title);
- }
- else {
-
- $commands = array();
-
- if (!empty($activity)) {
-
- // If undo is not allowed, we should always show the do link.
- if ($config->undoAllowed) {
- $action_url = 'culturefeed/undo/' . $activity_type . '/' . $content_type . '/' . urlencode($node_id);
- $title = $config->subjectUndo;
- }
- else {
- $action_url = 'culturefeed/do/' . $activity_type . '/' . $content_type . '/' . urlencode($node_id);
- $title = $config->undoNotAllowedMessage;
- }
-
- if (!empty($argument)) {
- $action_url .= '/' . $argument;
- }
-
- $build[$identifier] = array(
- '#id' => $identifier,
- '#type' => 'link',
- '#title' => $title,
- '#href' => $action_url,
- '#options' => array(
- 'query' => array(
- 'add_count' => $add_count,
- ),
- ),
- '#attributes' => array(
- 'id' => $identifier,
- 'class' => array($config->linkClassUndo),
- 'title' => $config->subjectUndo
- ),
- '#ajax' => array(
- 'wrapper' => $identifier_wrapper,
- ),
- '#prefix' => '',
- '#suffix' => '
',
- );
-
- if (isset($_GET['title_undo'])) {
- $build[$identifier]['#options']['query']['undo_title'] = $_GET['title_undo'];
- $build[$identifier]['#title'] = $_GET['title_undo'];
- }
-
- if (isset($_GET['title'])) {
- $build[$identifier]['#options']['query']['title'] = $_GET['title'];
- }
-
- // Add the updated total activities.
- if ($add_count) {
- $activity_count = culturefeed_social_get_activity_count($activity_type, $content_type, $node_id);
- if ($activity_count > 0) {
- $build[$identifier]['#title'] .= ' (' . $activity_count . ')';
- }
- }
-
- $commands[] = ajax_command_replace(NULL, render($build));
-
- // Give other modules the ability to add extra js commands.
- drupal_alter('culturefeed_social_page_do_ajax_commmands', $commands, $activity);
- }
-
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
-
- }
-
-}
-
-/**
- * Page callback to perform an activity (undo action).
- */
-function culturefeed_social_page_undo($activity_type, $content_type, $node_id, $argument = '') {
-
- $node_id = urldecode($node_id);
- $add_count = isset($_GET['add_count']);
- $activities = _culturefeed_social_undo($activity_type, $content_type, $node_id);
- $activity = array_pop($activities);
- $config = culturefeed_social_activity_get_config($activity_type);
-
- $identifier = drupal_html_id('activity-element');
- $identifier_wrapper = drupal_html_id('activity-wrapper');
-
- $build = array();
- drupal_alter('culturefeed_social_page_undo', $activity, $config, $build);
-
- // No redirect if argument is advanced, noredirect.
- $redirect = empty($argument) || $argument == 'redirect';
-
- if ($redirect) {
- if (empty($activity)) {
- drupal_set_message(t('Action could not be undone.'), 'error');
- }
- culturefeed_social_goto($activity, $content_type, $node_id, $activity->nodeTitle);
- }
- else {
-
- $commands = array();
-
- if (!empty($activity)) {
-
- $action_url = 'culturefeed/do/' . $activity_type . '/' . $content_type . '/' . urlencode($node_id);
- if (!empty($argument)) {
- $action_url .= '/' . $argument;
- }
-
- $build[$identifier] = array(
- '#id' => $identifier,
- '#type' => 'link',
- '#title' => $config->titleDo,
- '#href' => $action_url,
- '#options' => array(
- 'query' => array(
- 'add_count' => $add_count,
- ),
- ),
- '#attributes' => array(
- 'id' => $identifier,
- 'class' => array($config->linkClassDo),
- 'title' => $config->titleDo
- ),
- '#ajax' => array(
- 'wrapper' => $identifier_wrapper,
- ),
- '#prefix' => '',
- '#suffix' => '
',
- );
-
- if (isset($_GET['undo_title'])) {
- $build[$identifier]['#options']['query']['undo_title'] = $_GET['undo_title'];
- }
-
- if (isset($_GET['title'])) {
- $build[$identifier]['#options']['query']['title'] = $_GET['title'];
- $build[$identifier]['#title'] = $_GET['title'];
- }
-
- // Add the updated total activities.
- if ($add_count) {
- $activity_count = culturefeed_social_get_activity_count($activity_type, $content_type, $node_id);
- if ($activity_count > 0) {
- $build[$identifier]['#title'] .= ' (' . $activity_count . ')';
- }
- elseif (!isset($_GET['title'])) {
- $build[$identifier]['#title'] = $config->titleDoFirst;
- }
- }
-
- $commands[] = ajax_command_replace(NULL, render($build));
-
- // Give other modules the ability to add extra js commands.
- drupal_alter('culturefeed_social_page_undo_ajax_commmands', $commands, $activity);
- }
-
- ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
-
- }
-
-}
-
-/**
- * Page callback to show the overview of notifications for current user or page.
- */
-function culturefeed_social_page_notifications($page = NULL) {
-
- $build = array();
-
- try {
-
- // Currently get the messages till 1 year ago.
- $params = array(
- 'max' => CULTUREFEED_SOCIAL_PAGE_NOTIFICATIONS_COUNT,
- 'dateFrom' => date('Y-m-d', strtotime('-1 year')),
- );
-
- if ($page) {
- culturefeed_pages_set_page_breadcrumb($page);
- $notifications = DrupalCultureFeed::getLoggedInUserInstance()->pages()->getNotifications($page->getId(), $params);
- }
- else {
- $notifications = DrupalCultureFeed::getNotifications(DrupalCultureFeed::getLoggedInUserId(), $params);
- }
-
- return theme('culturefeed_social_user_notifications_page', array('notifications' => $notifications));
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- }
-
- return $build;
-
-}
-
-/**
- * Page callback: Show a list of the most recent activities.
- */
-function culturefeed_social_page_recent_activities() {
-
- $pagelength = CULTUREFEED_SOCIAL_PAGE_ACTIVITIES_RECENT_COUNT;
- $page = isset($_GET['page']) ? $_GET['page'] : 0;
-
- $query = new CultureFeed_SearchActivitiesQuery();
-
- $query->consumer = variable_get('culturefeed_api_application_key', '');
- $query->contentType = CultureFeed_Activity::CONTENT_TYPE_EVENT;
- $query->max = $pagelength;
- $query->start = $page * $pagelength;
- $query->type = array_keys(culturefeed_social_get_activity_filter_options(TRUE));
-
- try {
- $activities = DrupalCultureFeed::searchActivities($query);
- }
- catch (Exception $e) {
- drupal_set_message('Error occurred', 'error');
- return;
- }
-
- pager_default_initialize($activities->total, $pagelength);
-
- if (empty($activities)) {
- $content['activities'] = array(
- '#markup' => t('No activities found.'),
- );
- }
- else {
- $content['activities'] = array(
- '#theme' => 'culturefeed_social_user_activity_wall',
- '#activities' => $activities,
- );
-
- $content['pager'] = array(
- '#theme' => 'pager',
- );
- }
-
- return $content;
-}
-
-/**
- * Page callback: Show the detail of an activity item.
- */
-function culturefeed_social_page_activity_detail($activity, $type) {
- return theme('culturefeed_social_' . $type . '_detail', array('activity' => $activity));
-}
diff --git a/culturefeed_social/js/activities.js b/culturefeed_social/js/activities.js
deleted file mode 100644
index 7319df35..00000000
--- a/culturefeed_social/js/activities.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * @file
- * Js functionality for the activity overviews.
- */
-
-(function ($) {
-
- Drupal.CulturefeedSearch = Drupal.CulturefeedSearch || {};
- Drupal.CulturefeedSearch.Activities = Drupal.CulturefeedSearch.Activities || {};
- Drupal.CulturefeedSearch.Activities.filterForm;
- Drupal.CulturefeedSearch.Activities.filterSelect;
- Drupal.CulturefeedSearch.Activities.throbber = $('');
-
- Drupal.behaviors.culturefeedActivitiesFilter = {
- attach: function (context, settings) {
- $('#edit-filter').change(function (e) {
- $('#activities-table').hide();
- $(this).after(Drupal.CulturefeedSearch.Activities.throbber);
- $(this).parents('form').submit();
- });
- $('#culturefeed-social-user-activity-filter-form #edit-submit').hide();
- }
- };
-
- Drupal.behaviors.culturefeedActivitiesOverview = {
- attach: function (context, settings) {
- $('.activity-list-wrapper').find('.pager-link').bind('click', Drupal.CulturefeedSearch.Activities.pagerClickListener);
- Drupal.CulturefeedSearch.Activities.filterForm = $('#culturefeed-social-user-activity-filter-form');
- if (Drupal.CulturefeedSearch.Activities.filterForm.length) {
- Drupal.CulturefeedSearch.Activities.filterSelect = Drupal.CulturefeedSearch.Activities.filterForm.find('#edit-filter');
- Drupal.CulturefeedSearch.Activities.filterSelect.bind('change', Drupal.CulturefeedSearch.Activities.filterListener);
- }
-
- $('#activities-table tr').hover(function () {
- $(this).toggleClass("hover");
- });
-
- }
- };
-
- /**
- * Listener on the pager link.
- */
- Drupal.CulturefeedSearch.Activities.pagerClickListener = function() {
-
- $(this).after(Drupal.CulturefeedSearch.Activities.throbber);
-
- var post_data = '';
- if (Drupal.CulturefeedSearch.Activities.filterSelect && Drupal.CulturefeedSearch.Activities.filterSelect.val() != 'all') {
- post_data = ('type=' + Drupal.CulturefeedSearch.Activities.filterSelect.val());
- }
-
- var $pager = $(this);
-
- $.ajax({
- url : $pager.attr('href'),
- data : post_data,
- success : function (result) {
- Drupal.CulturefeedSearch.Activities.applyPagerResult($pager, result);
- },
- 'dataType' : 'json'
- });
-
- return false;
-
- }
-
- /**
- * Add the pager results to the current list.
- */
- Drupal.CulturefeedSearch.Activities.applyPagerResult = function($pager, result) {
-
- var $list_wrapper = $pager.parents('.activity-list-wrapper').eq(0);
- var $list = $list_wrapper.find('ul');
-
- for (var i = 0; i < result.results.length; i++) {
- $list.append('' + result.results[i] + ' ');
- }
-
- Drupal.CulturefeedSearch.Activities.throbber.remove();
-
- if (result.new_pager_url == '') {
- $pager.hide();
- }
- else {
- $pager.attr('href', result.new_pager_url);
- $pager.show();
- }
-
- }
-
- /**
- * Listener on the filter dropdown.
- */
- Drupal.CulturefeedSearch.Activities.filterListener = function() {
-
- Drupal.CulturefeedSearch.Activities.filterForm.after(Drupal.CulturefeedSearch.Activities.throbber);
- var post_data = 'new_filter=true';
- if ($(this).val() != 'all') {
- post_data += ('&type=' + $(this).val());
- }
-
- $.ajax({
- url : Drupal.CulturefeedSearch.Activities.filterForm.find('input[name=filter_url]').val(),
- data : post_data,
- success : Drupal.CulturefeedSearch.Activities.filterActivities,
- 'dataType' : 'json'
- });
-
- return false;
-
- }
-
- /**
- * Filter the activity results.
- */
- Drupal.CulturefeedSearch.Activities.filterActivities = function(result) {
-
- var $list_wrapper = $('.activity-list').eq(0);
- var $list = $list_wrapper.find('ul');
- var $pager = $list_wrapper.find('.pager-link');
-
- $list.empty();
- Drupal.CulturefeedSearch.Activities.applyPagerResult($pager, result);
-
- }
-
-})(jQuery);
diff --git a/culturefeed_social/js/culturefeed-social.js b/culturefeed_social/js/culturefeed-social.js
deleted file mode 100644
index 62ee7fa2..00000000
--- a/culturefeed_social/js/culturefeed-social.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file
- * Js functionality for the activity overviews.
- */
-
-Drupal.CulturefeedSocial = Drupal.CulturefeedSocial || {};
-
-(function ($) {
-
- Drupal.behaviors.culturefeedSocial = {
- attach: function (context, settings) {
- Drupal.CulturefeedSocial.bindToggles('.comment-list-item');
- }
- };
-
- Drupal.CulturefeedSocial.bindToggles = function(item_list_selector) {
-
- // Look up toggle links.
- $items = $(item_list_selector);
- var $comment_forms = $items.find('.comment-subform');
- $comment_forms.hide();
-
- $items.find('.comment-subform-toggle').bind('click', function() {
- return Drupal.CulturefeedSocial.toggle($(this), '.comment-subform', item_list_selector);
- });
-/*
- var $abuse_forms = $items.find('.comment-abuse-form');
- $abuse_forms.hide();
- $items.find('.comment-abuse-toggle').bind('click', function() {
- return Drupal.CulturefeedSocial.toggle($(this), '.comment-abuse-form', item_list_selector);
- });
-*/
- }
-
- Drupal.CulturefeedSocial.toggle = function(element, toggle_class, item_list_selector) {
-
- $wrapper = element.parents(item_list_selector).eq(0).find(toggle_class).eq(0);
- $wrapper.toggle('slow');
-
- return false;
- }
-
-
-})(jQuery);
diff --git a/culturefeed_social/js/social-links.js b/culturefeed_social/js/social-links.js
deleted file mode 100644
index 2704bc2a..00000000
--- a/culturefeed_social/js/social-links.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @file
- * Js functionality for the social links.
- */
-
-(function ($) {
-
- Drupal.behaviors.culturefeedSocialLinks = {
- attach: function (context, settings) {
-
- $(context).find('a.do-link').once('no-double-click').bind('click', function (e) {
-
- var $link = $(e.target);
- if (!$link.data('no-click')) {
-
- $link.data('no-click', 1);
-
- setTimeout(function(){
- $link.data('no-click', 0);
- }, 5000);
- }
- else {
- e.preventDefault();
- }
- });
- }
- };
-
-})(jQuery);
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigBase.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigBase.php
deleted file mode 100644
index 26f2e674..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigBase.php
+++ /dev/null
@@ -1,181 +0,0 @@
-nodeTypes = array_keys(node_type_get_types());
- $this->allowedTypes = array('event');
-
- $this->loginMessageLink = array(
- '#theme' => 'link',
- '#path' => 'culturefeed/oauth/connect',
- '#text' => t("logged in"),
- '#options' => array(
- 'html' => TRUE,
- 'attributes' => array(
- 'class' => array(
- 'culturefeedconnect'
- ),
- 'rel' => 'nofollow'
- ),
- 'query' => array(
- 'destination' => current_path(),
- ),
- ),
- );
- }
-
- /**
- * Factory method to retrieve the correct CultureFeedActivityConfig object.
- */
- public static function loadByType($type) {
-
- // Don't construct + drupal alter every time this type is requested.
- if (isset(self::$configs[$type])) {
- return self::$configs[$type];
- }
-
- switch ($type) {
-
- case CultureFeed_Activity::TYPE_COMMENT:
- $config = new CultureFeedActivityConfigComment();
- break;
-
- case CultureFeed_Activity::TYPE_DETAIL:
- $config = new CultureFeedActivityConfigDetail();
- break;
-
- case CultureFeed_Activity::TYPE_FACEBOOK:
- $config = new CultureFeedActivityConfigFacebook();
- break;
-
- case CultureFeed_Activity::TYPE_FOLLOW:
- $config = new CultureFeedActivityConfigFollow();
- break;
-
- case CultureFeed_Activity::TYPE_IK_GA:
- $config = new CultureFeedActivityConfigGo();
- break;
-
- case CultureFeed_Activity::TYPE_LIKE:
- $config = new CultureFeedActivityConfigLike();
- break;
-
- case CultureFeed_Activity::TYPE_MAIL:
- $config = new CultureFeedActivityConfigMail();
- break;
-
- case CultureFeed_Activity::TYPE_PAGE_ADMIN:
- $config = new CultureFeedActivityConfigPageAdmin();
- break;
-
- case CultureFeed_Activity::TYPE_PAGE_MEMBER:
- $config = new CultureFeedActivityConfigPageMember();
- break;
-
- case CultureFeed_Activity::TYPE_PRINT:
- $config = new CultureFeedActivityConfigPrint();
- break;
-
- case CultureFeed_Activity::TYPE_RECOMMEND:
- $config = new CultureFeedActivityConfigRecommend();
- break;
-
- case CultureFeed_Activity::TYPE_TWITTER:
- $config = new CultureFeedActivityConfigTwitter();
- break;
-
- case CultureFeed_Activity::TYPE_VIEW:
- $config = new CultureFeedActivityConfigView();
- break;
-
- case CultureFeed_Activity::TYPE_NEW_EVENT:
- $config = new CultureFeedActivityConfigNewEvent();
- break;
-
- case CultureFeed_Activity::TYPE_REVIEW:
- $config = new CultureFeedActivityConfigReview();
- break;
-
- case CultureFeed_Activity::TYPE_MEDIA_PHOTO:
- $config = new CultureFeedActivityMediaPhoto();
- break;
-
- case CultureFeed_Activity::TYPE_MEDIA_VIDEO:
- $config = new CultureFeedActivityMediaVideo();
- break;
-
- case CultureFeed_Activity::TYPE_PAGE_CREATED:
- $config = new CultureFeedActivityConfigPageCreated();
- break;
-
- case CultureFeed_Activity::TYPE_NEWS:
- $config = new CultureFeedActivityConfigNews();
- break;
-
- case CultureFeed_Activity::TYPE_MORE_INFO:
- $config = new CultureFeedActivityConfigMoreInfo();
- break;
-
- case CultureFeed_Activity::TYPE_ROUTE:
- $config = new CultureFeedActivityConfigRoute();
- break;
-
- case CultureFeed_Activity::TYPE_CONNECT_CHANNEL:
- $config = new CultureFeedActivityConfigConnectChannel();
- break;
-
- case CultureFeed_Activity::TYPE_CASHIN:
- $config = new CultureFeedActivityConfigCashin();
- break;
-
- case CultureFeed_Activity::TYPE_UITPAS:
- $config = new CultureFeedActivityConfigCheckin();
- break;
-
- default:
- return NULL;
-
-
- }
-
- drupal_alter('culturefeed_social_config_object', $config);
-
- self::$configs[$type] = $config;
-
- return $config;
-
- }
-
-}
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigCashin.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigCashin.php
deleted file mode 100644
index 5eff14f2..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigCashin.php
+++ /dev/null
@@ -1,21 +0,0 @@
-allowedTypes = array();
-
- $this->action = t('cashin');
- $this->viewPrefix = t('cashed in');
- $this->label = t('Cashed in');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigCheckin.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigCheckin.php
deleted file mode 100644
index e7da2a88..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigCheckin.php
+++ /dev/null
@@ -1,21 +0,0 @@
-allowedTypes = array();
-
- $this->action = t('checkin');
- $this->viewPrefix = t('checked in');
- $this->label = t('Check in');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigComment.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigComment.php
deleted file mode 100644
index b6d78630..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigComment.php
+++ /dev/null
@@ -1,41 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_ACTIVITY,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->subject = t('Reply by');
- $this->subjectUndo = t('Undo');
- $this->titleDo = t('Post a comment');
- $this->titleDoFirst = t('Be the first to post a comment');
- $this->titleShowAll = t('Show all users who posted a comment');
- $this->linkClassDo = 'comment-link';
- $this->linkClassUndo = 'uncomment-link';
- $this->viewPrefix = t('has replied to');
- $this->viewSuffix = '';
- $this->label = t('Comment');
- $this->action = t('comment');
- $this->loginRequiredMessage = t('You must be !sign_in_link to post a comment', array(
- '!sign_in_link' => drupal_render($this->loginMessageLink),
- ));
- $this->onBehalfOfMessage = t('Reply as');
- $this->pointsOverviewPrefix = t('Posted a comment on');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigConnectChannel.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigConnectChannel.php
deleted file mode 100644
index ffc8a3d2..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigConnectChannel.php
+++ /dev/null
@@ -1,21 +0,0 @@
-allowedTypes = array();
-
- $this->action = t('channel');
- $this->viewPrefix = t('connected channel');
- $this->label = t('Channel connected');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigDetail.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigDetail.php
deleted file mode 100644
index 18b133e5..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigDetail.php
+++ /dev/null
@@ -1,28 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->subject = t('Viewed by');
- $this->viewPrefix = t('has');
- $this->viewSuffix = t('seen');
- $this->label = t('Viewed');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigFacebook.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigFacebook.php
deleted file mode 100644
index c687971d..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigFacebook.php
+++ /dev/null
@@ -1,35 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
- $this->undoAllowed = FALSE;
-
- $this->titleDo = t('Share');
- $this->titleDoFirst = t('Share');
- $this->subject = t('Shared by');
- $this->viewPrefix = t('has');
- $this->viewSuffix = t('shared on Facebook');
- $this->label = t('Share on Facebook');
- $this->undoNotAllowedMessage = t('Successfully shared');
- $this->action = t('share');
- $this->pointsOverviewSuffix = t('shared on Facebook');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigFollow.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigFollow.php
deleted file mode 100644
index 205c2d61..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigFollow.php
+++ /dev/null
@@ -1,32 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->subject = t('Follow this page');
- $this->subjectUndo = t('Unfollow');
- $this->titleDo = t('I follow this page');
- $this->titleDoFirst = t('Be the first to follow this page');
- $this->titleShowAll = t('Show all users who follow this page');
- $this->linkClassDo = 'follow-link';
- $this->linkClassUndo = 'unfollow-link';
- $this->viewPrefix = t('follows');
- $this->label = t('Follow');
- $this->loginRequiredMessage = t('You must be !sign_in_link to follow a page', array(
- '!sign_in_link' => drupal_render($this->loginMessageLink),
- ));
-
- }
-
-}
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigGo.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigGo.php
deleted file mode 100644
index 3f583ed7..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigGo.php
+++ /dev/null
@@ -1,31 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- );
-
- $this->subject = t('Attend this');
- $this->titleDo = t('Attend');
- $this->titleDoFirst = t('Attend');
- $this->subjectUndo = t('Not attending');
- $this->viewPrefix = t('will be attending');
- $this->label = t('Will be attending');
- $this->loginRequiredMessage = t('You must be !sign_in_link to indicate that you will be attending', array(
- '!sign_in_link' => drupal_render($this->loginMessageLink),
- ));
- $this->pointsOverviewPrefix = t('Will be attending');
-
- }
-
-}
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigLike.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigLike.php
deleted file mode 100644
index fc2969dc..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigLike.php
+++ /dev/null
@@ -1,41 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_ACTIVITY,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->subject = t('Like this');
- $this->subjectDo = t('Like');
- $this->subjectUndo = t('Unlike');
- $this->titleDo = t('I Like');
- $this->titleDoFirst = t('Be the first to like this');
- $this->titleShowAll = t('Show all users who likes this');
- $this->linkClassDo = 'like-link';
- $this->linkClassUndo = 'unlike-link';
- $this->viewPrefix = t('likes');
- $this->viewSuffix = t('this');
- $this->label = t('Like');
- $this->loginRequiredMessage = t('You must be !sign_in_link to like this item', array(
- '!sign_in_link' => drupal_render($this->loginMessageLink),
- ));
- $this->pointsOverviewSuffix = t('liked');
-
- }
-
-}
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMail.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMail.php
deleted file mode 100644
index 9a940f93..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMail.php
+++ /dev/null
@@ -1,28 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->viewPrefix = t('has');
- $this->viewSuffix = t('sent');
- $this->label = t('E-mails');
-
- }
-
-}
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMediaPhoto.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMediaPhoto.php
deleted file mode 100644
index fee1c813..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMediaPhoto.php
+++ /dev/null
@@ -1,28 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_ACTIVITY,
- );
-
- $this->viewPrefix = t('has added a new picture');
- $this->pointsOverviewPrefix = t('Picture added to');
- $this->titleDo = t('Add a picture');
- $this->titleDoFirst = t('Add a picture');
- $this->action = t('picture');
- $this->label = t('Picture added');
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMediaVideo.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMediaVideo.php
deleted file mode 100644
index b035d7c8..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMediaVideo.php
+++ /dev/null
@@ -1,28 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_ACTIVITY,
- );
-
- $this->viewPrefix = t('has added a new video');;
- $this->pointsOverviewPrefix = t('Video added to');
- $this->titleDo = t('Add a video');
- $this->titleDoFirst = t('Add a video');
- $this->action = t('video');
- $this->label = t('Video added');
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMoreInfo.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMoreInfo.php
deleted file mode 100644
index 5d6cafd2..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigMoreInfo.php
+++ /dev/null
@@ -1,30 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_ACTIVITY,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->subject = t('More info requested by');
- $this->viewPrefix = t('has requested more info on');
- $this->viewSuffix = t('');
- $this->label = t('More info requested');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigNewEvent.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigNewEvent.php
deleted file mode 100644
index 71c58d7b..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigNewEvent.php
+++ /dev/null
@@ -1,22 +0,0 @@
-allowedTypes = array();
-
- $this->action = t('new event');
- $this->viewPrefix = t('has');
- $this->viewSuffix = t('added');
- $this->label = t('Event created');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigNews.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigNews.php
deleted file mode 100644
index de8d8590..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigNews.php
+++ /dev/null
@@ -1,23 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- );
-
- $this->action = t('news');
- $this->viewPrefix = t('has created a news message');
- $this->label = t('News created');
- }
-
-}
-
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageAdmin.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageAdmin.php
deleted file mode 100644
index 1b952a35..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageAdmin.php
+++ /dev/null
@@ -1,21 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->viewPrefix = t('became administrator of');
- $this->label = t('Page administrator');
- }
-
-}
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageCreated.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageCreated.php
deleted file mode 100644
index cdceb0db..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageCreated.php
+++ /dev/null
@@ -1,23 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->action = t('page');
- $this->viewPrefix = t('has created a page');
- $this->label = t('Page created');
- }
-
-}
-
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageMember.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageMember.php
deleted file mode 100644
index 623e3a03..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPageMember.php
+++ /dev/null
@@ -1,22 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->viewPrefix = t('became member of');
- $this->label = t('Membership');
-
- }
-
-}
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPrint.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPrint.php
deleted file mode 100644
index 03c55812..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigPrint.php
+++ /dev/null
@@ -1,30 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_ACTIVITY,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->subject = t('Printed by');
- $this->viewPrefix = t('has');
- $this->viewSuffix = t('printed');
- $this->label = t('Printed');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigRecommend.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigRecommend.php
deleted file mode 100644
index 7a9fac16..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigRecommend.php
+++ /dev/null
@@ -1,40 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_ACTIVITY,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->subject = t('Recommended by');
- $this->subjectDo = t('Recommended activity');
- $this->subjectUndo = t('Undo recommend');
- $this->titleDo = t('Also recommend');
- $this->titleDoFirst = t('Be the first to recommend');
- $this->titleShowAll = t('View all users who recommend this');
- $this->linkClassDo = 'recommend-link';
- $this->linkClassUndo = 'unrecommend-link';
- $this->viewPrefix = t('has');
- $this->viewSuffix = t('recommended');
- $this->label = t('Recommend');
- $this->loginRequiredMessage = t('You must be !sign_in_link to recommend this item', array(
- '!sign_in_link' => drupal_render($this->loginMessageLink),
- ));
- $this->pointsOverviewSuffix = t('recommended');
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigReview.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigReview.php
deleted file mode 100644
index 2328530e..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigReview.php
+++ /dev/null
@@ -1,28 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- );
-
- $this->viewPrefix = t('has');
- $this->viewSuffix = t('wrote a review');
- $this->action = t('review');
- $this->label = t('Reviews');
- $this->titleDo = t('Write a review');
- $this->titleDoFirst = t('Be the first to write a review');
- $this->pointsOverviewPrefix = t('Wrote a review for');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigRoute.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigRoute.php
deleted file mode 100644
index 05a74026..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigRoute.php
+++ /dev/null
@@ -1,30 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_ACTIVITY,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->subject = t('Route viewed by');
- $this->viewPrefix = t('has viewed the route to');
- $this->viewSuffix = t('');
- $this->label = t('Route viewed');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigTwitter.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigTwitter.php
deleted file mode 100644
index 20c06000..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigTwitter.php
+++ /dev/null
@@ -1,34 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->undoAllowed = FALSE;
- $this->titleDo = t('Share');
- $this->titleDoFirst = t('Share');
- $this->subject = t('Shared by');
- $this->viewPrefix = t('has');
- $this->viewSuffix = t('shared on Twitter');
- $this->label = t('Share on Twitter');
- $this->undoNotAllowedMessage = t('Successfully shared');
- $this->pointsOverviewSuffix = t('shared on Twitter');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigView.php b/culturefeed_social/lib/Drupal/CultureFeedActivityConfigView.php
deleted file mode 100644
index c1ce1661..00000000
--- a/culturefeed_social/lib/Drupal/CultureFeedActivityConfigView.php
+++ /dev/null
@@ -1,29 +0,0 @@
-allowedTypes = array(
- CultureFeed_Activity::CONTENT_TYPE_EVENT,
- CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,
- CultureFeed_Activity::CONTENT_TYPE_ACTOR,
- CultureFeed_Activity::CONTENT_TYPE_BOOK,
- CultureFeed_Activity::CONTENT_TYPE_NODE,
- CultureFeed_Activity::CONTENT_TYPE_CULTUREFEED_PAGE,
- );
-
- $this->subject = t('Viewed by');
- $this->viewPrefix = t('has');
- $this->viewSuffix = t('viewed');
- $this->label = t('Viewed');
-
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_social/theme/culturefeed-social-activity-summary.tpl.php b/culturefeed_social/theme/culturefeed-social-activity-summary.tpl.php
deleted file mode 100644
index 8bcdce0d..00000000
--- a/culturefeed_social/theme/culturefeed-social-activity-summary.tpl.php
+++ /dev/null
@@ -1,38 +0,0 @@
- and a .
- *
- * All variables are available (as convention) in the format of:
- * - $event_14 (Comments for events), $event_15, $book_14, ... etc.
- *
- * To make it easier, some variables are already prepared to use in this file.
- * Those variables are listed beneath. Ofcourse we can always count the counts together
- * for all other custom calculations.
- *
- * @var
- * Variables for content types in general (all content types).
- * - total_14
- * - total_15
- *
- * Variables specific for an activity type
- * - books_total_
- * - pages_total_
- * - activities_total_
- *
- * E.g.:
- * - total_14
- * - activities_total_14
- * - books_total_14
- * - pages_total_14
- */
-?>
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_social/theme/culturefeed-social-comment-form.tpl.php b/culturefeed_social/theme/culturefeed-social-comment-form.tpl.php
deleted file mode 100644
index 10f5f1e1..00000000
--- a/culturefeed_social/theme/culturefeed-social-comment-form.tpl.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-comment-list-item.tpl.php b/culturefeed_social/theme/culturefeed-social-comment-list-item.tpl.php
deleted file mode 100644
index d3b42934..00000000
--- a/culturefeed_social/theme/culturefeed-social-comment-list-item.tpl.php
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-comment-list.tpl.php b/culturefeed_social/theme/culturefeed-social-comment-list.tpl.php
deleted file mode 100644
index 9b248dfa..00000000
--- a/culturefeed_social/theme/culturefeed-social-comment-list.tpl.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-comment-teaser.tpl.php b/culturefeed_social/theme/culturefeed-social-comment-teaser.tpl.php
deleted file mode 100644
index 896e6940..00000000
--- a/culturefeed_social/theme/culturefeed-social-comment-teaser.tpl.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-event-teaser.tpl.php b/culturefeed_social/theme/culturefeed-social-event-teaser.tpl.php
deleted file mode 100644
index 522d4a8a..00000000
--- a/culturefeed_social/theme/culturefeed-social-event-teaser.tpl.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_social/theme/culturefeed-social-news-detail.tpl.php b/culturefeed_social/theme/culturefeed-social-news-detail.tpl.php
deleted file mode 100644
index c630f285..00000000
--- a/culturefeed_social/theme/culturefeed-social-news-detail.tpl.php
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-news-teaser.tpl.php b/culturefeed_social/theme/culturefeed-social-news-teaser.tpl.php
deleted file mode 100644
index 4d302ffd..00000000
--- a/culturefeed_social/theme/culturefeed-social-news-teaser.tpl.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-page-activity-summary.tpl.php b/culturefeed_social/theme/culturefeed-social-page-activity-summary.tpl.php
deleted file mode 100644
index 02d100a8..00000000
--- a/culturefeed_social/theme/culturefeed-social-page-activity-summary.tpl.php
+++ /dev/null
@@ -1,39 +0,0 @@
- and a .
- *
- * All variables are available (as convention) in the format of:
- * - $event_14 (Comments for events), $event_15, $book_14, ... etc.
- *
- * To make it easier, some variables are already prepared to use in this file.
- * Those variables are listed beneath. Ofcourse we can always count the counts together
- * for all other custom calculations.
- *
- * @var
- * Variables for content types in general (all content types).
- * - total_14
- * - total_15
- *
- * Variables specific for an activity type
- * - books_total_
- * - pages_total_
- * - activities_total_
- *
- * E.g.:
- * - total_14
- * - activities_total_14
- * - books_total_14
- * - pages_total_14
- */
-?>
-
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-production-teaser.tpl.php b/culturefeed_social/theme/culturefeed-social-production-teaser.tpl.php
deleted file mode 100644
index 522d4a8a..00000000
--- a/culturefeed_social/theme/culturefeed-social-production-teaser.tpl.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_social/theme/culturefeed-social-report-abuse-form.tpl.php b/culturefeed_social/theme/culturefeed-social-report-abuse-form.tpl.php
deleted file mode 100644
index 0eb584a6..00000000
--- a/culturefeed_social/theme/culturefeed-social-report-abuse-form.tpl.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-user-activity-list.tpl.php b/culturefeed_social/theme/culturefeed-social-user-activity-list.tpl.php
deleted file mode 100644
index 192a5a4c..00000000
--- a/culturefeed_social/theme/culturefeed-social-user-activity-list.tpl.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-user-activity-summary.tpl.php b/culturefeed_social/theme/culturefeed-social-user-activity-summary.tpl.php
deleted file mode 100644
index 0ad82297..00000000
--- a/culturefeed_social/theme/culturefeed-social-user-activity-summary.tpl.php
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-.
-
-
-
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-user-activity-wall-item.tpl.php b/culturefeed_social/theme/culturefeed-social-user-activity-wall-item.tpl.php
deleted file mode 100644
index 83a471ff..00000000
--- a/culturefeed_social/theme/culturefeed-social-user-activity-wall-item.tpl.php
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
- :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-user-activity-wall.tpl.php b/culturefeed_social/theme/culturefeed-social-user-activity-wall.tpl.php
deleted file mode 100644
index 5aeb1444..00000000
--- a/culturefeed_social/theme/culturefeed-social-user-activity-wall.tpl.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-user-list-block-for-activity.tpl.php b/culturefeed_social/theme/culturefeed-social-user-list-block-for-activity.tpl.php
deleted file mode 100644
index 7881ac7a..00000000
--- a/culturefeed_social/theme/culturefeed-social-user-list-block-for-activity.tpl.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
- 0) : ?>
-
-
- $list)); ?>
-
-
-
diff --git a/culturefeed_social/theme/culturefeed-social-user-notifications-page.tpl.php b/culturefeed_social/theme/culturefeed-social-user-notifications-page.tpl.php
deleted file mode 100644
index 3dbe924b..00000000
--- a/culturefeed_social/theme/culturefeed-social-user-notifications-page.tpl.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_social/theme/theme.inc b/culturefeed_social/theme/theme.inc
deleted file mode 100644
index fa48b975..00000000
--- a/culturefeed_social/theme/theme.inc
+++ /dev/null
@@ -1,714 +0,0 @@
-objects);
-
- foreach ($activities->objects as $activity) {
- if (!isset($accounts[$activity->userId])) {
- continue;
- }
-
- $items[] = theme('culturefeed_social_user_activity_summary', array('activity' => $activity, 'uid' => $accounts[$activity->userId]));
- }
-
- $variables['items'] = $items;
-
-}
-
-/**
- * Preprocess function for the user activity summary.
- * @see culturefeed-social-user-activity-summary.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_user_activity_summary(&$variables) {
-
- $activity = $variables['activity'];
-
- $picture = theme('image', array('path' => $activity->depiction . '?maxwidth=50&maxheight=50&crop=auto'));
- $user_url = 'user/' . $variables['uid'];
-
- $variables['picture'] = l($picture, $user_url, array('html' => TRUE));
-
- $date = $activity->creationDate;
- $time_zone = new DateTimeZone('Europe/Brussels');
- $last_reply = new DateTime();
- $last_reply->setTimestamp($date);
- $last_reply->setTimezone($time_zone);
-
- // Check if the activity happened today.
- $time_ago = $_SERVER['REQUEST_TIME'] - $date;
- if ($time_ago < (60 * 60 * 60)) {
- $variables['date'] = format_interval($time_ago) . ' ' . t('ago') . '.';
- }
- else {
-
- if ($date >= strtotime("today")) {
- $variables['date'] = t('Today at') . ' ' . $last_reply->format('H:i') . ' ' . t('hour');
- }
- else if ($date >= strtotime("yesterday")) {
- $variables['date'] = t('Yesterday at') . ' ' . $last_reply->format('H:i') . ' ' . t('hour');
- }
- else {
- $variables['date'] = format_date($date, 'custom', 'd M \o\m H:i') . ' ' . t('hour');
- }
-
- }
-
- $variables['title'] = $activity->nodeTitle;
- // News item link to an own detail page.
- if ($activity->type == CultureFeed_Activity::TYPE_NEWS) {
-
- $content = json_decode($activity->value);
- if (!empty($content->title)) {
- $variables['title'] = $content->title;
- }
-
- $link = l($variables['title'], culturefeed_search_detail_path('news', $activity->id, $variables['title']));
- }
- else {
- // Not possible to link when it's an activity on an activity.
- if ($activity->contentType == CultureFeed_Activity::CONTENT_TYPE_ACTIVITY) {
- $link = check_plain($activity->nodeTitle);
- }
- else {
- $url = culturefeed_social_activity_object_path($activity->contentType, $activity->nodeId, $activity->nodeTitle);
- $link = l($activity->nodeTitle, $url);
- }
- }
-
- $type_prefix = '';
- $type_suffix = '';
-
- $config = culturefeed_social_activity_get_config($activity->type);
-
- // If no config available, show default text
- if ($config) {
- $type_prefix = $config->viewPrefix;
- $type_suffix = $config->viewSuffix;
- }
-
- $variables['nick'] = l($activity->nick, $user_url);
- $variables['prefix'] = $type_prefix;
- $variables['suffix'] = $type_suffix;
- $variables['link'] = $link;
-
- // If onbehalf is known, show it only when culturefeed pages is enabled.
- if (!empty($activity->onBehalfOf) && !empty($activity->onBehalfOfName) && module_exists('culturefeed_pages')) {
- $variables['nick'] .= ' ' . t('from') . ' ' . culturefeed_search_detail_l('page', $activity->onBehalfOf, $activity->onBehalfOfName);
- }
-
-}
-
-/**
- * Preprocess the user activity wall.
- * @see culturefeed-social-user-activity-wall.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_user_activity_wall(&$variables) {
-
- $activities = $variables['activities'];
- $items = array();
-
- $accounts = culturefeed_get_uids_for_activities($activities->objects);
-
- foreach ($activities->objects as $activity) {
- if (!isset($accounts[$activity->userId])) {
- continue;
- }
-
- $items[] = theme('culturefeed_social_user_activity_wall_item', array('activity' => $activity, 'uid' => $accounts[$activity->userId]));
- }
-
- $variables['items'] = $items;
-
-}
-
-/**
- * Preprocess function for a user activity wall item.
- * @see culturefeed-social-user-activity-wall-item.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_user_activity_wall_item(&$variables) {
-
- culturefeed_social_preprocess_culturefeed_social_user_activity_summary($variables);
-
- $activity = $variables['activity'];
-
- // Comments / News template wins.
- if ($activity->type == CultureFeed_Activity::TYPE_NEWS || $activity->type == CultureFeed_Activity::TYPE_COMMENT) {
- $type = $activity->type == CultureFeed_Activity::TYPE_NEWS ? 'news' :'comment';
- $variables['teaser'] = theme('culturefeed_social_' . $type . '_teaser', array('activity' => $activity, 'uid' => $variables['uid']));
- }
- elseif (!empty($activity->contentDetails)) {
- $variables['teaser'] = theme('culturefeed_social_' . $activity->contentType . '_teaser', array('activity' => $activity, 'uid' => $variables['uid']));
- }
-
-}
-
-/**
- * Preprocess function for an event teaser when shown in a stream.
- * @see culturefeed-social-event-teaser.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_event_teaser(&$variables) {
-
- $details = $variables['activity']->contentDetails;
-
- $variables['title'] = $details->title;
- $variables['type'] = $details->type;
- $variables['image'] = $details->thumbnail;
- $variables['body'] = $details->description;
- $variables['url'] = url(culturefeed_social_activity_object_path(CultureFeed_Activity::CONTENT_TYPE_EVENT, $details->cdbId, $details->title));
- $variables['location'] = $details->location;
- $variables['cdbid'] = $details->cdbId;
-
-}
-
-/**
- * Preprocess function for a production teaser when shown in a stream.
- * @see culturefeed-social-production-teaser.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_production_teaser(&$variables) {
-
- $details = $variables['activity']->contentDetails;
-
- $variables['title'] = $details->title;
- $variables['type'] = $details->type;
- $variables['image'] = $details->thumbnail;
- $variables['body'] = $details->description;
- $variables['url'] = url(culturefeed_social_activity_object_path(CultureFeed_Activity::CONTENT_TYPE_PRODUCTION, $details->cdbId, $details->title));
- $variables['location'] = $details->location;
- $variables['cdbid'] = $details->cdbId;
-
-}
-
-/**
- * Preprocess function for a news teaser when shown in a stream.
- * @see culturefeed-social-news-teaser.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_news_teaser(&$variables) {
-
- $activity = $variables['activity'];
- $variables['activity_id'] = $activity->id;
- $variables['title'] = $activity->nodeTitle;
- $variables['body'] = '';
- $variables['summary'] = '';
-
- $content = json_decode($activity->value);
- if ($content && isset($content->title)) {
-
- if (!empty($content->title)) {
- $variables['title'] = $content->title;
- }
- if (!empty($content->body)) {
-
- $variables['body'] = filter_xss($content->body, array('a', 'em', 'strong', 'cite', 'blockquote', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd', 'h1', 'h2', 'h3', 'p'));
- $variables['summary'] = truncate_utf8(strip_tags($content->body), 100, FALSE, TRUE);
- }
-
- if (!empty($content->image)) {
- $variables['image'] = culturefeed_external_image_style($content->image, 'culturefeed_activity_image_teaser');
- }
-
- }
-
- $variables['url'] = url(culturefeed_search_detail_path('news', $activity->id, $variables['title']));
-
-}
-
-/**
- * Preprocess function for a comment teaser when shown in a stream.
- * @see culturefeed-social-comment-teaser.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_comment_teaser(&$variables) {
-
- $activity = $variables['activity'];
- $destination = drupal_get_destination();
-
- if (culturefeed_is_culturefeed_user()) {
- try {
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- }
- }
-
- $variables['body'] = check_plain(strip_tags($activity->value)); // CultuurNet doesn't want to see html tags converted to plain.
- $variables['body'] = str_replace("\n", " ", $variables['body']);
- $variables['summary'] = truncate_utf8($variables['body'], 100, FALSE, TRUE);
-
- $variables['activity_id'] = $activity->id;
-
- $variables['comment_link'] = '';
- $variables['comment_url'] = '';
- $variables['delete_link'] = '';
- $variables['abuse_link'] = '';
-
- if (!empty($cf_user)) {
-
- $remove_path = 'culturefeed/activity/delete/' . $activity->id;
- $attributes = array(
- 'class' => array('remove-link'/*, 'use-ajax'*/),
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#delete-wrapper-' . $activity->id,
- 'data-remote' => url($remove_path . "/ajax", array('query' => $destination)),
- );
-
- // Don't allow comments on comment that was on an activity.
- if ($activity->contentType != CultureFeed_Activity::CONTENT_TYPE_ACTIVITY) {
-
- if ($cf_user->id == $activity->userId) {
- $variables['delete_link'] = l(t('Delete'), $remove_path . '/nojs', array(
- 'attributes' => $attributes,
- 'query' => $destination,
- ));
- }
-
- $comment_url = 'culturefeed/activity/comment/' . $activity->id;
- $attributes = array(
- 'class' => array('comment-link link-icon'),
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#comment-wrapper-' . $activity->id,
- 'data-remote' => url($comment_url . "/ajax", array('query' => $destination)),
- );
-
- $variables['comment_link'] = l(t('Reply'), $comment_url . '/nojs', array(
- 'attributes' => $attributes,
- 'query' => $destination,
- ));
-
- $variables['comment_url'] = url($comment_url . '/nojs', array('attributes' => $attributes, 'query' => $destination));
-
- }
-
- }
-
- if (module_exists('culturefeed_messages')) {
-
- $abuse_url = 'culturefeed/activity/report-abuse/' . $activity->id;
- $attributes = array(
- 'class' => array('comment-abuse-link'),
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#abuse-wrapper-' . $activity->id,
- 'data-remote' => url($abuse_url . "/ajax", array('query' => $destination)),
- );
-
- $variables['abuse_link'] = l(t('Report as inappropriate'), $abuse_url . '/nojs', array(
- 'attributes' => $attributes,
- 'query' => $destination,
- ));
-
- }
-
-}
-
-/**
- * Preprocess function for the comment list.
- * @see culturefeed-social-comment-list.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_comment_list(&$variables) {
-
- // Always include the javascript for ajax behavior.
- drupal_add_library('system', 'drupal.ajax');
-
- $object = $variables['object'];
- $activities = $variables['activities'];
- $accounts = $variables['accounts'];
- $variables['url'] = url(culturefeed_social_detail_path($object->getType(), $object->getId(), $object->getTitle(culturefeed_search_get_preferred_language())));
-
- $list = array();
- foreach ($activities as $activity) {
- $list[] = theme('culturefeed_social_comment_list_item', array(
- 'activity' => $activity,
- 'object' => $object,
- 'uid' => $accounts[$activity->userId],
- 'child_activities' => $activity->childActivities,
- 'accounts' => $accounts,
- 'level' => 0,
- ));
- }
- $variables['list'] = $list;
-
-}
-
-/**
- * Preprocess function for the comment list item.
- * @see culturefeed-social-comment-list-item.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_comment_list_item(&$variables) {
-
- $object = $variables['object'];
- $activity = $variables['activity'];
- $accounts = $variables['accounts'];
- $destination = drupal_get_destination();
- $cf_user = NULL;
-
- if (culturefeed_is_culturefeed_user()) {
- try {
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_social', $e);
- }
- }
-
- // Variables for one list item.
- $picture = theme('image', array('path' => $activity->depiction . '?maxwidth=75&maxheight=75&crop=auto'));
- $author_url = 'user/' . $variables['uid'];
-
- $variables['picture'] = l($picture, $author_url, array('html' => TRUE));
- $variables['date'] = format_date($activity->creationDate, 'small');
-
- $variables['author'] = l($activity->nick, $author_url);
- if (!empty($activity->onBehalfOf) && !empty($activity->onBehalfOfName) && module_exists('culturefeed_pages')) {
- $variables['author'] .= ' ' . t('from') . ' ' . culturefeed_search_detail_l('page', $activity->onBehalfOf, $activity->onBehalfOfName);
- }
-
- $variables['content'] = check_plain(strip_tags($activity->value)); // CultuurNet doesn't want to see html tags converted to plain.
- $variables['content'] = str_replace("\n", " ", $variables['content']);
- $variables['activity_id'] = $activity->id;
-
- // The list of child activities if available.
- $variables['list'] = array();
- if (!empty($variables['child_activities'])) {
- // The subitems.
- $list = array();
- foreach ($variables['child_activities'] as $child_activity) {
- $list[] = theme('culturefeed_social_comment_list_item', array(
- 'activity' => $child_activity,
- 'object' => $object,
- 'uid' => $accounts[$child_activity->userId],
- 'child_activities' => array(),
- 'accounts' => array(),
- 'level' => 1,
- ));
- }
- $variables['list'] = $list;
- }
-
- $variables['comment_link'] = '';
- $variables['comment_url'] = '';
- $variables['delete_link'] = '';
- $variables['abuse_link'] = '';
-
- if ($cf_user) {
-
- $remove_path = 'culturefeed/activity/delete/' . $activity->id;
- $attributes = array(
- 'class' => array('remove-link'/*, 'use-ajax'*/),
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#delete-wrapper-' . $activity->id,
- 'data-remote' => url($remove_path . "/ajax", array('query' => $destination)),
- );
-
- if ($variables['level'] == 0) {
-
- if ($cf_user->id == $activity->userId || (module_exists('culturefeed_pages') && culturefeed_pages_is_user_admin_of_page($object->getId()))) {
- $variables['delete_link'] = l(t('Delete'), $remove_path . '/nojs', array(
- 'attributes' => $attributes,
- 'query' => $destination,
- ));
- }
-
- $comment_url = 'culturefeed/activity/comment/' . $activity->id;
- $attributes = array(
- 'class' => array('comment-link link-icon'),
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#comment-wrapper-' . $activity->id,
- 'data-remote' => url($comment_url . "/ajax", array('query' => $destination)),
- );
-
- $variables['comment_link'] = l(t('Reply'), $comment_url . '/nojs', array(
- 'attributes' => $attributes,
- 'query' => $destination,
- ));
-
- $variables['comment_url'] = url($comment_url . '/nojs', array('attributes' => $attributes, 'query' => $destination));
-
- }
- else {
-
- if ($cf_user->id == $activity->userId || culturefeed_pages_is_user_admin_of_page($object->getId())) {
- $variables['delete_link'] = l(t('Delete'), $remove_path . '/nojs', array(
- 'attributes' => $attributes,
- 'query' => $destination,
- 'html' => TRUE,
- ));
- }
-
- }
- }
-
- if (module_exists('culturefeed_messages')) {
-
- $abuse_url = 'culturefeed/activity/report-abuse/' . $activity->id;
- $attributes = array(
- 'class' => array('comment-abuse-link'),
- 'role' => 'button',
- 'data-toggle' => 'modal',
- 'data-target' => '#abuse-wrapper-' . $activity->id,
- 'data-remote' => url($abuse_url . "/ajax", array('query' => $destination)),
- );
-
- $variables['abuse_link'] = l(t('Report as inappropriate'), $abuse_url . '/nojs', array(
- 'attributes' => $attributes,
- 'query' => $destination,
- ));
-
- }
-
-}
-
-/**
- * Preprocess the variables for the user notifications page.
- * @see culturefeed-social-user-notifications-page.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_user_notifications_page(&$variables) {
-
- $notifications = array();
-
- // Split the notification resultset in 2 resultsets.
- foreach ($variables['notifications']->objects as $notification) {
-
- if (!isset($notifications[$notification->status])) {
- $notifications[$notification->status] = new CultureFeed_ResultSet(0, array());
- }
-
- $notifications[$notification->status]->total++;
- $notifications[$notification->status]->objects[] = $notification;
-
- }
-
- // Render the 2 lists.
- $variables['new_notifications_count'] = 0;
- if (isset($notifications[Culturefeed::NOTIFICATION_TYPE_NEW])) {
- $variables['new_notifications_count'] = $notifications[Culturefeed::NOTIFICATION_TYPE_NEW]->total;
- $variables['new_notifications'] = theme('culturefeed_social_user_activity_list', array('activities' => $notifications[Culturefeed::NOTIFICATION_TYPE_NEW]));
- }
-
- $variables['read_notifications_count'] = 0;
- if (isset($notifications[Culturefeed::NOTIFICATION_TYPE_READ])) {
- $variables['read_notifications_count'] = $notifications[Culturefeed::NOTIFICATION_TYPE_READ]->total;
- $variables['read_notifications'] = theme('culturefeed_social_user_activity_list', array('activities' => $notifications[Culturefeed::NOTIFICATION_TYPE_READ]));
- }
-
-}
-
-
-/**
- * Preprocess the variables for the summary of activities of a user.
- * @see culturefeed-social-activity-summary.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_activity_summary(&$variables) {
-
- $total_per_type = array();
-
- foreach ($variables['totals'] as $total) {
-
- // Conventional totals for each type/content type.
- list($activity_type, $content_type) = explode("_", $total->key);
- $variables[$content_type . '_' . $activity_type] = $total->value;
-
- if (!isset($total_per_type[$activity_type])) {
- $total_per_type[$activity_type] = array('activities' => 0, 'books' => 0, 'pages' => 0);
- }
-
- if (in_array($content_type, array('actor', 'production', 'event'))) {
- $total_per_type[$activity_type]['activities'] += $total->value;
- }
- elseif ($content_type == 'book') {
- $total_per_type[$activity_type]['books'] = $total->value;
- }
- elseif ($content_type == 'page') {
- $total_per_type[$activity_type]['pages'] = $total->value;
- }
-
- }
-
- foreach ($total_per_type as $atype => $total_per_content_type) {
-
- $variables['total_' . $atype] = $total_per_content_type['books'] + $total_per_content_type['pages'] + $total_per_content_type['activities'];
- $variables['books_total_' . $atype] = $total_per_content_type['books'];
- $variables['pages_total_' . $atype] = $total_per_content_type['pages'];
- $variables['activities_total_' . $atype] = $total_per_content_type['activities'];
-
- }
-
- if ($variables['private']) {
- $variables['subject'] = t('My activities');
- }
- else {
- $variables['subject'] = t('Activities of @username', array('@username' => $variables['account_name']));
- }
-
-}
-
-/**
- * Preprocess the variables for the summary of activities for a page.
- * @see culturefeed-social-page-activity-summary.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_page_activity_summary(&$variables) {
-
- $total_per_type = array();
-
- // Make sure our default vars are set.
- $variables['pages_total_' . CultureFeed_Activity::TYPE_PAGE_MEMBER] = 0;
- $variables['pages_total_' . CultureFeed_Activity::TYPE_PAGE_ADMIN] = 0;
- $variables['pages_total_' . CultureFeed_Activity::TYPE_FOLLOW] = 0;
- $variables['activities_total_' . CultureFeed_Activity::TYPE_RECOMMEND] = 0;
- $variables['activities_total_' . CultureFeed_Activity::TYPE_COMMENT] = 0;
-
- foreach ($variables['totals'] as $total) {
-
- // Conventional totals for each type/content type.
- list($activity_type, $content_type) = explode("_", $total->key);
- $variables[$content_type . '_' . $activity_type] = $total->value;
-
- if (!isset($total_per_type[$activity_type])) {
- $total_per_type[$activity_type] = array('activities' => 0, 'books' => 0, 'pages' => 0);
- }
-
- if (in_array($content_type, array('actor', 'production', 'event'))) {
- $total_per_type[$activity_type]['activities'] += $total->value;
- }
- elseif ($content_type == 'book') {
- $total_per_type[$activity_type]['books'] = $total->value;
- }
- elseif ($content_type == 'page') {
- $total_per_type[$activity_type]['pages'] = $total->value;
- }
-
- }
-
- foreach ($total_per_type as $atype => $total_per_content_type) {
-
- $variables['total_' . $atype] = $total_per_content_type['books'] + $total_per_content_type['pages'] + $total_per_content_type['activities'];
- $variables['books_total_' . $atype] = $total_per_content_type['books'];
- $variables['pages_total_' . $atype] = $total_per_content_type['pages'];
- $variables['activities_total_' . $atype] = $total_per_content_type['activities'];
-
- }
-
- $variables['subject'] = t('Activities');
-
-}
-
-/**
- * Preprocess the variables for detailpage of a news item.
- * @see culturefeed-social-news-detail.tpl.php
- */
-function culturefeed_social_preprocess_culturefeed_social_news_detail(&$variables) {
-
- $activity = $variables['activity'];
- $variables['activity_id'] = $variables['activity']->id;
-
- $picture = theme('image', array('path' => $activity->depiction . '?maxwidth=50&maxheight=50&crop=auto'));
- $user_url = 'user/' . $activity->userId;
-
- $variables['nick'] = l($activity->nick, $user_url);
-
- // If onbehalf is known, show it only when culturefeed pages is enabled.
- if (!empty($activity->onBehalfOf) && !empty($activity->onBehalfOfName) && module_exists('culturefeed_pages')) {
- $variables['nick'] .= ' ' . t('from') . ' ' . culturefeed_search_detail_l('page', $activity->onBehalfOf, $activity->onBehalfOfName);
- }
-
- $variables['picture'] = l($picture, $user_url, array('html' => TRUE));
-
- $date = $activity->creationDate;
- $time_zone = new DateTimeZone('Europe/Brussels');
- $last_reply = new DateTime();
- $last_reply->setTimestamp($date);
- $last_reply->setTimezone($time_zone);
-
- // Check if the activity happened today.
- $time_ago = $_SERVER['REQUEST_TIME'] - $date;
- if ($time_ago < (60 * 60 * 60)) {
- $variables['date'] = format_interval($time_ago) . ' ' . t('ago') . '.';
- }
- else {
-
- if ($date >= strtotime("today")) {
- $variables['date'] = t('Today at') . ' ' . $last_reply->format('H:i') . ' ' . t('hour');
- }
- else if ($date >= strtotime("yesterday")) {
- $variables['date'] = t('Yesterday at') . ' ' . $last_reply->format('H:i') . ' ' . t('hour');
- }
- else {
- $variables['date'] = format_date($date, 'custom', 'd M \o\m H:i') . ' ' . t('hour');
- }
-
- }
-
- $variables['title'] = '';
- $variables['body'] = '';
- $content = json_decode($activity->value);
- if ($content) {
-
- if (isset($content->title)) {
- $variables['title'] = $content->title;
- }
-
- if (isset($content->body)) {
- $variables['body'] = $content->body;
- }
-
- if (!empty($content->image)) {
- $variables['image'] = culturefeed_external_image_style($content->image, 'culturefeed_activity_image');
- }
-
- }
-
- // Merge all page variables into the variables. Add page_ as prefix.
- if ($activity->contentType == 'page') {
- $variables['page_admin'] = culturefeed_pages_is_user_admin_of_page($activity->nodeId);
- $variables['page_id'] = $activity->nodeId;
-
- if (module_exists('culturefeed_pages')) {
- module_load_include('inc', 'culturefeed_pages', 'theme/theme');
- $page_variables = array();
- $page = culturefeed_pages_page_load($activity->nodeId);
- $page_variables['item'] = $page;
- $page_variables['logged_in'] = DrupalCultureFeed::isCultureFeedUser();
- _culturefeed_pages_preprocess_culturefeed_page($page_variables);
-
- foreach ($page_variables as $key => $var) {
- $variables['page_' . $key] = $var;
- }
-
- }
-
- }
-
-}
-
-/**
- * Theme the login required message when an anonymous user sees a social action.
- */
-function theme_culturefeed_social_login_required_message($variables) {
-
- $config = culturefeed_social_activity_get_config($variables['activity_type']);
-
- return '' . $config->loginRequiredMessage . '
';
-
-}
-
-/**
- * Theme the notifications profile box item.
- */
-function theme_culturefeed_social_profile_box_item_notifications($variables) {
- return l(format_plural($variables['total'], '@count new notification', '@count new notifications'), 'culturefeed/notifications');
-}
diff --git a/culturefeed_social/translations/culturefeed_social.de.po b/culturefeed_social/translations/culturefeed_social.de.po
deleted file mode 100644
index 44d2dc28..00000000
--- a/culturefeed_social/translations/culturefeed_social.de.po
+++ /dev/null
@@ -1,930 +0,0 @@
-# $Id$
-#
-# German translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_social.module: n/a
-# culturefeed_social.info: n/a
-# includes/blocks.inc: n/a
-# includes/admin.inc: n/a
-# includes/pages.inc: n/a
-# lib/Drupal/CultureFeedActivityConfigComment.php: n/a
-# theme/culturefeed-social-comment-list.tpl.php: n/a
-# theme/theme.inc: n/a
-# lib/Drupal/CultureFeedActivityConfigDetail.php: n/a
-# lib/Drupal/CultureFeedActivityConfigView.php: n/a
-# lib/Drupal/CultureFeedActivityConfigFacebook.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMail.php: n/a
-# lib/Drupal/CultureFeedActivityConfigNewEvent.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPrint.php: n/a
-# lib/Drupal/CultureFeedActivityConfigRecommend.php: n/a
-# lib/Drupal/CultureFeedActivityConfigReview.php: n/a
-# lib/Drupal/CultureFeedActivityConfigTwitter.php: n/a
-# theme/culturefeed-social-activity-summary.tpl.php: n/a
-# lib/Drupal/CultureFeedActivityConfigFollow.php: n/a
-# lib/Drupal/CultureFeedActivityConfigGo.php: n/a
-# lib/Drupal/CultureFeedActivityConfigLike.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMediaPhoto.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMediaVideo.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPageAdmin.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPageCreated.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPageMember.php: n/a
-# theme/culturefeed-social-comment-list-item.tpl.php: n/a
-# theme/culturefeed-social-user-notifications-page.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2014-01-30 14:20+0100\n"
-"PO-Revision-Date: 2014-01-30 15:14+0100\n"
-"Last-Translator: Sven Houtmeyers \n"
-"Language-Team: German \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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_social.module:294
-msgid "Culturefeed social: recent site activities"
-msgstr "CultureFeed Social: letzte Site-Aktivitäten"
-
-#: culturefeed_social.module:299
-msgid "Culturefeed social: user activities"
-msgstr "CultureFeed Social: Nutzeraktionen"
-
-#: culturefeed_social.module:304
-msgid "Culturefeed social: recommended by"
-msgstr "CultureFeed Social: empfohlen von"
-
-#: culturefeed_social.module:309
-msgid "Culturefeed social: comments"
-msgstr "CultureFeed Social: Reaktionen"
-
-#: culturefeed_social.module:315
-msgid "Culturefeed social: my notifications (on user profile)"
-msgstr "CultureFeed Social: meine Meldungen (Nutzerprofil)"
-
-#: culturefeed_social.module:321
-msgid "Culturefeed social: summary of my activities (on user profile)"
-msgstr "CultureFeed Social: Übersicht meiner Meldungen (Nutzerprofil)"
-
-#: culturefeed_social.module:326
-msgid "Culturefeed social: summary of loggedin users activities"
-msgstr "CultureFeed Social: Übersicht der Nutzeraktionen"
-
-#: culturefeed_social.module:381
-msgid "User history"
-msgstr "Aktionen"
-
-#: culturefeed_social.module:383
-msgid "Set which user actions are visible to others on your profile page."
-msgstr "Ihre Aktionen ansehen und entscheiden, was für andere sichtbar ist"
-
-#: culturefeed_social.module:408
-msgid "new notifications"
-msgstr "neue Benachrichtigungen"
-
-#: culturefeed_social.module:459
-msgid "Everything"
-msgstr "Alles"
-
-#: culturefeed_social.module:467
-msgid "Filter events on"
-msgstr "Aktivitäten filtern nach"
-
-#: culturefeed_social.module:485
-msgid "Filter"
-msgstr "Filter"
-
-#: culturefeed_social.module:551
-msgid "Remove from list"
-msgstr "Melden Sie sich ab"
-
-#: culturefeed_social.module:552
-msgid ""
-"You're currently receiving updates of new comments. !link to get no "
-"more posts."
-msgstr ""
-"Sie erhalten derzeit Updates von neuen Reaktionen. !link, um keine "
-"Nachrichten mehr zu erhalten."
-
-#: culturefeed_social.module:563
-msgid "Receive email about new comments"
-msgstr "Bleiben Sie per E-Mail über neue Reaktionen auf dem Laufenden"
-
-#: culturefeed_social.module:580;739
-msgid "Submit"
-msgstr "Hinzufügen"
-
-#: culturefeed_social.module:623
-msgid ""
-"Due to technical problems it is currently not possible to send your message. "
-"Do not hesitate to directly contact via @site"
-msgstr ""
-"Aufgrund von technischen Problemen ist es zurzeit nicht möglich, Ihre "
-"Nachricht zu versenden. Nehmen Sie einfach direkt Kontakt mit uns auf über "
-"@site"
-
-#: culturefeed_social.module:626
-msgid "Your response should not exceed 1000 characters."
-msgstr "Ihre Reaktion darf höchstens 1.000 Zeichen lang sein."
-
-#: culturefeed_social.module:652
-msgid "Your !comment has been sent."
-msgstr "Ihr !comment wurde verschickt."
-
-#: culturefeed_social.module:707
-msgid "Inappropriate response"
-msgstr "Unangemessene Reaktion"
-
-#: culturefeed_social.module:708
-msgid "Please tell us why you think this is an inappropriate response"
-msgstr ""
-"Geben Sie an, warum dies Ihrer Meinung nach eine unangemessene Reaktion ist"
-
-#: culturefeed_social.module:724
-msgid "Send message as"
-msgstr "Nachricht verschicken als"
-
-#: culturefeed_social.module:784
-msgid "Something went wrong while sending"
-msgstr "Es ist ein unerwarteter Fehler aufgetreten"
-
-#: culturefeed_social.module:798
-msgid "Message sent"
-msgstr "Die Nachricht wurde versendet"
-
-#: culturefeed_social.module:33 culturefeed_social.info:0
-msgid "CultureFeed Social"
-msgstr "CultureFeed Social"
-
-#: culturefeed_social.module:34
-msgid "Change CultureFeed Social settings"
-msgstr "Einstellungen von CulturFeed Social ändern"
-
-#: culturefeed_social.module:43
-msgid "Administer actions"
-msgstr "Aktionen verwalten"
-
-#: culturefeed_social.module:52
-msgid "Undo action"
-msgstr "Rückgängig machen"
-
-#: culturefeed_social.module:62;72
-msgid "Abuse form"
-msgstr "Formular zur Meldung unangemessener Reaktionen"
-
-#: culturefeed_social.module:82
-msgid "Edit privacy settings"
-msgstr "Datenschutzeinstellungen bearbeiten"
-
-#: culturefeed_social.module:92
-msgid "Unfollow node"
-msgstr "Nicht mehr folgen"
-
-#: culturefeed_social.module:103
-msgid "Perform action"
-msgstr "Aktion ausführen"
-
-#: culturefeed_social.module:173 includes/blocks.inc:271
-msgid "My notifications"
-msgstr "Meine Meldungen"
-
-#: culturefeed_social.module:183
-msgid "Notifications"
-msgstr "Meldungen"
-
-#: culturefeed_social.info:0
-msgid ""
-"CultureFeed Social adds the ability to perform social actions (for example: "
-"like, comments, follow, ...) on culturefeed items like events, productions, "
-"pages..."
-msgstr ""
-"Mit CultureFeed Social können Sie Aktivitäten, Vorstellungen und Seiten ein "
-"„Gefällt mir“ geben, auf sie reagieren und ihnen folgen."
-
-#: culturefeed_social.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/admin.inc:22
-msgid "Visible filters on activity lists"
-msgstr "Sichtbare Filter"
-
-#: includes/admin.inc:29
-msgid "Enable notifications"
-msgstr "Meldungen einschalten"
-
-#: includes/admin.inc:35
-msgid "Report as abuse messages destination uid (Drupal)"
-msgstr ""
-"Eine Meldung über unangemessenen Inhalt wird an diesen Drupal-Benutzer "
-"(Drupal UID) versendet"
-
-#: includes/admin.inc:37
-msgid ""
-"Report as abuse messages will be sent to this account.\n"
-" Only if no destination page was available. Otherwise the message will be "
-"sent to all the admins of the page"
-msgstr ""
-"Eine Meldung über unangemessenen Inhalt wird an diesen Endnutzer versendet.\n"
-" Sobald der Inhalt mit einer Seite verlinkt wurde, wird die Meldung an alle "
-"Administratoren der Seite versendet."
-
-#: includes/blocks.inc:34
-msgid "All actions"
-msgstr "Alle Aktionen"
-
-#: includes/blocks.inc:38;120
-msgid "Recent actions"
-msgstr "Letzte Aktionen"
-
-#: includes/blocks.inc:72
-msgid "This user didn't perform any actions yet"
-msgstr "Dieser Nutzer hat noch keine Aktionen durchgeführt"
-
-#: includes/blocks.inc:84
-msgid "Manage your actions"
-msgstr "Ihre Aktionen verwalten"
-
-#: includes/blocks.inc:115
-msgid "Read previous messages"
-msgstr "Frühere Nachrichten lesen"
-
-#: includes/blocks.inc:254
-msgid "Comments"
-msgstr "Kommentare"
-
-#: includes/blocks.inc:272
-msgid "You have no notifications"
-msgstr "Sie haben keine neuen Meldungen"
-
-#: includes/blocks.inc:288
-msgid "View all notifications"
-msgstr "Alle Meldungen ansehen"
-
-#: includes/pages.inc:63
-msgid "No activities found"
-msgstr "Keine Aktivitäten gefunden"
-
-#: includes/pages.inc:107
-msgid "View profile"
-msgstr "Profil ansehen"
-
-#: includes/pages.inc:136;247;250;275
-msgid "Remove"
-msgstr "Löschen"
-
-#: includes/pages.inc:144;441
-msgid "Private"
-msgstr "Privat"
-
-#: includes/pages.inc:144;441
-msgid "Public"
-msgstr "Öffentlich"
-
-#: includes/pages.inc:146;443
-msgid "Make public"
-msgstr "Öffentlich machen"
-
-#: includes/pages.inc:146;443
-msgid "Make private"
-msgstr "Unsichtbar machen"
-
-#: includes/pages.inc:165
-msgid "ago on"
-msgstr "vor am"
-
-#: includes/pages.inc:174
-msgid "Page"
-msgstr "Seite"
-
-#: includes/pages.inc:174
-msgid "Action"
-msgstr "Aktion"
-
-#: includes/pages.inc:174
-msgid "Time and publication channel"
-msgstr "Uhrzeit und Veröffentlichungskanal"
-
-#: includes/pages.inc:174
-msgid "Status"
-msgstr "Status"
-
-#: includes/pages.inc:176
-msgid "You didn't perform any actions yet."
-msgstr "Sie haben noch keine Aktionen ausgeführt"
-
-#: includes/pages.inc:264
-msgid "Are you sure you want to delete your @action permanently"
-msgstr "Sind Sie sicher, dass Sie Ihre @action endgültig löschen möchten"
-
-#: includes/pages.inc:264
-msgid "Are you sure you want to delete this action permanently"
-msgstr "Sind Sie sicher, dass Sie Ihre action endgültig löschen möchten"
-
-#: includes/pages.inc:281
-msgid "Cancel"
-msgstr "Abbrechen"
-
-#: includes/pages.inc:338;377;479
-msgid "An unexpected error has occurred."
-msgstr "Es ist etwas falsch gegangen."
-
-#: includes/pages.inc:409;415
-msgid "You will no longer receive updates of new comments"
-msgstr "Sie erhalten keine Updates von neuen Reaktionen mehr"
-
-#: includes/pages.inc:577
-msgid "Action could not be undone."
-msgstr "Aktion konnte nicht rückgängig gemacht werden."
-
-#: includes/pages.inc:708
-msgid "No activities found."
-msgstr "Keine Aktivitäten gefunden."
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:22
-msgid "Reply by"
-msgstr "Veröffentlicht von"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:23
-msgid "Undo"
-msgstr "Rückgängig machen"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:24
-#: theme/culturefeed-social-comment-list.tpl.php:11
-msgid "Post a comment"
-msgstr "Reagieren"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:25
-msgid "Be the first to post a comment"
-msgstr "Als Erster reagieren"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:26
-msgid "Show all users who posted a comment"
-msgstr "Jeden anzeigen, der reagiert hat"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:29
-msgid "has replied to"
-msgstr "hat reagiert auf"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:31
-msgid "Comment"
-msgstr "Reaktion"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:32 theme/theme.inc:217
-msgid "Reply"
-msgstr "Reagieren"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:33
-msgid "You must be logged in to post a comment"
-msgstr "Sie müssen angemeldet sein, um zu reagieren"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:34
-msgid "Reply as"
-msgstr "Reagieren als"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:35
-msgid "Posted a comment on"
-msgstr "Schrieb einen Kommentar auf"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:21
-#: lib/Drupal/CultureFeedActivityConfigView.php:22
-msgid "Viewed by"
-msgstr "Angesehen von"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:22
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:26
-#: lib/Drupal/CultureFeedActivityConfigMail.php:22
-#: lib/Drupal/CultureFeedActivityConfigNewEvent.php:15
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:24
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:31
-#: lib/Drupal/CultureFeedActivityConfigReview.php:18
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:26
-#: lib/Drupal/CultureFeedActivityConfigView.php:23
-msgid "has"
-msgstr "hat"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:23
-msgid "seen"
-msgstr "gesehen"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:24
-#: lib/Drupal/CultureFeedActivityConfigView.php:25
-msgid "Viewed"
-msgstr "Angesehen"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:23;24
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:23;24
-msgid "Share"
-msgstr "Teilen"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:25
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:25
-msgid "Shared by"
-msgstr "Geteilt von"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:27;31
-msgid "shared on Facebook"
-msgstr "über Facebook geteilt"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:28
-msgid "Share on Facebook"
-msgstr "Über Facebook teilen"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:29
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:29
-msgid "Successfully shared"
-msgstr "Erfolgreich geteilt"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:30
-#: theme/culturefeed-social-activity-summary.tpl.php:37
-msgid "comments"
-msgstr "Reaktionen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:17
-msgid "Follow this page"
-msgstr "Dieser Seite folgen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:18
-msgid "Unfollow"
-msgstr "Nicht mehr folgen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:19
-msgid "I follow this page"
-msgstr "Ich folge dieser Seite"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:20
-msgid "Be the first to follow this page"
-msgstr "Dieser Seite als Erster folgen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:21
-msgid "Show all users who follow this page"
-msgstr "Alle Followers anzeigen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:24
-msgid "follows"
-msgstr "folgt"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:25
-msgid "Follow"
-msgstr "Folgen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:26
-msgid "You must be logged in to follow a page"
-msgstr "Sie müssen eingeloggt sein, um einer Seite zu folgen"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:18;19
-msgid "Attend"
-msgstr "Ich gehe hierhin"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:20
-msgid "Not attending"
-msgstr "Ich gehe nicht"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:21
-msgid "will be attending"
-msgstr "ich gehe"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:22;24
-msgid "Will be attending"
-msgstr "Ich gehe zu"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:23
-msgid "You must be logged in to indicate that you will be attending"
-msgstr "Sie müssen angemeldet sein, um anzugeben, dass Sie hingehen"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:23
-msgid "Like this"
-msgstr "Gefällt das"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:24;33
-msgid "Like"
-msgstr "Gefällt mir"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:25
-msgid "Unlike"
-msgstr "Gefällt mir nicht mehr"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:26
-msgid "I Like"
-msgstr "Gefällt mir"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:27
-msgid "Be the first to like this"
-msgstr "Klicken Sie als Erster auf „Gefällt mir“"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:28
-msgid "Show all users who likes this"
-msgstr "Jeden anzeigen, dem das gefällt"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:31
-msgid "likes"
-msgstr "gefällt"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:32
-msgid "this"
-msgstr "das"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:34
-msgid "You must be logged in to like this item"
-msgstr "Sie müssen angemeldet sein, um auf „Gefällt mir“ zu klicken"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:35
-msgid "liked"
-msgstr "gefallen"
-
-#: lib/Drupal/CultureFeedActivityConfigMail.php:23
-msgid "sent"
-msgstr "versendet"
-
-#: lib/Drupal/CultureFeedActivityConfigMail.php:24
-msgid "E-mails"
-msgstr "E-Mails"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:20
-msgid "has added a new picture"
-msgstr "hat ein neues Foto hinzugefügt"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:21
-msgid "Picture added to"
-msgstr "Fotos hinzugefügt zu"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:22;23
-msgid "Add a picture"
-msgstr "Ein Foto hinzufügen"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:24
-msgid "picture"
-msgstr "Bild"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:25
-msgid "Picture added"
-msgstr "Bild hinzugefügt"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:20
-msgid "has added a new video"
-msgstr "hat ein neues Video hinzugefügt"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:21
-msgid "Video added to"
-msgstr "Video hinzugefügt zu"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:22;23
-msgid "Add a video"
-msgstr "Ein Video hinzufügen"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:24
-msgid "video"
-msgstr "Video"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:25
-msgid "Video added"
-msgstr "Video hinzugefügt"
-
-#: lib/Drupal/CultureFeedActivityConfigNewEvent.php:16
-msgid "added"
-msgstr "hinzugefügt"
-
-#: lib/Drupal/CultureFeedActivityConfigPageAdmin.php:17
-msgid "became administrator of"
-msgstr "ist Administrator geworden von"
-
-#: lib/Drupal/CultureFeedActivityConfigPageAdmin.php:18
-msgid "Page administrator"
-msgstr "Administrator"
-
-#: lib/Drupal/CultureFeedActivityConfigPageCreated.php:17
-msgid "page"
-msgstr "seite"
-
-#: lib/Drupal/CultureFeedActivityConfigPageCreated.php:18
-msgid "has created a page"
-msgstr "hat eine Seite erstellt"
-
-#: lib/Drupal/CultureFeedActivityConfigPageCreated.php:19
-msgid "Page created"
-msgstr "Seite erstellt"
-
-#: lib/Drupal/CultureFeedActivityConfigPageMember.php:17
-msgid "became member of"
-msgstr "ist Mitglied geworden von"
-
-#: lib/Drupal/CultureFeedActivityConfigPageMember.php:18
-msgid "Membership"
-msgstr "Mitgliedschaft"
-
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:23
-msgid "Printed by"
-msgstr "Ausgedruckt von"
-
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:25
-msgid "printed"
-msgstr "ausgedruckt"
-
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:26
-msgid "Printed"
-msgstr "Ausgedruckt"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:23
-msgid "Recommended by"
-msgstr "Empfohlen von"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:24
-msgid "Recommended activity"
-msgstr "Empfohlene Aktivität"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:25
-msgid "Undo recommend"
-msgstr "Nicht mehr empfehlen"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:26
-msgid "Also recommend"
-msgstr "Auch empfehlen"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:27
-msgid "Be the first to recommend"
-msgstr "Als Erster empfehlen"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:28
-msgid "View all users who recommend this"
-msgstr "Jeden anzeigen, der dies empfiehlt"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:32;35
-msgid "recommended"
-msgstr "empfohlen"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:33
-msgid "Recommend"
-msgstr "Empfehlen"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:34
-msgid "You must be logged in to recommend this item"
-msgstr "Sie müssen angemeldet sein, um dies zu empfehlen"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:19
-msgid "wrote a review"
-msgstr "eine Bewertung abgegeben"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:20
-msgid "review"
-msgstr "Bewertung"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:21
-msgid "Reviews"
-msgstr "Bewertungen"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:22
-msgid "Write a review"
-msgstr "Eine Bewertung schreiben"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:23
-msgid "Be the first to write a review"
-msgstr "Als Erster eine Reaktion schreiben"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:24
-msgid "Wrote a review for"
-msgstr "Hat einen Beitrag für"
-
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:27;30
-msgid "shared on Twitter"
-msgstr "auf Twitter geteilt"
-
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:28
-msgid "Share on Twitter"
-msgstr "Auf Twitter teilen"
-
-#: lib/Drupal/CultureFeedActivityConfigView.php:24
-msgid "viewed"
-msgstr "angesehen"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:34
-msgid "recommended activities"
-msgstr "empfohlene Aktivitäten"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:35
-msgid "recommended books"
-msgstr "empfohlene Bücher"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:36
-msgid "pages I follow"
-msgstr "Seiten, denen ich folge"
-
-#: theme/culturefeed-social-comment-list-item.tpl.php:17
-msgid "Posted by"
-msgstr "Veröffentlicht von"
-
-#: theme/culturefeed-social-comment-list-item.tpl.php:17
-msgid "on"
-msgstr "auf"
-
-#: theme/culturefeed-social-user-notifications-page.tpl.php:7
-msgid "You have no new notifications"
-msgstr "Sie haben keine neuen Meldungen"
-
-#: theme/culturefeed-social-user-notifications-page.tpl.php:15
-msgid "Previously read messages"
-msgstr "Früher gelesenen Meldungen"
-
-#: theme/culturefeed-social-user-notifications-page.tpl.php:4
-msgid "@count new notification"
-msgid_plural "@count new notifications"
-msgstr[0] "@count neue Meldung"
-msgstr[1] "@count neue Meldungen"
-
-#: theme/theme.inc:52
-msgid "ago"
-msgstr "vor"
-
-#: theme/theme.inc:57
-msgid "Today at"
-msgstr "Heute um"
-
-#: theme/theme.inc:57;60;63
-msgid "hour"
-msgstr "Uhr"
-
-#: theme/theme.inc:60
-msgid "Yesterday at"
-msgstr "Gestern um"
-
-#: theme/theme.inc:95;159
-msgid "from"
-msgstr "von"
-
-#: theme/theme.inc:202
-msgid "Delete"
-msgstr "Löschen"
-
-#: theme/theme.inc:246
-msgid "Report as inappropriate"
-msgstr "Als unangemessen melden"
-
-#: theme/theme.inc:331
-msgid "My activities"
-msgstr "Meine Aktivitäten"
-
-#: theme/theme.inc:334
-msgid "Activities of @username"
-msgstr "Aktivitäten von @username"
-
-#: includes/pages.inc:250
-msgid "Remove action"
-msgstr "Aktion entfernen"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:22
-msgid "Reply by"
-msgstr "Antwort von"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:23
-msgid "Undo"
-msgstr "Rückgängig machen"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:24
-msgid "Post a comment"
-msgstr "Schreiben Sie einen Kommentar"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:25
-msgid "Be the first to post a comment"
-msgstr "Seien Sie der Erste, der einen Kommentar zu hinterlassen"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:26
-msgid "Show all users who posted a comment"
-msgstr "Alle Anwender, die einen Kommentar abgegeben anzeigen"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:29
-msgid "has replied to"
-msgstr "hat geantwortet"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:31
-msgid "Comment"
-msgstr "Kommentar"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:32
-msgid "comment"
-msgstr "kommentar"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:33
-msgid "You must be logged in to post a comment"
-msgstr "Sie müssen eingeloggt sein, um einen Kommentar zu schreiben"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:34
-msgid "Reply as"
-msgstr "Antworten wie"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:35
-msgid "Posted a comment on"
-msgstr "Schrieb einen Kommentar"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:21
-msgid "Viewed by"
-msgstr "Gesehen von"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:22
-msgid "has"
-msgstr "hat"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:23
-msgid "seen"
-msgstr "gesehen"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:24
-msgid "Viewed"
-msgstr "Gesehen"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:23
-msgid "Share"
-msgstr "Teilen"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:24
-msgid "Share"
-msgstr "Teilen"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:25
-msgid "Shared by"
-msgstr "Geteilt"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:26
-msgid "has"
-msgstr "hat"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:27
-msgid "shared on Facebook"
-msgstr "auf Facebook geteilt"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:28
-msgid "Share on Facebook"
-msgstr "Teilen auf Facebook"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:29
-msgid "Successfully shared"
-msgstr "Erfolgreich geteilt"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:30
-msgid "share"
-msgstr "teilen"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:31
-msgid "shared on Facebook"
-msgstr "geteilt auf Facebook"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:17
-msgid "Follow this page"
-msgstr "Folgen Sie dieser Seite"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:18
-msgid "Unfollow"
-msgstr ""
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:19
-msgid "I follow this page"
-msgstr "Ich folg diese Seite"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:20
-msgid "Be the first to follow this page"
-msgstr "Seien Sie der Erste, der diese Seite folgen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:21
-msgid "Show all users who follow this page"
-msgstr "Alle Benutzer, die diese Seite anzeigen zu folgen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:24
-msgid "follows"
-msgstr "folgt"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:25
-msgid "Follow"
-msgstr "Folgen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:26
-msgid "You must be logged in to follow a page"
-msgstr "Sie müssen eingeloggt sein, um einen Seite folgen"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:18
-msgid "Attend"
-msgstr "Ich gehe hierhin"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:19
-msgid "Attend"
-msgstr "Ich gehe hierhin"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:20
-msgid "Not attending"
-msgstr "Ich gehe nicht hierhin"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:21
-msgid "will be attending"
-msgstr "ich gehe"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:22
-msgid "Will be attending"
-msgstr "Ich gehe"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:23
-msgid "You must be logged in to indicate that you will be attending"
-msgstr "Sie müssen angemeldet sein, um anzugeben, dass Sie hingehen"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:24
-msgid "Will be attending"
-msgstr "Ich gehe"
\ No newline at end of file
diff --git a/culturefeed_social/translations/culturefeed_social.fr.po b/culturefeed_social/translations/culturefeed_social.fr.po
deleted file mode 100644
index d39b71db..00000000
--- a/culturefeed_social/translations/culturefeed_social.fr.po
+++ /dev/null
@@ -1,930 +0,0 @@
-# $Id$
-#
-# French translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_social.module: n/a
-# culturefeed_social.info: n/a
-# includes/blocks.inc: n/a
-# includes/admin.inc: n/a
-# includes/pages.inc: n/a
-# lib/Drupal/CultureFeedActivityConfigComment.php: n/a
-# theme/culturefeed-social-comment-list.tpl.php: n/a
-# theme/theme.inc: n/a
-# lib/Drupal/CultureFeedActivityConfigDetail.php: n/a
-# lib/Drupal/CultureFeedActivityConfigView.php: n/a
-# lib/Drupal/CultureFeedActivityConfigFacebook.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMail.php: n/a
-# lib/Drupal/CultureFeedActivityConfigNewEvent.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPrint.php: n/a
-# lib/Drupal/CultureFeedActivityConfigRecommend.php: n/a
-# lib/Drupal/CultureFeedActivityConfigReview.php: n/a
-# lib/Drupal/CultureFeedActivityConfigTwitter.php: n/a
-# theme/culturefeed-social-activity-summary.tpl.php: n/a
-# lib/Drupal/CultureFeedActivityConfigFollow.php: n/a
-# lib/Drupal/CultureFeedActivityConfigGo.php: n/a
-# lib/Drupal/CultureFeedActivityConfigLike.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMediaPhoto.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMediaVideo.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPageAdmin.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPageCreated.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPageMember.php: n/a
-# theme/culturefeed-social-comment-list-item.tpl.php: n/a
-# theme/culturefeed-social-user-notifications-page.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2014-01-30 14:19+0100\n"
-"PO-Revision-Date: 2014-01-30 14:55+0100\n"
-"Last-Translator: Sven Houtmeyers \n"
-"Language-Team: French \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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_social.module:294
-msgid "Culturefeed social: recent site activities"
-msgstr "Culturefeed social : activités récentes du site"
-
-#: culturefeed_social.module:299
-msgid "Culturefeed social: user activities"
-msgstr "Culturefeed social : actions des utilisateurs"
-
-#: culturefeed_social.module:304
-msgid "Culturefeed social: recommended by"
-msgstr "Culturefeed social : recommandé par"
-
-#: culturefeed_social.module:309
-msgid "Culturefeed social: comments"
-msgstr "Culturefeed social : réactions"
-
-#: culturefeed_social.module:315
-msgid "Culturefeed social: my notifications (on user profile)"
-msgstr "Culturefeed social : mes messages (profil d'utilisateur)"
-
-#: culturefeed_social.module:321
-msgid "Culturefeed social: summary of my activities (on user profile)"
-msgstr "Culturefeed social : aperçu de mes messages (profil d'utilisateur)"
-
-#: culturefeed_social.module:326
-msgid "Culturefeed social: summary of loggedin users activities"
-msgstr "Culturefeed social : aperçu des actions des utilisateurs "
-
-#: culturefeed_social.module:381
-msgid "User history"
-msgstr "Actions"
-
-#: culturefeed_social.module:383
-msgid "Set which user actions are visible to others on your profile page."
-msgstr ""
-"Consultez vos actions et déterminez ce que les autres utilisateurs peuvent "
-"voir"
-
-#: culturefeed_social.module:408
-msgid "new notifications"
-msgstr "nouvelles notifications"
-
-#: culturefeed_social.module:459
-msgid "Everything"
-msgstr "Tous"
-
-#: culturefeed_social.module:467
-msgid "Filter events on"
-msgstr "Filtrer les activités selon"
-
-#: culturefeed_social.module:485
-msgid "Filter"
-msgstr "Filtrer"
-
-#: culturefeed_social.module:551
-msgid "Remove from list"
-msgstr "Se désinscrire"
-
-#: culturefeed_social.module:552
-msgid ""
-"You're currently receiving updates of new comments. !link to get no "
-"more posts."
-msgstr ""
-"Vous recevez actuellement des mises à jour de nouvelles réactions. !"
-"lien pour ne plus recevoir de messages."
-
-#: culturefeed_social.module:563
-msgid "Receive email about new comments"
-msgstr "Rester informé(e) par e-mail des nouvelles réactions"
-
-#: culturefeed_social.module:580;739
-msgid "Submit"
-msgstr "Ajouter"
-
-#: culturefeed_social.module:623
-msgid ""
-"Due to technical problems it is currently not possible to send your message. "
-"Do not hesitate to directly contact via @site"
-msgstr ""
-"En raison de problèmes techniques, il est actuellement impossible d'envoyer "
-"votre message. N'hésitez pas à nous contacter directement via @site"
-
-#: culturefeed_social.module:626
-msgid "Your response should not exceed 1000 characters."
-msgstr "Votre réaction ne peut contenir plus de 1000 caractères."
-
-#: culturefeed_social.module:652
-msgid "Your !comment has been sent."
-msgstr "Votre !commentaire a été envoyé."
-
-#: culturefeed_social.module:707
-msgid "Inappropriate response"
-msgstr "Réaction inadaptée"
-
-#: culturefeed_social.module:708
-msgid "Please tell us why you think this is an inappropriate response"
-msgstr "Indiquez la raison pour laquelle vous trouvez cette réaction inadaptée"
-
-#: culturefeed_social.module:724
-msgid "Send message as"
-msgstr "Envoyer le message en tant que"
-
-#: culturefeed_social.module:784
-msgid "Something went wrong while sending"
-msgstr "Une erreur inattendue s'est produite"
-
-#: culturefeed_social.module:798
-msgid "Message sent"
-msgstr "Le message a été envoyé"
-
-#: culturefeed_social.module:33 culturefeed_social.info:0
-msgid "CultureFeed Social"
-msgstr "CultureFeed Social"
-
-#: culturefeed_social.module:34
-msgid "Change CultureFeed Social settings"
-msgstr "Modifier les réglages CulturFeed Social"
-
-#: culturefeed_social.module:43
-msgid "Administer actions"
-msgstr "Gérer les actions"
-
-#: culturefeed_social.module:52
-msgid "Undo action"
-msgstr "Annuler action"
-
-#: culturefeed_social.module:62;72
-msgid "Abuse form"
-msgstr "Formulaire de rapport des réactions non adaptées"
-
-#: culturefeed_social.module:82
-msgid "Edit privacy settings"
-msgstr "Changer les réglages de confidentialité"
-
-#: culturefeed_social.module:92
-msgid "Unfollow node"
-msgstr "Ne plus suivre"
-
-#: culturefeed_social.module:103
-msgid "Perform action"
-msgstr "Exécuter l'action"
-
-#: culturefeed_social.module:173 includes/blocks.inc:271
-msgid "My notifications"
-msgstr "Mes messages"
-
-#: culturefeed_social.module:183
-msgid "Notifications"
-msgstr "Messages"
-
-#: culturefeed_social.info:0
-msgid ""
-"CultureFeed Social adds the ability to perform social actions (for example: "
-"like, comments, follow, ...) on culturefeed items like events, productions, "
-"pages..."
-msgstr ""
-"Grâce à CultureFeed Social, vous pouvez aimer des activités et des pages, "
-"mais aussi réagir et les suivre."
-
-#: culturefeed_social.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/admin.inc:22
-msgid "Visible filters on activity lists"
-msgstr "Filtres visibles"
-
-#: includes/admin.inc:29
-msgid "Enable notifications"
-msgstr "Activer les messages"
-
-#: includes/admin.inc:35
-msgid "Report as abuse messages destination uid (Drupal)"
-msgstr ""
-"Un rapport de contenu inapproprié est envoyé à cet utilisateur Drupal "
-"(Drupal UID)"
-
-#: includes/admin.inc:37
-msgid ""
-"Report as abuse messages will be sent to this account.\n"
-" Only if no destination page was available. Otherwise the message will be "
-"sent to all the admins of the page"
-msgstr ""
-"Un rapport de contenu inapproprié est envoyé à cet utilisateur final.\n"
-" Dès que le contenu est relié à une page, le rapport est envoyé à l'ensemble "
-"des administrateurs de la page."
-
-#: includes/blocks.inc:34
-msgid "All actions"
-msgstr "Toutes les actions"
-
-#: includes/blocks.inc:38;120
-msgid "Recent actions"
-msgstr "Actions récentes"
-
-#: includes/blocks.inc:72
-msgid "This user didn't perform any actions yet"
-msgstr "Cet utilisateur n'a pas encore exécuté d'actions"
-
-#: includes/blocks.inc:84
-msgid "Manage your actions"
-msgstr "Gérer vos actions"
-
-#: includes/blocks.inc:115
-msgid "Read previous messages"
-msgstr "Lire les messages précédents"
-
-#: includes/blocks.inc:254
-msgid "Comments"
-msgstr "Commentaires"
-
-#: includes/blocks.inc:272
-msgid "You have no notifications"
-msgstr "Vous n'avez pas reçu de nouveaux messages"
-
-#: includes/blocks.inc:288
-msgid "View all notifications"
-msgstr "Consulter tous les messages"
-
-#: includes/pages.inc:63
-msgid "No activities found"
-msgstr "Aucune activité n'a été trouvée"
-
-#: includes/pages.inc:107
-msgid "View profile"
-msgstr "Consulter le profil"
-
-#: includes/pages.inc:136;247;250;275
-msgid "Remove"
-msgstr "Supprimer"
-
-#: includes/pages.inc:144;441
-msgid "Private"
-msgstr "Privé"
-
-#: includes/pages.inc:144;441
-msgid "Public"
-msgstr "Public"
-
-#: includes/pages.inc:146;443
-msgid "Make public"
-msgstr "Rendre public"
-
-#: includes/pages.inc:146;443
-msgid "Make private"
-msgstr "Rendre invisible"
-
-#: includes/pages.inc:165
-msgid "ago on"
-msgstr "il y a le"
-
-#: includes/pages.inc:174
-msgid "Page"
-msgstr "Page"
-
-#: includes/pages.inc:174
-msgid "Action"
-msgstr "Action"
-
-#: includes/pages.inc:174
-msgid "Time and publication channel"
-msgstr "Période et canal de publication"
-
-#: includes/pages.inc:174
-msgid "Status"
-msgstr "Statut"
-
-#: includes/pages.inc:176
-msgid "You didn't perform any actions yet."
-msgstr "Vous n'avez pas encore effectué d'actions"
-
-#: includes/pages.inc:264
-msgid "Are you sure you want to delete your @action permanently"
-msgstr "Êtes-vous sûr de vouloir supprimer définitivement votre @action ?"
-
-#: includes/pages.inc:264
-msgid "Are you sure you want to delete this action permanently"
-msgstr "Êtes-vous sûr de vouloir supprimer définitivement votre action?"
-
-#: includes/pages.inc:281
-msgid "Cancel"
-msgstr "Annuler"
-
-#: includes/pages.inc:338;377;479
-msgid "An unexpected error has occurred."
-msgstr "Une erreur s'est produite"
-
-#: includes/pages.inc:409;415
-msgid "You will no longer receive updates of new comments"
-msgstr "Vous ne recevez plus les mises à jour des réactions "
-
-#: includes/pages.inc:577
-msgid "Action could not be undone."
-msgstr "L'action n'a pas pu être annulée."
-
-#: includes/pages.inc:708
-msgid "No activities found."
-msgstr "Aucune activité trouvée."
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:22
-msgid "Reply by"
-msgstr "Posté par"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:23
-msgid "Undo"
-msgstr "Annuler"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:24
-#: theme/culturefeed-social-comment-list.tpl.php:11
-msgid "Post a comment"
-msgstr "Réagir"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:25
-msgid "Be the first to post a comment"
-msgstr "Soyez le premier à réagir"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:26
-msgid "Show all users who posted a comment"
-msgstr "Afficher l'ensemble des réactions"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:29
-msgid "has replied to"
-msgstr "a répondu à"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:31
-msgid "Comment"
-msgstr "Réaction"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:32 theme/theme.inc:217
-msgid "Reply"
-msgstr "Réagissez"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:33
-msgid "You must be logged in to post a comment"
-msgstr "Vous devez vous identifier pour réagir"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:34
-msgid "Reply as"
-msgstr "Réagir en tant que"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:35
-msgid "Posted a comment on"
-msgstr "Posté un commentaire sur"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:21
-#: lib/Drupal/CultureFeedActivityConfigView.php:22
-msgid "Viewed by"
-msgstr "Consulté par"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:22
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:26
-#: lib/Drupal/CultureFeedActivityConfigMail.php:22
-#: lib/Drupal/CultureFeedActivityConfigNewEvent.php:15
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:24
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:31
-#: lib/Drupal/CultureFeedActivityConfigReview.php:18
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:26
-#: lib/Drupal/CultureFeedActivityConfigView.php:23
-msgid "has"
-msgstr "a"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:23
-msgid "seen"
-msgstr "vu"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:24
-#: lib/Drupal/CultureFeedActivityConfigView.php:25
-msgid "Viewed"
-msgstr "Consulté"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:23;24
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:23;24
-msgid "Share"
-msgstr "Partager"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:25
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:25
-msgid "Shared by"
-msgstr "Partagé par"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:27;31
-msgid "shared on Facebook"
-msgstr "partagé via Facebook"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:28
-msgid "Share on Facebook"
-msgstr "Partager via Facebook"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:29
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:29
-msgid "Successfully shared"
-msgstr "Partage réussi"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:30
-#: theme/culturefeed-social-activity-summary.tpl.php:37
-msgid "comments"
-msgstr "Réactions"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:17
-msgid "Follow this page"
-msgstr "Suivre cette page"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:18
-msgid "Unfollow"
-msgstr "Ne plus suivre"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:19
-msgid "I follow this page"
-msgstr "Je suis cette page"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:20
-msgid "Be the first to follow this page"
-msgstr "Soyez le premier à suivre cette page"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:21
-msgid "Show all users who follow this page"
-msgstr "Afficher l'ensemble des personnes qui suivent cette page"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:24
-msgid "follows"
-msgstr "suit"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:25
-msgid "Follow"
-msgstr "Suivre"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:26
-msgid "You must be logged in to follow a page"
-msgstr "Vous devez vous identifier pour suivre une page"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:18;19
-msgid "Attend"
-msgstr "Je participerai"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:20
-msgid "Not attending"
-msgstr "Je ne participerai pas"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:21
-msgid "will be attending"
-msgstr "je vais"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:22;24
-msgid "Will be attending"
-msgstr "je vais à"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:23
-msgid "You must be logged in to indicate that you will be attending"
-msgstr "Vous devez vous identifier pour indiquer que vous vous y rendez"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:23
-msgid "Like this"
-msgstr "aiment ceci"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:24;33
-msgid "Like"
-msgstr "J'aime"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:25
-msgid "Unlike"
-msgstr "Je n'aime plus"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:26
-msgid "I Like"
-msgstr "J'aime"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:27
-msgid "Be the first to like this"
-msgstr "Soyez le premier à aimer"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:28
-msgid "Show all users who likes this"
-msgstr "Afficher l'ensemble des utilisateurs qui aiment"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:31
-msgid "likes"
-msgstr "aime"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:32
-msgid "this"
-msgstr "aime"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:34
-msgid "You must be logged in to like this item"
-msgstr "Vous devez vous identifier pour aimer"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:35
-msgid "liked"
-msgstr "aimé"
-
-#: lib/Drupal/CultureFeedActivityConfigMail.php:23
-msgid "sent"
-msgstr "envoyé"
-
-#: lib/Drupal/CultureFeedActivityConfigMail.php:24
-msgid "E-mails"
-msgstr "E-mails"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:20
-msgid "has added a new picture"
-msgstr "a ajouté une nouvelle photo"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:21
-msgid "Picture added to"
-msgstr "Ajouté des photos à"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:22;23
-msgid "Add a picture"
-msgstr "Ajouter une photo"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:24
-msgid "picture"
-msgstr "image"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:25
-msgid "Picture added"
-msgstr "Photo ajoutée"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:20
-msgid "has added a new video"
-msgstr "a ajouté une nouvelle vidéo"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:21
-msgid "Video added to"
-msgstr "Vidéo ajoutée à"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:22;23
-msgid "Add a video"
-msgstr "Ajouter une vidéo"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:24
-msgid "video"
-msgstr "vidéo"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:25
-msgid "Video added"
-msgstr "Vidéo ajoutée"
-
-#: lib/Drupal/CultureFeedActivityConfigNewEvent.php:16
-msgid "added"
-msgstr "ajouté"
-
-#: lib/Drupal/CultureFeedActivityConfigPageAdmin.php:17
-msgid "became administrator of"
-msgstr "Est devenu administrateur de"
-
-#: lib/Drupal/CultureFeedActivityConfigPageAdmin.php:18
-msgid "Page administrator"
-msgstr "Administrateur"
-
-#: lib/Drupal/CultureFeedActivityConfigPageCreated.php:17
-msgid "page"
-msgstr "page"
-
-#: lib/Drupal/CultureFeedActivityConfigPageCreated.php:18
-msgid "has created a page"
-msgstr "a créé une page"
-
-#: lib/Drupal/CultureFeedActivityConfigPageCreated.php:19
-msgid "Page created"
-msgstr "page créée"
-
-#: lib/Drupal/CultureFeedActivityConfigPageMember.php:17
-msgid "became member of"
-msgstr "est devenu membre de"
-
-#: lib/Drupal/CultureFeedActivityConfigPageMember.php:18
-msgid "Membership"
-msgstr "Affiliation"
-
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:23
-msgid "Printed by"
-msgstr "Imprimé par"
-
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:25
-msgid "printed"
-msgstr "imprimé"
-
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:26
-msgid "Printed"
-msgstr "Imprimé"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:23
-msgid "Recommended by"
-msgstr "Recommandé par"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:24
-msgid "Recommended activity"
-msgstr "Activité recommandée"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:25
-msgid "Undo recommend"
-msgstr "Ne plus recommander"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:26
-msgid "Also recommend"
-msgstr "Recommander également"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:27
-msgid "Be the first to recommend"
-msgstr "Soyez le premier à recommander"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:28
-msgid "View all users who recommend this"
-msgstr "Afficher l'ensemble des utilisateurs qui recommandent ceci"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:32;35
-msgid "recommended"
-msgstr "recommandé"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:33
-msgid "Recommend"
-msgstr "Recommander"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:34
-msgid "You must be logged in to recommend this item"
-msgstr "Vous devez être identifié(e) pour recommander ceci"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:19
-msgid "wrote a review"
-msgstr "Évaluer"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:20
-msgid "review"
-msgstr "évaluation"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:21
-msgid "Reviews"
-msgstr "Évaluations"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:22
-msgid "Write a review"
-msgstr "Écrivez une évaluation"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:23
-msgid "Be the first to write a review"
-msgstr "Soyez le premier à écrire un commentaire"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:24
-msgid "Wrote a review for"
-msgstr "A écrit une critique pour"
-
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:27;30
-msgid "shared on Twitter"
-msgstr "partagé sur Twitter"
-
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:28
-msgid "Share on Twitter"
-msgstr "Partager sur Twitter"
-
-#: lib/Drupal/CultureFeedActivityConfigView.php:24
-msgid "viewed"
-msgstr "consulté"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:34
-msgid "recommended activities"
-msgstr "Activités recommandées"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:35
-msgid "recommended books"
-msgstr "livres recommandés"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:36
-msgid "pages I follow"
-msgstr "Les pages que je suis"
-
-#: theme/culturefeed-social-comment-list-item.tpl.php:17
-msgid "Posted by"
-msgstr "Posté par"
-
-#: theme/culturefeed-social-comment-list-item.tpl.php:17
-msgid "on"
-msgstr "le"
-
-#: theme/culturefeed-social-user-notifications-page.tpl.php:7
-msgid "You have no new notifications"
-msgstr "Vous n'avez pas de nouveaux messages"
-
-#: theme/culturefeed-social-user-notifications-page.tpl.php:15
-msgid "Previously read messages"
-msgstr "Messages précédemment lus"
-
-#: theme/culturefeed-social-user-notifications-page.tpl.php:4
-msgid "@count new notification"
-msgid_plural "@count new notifications"
-msgstr[0] "@count nouveau message"
-msgstr[1] "@count nouveaux messages"
-
-#: theme/theme.inc:52
-msgid "ago"
-msgstr "il ya"
-
-#: theme/theme.inc:57
-msgid "Today at"
-msgstr "Aujourd'hui à"
-
-#: theme/theme.inc:57;60;63
-msgid "hour"
-msgstr "heure"
-
-#: theme/theme.inc:60
-msgid "Yesterday at"
-msgstr "Hier à "
-
-#: theme/theme.inc:95;159
-msgid "from"
-msgstr "de"
-
-#: theme/theme.inc:202
-msgid "Delete"
-msgstr "Supprimer"
-
-#: theme/theme.inc:246
-msgid "Report as inappropriate"
-msgstr "Signaler comme inapproprié"
-
-#: theme/theme.inc:331
-msgid "My activities"
-msgstr "Mes activités"
-
-#: theme/theme.inc:334
-msgid "Activities of @username"
-msgstr "Activités de @username"
-
-#: includes/pages.inc:250
-msgid "Remove action"
-msgstr "Supprimer l'action"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:22
-msgid "Reply by"
-msgstr "répondre par"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:23
-msgid "Undo"
-msgstr "Annuler"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:24
-msgid "Post a comment"
-msgstr "Poster un commentaire"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:25
-msgid "Be the first to post a comment"
-msgstr "Soyez le premier à poster un commentaire"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:26
-msgid "Show all users who posted a comment"
-msgstr "Afficher tous les utilisateurs ayant posté un commentaire"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:29
-msgid "has replied to"
-msgstr "a répondu à"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:31
-msgid "Comment"
-msgstr "Commentaire"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:32
-msgid "comment"
-msgstr "commentaire"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:33
-msgid "You must be logged in to post a comment"
-msgstr "Vous devez être connecté pour poster un commentaire"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:34
-msgid "Reply as"
-msgstr "répond en"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:35
-msgid "Posted a comment on"
-msgstr "Posté un commentaire sur"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:21
-msgid "Viewed by"
-msgstr "Vu par"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:22
-msgid "has"
-msgstr "a"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:23
-msgid "seen"
-msgstr "vu"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:24
-msgid "Viewed"
-msgstr "Vu"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:23
-msgid "Share"
-msgstr "Partager"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:24
-msgid "Share"
-msgstr "Partager"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:25
-msgid "Shared by"
-msgstr "Partagé par"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:26
-msgid "has"
-msgstr "a"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:27
-msgid "shared on Facebook"
-msgstr "partagé sur Facebook"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:28
-msgid "Share on Facebook"
-msgstr "Partager sur Facebook"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:29
-msgid "Successfully shared"
-msgstr "Partagé avec succès"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:30
-msgid "share"
-msgstr "partager"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:31
-msgid "shared on Facebook"
-msgstr "partagé sur Facebook"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:17
-msgid "Follow this page"
-msgstr "Suivre cette page"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:18
-msgid "Unfollow"
-msgstr "Ne plus suivre"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:19
-msgid "I follow this page"
-msgstr "Je suis cette page"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:20
-msgid "Be the first to follow this page"
-msgstr "Soyez le premier à suivre cette page"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:21
-msgid "Show all users who follow this page"
-msgstr "Afficher tous les utilisateurs qui suivent cette page"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:24
-msgid "follows"
-msgstr "suit"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:25
-msgid "Follow"
-msgstr "Suivre"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:26
-msgid "You must be logged in to follow a page"
-msgstr "Vous devez être connecté pour suivre une page"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:18
-msgid "Attend"
-msgstr "Je participerai"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:19
-msgid "Attend"
-msgstr "Je participerai"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:20
-msgid "Not attending"
-msgstr "Je ne participerai pas"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:21
-msgid "will be attending"
-msgstr "je vais"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:22
-msgid "Will be attending"
-msgstr "Je vais"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:23
-msgid "You must be logged in to indicate that you will be attending"
-msgstr "Vous devez vous identifier pour indiquer que vous vous y rendez"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:24
-msgid "Will be attending"
-msgstr "Je vais"
\ No newline at end of file
diff --git a/culturefeed_social/translations/culturefeed_social.nl.po b/culturefeed_social/translations/culturefeed_social.nl.po
deleted file mode 100644
index 6eec12f9..00000000
--- a/culturefeed_social/translations/culturefeed_social.nl.po
+++ /dev/null
@@ -1,919 +0,0 @@
-# $Id$
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_social.module: n/a
-# includes/pages.inc: n/a
-# culturefeed_social.info: n/a
-# includes/blocks.inc: n/a
-# includes/admin.inc: n/a
-# lib/Drupal/CultureFeedActivityConfigBase.php: n/a
-# lib/Drupal/CultureFeedActivityConfigCashin.php: n/a
-# lib/Drupal/CultureFeedActivityConfigCheckin.php: n/a
-# lib/Drupal/CultureFeedActivityConfigComment.php: n/a
-# theme/culturefeed-social-comment-list.tpl.php: n/a
-# lib/Drupal/CultureFeedActivityConfigConnectChannel.php: n/a
-# lib/Drupal/CultureFeedActivityConfigDetail.php: n/a
-# lib/Drupal/CultureFeedActivityConfigView.php: n/a
-# lib/Drupal/CultureFeedActivityConfigFacebook.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMail.php: n/a
-# lib/Drupal/CultureFeedActivityConfigNewEvent.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPrint.php: n/a
-# lib/Drupal/CultureFeedActivityConfigRecommend.php: n/a
-# lib/Drupal/CultureFeedActivityConfigReview.php: n/a
-# lib/Drupal/CultureFeedActivityConfigTwitter.php: n/a
-# lib/Drupal/CultureFeedActivityConfigFollow.php: n/a
-# lib/Drupal/CultureFeedActivityConfigGo.php: n/a
-# lib/Drupal/CultureFeedActivityConfigLike.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMediaPhoto.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMediaVideo.php: n/a
-# lib/Drupal/CultureFeedActivityConfigMoreInfo.php: n/a
-# lib/Drupal/CultureFeedActivityConfigNews.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPageAdmin.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPageCreated.php: n/a
-# lib/Drupal/CultureFeedActivityConfigPageMember.php: n/a
-# lib/Drupal/CultureFeedActivityConfigRoute.php: n/a
-# theme/culturefeed-social-activity-summary.tpl.php: n/a
-# theme/culturefeed-social-page-activity-summary.tpl.php: n/a
-# theme/culturefeed-social-comment-list-item.tpl.php: n/a
-# theme/culturefeed-social-news-detail.tpl.php: n/a
-# theme/culturefeed-social-user-notifications-page.tpl.php: n/a
-# theme/theme.inc: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2016-01-12 09:31+0100\n"
-"PO-Revision-Date: 2016-01-12 09:33+0100\n"
-"Last-Translator: Luk Dens \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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_social.module:408
-msgid "Culturefeed social: recent site activities"
-msgstr "Culturefeed social: recente gebeurtenissen"
-
-#: culturefeed_social.module:413
-msgid "Culturefeed social: user activities"
-msgstr "Culturefeed social: gebruikersacties"
-
-#: culturefeed_social.module:418
-msgid "Culturefeed social: Users who recommended this"
-msgstr ""
-
-#: culturefeed_social.module:423
-msgid "Culturefeed social: Users who liked this"
-msgstr ""
-
-#: culturefeed_social.module:428
-msgid "Culturefeed social: Users who will attend this"
-msgstr ""
-
-#: culturefeed_social.module:433
-msgid "Culturefeed social: comments"
-msgstr "Culturefeed social: reacties"
-
-#: culturefeed_social.module:439
-msgid "Culturefeed social: my notifications (on user profile)"
-msgstr "Culturefeed social: mijn meldingen (gebruikersprofiel)"
-
-#: culturefeed_social.module:445
-msgid "Culturefeed social: summary of my activities (on user profile)"
-msgstr "Culturefeed social: overzicht van mijn meldingen (gebruikersprofiel)"
-
-#: culturefeed_social.module:450
-msgid "Culturefeed social: summary of loggedin users activities"
-msgstr "Culturefeed social: overzicht van gebruikersacties"
-
-#: culturefeed_social.module:455
-msgid "Culturefeed social: summary of page activities"
-msgstr ""
-
-#: culturefeed_social.module:472
-msgid "Items to show"
-msgstr "Te tonen items"
-
-#: culturefeed_social.module:557;42
-msgid "User history"
-msgstr "Gebruikersgeschiedenis"
-
-#: culturefeed_social.module:559
-msgid "Set which user actions are visible to others on your profile page."
-msgstr "Bekijk je acties en bepaal wat zichtbaar is voor anderen"
-
-#: culturefeed_social.module:620
-msgid "Everything"
-msgstr "Alles"
-
-#: culturefeed_social.module:628
-msgid "Filter actions"
-msgstr "Filter acties"
-
-#: culturefeed_social.module:646
-msgid "Filter"
-msgstr "Filter"
-
-#: culturefeed_social.module:714
-msgid "Remove from list"
-msgstr "Schrijf je uit"
-
-#: culturefeed_social.module:715
-msgid ""
-"You're currently receiving updates of new comments. !link to get no "
-"more posts."
-msgstr ""
-"Je ontvangt momenteel updates van nieuwe reacties. !link om geen "
-"berichten meer te ontvangen."
-
-#: culturefeed_social.module:726
-msgid "Receive email about new comments"
-msgstr "Blijf via e-mail op de hoogte van nieuwe reacties"
-
-#: culturefeed_social.module:743;902
-msgid "Submit"
-msgstr "Voeg toe"
-
-#: culturefeed_social.module:786
-msgid ""
-"Due to technical problems it is currently not possible to send your message. "
-"Do not hesitate to directly contact via @site"
-msgstr ""
-"Door technische problemen is het momenteel niet mogelijk om jouw boodschap "
-"te versturen. Aarzel niet om rechtstreeks met ons contact op te nemen via "
-"@site"
-
-#: culturefeed_social.module:789
-msgid "Your response should not exceed 1000 characters."
-msgstr "Jouw reactie mag maximaal 1000 karakters bevatten."
-
-#: culturefeed_social.module:815
-msgid "Your !comment has been sent."
-msgstr "Jouw !comment is verzonden."
-
-#: culturefeed_social.module:870
-msgid "Inappropriate response"
-msgstr "Ongepaste reactie"
-
-#: culturefeed_social.module:871
-msgid "Please tell us why you think this is an inappropriate response"
-msgstr "Geef aan waarom dit volgens jou een ongepaste reactie is"
-
-#: culturefeed_social.module:887
-msgid "Send message as"
-msgstr "Verzend bericht als"
-
-#: culturefeed_social.module:910 includes/pages.inc:280
-msgid "Cancel"
-msgstr "Annuleren"
-
-#: culturefeed_social.module:956
-msgid "Something went wrong while sending"
-msgstr "Er is een onverwachte fout opgetreden"
-
-#: culturefeed_social.module:970
-msgid "Message sent"
-msgstr "Het bericht werd verstuurd"
-
-#: culturefeed_social.module:33 culturefeed_social.info:0
-msgid "CultureFeed Social"
-msgstr "CultureFeed Social"
-
-#: culturefeed_social.module:34
-msgid "Change CultureFeed Social settings"
-msgstr "Wijzig instellingen CulturFeed Social"
-
-#: culturefeed_social.module:50;123;132;141
-msgid "Undo action"
-msgstr "Ongedaan maken"
-
-#: culturefeed_social.module:59
-msgid "Leave your comment"
-msgstr "Plaats jouw reactie"
-
-#: culturefeed_social.module:68
-msgid "Abuse form"
-msgstr "Meldformulier voor ongepaste reacties"
-
-#: culturefeed_social.module:77
-msgid "Edit privacy settings"
-msgstr "Wijzig privacy"
-
-#: culturefeed_social.module:86
-msgid "Unfollow node"
-msgstr "Niet meer volgen"
-
-#: culturefeed_social.module:96
-msgid "Perform action"
-msgstr "Voer actie uit"
-
-#: culturefeed_social.module:105;114
-msgid "Do action"
-msgstr "Actie uitvoeren"
-
-#: culturefeed_social.module:150
-msgid "Most recent actions"
-msgstr "Meest recente gebruikersacties"
-
-#: culturefeed_social.module:171 includes/blocks.inc:186
-msgid "My notifications"
-msgstr "Mijn meldingen"
-
-#: culturefeed_social.module:180
-msgid "Notifications"
-msgstr "Meldingen"
-
-#: culturefeed_social.info:0
-msgid ""
-"CultureFeed Social adds the ability to perform social actions (for example: "
-"like, comments, follow, ...) on culturefeed items like events, productions, "
-"pages..."
-msgstr ""
-"Met CultureFeed Social kan je activiteiten producties en pagina's leuk "
-"vinden, reageren en volgen."
-
-#: culturefeed_social.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/admin.inc:22
-msgid "Activities page intro"
-msgstr ""
-
-#: includes/admin.inc:28
-msgid "Enable notifications"
-msgstr "Schakel meldingen in "
-
-#: includes/admin.inc:34
-msgid "Report as abuse messages destination uid (Drupal)"
-msgstr ""
-"Een melding van ongepaste inhoud wordt verstuurd naar deze Drupal gebruiker "
-"(Drupal UID)"
-
-#: includes/admin.inc:36
-msgid ""
-"Report as abuse messages will be sent to this account.\n"
-" Only if no destination page was available. Otherwise the message will be "
-"sent to all the admins of the page"
-msgstr ""
-"Een melding van ongepaste inhoud wordt verstuurd naar deze eindgebruiker.\n"
-" Zodra de inhoud gelinkt is aan een pagina , wordt de melding verstuurd "
-"naar alle beheerders van de pagina."
-
-#: includes/blocks.inc:34
-msgid "All actions"
-msgstr "Alle acties"
-
-#: includes/blocks.inc:38;123
-msgid "Recent actions"
-msgstr "Recente gebeurtenissen"
-
-#: includes/blocks.inc:72
-msgid "This user didn't perform any actions yet"
-msgstr "Deze gebruiker heeft nog geen acties uitgevoerd"
-
-#: includes/blocks.inc:84
-msgid "Manage your actions"
-msgstr "Beheer jouw acties"
-
-#: includes/blocks.inc:118
-msgid "Read previous messages"
-msgstr "Lees eerdere berichten"
-
-#: includes/blocks.inc:169
-msgid "Comments"
-msgstr "Reacties"
-
-#: includes/blocks.inc:187
-msgid "You have no notifications"
-msgstr "Je hebt geen nieuwe meldingen"
-
-#: includes/blocks.inc:203
-msgid "View all notifications"
-msgstr "Bekijk alle meldingen"
-
-#: includes/pages.inc:63
-msgid "No activities found"
-msgstr "Geen activiteiten gevonden"
-
-#: includes/pages.inc:134
-msgid "Remove activity"
-msgstr "Verwijder actie"
-
-#: includes/pages.inc:143;436
-msgid "Private"
-msgstr "Privé"
-
-#: includes/pages.inc:143;436
-msgid "Public"
-msgstr "Publiek"
-
-#: includes/pages.inc:145;438
-msgid "Make public"
-msgstr "Maak publiek"
-
-#: includes/pages.inc:145;438
-msgid "Make private"
-msgstr "Maak onzichtbaar"
-
-#: includes/pages.inc:179
-msgid "Date"
-msgstr "Datum"
-
-#: includes/pages.inc:179
-msgid "Action"
-msgstr "Actie"
-
-#: includes/pages.inc:179
-msgid "Where"
-msgstr "Waar"
-
-#: includes/pages.inc:179
-msgid "Status"
-msgstr "Status"
-
-#: includes/pages.inc:181
-msgid "You didn't perform any actions yet."
-msgstr "Je hebt nog geen acties uitgevoerd"
-
-#: includes/pages.inc:257;260;274
-msgid "Remove"
-msgstr "Verwijderen"
-
-#: includes/pages.inc:260
-msgid "Remove action"
-msgstr "Actie verwijderen"
-
-#: includes/pages.inc:269
-msgid "Are you sure you want to delete your @action permanently"
-msgstr "Ben je zeker dat je jouw @action definitief wil verwijderen"
-
-#: includes/pages.inc:269
-msgid "Are you sure you want to delete this action permanently"
-msgstr "Ben je zeker dat je deze actie definitief wil verwijderen"
-
-#: includes/pages.inc:333;372;474
-msgid "An unexpected error has occurred."
-msgstr "Er is iets foutgelopen."
-
-#: includes/pages.inc:404;410
-msgid "You will no longer receive updates of new comments"
-msgstr "Je ontvangt geen updates meer van nieuwe reacties"
-
-#: includes/pages.inc:572
-msgid "Action could not be undone."
-msgstr "Actie kon niet ongedaan gemaakt worden."
-
-#: includes/pages.inc:703
-msgid "No activities found."
-msgstr "Geen activiteiten gevonden."
-
-#: lib/Drupal/CultureFeedActivityConfigBase.php:43
-msgid "logged in"
-msgstr "aangemeld"
-
-#: lib/Drupal/CultureFeedActivityConfigCashin.php:15
-msgid "cashin"
-msgstr "voordeel omgeruild"
-
-#: lib/Drupal/CultureFeedActivityConfigCashin.php:16
-msgid "cashed in"
-msgstr "voordeel omgeruild"
-
-#: lib/Drupal/CultureFeedActivityConfigCashin.php:17
-msgid "Cashed in"
-msgstr "Voordeel omgeruild"
-
-#: lib/Drupal/CultureFeedActivityConfigCheckin.php:15
-msgid "checkin"
-msgstr "punt gespaard"
-
-#: lib/Drupal/CultureFeedActivityConfigCheckin.php:16
-msgid "checked in"
-msgstr "punt gespaard"
-
-#: lib/Drupal/CultureFeedActivityConfigCheckin.php:17
-msgid "Check in"
-msgstr "Punt gespaard"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:22
-msgid "Reply by"
-msgstr "Geplaatst door"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:23
-msgid "Undo"
-msgstr "Ongedaan maken"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:24
-#: theme/culturefeed-social-comment-list.tpl.php:11
-msgid "Post a comment"
-msgstr "Reageer"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:25
-msgid "Be the first to post a comment"
-msgstr "Reageer als eerste"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:26
-msgid "Show all users who posted a comment"
-msgstr "Toon iedereen die reageerde"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:29
-msgid "has replied to"
-msgstr "heeft gereageerd op"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:31
-msgid "Comment"
-msgstr "Reactie"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:32
-msgid "comment"
-msgstr "reactie"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:33
-msgid "You must be !sign_in_link to post a comment"
-msgstr "Je moet !sign_in_link zijn om een beoordeling te schrijven"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:36
-msgid "Reply as"
-msgstr "Reageer als"
-
-#: lib/Drupal/CultureFeedActivityConfigComment.php:37
-msgid "Posted a comment on"
-msgstr "Heeft een reactie gepost op"
-
-#: lib/Drupal/CultureFeedActivityConfigConnectChannel.php:15
-msgid "channel"
-msgstr "kanaal"
-
-#: lib/Drupal/CultureFeedActivityConfigConnectChannel.php:16
-msgid "connected channel"
-msgstr "kanaal gekoppeld"
-
-#: lib/Drupal/CultureFeedActivityConfigConnectChannel.php:17
-msgid "Channel connected"
-msgstr "Kanaal gekoppeld"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:21
-#: lib/Drupal/CultureFeedActivityConfigView.php:22
-msgid "Viewed by"
-msgstr "Bekeken door"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:22
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:26
-#: lib/Drupal/CultureFeedActivityConfigMail.php:22
-#: lib/Drupal/CultureFeedActivityConfigNewEvent.php:16
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:24
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:31
-#: lib/Drupal/CultureFeedActivityConfigReview.php:18
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:26
-#: lib/Drupal/CultureFeedActivityConfigView.php:23
-msgid "has"
-msgstr "heeft"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:23
-msgid "seen"
-msgstr "gezien"
-
-#: lib/Drupal/CultureFeedActivityConfigDetail.php:24
-#: lib/Drupal/CultureFeedActivityConfigView.php:25
-msgid "Viewed"
-msgstr "Bekeken"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:23;24
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:23;24
-msgid "Share"
-msgstr "Deel"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:25
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:25
-msgid "Shared by"
-msgstr "Gedeeld door"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:27;31
-msgid "shared on Facebook"
-msgstr "via Facebook gedeeld"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:28
-msgid "Share on Facebook"
-msgstr "Delen via Facebook"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:29
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:29
-msgid "Successfully shared"
-msgstr "Succesvol gedeeld"
-
-#: lib/Drupal/CultureFeedActivityConfigFacebook.php:30
-msgid "share"
-msgstr "delen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:17
-msgid "Follow this page"
-msgstr "Volg deze pagina"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:18
-msgid "Unfollow"
-msgstr "Niet meer volgen"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:19
-msgid "I follow this page"
-msgstr "Ik volg deze pagina"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:20
-msgid "Be the first to follow this page"
-msgstr "Volg deze pagina als eerste"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:21
-msgid "Show all users who follow this page"
-msgstr "Toon alle volgers"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:24
-msgid "follows"
-msgstr "volgt"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:25
-msgid "Follow"
-msgstr "Volg"
-
-#: lib/Drupal/CultureFeedActivityConfigFollow.php:26
-msgid "You must be !sign_in_link to follow a page"
-msgstr "Je moet !sign_in_link zijn om een pagina te volgen"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:18
-msgid "Attend this"
-msgstr "Gaan hier naartoe"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:19;20
-msgid "Attend"
-msgstr "Ik ga hier naartoe"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:21
-msgid "Not attending"
-msgstr "Ik ga niet"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:22
-msgid "will be attending"
-msgstr "gaat naar"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:23;27
-msgid "Will be attending"
-msgstr "Ik ga naar"
-
-#: lib/Drupal/CultureFeedActivityConfigGo.php:24
-msgid "You must be !sign_in_link to indicate that you will be attending"
-msgstr "Je moet !sign_in_link zijn om aan te geven dat je hier naartoe gaat"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:23
-msgid "Like this"
-msgstr "Vinden dit leuk"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:24;33
-msgid "Like"
-msgstr "Vind ik leuk"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:25
-msgid "Unlike"
-msgstr "Vind ik niet meer leuk"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:26
-msgid "I Like"
-msgstr "Vind ik leuk"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:27
-msgid "Be the first to like this"
-msgstr "Vind dit als eerste leuk"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:28
-msgid "Show all users who likes this"
-msgstr "Toon iedereen die dit leuk vindt"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:31
-msgid "likes"
-msgstr "vindt"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:32
-msgid "this"
-msgstr "leuk"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:34
-msgid "You must be !sign_in_link to like this item"
-msgstr "Je moet !sign_in_link zijn om dit leuk te vinden"
-
-#: lib/Drupal/CultureFeedActivityConfigLike.php:37
-msgid "liked"
-msgstr "vind leuk"
-
-#: lib/Drupal/CultureFeedActivityConfigMail.php:23
-msgid "sent"
-msgstr "verstuurd"
-
-#: lib/Drupal/CultureFeedActivityConfigMail.php:24
-msgid "E-mails"
-msgstr "E-mails"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:20
-msgid "has added a new picture"
-msgstr "heeft een nieuwe foto toegevoegd"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:21
-msgid "Picture added to"
-msgstr "Foto's toegevoegd aan"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:22;23
-msgid "Add a picture"
-msgstr "Voeg een foto toe"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:24
-msgid "picture"
-msgstr "foto"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaPhoto.php:25
-msgid "Picture added"
-msgstr "Afbeelding toegevoegd"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:20
-msgid "has added a new video"
-msgstr "heeft een nieuw filmpje toegevoegd"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:21
-msgid "Video added to"
-msgstr "Video toegevoegd aan"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:22;23
-msgid "Add a video"
-msgstr "Voeg een filmpje toe"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:24
-msgid "video"
-msgstr "video"
-
-#: lib/Drupal/CultureFeedActivityConfigMediaVideo.php:25
-msgid "Video added"
-msgstr "Video toegevoegd"
-
-#: lib/Drupal/CultureFeedActivityConfigMoreInfo.php:23
-msgid "More info requested by"
-msgstr "Meer info bekeken door"
-
-#: lib/Drupal/CultureFeedActivityConfigMoreInfo.php:24
-msgid "has requested more info on"
-msgstr "heeft meer info bekeken over"
-
-#: lib/Drupal/CultureFeedActivityConfigMoreInfo.php:26
-msgid "More info requested"
-msgstr "Meer info bekeken"
-
-#: lib/Drupal/CultureFeedActivityConfigNewEvent.php:15
-msgid "new event"
-msgstr "event aangemaakt"
-
-#: lib/Drupal/CultureFeedActivityConfigNewEvent.php:17
-msgid "added"
-msgstr "toegevoegd"
-
-#: lib/Drupal/CultureFeedActivityConfigNewEvent.php:18
-msgid "Event created"
-msgstr "Event aangemaakt"
-
-#: lib/Drupal/CultureFeedActivityConfigNews.php:17
-msgid "news"
-msgstr "nieuws"
-
-#: lib/Drupal/CultureFeedActivityConfigNews.php:18
-msgid "has created a news message"
-msgstr "heeft een nieuwsbericht gemaakt"
-
-#: lib/Drupal/CultureFeedActivityConfigNews.php:19
-msgid "News created"
-msgstr "Nieuwsbericht gemaakt"
-
-#: lib/Drupal/CultureFeedActivityConfigPageAdmin.php:17
-msgid "became administrator of"
-msgstr "is beheerder geworden van "
-
-#: lib/Drupal/CultureFeedActivityConfigPageAdmin.php:18
-msgid "Page administrator"
-msgstr "Beheerder"
-
-#: lib/Drupal/CultureFeedActivityConfigPageCreated.php:17
-msgid "page"
-msgstr "pagina"
-
-#: lib/Drupal/CultureFeedActivityConfigPageCreated.php:18
-msgid "has created a page"
-msgstr "heeft een pagina aangemaakt"
-
-#: lib/Drupal/CultureFeedActivityConfigPageCreated.php:19
-msgid "Page created"
-msgstr "Pagina aangemaakt"
-
-#: lib/Drupal/CultureFeedActivityConfigPageMember.php:17
-msgid "became member of"
-msgstr "is lid geworden van"
-
-#: lib/Drupal/CultureFeedActivityConfigPageMember.php:18
-msgid "Membership"
-msgstr "Lidmaatschap"
-
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:23
-msgid "Printed by"
-msgstr "Afgedrukt door"
-
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:25
-msgid "printed"
-msgstr "afgedrukt"
-
-#: lib/Drupal/CultureFeedActivityConfigPrint.php:26
-msgid "Printed"
-msgstr "Afgedrukt"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:23
-msgid "Recommended by"
-msgstr "Aangeraden door"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:24
-msgid "Recommended activity"
-msgstr "Aangeradan activiteit"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:25
-msgid "Undo recommend"
-msgstr "Niet meer aanraden"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:26
-msgid "Also recommend"
-msgstr "Ook aanraden"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:27
-msgid "Be the first to recommend"
-msgstr "Raad als eerste aan"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:28
-msgid "View all users who recommend this"
-msgstr "Toon iedereen die dit aanraadt"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:32;37
-msgid "recommended"
-msgstr "aangeraden"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:33
-msgid "Recommend"
-msgstr "Aanraden"
-
-#: lib/Drupal/CultureFeedActivityConfigRecommend.php:34
-msgid "You must be !sign_in_link to recommend this item"
-msgstr "Je moet !sign_in_link zijn om dit aan te raden"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:19
-msgid "wrote a review"
-msgstr "een beoordeling gegeven"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:20
-msgid "review"
-msgstr "beoordeling"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:21
-msgid "Reviews"
-msgstr "Beoordelingen"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:22
-msgid "Write a review"
-msgstr "Schrijf een beoordeling"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:23
-msgid "Be the first to write a review"
-msgstr "Schrijf als eerste een reactie"
-
-#: lib/Drupal/CultureFeedActivityConfigReview.php:24
-msgid "Wrote a review for"
-msgstr "Heeft een review geschreven voor"
-
-#: lib/Drupal/CultureFeedActivityConfigRoute.php:23
-msgid "Route viewed by"
-msgstr "Route bekeken door"
-
-#: lib/Drupal/CultureFeedActivityConfigRoute.php:24
-msgid "has viewed the route to"
-msgstr "heeft de route bekeken naar"
-
-#: lib/Drupal/CultureFeedActivityConfigRoute.php:26
-msgid "Route viewed"
-msgstr "Route bekeken"
-
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:27;30
-msgid "shared on Twitter"
-msgstr "gedeeld op Twitter"
-
-#: lib/Drupal/CultureFeedActivityConfigTwitter.php:28
-msgid "Share on Twitter"
-msgstr "Delen op Twitter"
-
-#: lib/Drupal/CultureFeedActivityConfigView.php:24
-msgid "viewed"
-msgstr "bekeken"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:34
-msgid "recommended activities"
-msgstr "aangeraden activiteiten"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:35
-msgid "recommended books"
-msgstr "aangeraden boeken"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:36
-msgid "pages I follow"
-msgstr "pagina's die ik volg"
-
-#: theme/culturefeed-social-activity-summary.tpl.php:37
-#: theme/culturefeed-social-page-activity-summary.tpl.php:38
-msgid "comments"
-msgstr "Reacties"
-
-#: theme/culturefeed-social-comment-list-item.tpl.php:17
-msgid "Posted by"
-msgstr "Geplaatst door"
-
-#: theme/culturefeed-social-comment-list-item.tpl.php:17
-msgid "on"
-msgstr "op"
-
-#: theme/culturefeed-social-news-detail.tpl.php:10
-msgid "Delete news item"
-msgstr "Verwijder nieuwsbericht"
-
-#: theme/culturefeed-social-page-activity-summary.tpl.php:34
-msgid "followers"
-msgstr "volgers"
-
-#: theme/culturefeed-social-page-activity-summary.tpl.php:35
-msgid "members"
-msgstr "leden"
-
-#: theme/culturefeed-social-page-activity-summary.tpl.php:36
-msgid "admins"
-msgstr "beheerders"
-
-#: theme/culturefeed-social-page-activity-summary.tpl.php:37
-msgid "recommends"
-msgstr "aanbevelingen"
-
-#: theme/culturefeed-social-user-notifications-page.tpl.php:7
-msgid "You have no new notifications"
-msgstr "Je hebt geen nieuwe meldingen"
-
-#: theme/culturefeed-social-user-notifications-page.tpl.php:15
-msgid "Previously read messages"
-msgstr "Eerder gelezen meldingen"
-
-#: theme/culturefeed-social-user-notifications-page.tpl.php:4
-#: theme/theme.inc:713
-msgid "@count new notification"
-msgid_plural "@count new notifications"
-msgstr[0] "@count nieuwe melding"
-msgstr[1] "@count nieuwe meldingen"
-
-#: theme/theme.inc:52;640
-msgid "ago"
-msgstr "geleden"
-
-#: theme/theme.inc:57;645
-msgid "Today at"
-msgstr "Vandaag om"
-
-#: theme/theme.inc:57;60;63;645;648;651
-msgid "hour"
-msgstr "uur"
-
-#: theme/theme.inc:60;648
-msgid "Yesterday at"
-msgstr "Gisteren om"
-
-#: theme/theme.inc:108;376;626
-msgid "from"
-msgstr "van"
-
-#: theme/theme.inc:271;420;446
-msgid "Delete"
-msgstr "Verwijder"
-
-#: theme/theme.inc:286;435
-msgid "Reply"
-msgstr "Reageer"
-
-#: theme/theme.inc:308;467
-msgid "Report as inappropriate"
-msgstr "Meld als ongepast"
-
-#: theme/theme.inc:552
-msgid "My activities"
-msgstr "Mijn activiteiten"
-
-#: theme/theme.inc:555
-msgid "Activities of @username"
-msgstr "Activiteiten van @username"
-
-#: theme/theme.inc:606
-msgid "Activities"
-msgstr "Activiteiten"
From 21089ebcc27edd5bcb2ac3142faeac16300624a7 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 5 Nov 2019 14:18:36 +0100
Subject: [PATCH 07/16] Moved culturefeed_uitpas to
https://github.com/cultuurnet/culturefeed_uitpas
---
culturefeed_uitpas/css/advantages.css | 46 -
culturefeed_uitpas/css/coupons.css | 4 -
.../css/profile_details_form.css | 64 -
.../css/promotion_advantage.css | 22 -
culturefeed_uitpas/css/promotions.css | 50 -
...d_uitpas_promotions_views_wizard.class.php | 150 ---
...urefeed_uitpas_views_wizard_promotions.inc | 18 -
.../culturefeed_uitpas.admin.inc | 116 --
.../culturefeed_uitpas.blocks.inc | 178 ---
.../culturefeed_uitpas.forms.inc | 62 -
.../culturefeed_uitpas.helpers.inc | 399 -------
culturefeed_uitpas/culturefeed_uitpas.info | 19 -
culturefeed_uitpas/culturefeed_uitpas.install | 16 -
.../culturefeed_uitpas.loaders.inc | 46 -
.../culturefeed_uitpas.menu.inc | 142 ---
culturefeed_uitpas/culturefeed_uitpas.module | 151 ---
.../culturefeed_uitpas.profile.inc | 78 --
.../culturefeed_uitpas.theme.inc | 365 ------
.../culturefeed_uitpas.variable.inc | 24 -
culturefeed_uitpas/images/default.png | Bin 7578 -> 0 bytes
culturefeed_uitpas/includes/activate.inc | 37 -
.../includes/advantage_details.inc | 31 -
culturefeed_uitpas/includes/advantages.inc | 215 ----
.../includes/event_details_advantages.inc | 150 ---
.../includes/profile_actions.inc | 79 --
.../includes/profile_advantages.inc | 170 ---
.../includes/profile_coupons.inc | 31 -
.../includes/profile_details.inc | 258 -----
.../includes/profile_memberships.inc | 27 -
.../includes/profile_promotions.inc | 178 ---
.../includes/profile_summary.inc | 138 ---
.../includes/promotion_details.inc | 31 -
culturefeed_uitpas/includes/promotions.inc | 270 -----
.../includes/promotions_highlight.inc | 76 --
.../includes/recent_actions.inc | 72 --
.../includes/register_where.inc | 197 ----
.../includes/registration_confirmation.inc | 100 --
culturefeed_uitpas/includes/reminder.inc | 33 -
.../includes/synchronization.inc | 154 ---
culturefeed_uitpas/includes/user_register.inc | 230 ----
culturefeed_uitpas/js/script.js | 9 -
.../culturefeed-uitpas-advantage.tpl.php | 59 -
...efeed-uitpas-advantages-promotions.tpl.php | 18 -
...ulturefeed-uitpas-advantages-table.tpl.php | 33 -
.../culturefeed-uitpas-advantages.tpl.php | 15 -
...ed-uitpas-event-details-advantages.tpl.php | 26 -
.../culturefeed-uitpas-filter-labels.tpl.php | 3 -
.../culturefeed-uitpas-memberships.tpl.php | 19 -
...-uitpas-my-uitpas-profile-box-item.tpl.php | 1 -
...culturefeed-uitpas-profile-actions.tpl.php | 26 -
...turefeed-uitpas-profile-advantages.tpl.php | 18 -
...culturefeed-uitpas-profile-coupons.tpl.php | 32 -
...refeed-uitpas-profile-details-form.tpl.php | 29 -
...culturefeed-uitpas-profile-details.tpl.php | 57 -
...turefeed-uitpas-profile-promotions.tpl.php | 17 -
...ed-uitpas-profile-section-register.tpl.php | 19 -
...culturefeed-uitpas-profile-section.tpl.php | 16 -
...culturefeed-uitpas-profile-summary.tpl.php | 37 -
.../culturefeed-uitpas-promotion.tpl.php | 66 --
...refeed-uitpas-promotions-highlight.tpl.php | 17 -
...ulturefeed-uitpas-promotions-table.tpl.php | 29 -
.../culturefeed-uitpas-promotions.tpl.php | 18 -
.../culturefeed-uitpas-recent-actions.tpl.php | 19 -
.../culturefeed-uitpas-register-cta.tpl.php | 20 -
.../culturefeed-uitpas-register-where.tpl.php | 20 -
culturefeed_uitpas/theme/theme.inc | 989 ----------------
.../translations/culturefeed_uitpas.de.po | 806 -------------
.../translations/culturefeed_uitpas.fr.po | 806 -------------
.../translations/culturefeed_uitpas.nl.mo | Bin 19636 -> 0 bytes
.../translations/culturefeed_uitpas.nl.po | 1030 -----------------
.../views/culturefeed_uitpas.views.inc | 189 ---
...efeed_uitpas_views_handler_field_image.inc | 82 --
...feed_uitpas_views_handler_field_markup.inc | 63 -
...efeed_uitpas_views_handler_field_title.inc | 51 -
...ed_uitpas_views_handler_filter_boolean.inc | 39 -
...as_views_handler_filter_card_system_id.inc | 41 -
...efeed_uitpas_views_handler_filter_date.inc | 31 -
.../culturefeed_uitpas_views_handler_sort.inc | 39 -
.../culturefeed_uitpas_promotions_query.inc | 82 --
79 files changed, 9298 deletions(-)
delete mode 100644 culturefeed_uitpas/css/advantages.css
delete mode 100644 culturefeed_uitpas/css/coupons.css
delete mode 100644 culturefeed_uitpas/css/profile_details_form.css
delete mode 100644 culturefeed_uitpas/css/promotion_advantage.css
delete mode 100644 culturefeed_uitpas/css/promotions.css
delete mode 100644 culturefeed_uitpas/ctools/plugins/views_wizard/culturefeed_uitpas_promotions_views_wizard.class.php
delete mode 100644 culturefeed_uitpas/ctools/plugins/views_wizard/culturefeed_uitpas_views_wizard_promotions.inc
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.admin.inc
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.blocks.inc
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.forms.inc
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.helpers.inc
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.info
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.install
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.loaders.inc
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.menu.inc
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.module
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.profile.inc
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.theme.inc
delete mode 100644 culturefeed_uitpas/culturefeed_uitpas.variable.inc
delete mode 100644 culturefeed_uitpas/images/default.png
delete mode 100644 culturefeed_uitpas/includes/activate.inc
delete mode 100644 culturefeed_uitpas/includes/advantage_details.inc
delete mode 100644 culturefeed_uitpas/includes/advantages.inc
delete mode 100644 culturefeed_uitpas/includes/event_details_advantages.inc
delete mode 100644 culturefeed_uitpas/includes/profile_actions.inc
delete mode 100644 culturefeed_uitpas/includes/profile_advantages.inc
delete mode 100644 culturefeed_uitpas/includes/profile_coupons.inc
delete mode 100644 culturefeed_uitpas/includes/profile_details.inc
delete mode 100644 culturefeed_uitpas/includes/profile_memberships.inc
delete mode 100644 culturefeed_uitpas/includes/profile_promotions.inc
delete mode 100644 culturefeed_uitpas/includes/profile_summary.inc
delete mode 100644 culturefeed_uitpas/includes/promotion_details.inc
delete mode 100644 culturefeed_uitpas/includes/promotions.inc
delete mode 100644 culturefeed_uitpas/includes/promotions_highlight.inc
delete mode 100644 culturefeed_uitpas/includes/recent_actions.inc
delete mode 100644 culturefeed_uitpas/includes/register_where.inc
delete mode 100644 culturefeed_uitpas/includes/registration_confirmation.inc
delete mode 100644 culturefeed_uitpas/includes/reminder.inc
delete mode 100644 culturefeed_uitpas/includes/synchronization.inc
delete mode 100644 culturefeed_uitpas/includes/user_register.inc
delete mode 100644 culturefeed_uitpas/js/script.js
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-advantage.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-advantages-promotions.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-advantages-table.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-advantages.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-event-details-advantages.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-filter-labels.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-memberships.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-my-uitpas-profile-box-item.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-profile-actions.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-profile-advantages.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-profile-coupons.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-profile-details-form.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-profile-details.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-profile-promotions.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-profile-section-register.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-profile-section.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-profile-summary.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-promotion.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-promotions-highlight.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-promotions-table.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-promotions.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-recent-actions.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-register-cta.tpl.php
delete mode 100644 culturefeed_uitpas/theme/culturefeed-uitpas-register-where.tpl.php
delete mode 100644 culturefeed_uitpas/theme/theme.inc
delete mode 100644 culturefeed_uitpas/translations/culturefeed_uitpas.de.po
delete mode 100644 culturefeed_uitpas/translations/culturefeed_uitpas.fr.po
delete mode 100644 culturefeed_uitpas/translations/culturefeed_uitpas.nl.mo
delete mode 100644 culturefeed_uitpas/translations/culturefeed_uitpas.nl.po
delete mode 100644 culturefeed_uitpas/views/culturefeed_uitpas.views.inc
delete mode 100644 culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_image.inc
delete mode 100644 culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_markup.inc
delete mode 100644 culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_title.inc
delete mode 100644 culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_boolean.inc
delete mode 100644 culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc
delete mode 100644 culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_date.inc
delete mode 100644 culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_sort.inc
delete mode 100644 culturefeed_uitpas/views/plugins/culturefeed_uitpas_promotions_query.inc
diff --git a/culturefeed_uitpas/css/advantages.css b/culturefeed_uitpas/css/advantages.css
deleted file mode 100644
index 50f4a0b3..00000000
--- a/culturefeed_uitpas/css/advantages.css
+++ /dev/null
@@ -1,46 +0,0 @@
-.advantages-overview article {
- border-bottom: 1px solid transparent;
- border-top: 1px solid transparent;
- padding: 10px;
-}
-
-.advantages-overview article:hover {
- border-color: #D0D0D0;
-}
-
-.advantages-overview article.even {
- background-color: #F0F0F0;
-}
-
-.advantages-overview article:before,
-.advantages-overview article:after {
- content: " ";
- display: table;
-}
-
-.advantages-overview article:after {
- clear: both;
-}
-
-.advantages-overview article main {
- float: left;
- width: 74%;
-}
-
-.advantages-overview article main figure {
- float: left;
- margin: 0.4em;
-}
-
-.advantages-overview article main .content {
- float: left;
-}
-
-.advantages-overview article aside {
- float: right;
- width: 24%;
-}
-
-.advantages-overview article aside.points {
- display: block;
-}
diff --git a/culturefeed_uitpas/css/coupons.css b/culturefeed_uitpas/css/coupons.css
deleted file mode 100644
index 996c8ff7..00000000
--- a/culturefeed_uitpas/css/coupons.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.coupon-detail span {
- display: block;
- margin-top: 10px;
-}
\ No newline at end of file
diff --git a/culturefeed_uitpas/css/profile_details_form.css b/culturefeed_uitpas/css/profile_details_form.css
deleted file mode 100644
index d30b8a44..00000000
--- a/culturefeed_uitpas/css/profile_details_form.css
+++ /dev/null
@@ -1,64 +0,0 @@
-/* General. */
-
-.details-form * {
- box-sizing: border-box;
-}
-
-.details-form .form-row {
- margin: 0 -10px 0 -10px;
-}
-
-.details-form .form-item,
-.details-form .form-actions,
-.details-form .form-grouped {
- width: 50%;
- float: left;
- padding: 0 10px 0 10px;
-}
-
-.details-form .form-grouped .form-item {
- width: 100%;
- float: none;
- padding: 0;
-}
-
-.details-form .btn-primary {
- margin: 20px 0 0 10px;
-}
-
-.details-form .form-item input {
- width: 100%;
-}
-
-.details-form .form-item input.form-checkbox {
- width: auto;
- margin-left: 0px;
- margin-right: 5px;
-}
-
-/* Specific. */
-
-.details-form .form-item-street {
- width: 80%;
-}
-
-.details-form .form-item-nr {
- width: 20%;
-}
-
-.details-form .form-item-zip {
- width: 20%;
-}
-
-.details-form .form-item-city {
- width: 80%;
-}
-
-.details-form .form-item-mobile,
-.details-form .form-item-email {
- margin-bottom: 0;
-}
-
-.details-form .form-item-email-description {
- padding-top: 1.1em;
-}
\ No newline at end of file
diff --git a/culturefeed_uitpas/css/promotion_advantage.css b/culturefeed_uitpas/css/promotion_advantage.css
deleted file mode 100644
index 2391ba18..00000000
--- a/culturefeed_uitpas/css/promotion_advantage.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.page-advantage .advantage_details,
-.page-promotion .promotion_details {
- float: left;
- width: 70%;
-}
-
-.how-to-exchange .exchange-info {
- display: none;
-}
-
-.page-advantage .advantage_media,
-.page-promotion .promotion_media {
- float: left;
- width: 30%;
-}
-
-.page-advantage .advantage_media ul,
-.page-promotion .promotion_media ul {
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
diff --git a/culturefeed_uitpas/css/promotions.css b/culturefeed_uitpas/css/promotions.css
deleted file mode 100644
index 8aa7c3b8..00000000
--- a/culturefeed_uitpas/css/promotions.css
+++ /dev/null
@@ -1,50 +0,0 @@
-.promotions-overview article {
- border-bottom: 1px solid transparent;
- border-top: 1px solid transparent;
- padding: 10px;
-}
-
-.promotions-overview article:hover {
- border-color: #D0D0D0;
-}
-
-.promotions-overview article.even {
- background-color: #F0F0F0;
-}
-
-.promotions-overview article:before,
-.promotions-overview article:after {
- content: " ";
- display: table;
-}
-
-.promotions-overview article:after {
- clear: both;
-}
-
-.promotions-overview article main {
- float: left;
- width: 74%;
-}
-
-.promotions-overview article main figure {
- float: left;
- margin: 0.4em;
-}
-
-.promotions-overview article main .content {
- float: left;
-}
-
-.promotions-overview article aside {
- float: right;
- width: 24%;
-}
-
-.promotions-overview article aside.points .points-value {
- display: block;
-}
-
-.promotions-overview article aside.points.insufficient-points {
- color: #B0B0B0;
-}
diff --git a/culturefeed_uitpas/ctools/plugins/views_wizard/culturefeed_uitpas_promotions_views_wizard.class.php b/culturefeed_uitpas/ctools/plugins/views_wizard/culturefeed_uitpas_promotions_views_wizard.class.php
deleted file mode 100644
index 2e36351c..00000000
--- a/culturefeed_uitpas/ctools/plugins/views_wizard/culturefeed_uitpas_promotions_views_wizard.class.php
+++ /dev/null
@@ -1,150 +0,0 @@
- 'uitpas_promotions',
- 'base_table' => 'uitpas_promotions',
- 'form_wizard_class' => array(
- 'file' => 'culturefeed_uitpas_promotions_views_wizard.class.php',
- 'class' => 'CulturefeedUitpasPromotionsViewsWizard',
- ),
- 'title' => t('UiTPAS Promotions'),
- 'available_sorts' => array(),
- 'displays' => array('page', 'block'),
-);
diff --git a/culturefeed_uitpas/culturefeed_uitpas.admin.inc b/culturefeed_uitpas/culturefeed_uitpas.admin.inc
deleted file mode 100644
index 50aa5311..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.admin.inc
+++ /dev/null
@@ -1,116 +0,0 @@
- 'textfield',
- '#title' => t('Your cardsystem id'),
- '#default_value' => variable_get('culturefeed_uitpas_cardsystem_id', 3),
- '#description' => t('Use the id of your cardsystem. Leave empty when your site is using multiple cardsystems.'),
- );
-
- $card_system_ids = array();
- $cf = DrupalCultureFeed::getConsumerInstance();
- $card_systems = $cf->uitpas()->getCardSystems('permanent');
- foreach ($card_systems as $card_system) {
- $card_system_ids[$card_system->id] = $card_system->name;
- }
-
- $form['culturefeed_uitpas_cardsystem_ids'] = array(
- '#default_value' => variable_get('culturefeed_uitpas_cardsystem_ids', array()),
- '#options' => $card_system_ids,
- '#title' => t('Or select multiple cardsystems'),
- '#type' => 'checkboxes',
- '#description' => t('Only use this if your site is intended for passholders of multiple UiTPAS regions'),
- );
-
- $form['culturefeed_uitpas_card_name'] = array(
- '#default_value' => variable_get('culturefeed_uitpas_card_name', 'UiTPAS'),
- '#description' => t('The card name, used as title in profile sections block.'),
- '#title' => t('Card name'),
- '#type' => 'textfield',
- );
-
- $form['culturefeed_uitpas_remind_user_without_uitpas'] = array(
- '#type' => 'checkbox',
- '#title' => t('Show message to users without UiTPAS'),
- '#description' => t('When checked a message is shown on each page when the UiTiD user does not have a UiTPAS activated, to remind him/her to activate their card.'),
- '#default_value' => variable_get('culturefeed_uitpas_remind_user_without_uitpas', 1),
- );
-
- $form['culturefeed_uitpas_enable_agenda_preprocessing'] = array(
- '#type' => 'checkbox',
- '#title' => t('Show UiTPAS prices and promotions on agenda detail pages'),
- '#description' => t('When checked this will enable the preprocessing of uitpas prices and promotions on agenda event & actor details.'),
- '#default_value' => variable_get('culturefeed_uitpas_enable_agenda_preprocessing', 1),
- );
-
- // Advantages.
- form_load_include($form_state, 'inc', 'culturefeed_uitpas', 'includes/advantages');
- culturefeed_uitpas_advantages_settings_get($form);
-
- // Promotions.
- form_load_include($form_state, 'inc', 'culturefeed_uitpas', 'includes/promotions');
- culturefeed_uitpas_promotions_settings_get($form);
-
- // Locations.
- $form['locations'] = array(
- '#type' => 'fieldset',
- '#title' => t('UiTPAS locations'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
-
- $locations = variable_get('culturefeed_uitpas_locations');
- if (!$locations) {
- $locations = array();
- }
-
- $form['locations']['culturefeed_uitpas_locations'] = array(
- '#type' => 'textarea',
- '#title' => t('Locations'),
- '#value_callback' => 'culturefeed_uitpas_locations_value_callback',
- '#default_value' => implode("\r\n", $locations),
- '#description' => t('These locations will only be used when only 1 card system is enabled'),
- );
-
- // Profile promotions.
- form_load_include($form_state, 'inc', 'culturefeed_uitpas', 'includes/profile_promotions');
- culturefeed_uitpas_profile_promotions_settings_get($form);
-
- // Profile upcoming promotions
- //form_load_include($form_state, 'inc', 'culturefeed_uitpas', 'includes/profile_upcoming_promotions');
- //culturefeed_uitpas_profile_upcoming_promotions_settings_get($form);
-
- // Profile advantages.
- form_load_include($form_state, 'inc', 'culturefeed_uitpas', 'includes/profile_advantages');
- culturefeed_uitpas_profile_advantages_settings_get($form);
-
- // Register where.
- form_load_include($form_state, 'inc', 'culturefeed_uitpas', 'includes/register_where');
- culturefeed_uitpas_register_where_settings_get($form);
-
- return system_settings_form($form);
-
-}
-
-/**
- * Value callback for culturefeed_uitpas_settings_form locations.
- */
-function culturefeed_uitpas_locations_value_callback($element, $input = FALSE, $form_state = array()) {
-
- if ($input) {
-
- $input = str_replace(array("\r\n", "\r"), "\n", $input);
- return explode("\n", $input);
-
- }
-
-}
diff --git a/culturefeed_uitpas/culturefeed_uitpas.blocks.inc b/culturefeed_uitpas/culturefeed_uitpas.blocks.inc
deleted file mode 100644
index 3e73f7eb..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.blocks.inc
+++ /dev/null
@@ -1,178 +0,0 @@
- array(
- 'info' => t('Culturefeed uitpas: event details advantages'),
- 'cache' => DRUPAL_NO_CACHE,
- ),
- 'uitpas_profile_summary' => array(
- 'info' => t('Culturefeed uitpas: profile (summary)'),
- 'cache' => DRUPAL_NO_CACHE,
- ),
- 'uitpas_promotions_highlight' => array(
- 'info' => t('Culturefeed uitpas: promotions highlight'),
- 'cache' => DRUPAL_NO_CACHE,
- ),
- 'uitpas_recent_actions' => array(
- 'info' => t('Culturefeed uitpas: recent actions'),
- 'cache' => DRUPAL_NO_CACHE,
- ),
- 'uitpas_user_register' => array(
- 'info' => t('Culturefeed uitpas: register for logged in users.'),
- 'cache' => DRUPAL_NO_CACHE,
- ),
- 'uitpas_register' => array(
- 'info' => t('Culturefeed uitpas: register for not authenticated users.'),
- 'cache' => DRUPAL_NO_CACHE,
- ),
- );
-
-}
-
-/**
- * Implements hook_block_configure().
- */
-function culturefeed_uitpas_block_configure($delta = '') {
-
- $form = array();
-
- switch ($delta) {
-
- case 'uitpas_profile_summary':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/profile_summary');
- culturefeed_uitpas_profile_summary_settings_get($form);
- break;
-
- case 'uitpas_promotions_highlight':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/promotions_highlight');
- culturefeed_uitpas_promotions_highlights_settings_get($form);
- break;
-
- case 'uitpas_recent_actions':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/recent_actions');
- culturefeed_uitpas_recent_actions_settings_get($form);
- break;
-
- }
-
- return $form;
-
-}
-
-/**
- * Implements hook_block_save().
- */
-function culturefeed_uitpas_block_save($delta = '', $edit = array()) {
-
- switch ($delta) {
-
- case 'uitpas_profile_summary':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/profile_summary');
- culturefeed_uitpas_profile_summary_settings_save($edit);
- break;
-
- case 'uitpas_promotions_highlight':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/promotions_highlight');
- culturefeed_uitpas_promotions_highlights_settings_save($edit);
- break;
-
- case 'uitpas_recent_actions':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/recent_actions');
- culturefeed_uitpas_recent_actions_settings_save($edit);
- break;
-
- }
-
-}
-
-/**
- * Implements hook_block_view().
- */
-function culturefeed_uitpas_block_view($delta = '') {
-
- $block = array();
-
- switch ($delta) {
-
- case 'uitpas_event_details_advantages':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/event_details_advantages');
- $content = culturefeed_uitpas_event_details_advantages_get();
-
- if ($content) {
-
- $block['subject'] = t("UiTPAS Advantages");
- $block['content'] = $content;
- }
- break;
-
- case 'uitpas_profile_summary':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/profile_summary');
- $content = culturefeed_uitpas_profile_summary_get();
- if ($content) {
-
- $block['subject'] = t("My UiTPAS");
- $block['content'] = $content;
-
- }
- break;
-
- case 'uitpas_promotions_highlight':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/promotions_highlight');
- $content = culturefeed_uitpas_promotions_highlight_get();
- if ($content) {
-
- $block['subject'] = t("Spotlight promotions");
- $block['content'] = $content;
-
- }
- break;
-
- case 'uitpas_recent_actions':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/recent_actions');
- $content = culturefeed_uitpas_recent_actions_get();
- if ($content) {
-
- $block['subject'] = t('Recent actions');
- $block['content'] = $content;
-
- }
- break;
-
- case 'uitpas_user_register':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/user_register');
- $content = culturefeed_uitpas_user_register_cta_get();
- if ($content) {
-
- $block['subject'] = t('Already own an UiTPAS?');
- $block['content'] = $content;
-
- }
- break;
-
- case 'uitpas_register':
- module_load_include('inc', 'culturefeed_uitpas', 'includes/user_register');
- $content = culturefeed_uitpas_user_register_get(true);
-
- if ($content) {
-
- $block['subject'] = t('Already own an UiTPAS ?');
- $block['content'] = $content;
-
- }
- break;
-
- }
-
- return $block;
-
-}
diff --git a/culturefeed_uitpas/culturefeed_uitpas.forms.inc b/culturefeed_uitpas/culturefeed_uitpas.forms.inc
deleted file mode 100644
index 951ee0f4..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.forms.inc
+++ /dev/null
@@ -1,62 +0,0 @@
-user) {
-
- // @codingStandardsIgnoreStart
- /** @var CultureFeed_Preferences $preferences */
- // @codingStandardsIgnoreEnd
- $preferences = $uitpas_user->cf->getUserPreferences($uitpas_user->user->id);
- $activity_preferences = $preferences->activityPrivacyPreferences;
- $publish_actions = (isset($activity_preferences[CultureFeed_Activity::TYPE_UITPAS]->private) && !$activity_preferences[CultureFeed_Activity::TYPE_UITPAS]->private);
-
- $form['uitpas_user'] = array(
- '#type' => 'value',
- '#value' => $uitpas_user,
- );
-
- $form['publish_actions'] = array(
- '#type' => 'checkbox',
- '#title' => t('Make my UiTPAS actions available for others'),
- '#default_value' => $publish_actions,
- );
-
- $form['actions'] = array(
- 'submit' => array(
- '#type' => 'submit',
- '#value' => t('Confirm'),
- ),
- );
-
- }
-
- return $form;
-
-}
-
-/**
- * Submit handler for culturefeed_uitpas_activity_preferences_form.
- */
-function culturefeed_uitpas_activity_preferences_form_submit($form, $form_state) {
-
- $uitpas_user = $form_state['values']['uitpas_user'];
- $cf = $uitpas_user->cf;
-
- $preferences = new CultureFeed_Preferences();
- $private = ($form_state['values']['publish_actions']) ? FALSE : TRUE;
- $preference = new CultureFeed_ActivityPrivacyPreference(CultureFeed_Activity::TYPE_UITPAS, $private);
- $preferences->activityPrivacyPreferences[] = $preference;
- $cf->setUserPreferences($uitpas_user->user->id, $preferences);
-
-}
diff --git a/culturefeed_uitpas/culturefeed_uitpas.helpers.inc b/culturefeed_uitpas/culturefeed_uitpas.helpers.inc
deleted file mode 100644
index dd1ced91..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.helpers.inc
+++ /dev/null
@@ -1,399 +0,0 @@
-name == 'HELA') {
- return 'UiTPAS';
- }
-
- return $cardsystem->name;
-}
-
-/**
- * Returns the card systems used in this site.
- *
- * @return \CultureFeed_Uitpas_CardSystem[]
- * The card systems.
- */
-function culturefeed_uitpas_get_card_systems() {
-
- $cf = DrupalCultureFeed::getConsumerInstance();
- $default_card_system = variable_get('culturefeed_uitpas_cardsystem_id');
- $active_card_systems = $cf->uitpas()->getCardSystems('permanent');
- $selected_card_systems = array_filter(array_values(variable_get('culturefeed_uitpas_cardsystem_ids', array())));
- $card_systems = array();
-
- foreach ($active_card_systems as $card_system) {
- if (count($selected_card_systems) && in_array($card_system->id, $selected_card_systems)) {
- $card_systems[] = $card_system;
- }
- // if no card system is selected, we use default card system
- else if ($card_system->id == $default_card_system) {
- $card_systems[] = $card_system;
- }
- }
-
- return $card_systems;
-
-}
-
-/**
- * Check if site supports multiple cardsystems.
- *
- * @return bool
- * Boolean.
- */
-function culturefeed_uitpas_multiple_cardsystems() {
-
- $card_systems = culturefeed_uitpas_get_card_systems();
-
- if (count($card_systems) > 1) {
- return TRUE;
- }
-
-}
-
-
-/**
- * Returns a Culturefeed uitpas event object.
- *
- * @param CultuurNet\Search\ActivityStatsExtendedEntity $item
- * A Cultuurnet event item.
- *
- * @return CultureFeed_Uitpas_Event_CultureEvent
- * A Culturefeed event.
- */
-function culturefeed_uitpas_get_uitpas_event($item) {
-
- $event = NULL;
-
- if ($item) {
-
- $cdb_item = $item->getEntity();
- $cdbid = $cdb_item->getCdbid();
- $cache_prefix = 'culturefeed:uitpas:cultureevent:';
-
- if ($cache = cache_get($cache_prefix . $cdbid, 'cache_culturefeed')) {
- $event = $cache->data;
- }
- else {
-
- $query = new CultureFeed_Uitpas_Event_Query_SearchEventsOptions();
- $query->cdbid = $cdbid;
-
- $cf = DrupalCultureFeed::getConsumerInstance();
- $result = $cf->uitpas()->searchEvents($query);
-
- if ($result->total && !empty($result->objects[0])) {
- $event = $result->objects[0];
- }
- $culturefeed_uitpas_cache_expires = variable_get('culturefeed_cache_uitpas_expires', 86400);
- cache_set($cache_prefix . $cdbid, $event, 'cache_culturefeed', REQUEST_TIME + $culturefeed_uitpas_cache_expires);
- }
-
- }
-
- return $event;
-
-}
-
-/**
- * Returns Culturefeed uitpas cardsystem objects.
- *
- * @param CultuurNet\Search\ActivityStatsExtendedEntity $item
- * A Cultuurnet event item.
- *
- * @return CultureFeed_Uitpas_CardSystem
- * All Culturefeed cardsystems for the given event.
- */
-function culturefeed_uitpas_get_uitpas_event_cardsystems($item) {
-
- $event_cardsystems = NULL;
-
- if ($item) {
-
- $cdb_item = $item->getEntity();
- $cdbid = $cdb_item->getCdbid();
- $cache_prefix = 'culturefeed:uitpas:cultureevent:cardsystems:';
-
- if ($cache = cache_get($cache_prefix . $cdbid, 'cache_culturefeed')) {
- $event_cardsystems = $cache->data;
- }
- else {
-
- $cf = DrupalCultureFeed::getConsumerInstance();
- $result = $cf->uitpas()->getCardSystemsForEvent($cdbid);
-
- if ($result->total) {
- $event_cardsystems = $result->objects;
- }
- $culturefeed_uitpas_cache_expires = variable_get('culturefeed_cache_uitpas_expires', 86400);
- cache_set($cache_prefix . $cdbid, $event_cardsystems, 'cache_culturefeed', REQUEST_TIME + $culturefeed_uitpas_cache_expires);
- }
-
- }
-
- return $event_cardsystems;
-
-}
-
-/**
- * Get the card systems as options for the profile pages.
- *
- * @return array
- * The options.
- */
-function culturefeed_uitpas_get_user_card_systems_as_options($other_regions = TRUE) {
-
- // Get the card systems for the passholder.
- $options = array();
- $uitpas_user = culturefeed_uitpas_get_uitpas_user();
- /* @var \CultureFeed_Uitpas_Passholder $passholder */
- $passholder = $uitpas_user->passholder;
- foreach ($passholder->cardSystemSpecific as $card_system_specific) {
- $card_system = $card_system_specific->cardSystem;
- $options[$card_system->id] = $card_system->name;
- }
-
- $multiple_card_systems = culturefeed_uitpas_multiple_cardsystems();
-
- // If multiple cards systems are enabled, get the remaining card systems.
- if ($multiple_card_systems && $other_regions) {
- $card_systems = culturefeed_uitpas_get_card_systems();
- array_walk($card_systems, function (&$card_system) {
- /* @var CultureFeed_Uitpas_Cardsystem $card_system */
- $card_system = $card_system->id;
- });
- $card_systems = array_diff($card_systems, array_keys($options));
- $options['other-card-systems+' . implode('+', $card_systems)] = t('Other regions');
- }
-
- return $options;
-
-}
-
-/**
- * Returns a Culturefeed uitpas location.
- *
- * @return string
- * An UiTPAS location.
- */
-function culturefeed_uitpas_get_uitpas_location() {
-
- $location = '';
- $locations = variable_get('culturefeed_uitpas_locations', array());
- if (!$locations) {
- $locations = array();
- }
-
- $uitpas_user = culturefeed_uitpas_get_uitpas_user();
-
- // Get the user's location if available.
- if ($uitpas_user->passholder && $uitpas_user->passholder->city) {
- $location = strtolower($uitpas_user->passholder->city);
- }
-
- // Cookie is only for anonymous users.
- elseif (isset($_COOKIE['uitpas_location'])) {
- $location = $_COOKIE['uitpas_location'];
- }
-
- // Set location through a dropdown.
- if (isset($_GET['uitpas_location'])) {
- $location = $_GET['uitpas_location'];
- }
-
- if (!in_array($location, $locations)) {
- $location = 'all';
- }
-
- setcookie('uitpas_location', $location, 0, '/');
-
- return $location;
-
-}
-
-/**
- * Returns a culterfeed uitpas user object.
- */
-function culturefeed_uitpas_get_uitpas_user() {
- $uitpas_user = &drupal_static(__FUNCTION__);
-
- if (!$uitpas_user) {
-
- $uitpas_user = new stdClass();
- $uitpas_user->user = NULL;
- $uitpas_user->passholder = NULL;
- $uitpas_user->card_system = NULL;
-
- try {
-
- if (DrupalCultureFeed::isCultureFeedUser()) {
-
- $uitpas_user->user = DrupalCultureFeed::getLoggedInUser();
- $uitpas_user->cf = DrupalCultureFeed::getLoggedInUserInstance();
-
- if ($uitpas_user->user) {
-
- $cache_prefix = 'culturefeed:uitpas:passholder:';
-
- if ($cache = cache_get($cache_prefix . $uitpas_user->user->id, 'cache_culturefeed')) {
- $uitpas_user = $cache->data;
- }
- else {
-
- try {
- $uitpas_user->passholder = $uitpas_user->cf->uitpas()->getPassholderByUser($uitpas_user->user->id);
- if ($uitpas_user->passholder) {
-
- $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
- if ($card_system_id && isset($uitpas_user->passholder->cardSystemSpecific[$card_system_id])) {
- $uitpas_user->card_system = $uitpas_user->passholder->cardSystemSpecific[$card_system_id];
- }
- else {
- $uitpas_user->card_system = reset($uitpas_user->passholder->cardSystemSpecific);
- }
- }
- }
- catch (Exception $e) {
- if ($e->error_code == 'UNKNOWN_PASSHOLDER_UID') {
- $uitpas_user->passholder = null;
- }
- }
- $culturefeed_uitpas_cache_expires = variable_get('culturefeed_uitpas_cache_expires', 86400);
- cache_set($cache_prefix . $uitpas_user->user->id, $uitpas_user, 'cache_culturefeed', REQUEST_TIME + $culturefeed_uitpas_cache_expires);
- }
-
- }
-
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_get_uitpas_user', $e);
- }
- }
-
- return $uitpas_user;
-}
-
-/**
- * Check if the current user is a UiTPAS passholder and registered it online
- *
- * @return bool
- * Boolean.
- */
-function culturefeed_uitpas_is_passholder() {
- $uitpas_user = culturefeed_uitpas_get_uitpas_user();
-
- return NULL !== $uitpas_user->passholder;
-}
-
-/**
- * Check if the current user has already bought a card, but hasn't registered it online
- *
- * @return bool
- * Boolean.
- */
-
-function culturefeed_uitpas_not_yet_registered() {
- if(!culturefeed_uitpas_is_passholder() && culturefeed_uitpas_email_is_passholder()) {
- return true;
- }
-}
-
-/**
- * Check if the email is a UiTPAS passholder
- *
- * @return bool
- * Boolean.
- */
-
-function culturefeed_uitpas_email_is_passholder() {
- try {
- $uitpas_user = culturefeed_uitpas_get_uitpas_user();
-
- if ($uitpas_user->user && $uitpas_user->user->mbox) {
-
- $cache_prefix = 'culturefeed:uitpas:passholders:';
-
- if ($cache = cache_get($cache_prefix . $uitpas_user->user->mbox, 'cache_culturefeed')) {
- $passholders = $cache->data;
- }
- else {
- $query = new CultureFeed_Uitpas_Passholder_Query_SearchPassholdersOptions();
- $query->email = $uitpas_user->user->mbox;
- $passholders = $uitpas_user->cf->uitpas()->searchPassholders($query);
- $culturefeed_uitpas_cache_expires = variable_get('culturefeed_uitpas_cache_expires', 86400);
- cache_set($cache_prefix . $uitpas_user->user->mbox, $passholders, 'cache_culturefeed', REQUEST_TIME + $culturefeed_uitpas_cache_expires);
- }
- if ($passholders->total > 0) {
- return true;
- }
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_not_yet_registered', $e);
- }
-}
-
-function culturefeed_uitpas_get_passholder_memberships($uitpas_user) {
- $memberships = $uitpas_user->passholder->memberships;
- $today = strtotime(date('d/m/Y'));
-
- foreach ($memberships as $key => $membership) {
- if ($membership->endDate < $today) {
- unset($memberships[$key]);
- }
- }
-
- $grouped_memberships = array();
- foreach ($memberships as $membership) {
- if (!array_key_exists($membership->association->cardSystems[0]->name, $grouped_memberships)) {
- $grouped_memberships[$membership->association->cardSystems[0]->name] = array();
- }
- $grouped_memberships[$membership->association->cardSystems[0]->name][] = $membership;
- }
-
- return $grouped_memberships;
-}
-
-function culturefeed_uitpas_get_passholder_coupons($uitpas_user) {
- $coupons = array();
-
- foreach ($uitpas_user->passholder->cardSystemSpecific as $cardSystem) {
- $current_card = $cardSystem->currentCard;
-
- if ($current_card !== NULL) {
- $coupons = $uitpas_user->cf->uitpas()->getCouponsForPassholder($current_card->uitpasNumber, NULL, 1000);
- $coupons = $coupons->objects;
- }
- }
-
- // Group coupons per card system.
- $grouped_coupons = array();
- foreach ($coupons as $coupon) {
- if (!array_key_exists($coupon->cardSystem->name, $grouped_coupons)) {
- $grouped_coupons[$coupon->cardSystem->name] = array();
- }
- $grouped_coupons[$coupon->cardSystem->name][] = $coupon;
- }
-
- return $grouped_coupons;
-}
diff --git a/culturefeed_uitpas/culturefeed_uitpas.info b/culturefeed_uitpas/culturefeed_uitpas.info
deleted file mode 100644
index 382b1ed8..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.info
+++ /dev/null
@@ -1,19 +0,0 @@
-name = CultureFeed Uitpas
-description = Provides Uitpas UI elements
-package = CultureFeed
-core = 7.x
-dependencies[] = culturefeed
-dependencies[] = culturefeed_agenda
-dependencies[] = culturefeed_search
-dependencies[] = culturefeed_ui
-configure = admin/config/culturefeed/uitpas
-
-files[] = views/plugins/culturefeed_uitpas_promotions_query.inc
-files[] = views/handlers/culturefeed_uitpas_views_handler_field_image.inc
-files[] = views/handlers/culturefeed_uitpas_views_handler_field_markup.inc
-files[] = views/handlers/culturefeed_uitpas_views_handler_field_title.inc
-files[] = views/handlers/culturefeed_uitpas_views_handler_filter_boolean.inc
-files[] = views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc
-files[] = views/handlers/culturefeed_uitpas_views_handler_filter_date.inc
-files[] = views/handlers/culturefeed_uitpas_views_handler_sort.inc
-files[] = ctools/plugins/views_wizard/culturefeed_uitpas_promotions_views_wizard.class.php
diff --git a/culturefeed_uitpas/culturefeed_uitpas.install b/culturefeed_uitpas/culturefeed_uitpas.install
deleted file mode 100644
index 1474dee5..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.install
+++ /dev/null
@@ -1,16 +0,0 @@
-uitpas()->getWelcomeAdvantage($id));
- return $advantages[0];
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_uitpas_advantage', $e);
- }
-
- return FALSE;
-
-}
-
-/**
- * Load an uitpas promotion.
- */
-function uitpas_promotion_load($id) {
-
- try {
-
- $cf = DrupalCultureFeed::getConsumerInstance();
- $promotions = array($cf->uitpas()->getPointsPromotion($id));
- return $promotions[0];
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_uitpas_promotion', $e);
- }
-
- return FALSE;
-
-}
diff --git a/culturefeed_uitpas/culturefeed_uitpas.menu.inc b/culturefeed_uitpas/culturefeed_uitpas.menu.inc
deleted file mode 100644
index 42b4dc03..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.menu.inc
+++ /dev/null
@@ -1,142 +0,0 @@
- array(
- 'title' => 'UiTPAS',
- 'description' => 'Change UiTPAS setting like the card system, ...',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_uitpas_settings_form'),
- 'access arguments' => array('administer site configuration'),
- 'file' => 'culturefeed_uitpas.admin.inc',
- ),
- 'advantage/%/%uitpas_advantage' => array(
- 'title callback' => 'culturefeed_uitpas_advantage_details_title_get',
- 'title arguments' => array(2),
- 'description' => 'Details for an UiTPAS advantage.',
- 'page callback' => 'culturefeed_uitpas_advantage_details_get',
- 'page arguments' => array(2, 1),
- 'access arguments' => array('access content'),
- 'file' => 'includes/advantage_details.inc',
- ),
- 'advantages' => array(
- 'title callback' => 'culturefeed_uitpas_advantages_title',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_uitpas_advantages_filter_sort'),
- 'file' => 'includes/advantages.inc',
- 'access arguments' => array('access content'),
- ),
- 'promotions' => array(
- 'title callback' => 'culturefeed_uitpas_promotions_title',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_uitpas_promotions_filter_sort'),
- 'file' => 'includes/promotions.inc',
- 'access arguments' => array('access content'),
- ),
- 'culturefeed/profile/uitpas' => array(
- 'title callback' => 'culturefeed_uitpas_profile_title',
- 'page callback' => 'culturefeed_uitpas_profile_details_get',
- 'access callback' => 'culturefeed_uitpas_is_passholder',
- 'file' => 'includes/profile_details.inc',
- ),
- 'culturefeed/profile/uitpas/actions' => array(
- 'title callback' => 'culturefeed_uitpas_profile_actions_title',
- 'description' => t('An overview of all your UiTPAS actions.'),
- 'page callback' => 'culturefeed_uitpas_profile_actions_get',
- 'access callback' => 'culturefeed_uitpas_is_passholder',
- 'file' => 'includes/profile_actions.inc',
- ),
- 'culturefeed/profile/uitpas/promotions' => array(
- 'title callback' => 'culturefeed_uitpas_profile_promotions_title',
- 'description' => t('Discover which promotions and advantages you are entitled to.'),
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_uitpas_profile_promotions_filter_sort'),
- 'access callback' => 'culturefeed_uitpas_is_passholder',
- 'file' => 'includes/profile_promotions.inc',
- ),
- 'culturefeed/profile/uitpas/advantages' => array(
- 'title callback' => 'culturefeed_uitpas_profile_advantages_title',
- 'description' => t('Discover which promotions and advantages you are entitled to.'),
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_uitpas_profile_advantages_filter_sort'),
- 'access callback' => 'culturefeed_uitpas_is_passholder',
- 'file' => 'includes/profile_advantages.inc',
- ),
- 'culturefeed/profile/uitpas/memberships' => array(
- 'title' => t('My Memberships'),
- 'description' => t('An overview of all you UiTPAS memberships'),
- 'page callback' => 'culturefeed_uitpas_profile_memberships_get',
- 'access callback' => 'culturefeed_uitpas_is_passholder',
- 'file' => 'includes/profile_memberships.inc',
- ),
- 'culturefeed/profile/uitpas/coupons' => array(
- 'title' => t('My Coupons'),
- 'description' => t('An overview of all you UiTPAS coupons'),
- 'page callback' => 'culturefeed_uitpas_profile_coupons_get',
- 'access callback' => 'culturefeed_uitpas_is_passholder',
- 'file' => 'includes/profile_coupons.inc',
- ),
- 'promotion/%/%uitpas_promotion' => array(
- 'title callback' => 'culturefeed_uitpas_promotion_details_title_get',
- 'title arguments' => array(2),
- 'description' => 'Details for an UiTPAS promotion.',
- 'page callback' => 'culturefeed_uitpas_promotion_details_get',
- 'page arguments' => array(2, 1),
- 'access arguments' => array('access content'),
- 'file' => 'includes/promotion_details.inc',
- ),
- 'register_where' => array(
- 'title callback' => 'culturefeed_uitpas_register_where_title',
- 'page callback' => 'culturefeed_uitpas_register_where_get',
- 'file' => 'includes/register_where.inc',
- 'access callback' => TRUE,
- ),
- 'registration_confirmation' => array(
- 'title callback' => 'culturefeed_uitpas_registration_confirmation_title',
- 'page callback' => 'culturefeed_uitpas_registration_confirmation_get',
- 'file' => 'includes/registration_confirmation.inc',
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'type' => MENU_CALLBACK,
- ),
- 'activate/%/%' => array(
- 'title' => 'Activate',
- 'page callback' => 'culturefeed_uitpas_activate',
- 'page arguments' => array(1, 2),
- 'access callback' => TRUE,
- 'file' => 'includes/activate.inc',
- 'type' => MENU_CALLBACK,
- ),
- 'register_uitpas' => array(
- 'title' => 'Register your UiTPAS',
- 'page callback' => 'culturefeed_uitpas_user_register_get',
- 'page arguments' => array(false),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'file' => 'includes/user_register.inc',
- 'type' => MENU_CALLBACK,
- ),
- 'culturefeed/uitpas/reminder/toggle' => array(
- 'title' => 'Toggle reminder on and off',
- 'page callback' => 'culturefeed_uitpas_toggle_reminder',
- 'access callback' => 'user_is_logged_in',
- 'file' => 'includes/reminder.inc',
- 'type' => MENU_CALLBACK,
- ),
- 'culturefeed/uitpas/synchronization' => array(
- 'access callback' => TRUE,
- 'file' => 'includes/synchronization.inc',
- 'page callback' => 'culturefeed_uitpas_synchronization',
- 'title callback' => 'culturefeed_uitpas_synchronization_title',
- 'type' => MENU_CALLBACK,
- ),
- );
-
-}
diff --git a/culturefeed_uitpas/culturefeed_uitpas.module b/culturefeed_uitpas/culturefeed_uitpas.module
deleted file mode 100644
index febd8cad..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.module
+++ /dev/null
@@ -1,151 +0,0 @@
-user->id, 'cache_culturefeed');
- cache_clear_all('culturefeed:uitpas:passholders:' . $uitpas_user->user->mbox, 'cache_culturefeed');
-
- $destination = 'culturefeed/profile/edit';
- }
-
-}
-
-/**
- * Implements hook_ctools_plugin_directory().
- */
-function culturefeed_uitpas_ctools_plugin_directory($module, $plugin) {
- return 'ctools/plugins/' . $plugin;
-}
-
-/**
- * Implements hook_views_api().
- */
-function culturefeed_uitpas_views_api() {
- return array(
- 'api' => 3,
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/views',
- );
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_box_dropdown_items().
- */
-function culturefeed_uitpas_culturefeed_ui_profile_box_dropdown_items(CultureFeed_User $cf_account) {
-
-
-
- if (culturefeed_uitpas_is_passholder()) {
-
- $items['uitpas-divider'] = array(
- 'data' => '',
- 'class' => 'divider',
- 'weight' => 9,
- );
-
- $items['my-uitpas'] = array(
- 'data' => theme('culturefeed_uitpas_my_uitpas_profile_box_item', array(
- 'points' => culturefeed_uitpas_get_uitpas_user()->passholder->points,
- 'url' => url('culturefeed/profile/uitpas')
- )),
- 'class' => 'my-uitpas',
- 'weight' => 10,
- );
-
- return $items;
-
- }
-
- else {
-
- if (culturefeed_uitpas_not_yet_registered()) {
-
- $items['uitpas-divider'] = array(
- 'data' => '',
- 'class' => 'divider',
- 'weight' => 9,
- );
-
- $items['uitpas-register'] = array(
- 'data' => l(t('Register your UiTPAS'), 'register_uitpas'),
- 'class' => 'uitpas-register',
- 'weight' => 10,
- );
-
- return $items;
- }
-
- }
-
-}
-
-/**
- * Implements hook_init().
- */
-function culturefeed_uitpas_init() {
- if (!in_array(current_path(), array('culturefeed/uitpas/reminder/toggle', 'register_uitpas')) &&
- variable_get('culturefeed_uitpas_remind_user_without_uitpas', 1)) {
-
- $current_state = isset($_COOKIE['Drupal_visitor_culturefeed_uitpas_reminder']) ? $_COOKIE['Drupal_visitor_culturefeed_uitpas_reminder'] : 'on';
-
- // Don't do anything when reminder was toggled off with cookie.
- if ($current_state !== 'on') {
- return;
- }
-
- if (culturefeed_uitpas_not_yet_registered()) {
- $message = t('You have successfully logged in, but you did not register your UiTPAS yet. Fill in the necessary information to consult your benefits and points balance. Do not show this message again .');
- $args = array(
- '@register_url' => url('register_uitpas'),
- '@toggle_url' => url('culturefeed/uitpas/reminder/toggle'),
- );
- $message = format_string($message, $args);
- drupal_set_message($message, 'warning', FALSE);
- }
- }
-}
-
-/**
- * Implements hook_form_alter().
- */
-function culturefeed_uitpas_form_system_performance_settings_alter(&$form, $form_state) {
-
- // Adding API cache settings to the performance settings form.
-
- $form['culturefeed_uitpas_cache'] = array(
- '#type' => 'fieldset',
- '#title' => t('CultuurNet Uitpas cache'),
- '#weight' => 1,
- '#description' => t('Enabling the CultuurNet Uitpas cache will cache all parsed results of requests to the Uitpas API. This will reduce the number of requests made directly to the API service.'),
- );
-
- $period = array(0 => '<' . t('none') . '>') + drupal_map_assoc(array(0, 60, 180, 300, 600, 900, 1800, 2700, 3600, 10800, 21600, 32400, 43200, 86400, 86400 * 2, 86400 * 5, 86400 * 7, 86400 * 14, 86400 * 28), 'format_interval');
-
- $form['culturefeed_uitpas_cache']['culturefeed_uitpas_cache_expires'] = array(
- '#type' => 'select',
- '#title' => t('Minimum cache lifetime for the uitpas content'),
- '#default_value' => variable_get('culturefeed_uitpas_cache_expires', 86400),
- '#options' => $period,
- '#description' => t('The minimum cache lifetime is the minimum amount of time that will elapse before the cache is emptied and recreated'),
- );
-}
diff --git a/culturefeed_uitpas/culturefeed_uitpas.profile.inc b/culturefeed_uitpas/culturefeed_uitpas.profile.inc
deleted file mode 100644
index 645160ec..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.profile.inc
+++ /dev/null
@@ -1,78 +0,0 @@
-passholder;
-
- $links = array(
- array(
- 'title' => t('My UiTPAS'),
- 'href' => 'culturefeed/profile/uitpas',
- 'attributes' => array(
- 'title' => t('Check your personal UiTPAS data and cardnumber.'),
- ),
- ),
- array(
- 'title' => t('My promotions'),
- 'href' => 'culturefeed/profile/uitpas/promotions',
- 'attributes' => array(
- 'title' => t('Find out which promotions and advantages you are entitled to.'),
- ),
- ),
- array(
- 'title' => t('My coupons'),
- 'href' => 'culturefeed/profile/uitpas/coupons',
- 'attributes' => array(
- 'title' => t('An overview of all your UiTPAS coupons.'),
- )
- ),
- array(
- 'title' => t('My memberships'),
- 'href' => 'culturefeed/profile/uitpas/memberships',
- 'attributes' => array(
- 'title' => t('An overview of all your UiTPAS memberships.'),
- )
- ),
- array(
- 'title' => t('Points history'),
- 'href' => 'culturefeed/profile/uitpas/actions',
- 'attributes' => array(
- 'title' => t('An overview of all your UiTPAS actions.'),
- ),
- ),
- );
-
- return array(
- 'classes' => array('uitpas'),
- 'content' => theme('culturefeed_uitpas_profile_section', array(
- 'links' => theme('links', array('links' => $links)),
- 'points_label' => t('Points balance'),
- 'points_value' => $passholder->points,
- )),
- 'title' => variable_get('culturefeed_uitpas_card_name', 'UiTPAS'),
- );
-
- }
-
- else {
- return array(
- 'classes' => array('uitpas'),
- 'content' => theme('culturefeed_uitpas_profile_section_register'),
- 'title' => variable_get('culturefeed_uitpas_card_name', 'UiTPAS'),
- );
- }
-
-}
diff --git a/culturefeed_uitpas/culturefeed_uitpas.theme.inc b/culturefeed_uitpas/culturefeed_uitpas.theme.inc
deleted file mode 100644
index 4ade2015..00000000
--- a/culturefeed_uitpas/culturefeed_uitpas.theme.inc
+++ /dev/null
@@ -1,365 +0,0 @@
- array(
- 'variables' => array('advantage' => NULL),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-advantage',
- ),
- 'culturefeed_uitpas_advantages' => array(
- 'variables' => array(
- 'advantages' => array(),
- 'advantages_total' => 0,
- 'advantages_pager_element' => 0,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-advantages',
- ),
- 'culturefeed_uitpas_advantages_table' => array(
- 'variables' => array(
- 'title' => t('Advantages'),
- 'advantages' => array(),
- 'advantages_total' => 0,
- 'advantages_pager_element' => 0,
- 'items' => array(),
- 'pager' => FALSE,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'template' => 'culturefeed-uitpas-advantages-table',
- 'file' => 'theme.inc',
- ),
- 'culturefeed_uitpas_event_details_advantages' => array(
- 'file' => 'theme.inc',
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'template' => 'culturefeed-uitpas-event-details-advantages',
- 'variables' => array(
- 'title' => '',
- 'show_all_link_title' => '',
- 'show_all_link_path' => '',
- 'show_all_link_default_render' => '',
- 'promotions' => array(),
- 'promotions_array' => array(),
- 'promotions_default_render' => '',
- ),
- ),
- 'culturefeed_uitpas_profile_section' => array(
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'template' => 'culturefeed-uitpas-profile-section',
- ),
- 'culturefeed_uitpas_profile_section_register' => array(
- 'variables' => array(
- 'intro_title' => NULL,
- 'intro_text' => NULL,
- 'cta_link' => NULL,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'template' => 'culturefeed-uitpas-profile-section-register',
- ),
- 'culturefeed_uitpas_promotion' => array(
- 'variables' => array('promotion' => NULL),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-promotion',
- ),
- 'culturefeed_uitpas_promotion_image' => array(
- 'variables' => array(
- 'path' => NULL,
- 'maxheight' => 120,
- 'maxwidth' => 120,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- ),
- 'culturefeed_uitpas_promotions' => array(
- 'variables' => array(
- 'promotions' => array(),
- 'promotions_total' => 0,
- 'promotions_pager_element' => 0,
- 'promotions_filter' => array(),
- 'promotions_pager_min' => 0,
- 'promotions_pager_max' => 0,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-promotions',
- ),
- 'culturefeed_uitpas_promotions_table' => array(
- 'variables' => array(
- 'title' => t('Promotions'),
- 'promotions' => array(),
- 'promotions_total' => 0,
- 'promotions_pager_element' => 0,
- 'items' => array(),
- 'pager' => FALSE,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'template' => 'culturefeed-uitpas-promotions-table',
- 'file' => 'theme.inc',
- ),
- 'culturefeed_uitpas_promotions_highlight' => array(
- 'variables' => array('promotions' => array()),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-promotions-highlight',
- ),
- 'culturefeed_uitpas_profile_actions' => array(
- 'variables' => array(
- 'activities' => array(),
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-profile-actions',
- ),
- 'culturefeed_uitpas_profile_promotions' => array(
- 'variables' => array(
- 'promotions' => array(),
- 'promotions_total' => 0,
- 'promotions_pager_min' => 0,
- 'promotions_pager_max' => 0,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-profile-promotions',
- ),
- 'culturefeed_uitpas_profile_advantages' => array(
- 'variables' => array(
- 'advantages' => array(),
- 'advantages_total' => 0,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-profile-advantages',
- ),
- 'culturefeed_uitpas_profile_coupons' => array(
- 'variables' => array(
- 'coupons' => NULL,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-profile-coupons',
- ),
- 'culturefeed_uitpas_profile_details' => array(
- 'variables' => array(
- 'uitpas_user' => NULL,
- 'passholder' => NULL,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-profile-details',
- ),
- 'culturefeed_uitpas_profile_details_form' => array(
- 'render element' => 'form',
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-profile-details-form',
- ),
- 'culturefeed_uitpas_profile_summary' => array(
- 'variables' => array(
- 'uitpas_user' => NULL,
- 'passholder' => NULL,
- 'advantages' => array(),
- 'promotions' => array(),
- 'upcoming_promotions' => array(),
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-profile-summary',
- ),
- 'culturefeed_uitpas_recent_actions' => array(
- 'variables' => array('actions' => array()),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-recent-actions',
- ),
- 'culturefeed_uitpas_register_where' => array(
- 'variables' => array(
- 'pos' => array(),
- 'pos_total' => 0,
- 'pos_pager_element' => 0,
- 'filters' => array(),
- 'actors' => array(),
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-register-where',
- ),
- 'culturefeed_uitpas_filter_labels' => array(
- 'render element' => 'element',
- 'template' => 'culturefeed-uitpas-filter-labels',
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- ),
- 'culturefeed_uitpas_register_cta' => array(
- 'variables' => array(
- 'intro' => NULL,
- 'register_link' => NULL,
- 'get_title' => NULL,
- 'get_link' => NULL,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'template' => 'culturefeed-uitpas-register-cta',
- ),
- 'culturefeed_uitpas_memberships' => array(
- 'variables' => array(
- 'memberships' => NULL,
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'template' => 'culturefeed-uitpas-memberships',
- ),
- 'culturefeed_uitpas_my_uitpas_profile_box_item' => array(
- 'variables' => array(
- 'total' => 0,
- 'url' => ''
- ),
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/theme',
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-uitpas-my-uitpas-profile-box-item',
- ),
- );
-}
-
-function culturefeed_uitpas_preprocess_culturefeed_actor(&$vars) {
-
- if (variable_get('culturefeed_uitpas_enable_agenda_preprocessing', 1)) {
- // Get promotions for known uitpas locations.
- if (isset($vars['uitpas'])) {
- // Promotions.
- module_load_include('inc', 'culturefeed_uitpas', 'includes/event_details_advantages');
- $promotions = culturefeed_uitpas_event_details_advantages_get($vars['cdbid'], $vars['title']);
- $vars['uitpas_promotions'] = drupal_render($promotions);
- }
- }
-
-}
-
-/**
- * Preprocess function for culturefeed_agenda_event.
- */
-function culturefeed_uitpas_preprocess_culturefeed_event(&$vars) {
-
- if (variable_get('culturefeed_uitpas_enable_agenda_preprocessing', 1)) {
-
- if (isset($vars['uitpas'])) {
- try {
- $event_cardsystems = culturefeed_uitpas_get_uitpas_event_cardsystems($vars['item']);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas', $e);
- }
- }
-
- if (isset($event_cardsystems)) {
-
- $vars['uitpas_save_points'] = TRUE;
-
- $prices = array();
-
- if (isset($vars['price'])) {
- $prices[] = $vars['price'];
- }
-
- foreach ($event_cardsystems as $card_system) {
- foreach ($card_system->distributionKeys as $key) {
- foreach ($key->conditions as $condition) {
-
- if ($condition->definition == $condition::DEFINITION_KANSARM && $key->tariff > 0) {
-
- if ($condition->value == $condition::VALUE_MY_CARDSYSTEM) {
- $prices[] = t('Opportunities tariff with @system: € !tariff', array('@system' => culturefeed_uitpas_cardsystem_name($card_system), '!tariff' => $key->tariff));
- }
-
- if ($condition->value == $condition::VALUE_AT_LEAST_ONE_CARDSYSTEM) {
- $prices[] = t('Opportunities tariff for pass holders from another region: € !tariff', array('!tariff' => $key->tariff));
- }
-
- }
-
- }
-
- }
-
- }
-
- foreach ($prices as $key => $price) {
- $prices[$key] = str_replace('.', ',', $price);
- }
-
- if (count($prices)) {
- $vars['price'] = '' . 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 36382ea7125e0f9a8a8f5532eac686866bb9eda9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 7578
zcmeHrWl&tvmTn^nk|2TL(n#a(?%EItF2OAX2--~`ID`ZU4grD(hv4q+9w1F4K^tq_
zT^_mjzL{G!Z|eP@np3sU*?X<^E&Z|9*#}BWv3ZDQy
zK$#fvl4Tkn0b;59HY2a#DYuITNFK7p(gws3_S
znBc!28W{;P$iS|2oy2q1y61R1>G_J7&4yAH5{o$-l0-jXK6)oLeALdsC&w@Nh4cMy
z9SiATVOxXx?b8x-o-co532$?Mafc?*wDlmAcY81WelpW|{cg)lN8mU-B?a8S!yRTK
zwKP!uMynEiPT4!np4CG#my^}jR33O5TQh7e>m1>1Kic~w9|oQ&71xwMT=Qhg0h;y->W5i4&p!iz0jg~
zCBSFP&NUJ=8t0<%d4^s{fK_@syw?@7D%;oK+927cg-aST98J9*(K)+L#ItP#8o&hB
z_OmvS-M^R=wF+@Nrt9|+gRG#(PosFp^C`LK4ye=YV
zm%qf+Qtf|kmc5S=8|#1tia0&vJL*}maQdKeLoYWW9DY!H`%#>y9SEU>4JQxHMph}4
zZyrcEok3n60PTAM50*1IDv4%Zlspj&H|bM1#|a2a?<23&+s!479uF>vOXe1Q6C7+L
z8qrNrU0G7QTYY;B%&Ar+!(@1%SaUmp^ginnQ{~nlPz8_Lcy&=F4?kb4=3wM0NBL|ej-#A(5@?{SbiAp+djCYM
z!$|`NH=z3mN*chnQ^AF(=9AGfN*YD$G7%|2&YV;RpFmb_E0jDtl9c9csK9Dy18ti!
zCP82ieV8(Kmy-N|k2Q-{P>E638*yU0$XlX5XPSJvWI=%u3kutD%+%H&t-XGTCB-;-h_M@9ThaLq=Yl^mSFB
zvy%~8KC84Wd0E`EUBP%+?rd&iAa#z#vvv#NgiUf`@k;JJE
z-V78Bq_1tRS&%&;LnE_I<|d08F-{iX^|ns2E*m}_danJFMe(J+%1egGs$ea}q8#HN
z;<+vH2??+S_qcS%;dm2vBSvrK^SJl*yG%a`VBfaY(q)J=^|gx&Z3{0758m;o(2jme
zlpfA2&4>LOo1mVO9GX~XUqf9Nb_-t{THjt5T{j&b9-tWT9vYA1is4F-qVqRtGm}y5
z)aWz{%&XAIGG1xuqWUbO(3G8E`Q0*qm9^LRYZ8$ebL_Y02|fwJD#PDCu%&BnXIVid
znuOBT%v6@-+NBS48CfYQs=?>YmofXHItm;NR*%1o
zXJuO8DM;~7*-VC~co=cB%d%s0kh7bQmncKTq
zA5Jeb(dN^3#pD-l{r*uzkuUjN0CPP=FgUQHqXNewx+}7)y8Gd~Vj8hzsn1+BW^w4%
z3y#>+f!Wv_x{&Oa>}h$4P{Al-1)=_d{*ln4uq*r>!e+@jHYc|~K@G)6+ea;zedt=U
zueuh4JCSWuLTU%;7D74i`u36)`A%$2Gx8+atfmKNkE;!+!-&~<3i}&A~vi#^FR!4mosc)T|jO~q@toUrI-$C>Zl?@TZcN`A&KC>xJ
zXL^nLSDlXJ^LkD<73tNj)m=H+P9Ymnaa5Te#~&6K*4vBQCM&9-LarW*`?lVe=QXz*
zmqw$eXRQq0?RrPWO+V>>j>Cn2|K6RNsm~`aC4!yrWmdM|1&jywiJml>V31*`;s(lP
z%W?U?zP&qNS?(THqKy7cB_Q0iM|x-ADxoD+@AreYHmjJYtrFq+>u7^9Dc{Q9;8xRJ
zc2oWeoDlDzuBpx;Cg9eze7a25nS5W(V(Xn^Daoj6!+Bpy$k
zN;2k3Z`k#@x+Lmn!_nU>pRS*)rEY%fv1gF#Yjo!xvJ<(dzNbc|EvoL`Bb|L0*SNxnePkFE3e}b1&QO8nVERw
zSF+by=dd-0srqGSJSAQwMRayrRkxQN=5q1zD4s@7036gARLc@kbWE-OVD#8UG6u|B
z!oFMb5C=CFJdx}189c`c%
zG@g#{ogku~5_JEN5PjVLC3Dfy{6hrlAVFuKra>d;>}EqFz{$_aO(%&>Lqj9(X8l%F
zOJ4C`@W+z`-8(4MMU;!n!^4BqgOAhM&6bNtL_~y(o0p51m*Y`_1M<-cYT?P@1fl<@
zlK-nm-UedjX6FL6b9SQntJlKP*&QlDNB7sze?0&6)5g>8KP@>y{uS0^fLwn$Ts)lI
zT>mc^)b8zn1N+PQC+r__{nMQIUuB{icAhrx4dv||ZJZ#Fu1WF;@{9k&%zxqhr=$Od
zH280k|Hk<@{;=re?Ce~{fVvdfF+V?#14j#1o%9v@)95Ep116am@FPLrZ;~IR36qw7
zJa-H@0ny{2zAj_TD1jgo0DZGBzVhT*r$`R^BN-)P_gsbs49D1vAb2D{;jWs;c$5OB
z@u~bT`2U+QPs}?flly}{{)f%JsAk9IA+*{CQOTjo>PadFLc%>O%>`u(Ojexd9{&FRC#R>-lgmqk8;OfE
zm_Z2bLUUw@J;O{8WnOO1kb=~-Lw_6wl6<24_g5Q=^*tir%^c`{n7?6xEktU+myg@e
z)2C2(e`O_WUzg%$s(sT`>Z?2Hq^l9WjVyN>KM@
zL!{I$xz(}+yGu5~#!p&}HX|&@fhOLK;}Q>isvf#{vN4FWa<09Fq39dSy7p2Py_nATeTmP
z0(DmoPOS^(n|f+fNsap`t#@i>A~ml&R5(pl;v3v0AqGiOjgr&C}2cg6Gy+KFD?
z*(RZXE{7$Jk@ve7TLvZ3=JMIC?#zI)mHIE&*KLZKuUQV9cIHP);~Gt0SsG8dpE>01
z>|a?x7Pdm188kuE2_+FiK?(QNNaJycn_h~y6G8_urdnFo16sy=C#USe!UBIZEj=s!I&9I}|AtZr0JPtS_e&w53+|9rZ4#ce9=-()E7C6pbe*LGM
zop3)qbX(nD)Zvli^#>B)PbKG0o2!1XUHbwA1r@=d?AIw8RGyw2U}i5^V_{RXRPB
z28gr0({MD3#_(2x=YwJ^Rg$AWf0nW``G|-kO8}b$d99=A*OBJEC|$4zY>Qu0+Z^#f
z6^MN9wAX1&7@m*Y(IfGEuWm~TEE%4AVFs$N{>aI4F7G|Q*Ifm(TD4uI
zsq!%)2V7}0tOJaV1=;XHVd&xKh47`bLx;VnqX{#DzL~y;w<4R}3XR3dp32h4^cGwF
zJIPh#JL+U}%FH+WpKwV@BDGgcimoV7Au!^JPumyzb{oI6@VxPcv@P}n
z?x+COICFXSB$$+NCJI&{{uEUz2pTsqWKk
z7#U5}&^k^iExbQgirLS}?deJRRTz$Cn=YZ{SK~K#FM%4uU;@IGx9i{bgp>J4<^e@H
z`^ASR3TPRY-kMb^yq=<7->!0izl{(c7dVru!#d_n{g-s
zrLcLfh7Oc3J<9H=Zm23ZXu%j+w;g)C2~5S2P`|inU~Z5xKW1pVe9feVmE=RKQGE$*
z@&!n=T$$Nj#qt*^TWygX5MCHX*hU!#<-ubtx{tdZXTpO$p~8w>>sqo#KzYkYLZD}<
z)C&6o2=L4GjDrl$vFMwblXP7V=E-F9P?=10S$s~`H!Zqx74>IJ*jYiYs*$5>`t7yX
z6}U^3NAvV0Ogs@J{ilv|2;sRf607~lun@^Hi2qhgglp-sMs7GwJYb+79>lsbWEPQ?
zJ@Lx8)Y4|8l#lUGu9M#mJd9=@p?x)Punxrk%@~WgCAW^OF6fWS2$ygZ(Nk>Q$uq_m
zeu-2j9nJJ4P;w9Q+l}sJ
zafoocD)rKv8G)9r-XEyF3nB1^*dMO`Tgl<4b;zbMnV;bh`l1@PoTb`xJO$Cf`nd0u
zaTpdA5Sb<~BjZ6WEJ9Wa-LiXy&0|M1<^H{IYl*8EBBSO5U7fnUA7W>L5JJCBwyEwCrB6*oY
z*OlS^OQ`J_x+)p=)7c=z)mx^5;O#{DV~6l$axL?G
zoIp5O=8mWr1&WGg{2A=8CooJXt>D1cy1E0=r0vM+JKq`U{83`8fu+>XAM?o2koSMA
z+#3$_B)g|6#B44v9Wjyj0_>p359%oc@0ND7T@P!Ie-G(Q>yD=>bMCp8HpOlzc#W+u4ZCQw-G6Q6HG%}z_asO=ZBJ>Hxs}6
zg)`W;cj48CQS>#_ncr*lfca_Aq`AfxOPBkwslca?U4H*I;K{F`{E{$MFU*iJm0YSu
zlly8sHWtB5-PgM+i*&Vym6ma}E5MtG9Z63^qqG9fq4C{`q~$!BB4uRBkMNHoRN}MED-CuRiz6^)H`%+=U3El;^Ix+N~@r4sBCta7TINamJ=?
zN72mt@@!Z>_yn&Vd^KvP-<8<6z(lS--Su|RmQ5q%Esa9mZjl&lxl9dA)bWP=LVAEB
zAPy0e)gEOy?V1#gH2e6I$;KBX{YIHX(=EgEC;CForx;HLpF~k4VxZYR&f#4&I!#-6
zF{qShvu4y{eyF%|%1m~*V5kq4x!F;xb*savovXXgw`#vzvQEtp$u|wG=wEc2&Y8-o
z%!svE0bxQu4U%%$0xgsz13mXa
z3(|+SIO(~m0w-wW>A4h`_y4nu-Nif 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'] = "";
- $form['advantages']["#suffix"] = "
";
-
- $advantages_intro = t('This page shows all advantages for which UiTPAS holders can save points.');
-
- if (culturefeed_uitpas_is_passholder()) {
- $advantages_intro .= ' '. t('Discover your personal promotions and points balance.', array('@my-promotions' => url('culturefeed/profile/uitpas/promotions')));
- }
- else {
- $advantages_intro .= ' '. t('Find out where to get an UiTPAS', array('@register-where' => url('register_where')));
- if (!culturefeed_is_culturefeed_user()) {
- $advantages_intro .= ' '. t('or login and register your UiTPAS to discover your personal promotions and points balance.', array('@login' => url('culturefeed/oauth/connect', array('query' => array('destination' => 'register_uitpas')))));
- }
- else {
- $advantages_intro .= '.';
- }
- }
-
- if (trim($advantages_intro)) {
- $form['advantages']['intro']['#markup'] = '' . $advantages_intro . '
';
- }
-
- if ($multiple_card_systems) {
-
- $options = array();
- foreach ($card_systems as $system) {
- $options[$system->id] = $system->name;
- }
-
- $form['advantages']['filter'] = array(
- '#type' => 'radios',
- '#title' => t('Filter by'),
- '#default_value' => isset($filter) ? $filter : 0,
- '#empty_option' => t('All card systems'),
- '#options' => $options,
- '#theme' => 'culturefeed_uitpas_filter_labels',
- '#ajax' => array(
- 'event' => 'change',
- 'wrapper' => $id,
- 'callback' => 'culturefeed_uitpas_advantages_ajax_callback',
- ),
- );
-
- if (isset($filter)) {
- $filter_reset_link = '' . l(t('Show all advantages'), 'advantages', array('attributes' => array('class' => array('reset-filter')))) . '
';
- }
- else {
- $filter_reset_link = '';
- }
-
- $form['advantages']['filter']['#prefix'] = '';
- $form['advantages']['filter']['#suffix'] = $filter_reset_link . '
';
- }
-
- $total = $advantages['#advantages_total'];
- $title = t('Found %count advantages', array('%count' => $total));
- $filter_reset_link = l('×', 'advantages', array('attributes' => array('class' => array('reset-filter-inline')), 'html' => TRUE));
- $all_promotions_link = l(t('Show all promotions'), 'promotions', array('attributes' => array('class' => array('all-promotions-link'))));
-
- if ($filter && $multiple_card_systems) {
- $form['advantages']['title']['#markup'] = '' . $title . ' ' . $options[$filter] . ' ' . $filter_reset_link . ' ';
- }
- else {
- $form['advantages']['title']['#markup'] = '' . $title . ' ' . $all_promotions_link . ' ';
- }
-
- if (count($advantages['#advantages'])) {
- $form['advantages']['result']['#markup'] = theme('culturefeed_uitpas_advantages_table', $advantages);
- }
- else {
- $form['advantages']['result']['#markup'] = '' . t('No results found') . '
';
- }
-
- // Pager.
- $advantages_max = variable_get('culturefeed_uitpas_advantages_advantages_max', 20);
-
- pager_default_initialize($advantages['#advantages_total'], $advantages_max);
-
- // Solution csdco on from https://www.drupal.org/node/1049354#comment-6253362
- $tmp_q = $_GET['q'];
- $_GET['q'] = 'advantages';
- $form['promotions']['pager']['#markup'] = '';
- $_GET['q'] = $tmp_q;
-
- return $form;
-
-}
-
-function culturefeed_uitpas_advantages_ajax_callback($form, $form_state) {
- return $form['advantages'];
-}
-
-/**
- * Title callback for the advantages page.
- */
-function culturefeed_uitpas_advantages_title() {
-
- return t('UiTPAS advantages');
-
-}
diff --git a/culturefeed_uitpas/includes/event_details_advantages.inc b/culturefeed_uitpas/includes/event_details_advantages.inc
deleted file mode 100644
index a0608884..00000000
--- a/culturefeed_uitpas/includes/event_details_advantages.inc
+++ /dev/null
@@ -1,150 +0,0 @@
-organiserId;
- $balie_name = $event->organiserName;
- $actor = NULL;
- }
- // If no event check for actor.
- else {
- $item = menu_get_object('culturefeed_agenda_actor', 3);
- if ($item) {
- $actor = $item->getEntity();
- if ($actor) {
- $balie_id = $actor->getCdbId();
- $balie_name = $actor->getDetails()->getDetailByLanguage('nl')->getTitle();
- }
- }
- else {
- return FALSE;
- }
- }
- }
-
- if ($balie_id) {
-
- // Promotions.
- $promotions = array();
-
- try {
-
- /* @var \DrupalCulturefeed_Cache $cf */
- $cf = DrupalCultureFeed::getConsumerInstance();
-
- $query = new CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions();
- $query->balieConsumerKey = $balie_id;
- $query->cashingPeriodBegin = time();
- $query->unexpired = TRUE;
- $query->start = 0;
- $query->max = 5;
- $query->published = TRUE;
- $query->sort = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::SORT_POINTS;
- $query->order = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::ORDER_ASC;
-
- do {
- $result = $cf->uitpas()->getPromotionPoints($query);
- $promotions = array_merge($promotions, $result->objects);
- $query->start += $query->max;
- } while ($query->start < $result->total);
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_event_details_promotions', $e);
- }
-
- if (count($promotions)) {
-
- $title = t('Promotions at @organisation', array('@organisation' => ($balie_name) ? $balie_name : t('this organizer')));
- $show_all_link_title = t('All promotions');
- $show_all_link_path = 'promotions';
-
- $table = array(
- 'rows' => array(),
- );
- // A helper array in case the default implementation needs to be
- // overridden.
- $promotions_array = array();
- $flip = array('even' => 'odd', 'odd' => 'even');
- $class = 'even';
-
- foreach ($promotions as $promotion) {
-
- /* @var \CultureFeed_Uitpas_Passholder_PointsPromotion $promotion */
- $promotion_path = 'promotion/' . culturefeed_search_slug($promotion->title) . '/' . $promotion->id;
- $promotion_title = l($promotion->title, $promotion_path);
- $promotion_points = $promotion->points;
- $points_remark = '';
- $points_classes = array('points-value', 'points-value__brand');
-
- /* @var \CultureFeed_User $cf_user */
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- if ($cf_user && $cf_user->points < $promotion->points) {
- $points_remark = t('You have insufficient points');
- $points_classes[] = 'insufficient-points';
- }
-
- // Points.
- $points_html = theme('html_tag', array(
- 'element' => array(
- '#attributes' => array('class' => $points_classes),
- '#tag' => 'span',
- '#value' => format_plural($promotion->points, '1 point', '@count points'),
- ),
- ));
-
- if ($points_remark) {
- $points_html .= theme('html_tag', array(
- 'element' => array(
- '#attributes' => array('class' => array('points-remark')),
- '#tag' => 'span',
- '#value' => $points_remark,
- ),
- ));
- }
-
- // The row.
- $table['rows'][] = array(
- $promotion_title,
- $points_html,
- );
-
- $promotions_array[] = array(
- 'points' => $promotion_points,
- 'points_classes' => $points_classes,
- 'points_remark' => $points_remark,
- 'title' => $promotion_title,
- 'parity_class' => $class = $flip[$class],
- );
-
- }
-
- return array(
- '#theme' => 'culturefeed_uitpas_event_details_advantages',
- '#show_all_link_title' => $show_all_link_title,
- '#show_all_link_path' => $show_all_link_path,
- '#show_all_link_default_render' => l($show_all_link_title, $show_all_link_path),
- '#promotions' => $promotions,
- '#promotions_array' => $promotions_array,
- '#promotions_default_render' => theme('table', $table),
- '#title' => $title,
- );
-
- }
-
- }
-
-}
diff --git a/culturefeed_uitpas/includes/profile_actions.inc b/culturefeed_uitpas/includes/profile_actions.inc
deleted file mode 100644
index 4aa24498..00000000
--- a/culturefeed_uitpas/includes/profile_actions.inc
+++ /dev/null
@@ -1,79 +0,0 @@
-user && $uitpas_user->passholder) {
-
- $activities = array();
-
- // 2 queries are needed: one for positive points and one for negative
- // points. The queries also loop to get all results.
- $base_query = new CultureFeed_SearchActivitiesQuery();
- $base_query->userId = $uitpas_user->user->id;
- $base_query->start = 0;
- $base_query->max = 10;
- $base_query->private = TRUE;
-
- try {
-
- foreach (array('positive', 'negative') as $activity_points_filter) {
-
- $query = clone($base_query);
- $query->filterOnActivityPoints = $activity_points_filter;
-
- do {
-
- $result_set = DrupalCultureFeed::searchActivities($query);
- $activities = array_merge($activities, $result_set->objects);
- $query->start += $query->max;
-
- } while ($query->start < $result_set->total);
-
- }
-
- }
- catch (Exception $e) {
- watchdog('culturefeed_uitpas_activities', $e);
- }
-
- }
-
- // Sort by creation date.
- usort($activities, function($a, $b) {
- /* @var \CultureFeed_Activity $a */
- /* @var \CultureFeed_Activity $b */
- return $b->creationDate - $a->creationDate;
- });
-
- // Only include last year.
- $activities = array_values(array_filter($activities, function ($activity) {
- /* @var \CultureFeed_Activity $activity */
- return $activity->creationDate > strtotime("-1 year", time());
- }));
-
- return array(
- '#theme' => 'culturefeed_uitpas_profile_actions',
- '#activities' => $activities,
- );
-
-}
-
-/**
- * Title callback for the profile actions page.
- */
-function culturefeed_uitpas_profile_actions_title() {
-
- return t('Points history');
-
-}
diff --git a/culturefeed_uitpas/includes/profile_advantages.inc b/culturefeed_uitpas/includes/profile_advantages.inc
deleted file mode 100644
index 127977c4..00000000
--- a/culturefeed_uitpas/includes/profile_advantages.inc
+++ /dev/null
@@ -1,170 +0,0 @@
-user && $uitpas_user->passholder) {
-
- $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
- $card_systems = $uitpas_user->passholder->cardSystemSpecific;
- $first_card = key($card_systems);
-
- foreach ($uitpas_user->passholder->cardSystemSpecific as $cardsystem) {
- if (isset($cardsystem->currentCard->uitpasNumber)) {
- $uitpas_number = $cardsystem->currentCard->uitpasNumber;
- continue;
- }
- }
-
- // Welcome advantages.
- try {
- $query = new CultureFeed_Uitpas_Passholder_Query_WelcomeAdvantagesOptions();
- $query->uitpas_number = $uitpas_number;
- $query->cashedIn = FALSE;
- if ($filter) {
- if (strpos($filter, '+') === FALSE) {
- $query->owningCardSystemId = $filter;
- }
- else {
- $query->applicableCardSystemId = array_slice(explode('+', $filter), 1);
- }
- }
-
- $query->start = $advantages_page * $advantages_max;
- $query->max = $advantages_max;
- $result = $uitpas_user->cf->uitpas()->getWelcomeAdvantagesForPassholder($query);
- $advantages = $result->objects;
- pager_default_initialize($result->total, $advantages_max);
- $advantages_total = $result->total;
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_profile_advantages', $e);
- pager_default_initialize(0, $advantages_max);
- }
-
- // Title.
- drupal_set_title(t('My advantages'), PASS_THROUGH);
-
- }
-
- // Solution csdco on from https://www.drupal.org/node/1049354
- $_GET['q'] = 'culturefeed/profile/uitpas/advantages';
-
- return array(
- array(
- '#theme' => 'culturefeed_uitpas_profile_advantages',
- '#advantages' => $advantages,
- '#advantages_total' => $advantages_total,
- ),
- array(
- '#theme' => 'pager',
- '#parameters' => array('filter' => $filter),
- ),
- );
-
-}
-
-/**
- * Returns form elements for profile advantages settings.
- */
-function culturefeed_uitpas_profile_advantages_settings_get(&$form) {
-
- $form['profile_advantages'] = array(
- '#type' => 'fieldset',
- '#title' => t('My UiTPAS advantages settings'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['profile_advantages']['culturefeed_uitpas_profile_advantages_advantages_max'] = array(
- '#type' => 'textfield',
- '#title' => t('Number of advantages to display'),
- '#default_value' => variable_get('culturefeed_uitpas_profile_advantages_advantages_max', 20),
- );
-
-}
-
-/**
- * Title callback for the profile advantages page.
- */
-function culturefeed_uitpas_profile_advantages_title() {
-
- return t('My advantages');
-
-}
-
-/**
- * Returns form elements for filter & sort on profile promotions page.
- */
-function culturefeed_uitpas_profile_advantages_filter_sort($form, $form_state) {
-
- $form['profile_advantages_link'] = array(
- '#attributes' => array(
- 'id' => 'advantages_link'
- ),
- '#links' => array(
- 'promotions' => array(
- 'href' => 'culturefeed/profile/uitpas/promotions',
- 'title' => t('My Promotions'),
- ),
- 'advantages' => array(
- 'href' => 'culturefeed/profile/uitpas/advantages',
- 'title' => t('Welcome Advantages'),
- ),
- ),
- '#theme' => 'links',
- );
-
- // We can't show welcome advantages in other regions than owning card system.
- $other_regions = FALSE;
-
- // Get the card systems for the passholder
- $options = culturefeed_uitpas_get_user_card_systems_as_options($other_regions);
-
- $id = drupal_html_id('profile-advantages-filter-sort');
- $form['profile_advantages']['#prefix'] = '';
- $form['profile_advantages']["#suffix"] = '
';
-
- $filter = isset($form_state['values']['filter']) ? $form_state['values']['filter'] : (isset($_GET['filter']) ? $_GET['filter'] : NULL);
-
- if (count($options) > 1) {
- $form['profile_advantages']['filter'] = array(
- '#type' => 'radios',
- '#title' => t('Distributed by'),
- '#default_value' => $filter,
- '#empty_option' => t('All card systems'),
- '#options' => $options,
- '#ajax' => array(
- 'event' => 'change',
- 'wrapper' => $id,
- 'callback' => 'culturefeed_uitpas_profile_advantages_ajax_callback',
- ),
- );
- }
-
- $results = culturefeed_uitpas_profile_advantages_get($filter);
- $form['profile_advantages']['result'] = array(
- '#markup' => drupal_render($results),
- );
-
- $form['profile_advantages']['#attached']['css'][] = drupal_get_path('module', 'culturefeed_uitpas') . '/css/culturefeed_uitpas.css';
-
- return $form;
-}
-
-function culturefeed_uitpas_profile_advantages_ajax_callback($form, $form_state) {
- return $form['profile_advantages'];
-}
diff --git a/culturefeed_uitpas/includes/profile_coupons.inc b/culturefeed_uitpas/includes/profile_coupons.inc
deleted file mode 100644
index c527fe81..00000000
--- a/culturefeed_uitpas/includes/profile_coupons.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-user && $uitpas_user->passholder) {
- $coupons = culturefeed_uitpas_get_passholder_coupons($uitpas_user);
- }
-
- if (count($coupons) > 0) {
- return array(
- '#theme' => 'culturefeed_uitpas_profile_coupons',
- '#coupons' => $coupons,
- );
- } else {
- return array(
- '#markup' => t('There were no coupons found for this user')
- );
- }
-}
diff --git a/culturefeed_uitpas/includes/profile_details.inc b/culturefeed_uitpas/includes/profile_details.inc
deleted file mode 100644
index 8056752b..00000000
--- a/culturefeed_uitpas/includes/profile_details.inc
+++ /dev/null
@@ -1,258 +0,0 @@
-user && $uitpas_user->passholder && $uitpas_user->card_system) {
-
- /* @var CultureFeed_Uitpas_Passholder $passholder */
- $passholder = $uitpas_user->passholder;
-
- $form['#theme'] = 'culturefeed_uitpas_profile_details_form';
-
- $form['uitpas_user'] = array(
- '#type' => 'value',
- '#value' => $uitpas_user,
- );
-
- $form['first_name'] = array(
- '#default_value' => $passholder->firstName,
- '#disabled' => TRUE,
- '#title' => t('First name'),
- '#type' => 'textfield',
- );
-
- $form['last_name'] = array(
- '#default_value' => $passholder->name,
- '#disabled' => TRUE,
- '#title' => t('Name'),
- '#type' => 'textfield',
- );
-
- // Set date of birth in right timezone
- $default_value = '';
- if (!empty($passholder->dateOfBirth)) {
- $dob = new DateTime();
- $time_zone = new DateTimeZone('Europe/Brussels');
- $dob->setTimestamp($passholder->dateOfBirth);
- $dob->setTimezone($time_zone);
- $default_value = $dob->format('d/m/Y');
- }
- $form['dob'] = array(
- '#default_value' => $default_value,
- '#disabled' => TRUE,
- '#title' => t('Date of birth'),
- '#type' => 'textfield',
- );
-
- $form['pob'] = array(
- '#default_value' => $passholder->placeOfBirth,
- '#disabled' => TRUE,
- '#title' => t('Place of birth'),
- '#type' => 'textfield',
- );
-
- $form['gender'] = array(
- '#default_value' => ($passholder->gender == 'MALE') ? t('Male') : t('Female'),
- '#disabled' => TRUE,
- '#title' => t('Gender'),
- '#type' => 'textfield',
- );
-
- $form['nationality'] = array(
- '#default_value' => $passholder->nationality,
- '#disabled' => TRUE,
- '#title' => t('Nationality'),
- '#type' => 'textfield',
- );
-
- $form['street'] = array(
- '#default_value' => $passholder->street,
- '#disabled' => TRUE,
- '#title' => t('Street'),
- '#type' => 'textfield',
- );
-
- $form['nr'] = array(
- '#default_value' => $passholder->number,
- '#disabled' => TRUE,
- '#title' => t('Nr'),
- '#type' => 'textfield',
- );
-
- $form['zip'] = array(
- '#default_value' => $passholder->postalCode,
- '#disabled' => TRUE,
- '#title' => t('Zip'),
- '#type' => 'textfield',
- );
-
- $form['city'] = array(
- '#default_value' => $passholder->city,
- '#disabled' => TRUE,
- '#title' => t('City'),
- '#type' => 'textfield',
- );
-
- $form['tel'] = array(
- '#default_value' => $passholder->telephone,
- '#title' => t('Telephone'),
- '#type' => 'textfield',
- );
-
- $form['mobile'] = array(
- '#default_value' => $passholder->gsm,
- '#title' => t('Mobile'),
- '#type' => 'textfield',
- );
-
- $form['email'] = array(
- '#default_value' => $passholder->email,
- '#required' => TRUE,
- '#title' => t('Email'),
- '#type' => 'textfield',
- );
-
- $form['email_description'] = array(
- '#attributes' => array('class' => array('form-item', 'form-item-email-description')),
- '#type' => 'container',
- '#title' => ' ',
- 'markup' => array(
- '#markup' => t('This email address is synchronized with your online account and will be used for all communication regarding @site-name and @card-name.', array('@edit-account' => url('culturefeed/account/edit'), '@site-name' => variable_get('site_name', 'this website'), '@card-name' => variable_get('culturefeed_uitpas_card_name', 'UiTPAS'))),
- ),
- );
-
- $form['actions'] = array(
- '#type' => 'actions',
- 'submit' => array(
- '#value' => t('Save'),
- '#type' => 'submit',
- ),
- );
-
- }
-
- return $form;
-
-}
-
-/**
- * Validation handler for culturefeed_uitpas_profile_details_form().
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_uitpas_profile_details_form_validate(array $form, array &$form_state) {
-
- if (!empty($form_state['values']['email']) && !valid_email_address($form_state['values']['email'])) {
- form_set_error('email', t('Invalid e-mail address'));
- }
-
-}
-
-/**
- * Submit handler for culturefeed_uitpas_profile_details_form().
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_uitpas_profile_details_form_submit(array $form, array &$form_state) {
-
- $uitpas_user = $form_state['values']['uitpas_user'];
- /* @var CultureFeed_User $culturefeed_user */
- $culturefeed_user = $uitpas_user->user;
- /* @var CultureFeed_Uitpas_Passholder $passholder */
- $passholder = $uitpas_user->passholder;
- /* @var CultureFeed_Uitpas_Passholder_CardSystemSpecific $card_system */
- $card_system = $uitpas_user->card_system;
-
- $error = FALSE;
-
- if ($uitpas_user->user && $uitpas_user->passholder && $uitpas_user->card_system) {
-
- // Passholder.
- $passholder_update = new CultureFeed_Uitpas_Passholder();
- $passholder_update->uitpasNumber = $card_system->currentCard->uitpasNumber;
- $passholder_update->email = $form_state['values']['email'];
- if ($form_state['values']['tel']) {
- $passholder_update->telephone = $form_state['values']['tel'];
- }
- if ($form_state['values']['mobile']) {
- $passholder_update->gsm = $form_state['values']['mobile'];
- }
-
- try {
- $uitpas_user->cf->uitpas()->updatePassholder($passholder_update);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_profile_details_uitpas', $e);
- $error = TRUE;
- }
-
- // CultureFeed user.
- $culturefeed_user_update = new CultureFeed_User();
- $culturefeed_user_update->id = $culturefeed_user->id;
- $culturefeed_user_update->mbox = $form_state['values']['email'];
-
- try {
- DrupalCultureFeed::updateUser($culturefeed_user_update);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_profile_details_account', $e);
- $error = TRUE;
- }
-
- }
-
- else {
- $error = TRUE;
- }
-
- if ($error) {
- drupal_set_message(t('An error occurred.'), 'error');
- }
- else {
- drupal_set_message(t('Your changes have been saved.'));
- }
-
-}
-
-/**
- * Returns profile details.
- */
-function culturefeed_uitpas_profile_details_get() {
-
- $uitpas_user = culturefeed_uitpas_get_uitpas_user();
-
- if ($uitpas_user->user && $uitpas_user->passholder) {
-
- return array(
- '#theme' => 'culturefeed_uitpas_profile_details',
- '#uitpas_user' => $uitpas_user,
- );
-
- }
-
-}
-
-/**
- * Title callback for the uitpas profile page.
- */
-function culturefeed_uitpas_profile_title() {
-
- return t('My UiTPAS');
-
-}
diff --git a/culturefeed_uitpas/includes/profile_memberships.inc b/culturefeed_uitpas/includes/profile_memberships.inc
deleted file mode 100644
index 591a2df8..00000000
--- a/culturefeed_uitpas/includes/profile_memberships.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-user && $uitpas_user->passholder) {
- $memberships = culturefeed_uitpas_get_passholder_memberships($uitpas_user);
- }
-
- if (count($memberships) > 0) {
- return theme('culturefeed_uitpas_memberships', array('memberships' => $memberships));
- }
- else {
- return array(
- '#markup' => t('There were no memberships found for this user')
- );
- }
-}
\ No newline at end of file
diff --git a/culturefeed_uitpas/includes/profile_promotions.inc b/culturefeed_uitpas/includes/profile_promotions.inc
deleted file mode 100644
index 0b80d73e..00000000
--- a/culturefeed_uitpas/includes/profile_promotions.inc
+++ /dev/null
@@ -1,178 +0,0 @@
-user && $uitpas_user->passholder) {
-
- /* @var \CultureFeed_Uitpas_Passholder $passholder */
- $passholder = $uitpas_user->passholder;
-
- // Promotions.
- try {
-
- $query = new CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions();
- $query->cashingPeriodBegin = time();
- $query->unexpired = TRUE;
- $query->filterOnUserPoints = TRUE;
- $query->uid = $passholder->uitIdUser->id;
-
- if ($filter) {
- if (strpos($filter, '+') === FALSE) {
- $query->owningCardSystemId = $filter;
- }
- else {
- $query->applicableCardSystemId = array_slice(explode('+', $filter), 1);
- }
- }
- $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
- if ($card_system_id) {
- $query->orderByOwningCardSystemId = $card_system_id;
- }
- $query->sort = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::SORT_POINTS;
-
- $query->order = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::ORDER_ASC;
-
- $query->start = $promotions_page * $promotions_max;
- $query->max = $promotions_max;
- $result = $uitpas_user->cf->uitpas()->getPromotionPoints($query);
- $promotions = $result->objects;
- pager_default_initialize($result->total, $promotions_max);
- $promotions_total = $result->total;
-
- }
- catch (Exception $e) {
-
- watchdog_exception('culturefeed_uitpas_profile_promotions', $e);
- pager_default_initialize(0, $promotions_max);
-
- }
-
- // Title.
- drupal_set_title(t('My promotions'), PASS_THROUGH);
-
- }
-
- // Solution csdco on from https://www.drupal.org/node/1049354
- $_GET['q'] = 'culturefeed/profile/uitpas/promotions';
-
- return array(
- array(
- '#theme' => 'culturefeed_uitpas_profile_promotions',
- '#promotions' => $promotions,
- '#promotions_total' => $promotions_total,
- '#promotions_pager_min' => ($promotions_page * $promotions_max) + 1,
- '#promotions_pager_max' => ($promotions_page * $promotions_max) + $promotions_max,
- ),
- array(
- '#theme' => 'pager',
- '#parameters' => array('filter' => $filter),
- ),
- );
-
-}
-
-/**
- * Returns form elements for profile advantages settings.
- */
-function culturefeed_uitpas_profile_promotions_settings_get(&$form) {
-
- $form['profile_promotions'] = array(
- '#type' => 'fieldset',
- '#title' => t('My UiTPAS promotions settings'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['profile_promotions']['culturefeed_uitpas_profile_promotions_max'] = array(
- '#type' => 'textfield',
- '#title' => t('Number of promotions to display'),
- '#default_value' => variable_get('culturefeed_uitpas_profile_promotions_max', 20),
- );
-
-}
-
-/**
- * Title callback for the profile advantages page.
- */
-function culturefeed_uitpas_profile_promotions_title() {
-
- return t('My promotions');
-
-}
-
-/**
- * Returns form elements for filter & sort on profile promotions page.
- */
-function culturefeed_uitpas_profile_promotions_filter_sort($form, $form_state) {
-
- $form['profile_promotions_link'] = array(
- '#attributes' => array(
- 'id' => 'promotions_link'
- ),
- '#links' => array(
- 'promotions' => array(
- 'href' => 'culturefeed/profile/uitpas/promotions',
- 'title' => t('My Promotions'),
- ),
- 'advantages' => array(
- 'href' => 'culturefeed/profile/uitpas/advantages',
- 'title' => t('Welcome Advantages'),
- ),
- ),
- '#theme' => 'links',
- );
-
- // We can show promotions in other regions than owning card system.
- $other_regions = TRUE;
-
- // Get the card systems for the passholder.
- $options = culturefeed_uitpas_get_user_card_systems_as_options($other_regions);
-
- $id = drupal_html_id('profile-promotions-filter-sort');
- $form['profile_promotions']['#prefix'] = '';
- $form['profile_promotions']["#suffix"] = '
';
-
- $filter = isset($form_state['values']['filter']) ? $form_state['values']['filter'] : (isset($_GET['filter']) ? $_GET['filter'] : NULL);
-
- if (count($options) > 1) {
- $form['profile_promotions']['filter'] = array(
- '#type' => 'radios',
- '#title' => t('Distributed by'),
- '#default_value' => $filter,
- '#empty_option' => t('All card systems'),
- '#options' => $options,
- '#ajax' => array(
- 'event' => 'change',
- 'wrapper' => $id,
- 'callback' => 'culturefeed_uitpas_profile_promotions_ajax_callback',
- ),
- );
- }
-
- $results = culturefeed_uitpas_profile_promotions_get($filter);
- $form['profile_promotions']['result'] = array(
- '#markup' => drupal_render($results),
- );
-
- $form['profile_promotions']['#attached']['css'][] = drupal_get_path('module', 'culturefeed_uitpas') . '/css/culturefeed_uitpas.css';
-
- return $form;
-}
-
-function culturefeed_uitpas_profile_promotions_ajax_callback($form, $form_state) {
- return $form['profile_promotions'];
-}
diff --git a/culturefeed_uitpas/includes/profile_summary.inc b/culturefeed_uitpas/includes/profile_summary.inc
deleted file mode 100644
index e838439c..00000000
--- a/culturefeed_uitpas/includes/profile_summary.inc
+++ /dev/null
@@ -1,138 +0,0 @@
-user && $uitpas_user->passholder) {
-
- $user = $uitpas_user->user;
- // @var CultureFeed_Uitpas_Passholder $passholder.
- $passholder = $uitpas_user->passholder;
- $cf = $uitpas_user->cf;
-
- $advantages = array();
- $promotions = array();
- $upcoming_promotions = array();
-
- $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
-
- // Welcome advantages.
- try {
- $query = new CultureFeed_Uitpas_Passholder_Query_WelcomeAdvantagesOptions();
- $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
- if ($card_system_id &&
- isset($passholder->cardSystemSpecific[$card_system_id]) &&
- isset($passholder->cardSystemSpecific[$card_system_id]->currentCard)) {
- $query->uitpas_number = $passholder->cardSystemSpecific[$card_system_id]->currentCard->uitpasNumber;
- }
- $query->cashedIn = FALSE;
- $query->max = 2;
- if ($card_system_id) {
- $query->owningCardSystemId = $card_system_id;
- }
- $result = $cf->uitpas()->getWelcomeAdvantagesForPassholder($query);
- if ($result->total) {
- $advantages = $result->objects;
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_profile_summary_welcome_advantages', $e);
- }
-
- // Promotions.
- try {
- $query = new CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions();
- $query->maxPoints = $passholder->points;
- $query->cashingPeriodBegin = time();
- $query->sort = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::SORT_POINTS;
- $query->order = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::ORDER_DESC;
- $query->max = 4;
- if ($card_system_id) {
- $query->owningCardSystemId = $card_system_id;
- }
- $query->unexpired = TRUE;
- $result = $cf->uitpas()->getPromotionPoints($query);
- if ($result->total) {
- $promotions = $result->objects;
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_profile_summary_promotions', $e);
- }
-
- // Upcoming promotions.
- try {
- $query = new CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions();
- $query->minPoints = $passholder->points + 1;
- $query->max = 2;
- $query->cashingPeriodBegin = time();
- if ($card_system_id) {
- $query->owningCardSystemId = $card_system_id;
- }
- $query->unexpired = TRUE;
- $query->sort = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::SORT_POINTS;
- $query->order = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::ORDER_ASC;
- $result = $cf->uitpas()->getPromotionPoints($query);
- if ($result->total) {
- $upcoming_promotions = $result->objects;
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_profile_summary_upcoming_promotions', $e);
- }
-
- return array(
- '#theme' => 'culturefeed_uitpas_profile_summary',
- '#uitpas_user' => $user,
- '#passholder' => $passholder,
- '#advantages' => $advantages,
- '#promotions' => $promotions,
- '#upcoming_promotions' => $upcoming_promotions,
- );
-
- }
-
-}
-
-/**
- * Returns form elements for profile summary settings.
- */
-function culturefeed_uitpas_profile_summary_settings_get(&$form) {
-
- $form['promotions_title'] = array(
- '#type' => 'textfield',
- '#title' => t('Title for the promotions'),
- '#default_value' => variable_get('culturefeed_uitpas_profile_summary_promotions_title', t('Your UiTPAS advantages')),
- );
- $form['upcoming_promotions_title'] = array(
- '#type' => 'textfield',
- '#title' => t('Title for the upcoming promotions'),
- '#default_value' => variable_get('culturefeed_uitpas_profile_summary_upcoming_promotions_title', t('Just a few points more for')),
- );
- $form['more_link_text'] = array(
- '#type' => 'textfield',
- '#title' => t('More link text'),
- '#default_value' => variable_get('culturefeed_uitpas_profile_summary_more_link_text', t('Show all my promotions')),
- );
-
-}
-
-/**
- * Saves settings for my uitpas summary.
- */
-function culturefeed_uitpas_profile_summary_settings_save($values) {
-
- variable_set('culturefeed_uitpas_profile_summary_promotions_title', $values['promotions_title']);
- variable_set('culturefeed_uitpas_profile_summary_upcoming_promotions_title', $values['upcoming_promotions_title']);
- variable_set('culturefeed_uitpas_profile_summary_more_link_text', $values['more_link_text']);
-
-}
diff --git a/culturefeed_uitpas/includes/promotion_details.inc b/culturefeed_uitpas/includes/promotion_details.inc
deleted file mode 100644
index 746eca6c..00000000
--- a/culturefeed_uitpas/includes/promotion_details.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-title)) {
- drupal_goto('promotion/' . culturefeed_search_slug($promotion->title) . '/' . $promotion->id, array(), 301);
- }
-
- return array(
- '#promotion' => $promotion,
- '#theme' => 'culturefeed_uitpas_promotion',
- );
-
-}
-
-/**
- * Returns promotion details title.
- */
-function culturefeed_uitpas_promotion_details_title_get($promotion) {
-
- return $promotion->title;
-
-}
diff --git a/culturefeed_uitpas/includes/promotions.inc b/culturefeed_uitpas/includes/promotions.inc
deleted file mode 100644
index dfed28d6..00000000
--- a/culturefeed_uitpas/includes/promotions.inc
+++ /dev/null
@@ -1,270 +0,0 @@
-start = $promotions_page * $promotions_max;
- $query->max = $promotions_max;
- $query->unexpired = TRUE;
- $query->cashingPeriodBegin = time();
- $query->published = TRUE;
- $query->cashInState = array(
- CultureFeed_Uitpas_Passholder_PointsPromotion::CASHIN_POSSIBLE,
- // Also show items that are not any longer in stock.
- CultureFeed_Uitpas_Passholder_PointsPromotion::CASHIN_NOT_POSSIBLE_VOLUME_CONSTRAINT,
- );
- $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
- if ($card_system_id) {
- $query->applicableCardSystemId = $card_system_id;
- }
- if ($filter) {
- $query->owningCardSystemId = $filter;
- }
- $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
- if ($card_system_id) {
- $query->orderByOwningCardSystemId = $card_system_id;
- }
- $query->sort = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::SORT_POINTS;
-
- $query->order = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::ORDER_ASC;
- $result = $cf->uitpas()->getPromotionPoints($query);
-
- $promotions = $result->objects;
- $promotions_total = $result->total;
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_promotions', $e);
- }
-
- $promotions_pager_min = ($promotions_page * $promotions_max) + 1;
- $promotions_pager_max = ($promotions_page * $promotions_max) + $promotions_max;
- if ($promotions_pager_max > $promotions_total) {
- $promotions_pager_max = $promotions_total;
- }
-
- return array(
- '#theme' => 'culturefeed_uitpas_promotions',
- '#promotions' => $promotions,
- '#promotions_total' => $promotions_total,
- '#promotions_pager_min' => $promotions_pager_min,
- '#promotions_pager_max' => $promotions_pager_max,
- );
-
-}
-
-/**
- * Returns form elements for advantages promotions settings.
- */
-function culturefeed_uitpas_promotions_settings_get(&$form) {
-
- $form['promotions'] = array(
- '#type' => 'fieldset',
- '#title' => t('UiTPAS promotions settings'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['promotions']['culturefeed_uitpas_promotions_promotions_max'] = array(
- '#type' => 'textfield',
- '#title' => t('Number of promotions to display'),
- '#default_value' => variable_get('culturefeed_uitpas_promotions_promotions_max', 20),
- );
- $form['promotions']['culturefeed_uitpas_show_advantages_above_promotions']= array(
- '#type' => 'checkbox',
- '#title' => t('Show advantages above the promotions list.'),
- '#default_value' => variable_get('culturefeed_uitpas_show_advantages_above_promotions', TRUE),
- );
- $form['promotions']['culturefeed_uitpas_number_advantages_above_promotions'] = array(
- '#type' => 'select',
- '#title' => t('Number of advantages to show above the promotions list'),
- '#default_value' => variable_get('culturefeed_uitpas_number_advantages_above_promotions', 2),
- '#options' => range(0, 15),
- '#states' => array(
- 'visible' => array(
- ':input[name="culturefeed_uitpas_show_advantages_above_promotions"]' =>array('checked' => TRUE)
- ),
- ),
- );
-
-}
-
-/**
- * Returns form elements for filter & sort on promotions page.
- */
-function culturefeed_uitpas_promotions_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['promotions_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;
- }
- $promotions = culturefeed_uitpas_promotions_get($filter);
-
- $advantages = array();
- if (variable_get('culturefeed_uitpas_show_advantages_above_promotions', TRUE)) {
- module_load_include('inc', 'culturefeed_uitpas', 'includes/advantages');
- $advantages = culturefeed_uitpas_advantages_get($filter);
- }
-
- $id = drupal_html_id('promotions-filter-sort');
-
- $form['promotions']['#prefix'] = "";
- $form['promotions']["#suffix"] = "
";
-
- $promotions_intro = t('This page shows all promotions for which UiTPAS holders can save points.');
-
- if (culturefeed_uitpas_is_passholder()) {
- $promotions_intro .= ' '. t('Discover your personal promotions and points balance.', array('@my-promotions' => url('culturefeed/profile/uitpas/promotions')));
- }
- else {
- $promotions_intro .= ' '. t('Find out where to get an UiTPAS', array('@register-where' => url('register_where')));
- if (!culturefeed_is_culturefeed_user()) {
- $promotions_intro .= ' '. t('or login and register your UiTPAS to discover your personal promotions and points balance.', array('@login' => url('culturefeed/oauth/connect', array('query' => array('destination' => 'register_uitpas')))));
- }
- else {
- $promotions_intro .= '.';
- }
- }
-
- if (trim($promotions_intro)) {
- $form['promotions']['intro']['#markup'] = '' . $promotions_intro . '
';
- }
-
- if ($multiple_card_systems) {
-
- $options = array();
- foreach ($card_systems as $system) {
- $options[$system->id] = $system->name;
- }
-
- $form['promotions']['filter'] = array(
- '#type' => 'radios',
- '#title' => t('Filter by'),
- '#default_value' => isset($filter) ? $filter : 0,
- '#empty_option' => t('All card systems'),
- '#options' => $options,
- '#theme' => 'culturefeed_uitpas_filter_labels',
- '#ajax' => array(
- 'event' => 'change',
- 'wrapper' => $id,
- 'callback' => 'culturefeed_uitpas_promotions_ajax_callback',
- ),
- );
-
- if (isset($filter)) {
- $filter_reset_link = '' . l(t('Show all promotions'), 'promotions', array('attributes' => array('class' => array('reset-filter')))) . '
';
- }
- else {
- $filter_reset_link = '';
- }
-
- $form['promotions']['filter']['#prefix'] = '';
- $form['promotions']['filter']['#suffix'] = $filter_reset_link . '
';
-
- }
-
- $total = $promotions['#promotions_total'];
- if (isset($advantages['#advantages_total'])) {
- $total += $advantages['#advantages_total'];
- }
- $title = t('Found %count promotions', array('%count' => $total));
- $filter_reset_link = l('×', 'promotions', array('attributes' => array('class' => array('reset-filter-inline')), 'html' => TRUE));
- if ($filter && $multiple_card_systems) {
- $form['promotions']['title']['#markup'] = '' . $title . ' ' . $options[$filter] . ' ' . $filter_reset_link . ' ';
- }
- else {
- $form['promotions']['title']['#markup'] = '' . $title . ' ';
- }
-
- // Only show the advantages if the settings allow it.
- // Only show the advantages on the first page.
- if (
- variable_get('culturefeed_uitpas_show_advantages_above_promotions', TRUE) &&
- ((isset($_GET['page']) && $_GET['page'] == 0) || !isset($_GET['page'])) &&
- count($advantages['#advantages'])
- ) {
- $advantages['#advantages'] = array_slice($advantages['#advantages'], 0, variable_get('culturefeed_uitpas_number_advantages_above_promotions', 2));
- $advantages['#advantages_total'] = variable_get('culturefeed_uitpas_number_advantages_above_promotions', 2);
- $form['promotions']['advantages']['#markup'] = theme('culturefeed_uitpas_advantages_table', $advantages);
- $options = array('attributes' => array('class' => 'link-primary'));
- if ($filter) {
- $options['query'] = array('filter' => $filter);
- }
- $form['promotions']['advantages']['#markup'] .= '' . 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'] = '' . t('No results found') . '
';
- }
-
- // Pager.
- $promotions_max = variable_get('culturefeed_uitpas_promotions_promotions_max', 20);
-
- pager_default_initialize($promotions['#promotions_total'], $promotions_max);
-
- // Solution csdco on from https://www.drupal.org/node/1049354#comment-6253362
- $tmp_q = $_GET['q'];
- $_GET['q'] = 'promotions';
- $form['promotions']['pager']['#markup'] = '';
- $_GET['q'] = $tmp_q;
-
- return $form;
-
-}
-
-function culturefeed_uitpas_promotions_ajax_callback($form, $form_state) {
- return $form['promotions'];
-}
-
-/**
- * Title callback for the promotions page.
- */
-function culturefeed_uitpas_promotions_title() {
-
- return t('UiTPAS promotions');
-
-}
diff --git a/culturefeed_uitpas/includes/promotions_highlight.inc b/culturefeed_uitpas/includes/promotions_highlight.inc
deleted file mode 100644
index 1fab4847..00000000
--- a/culturefeed_uitpas/includes/promotions_highlight.inc
+++ /dev/null
@@ -1,76 +0,0 @@
-sort = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::SORT_CASHING_PERIOD_END;
- $query->max = variable_get('culturefeed_uitpas_promotions_highlight_max', 5);
- $query->cashingPeriodBegin = time();
- $query->unexpired = TRUE;
- $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
- if ($card_system_id) {
- $query->owningCardSystemId = $card_system_id;
- }
- if (variable_get('culturefeed_uitpas_feature_implemented_in_spotlight', FALSE)) {
- $query->inSpotlight = TRUE;
- }
- $result = $cf->uitpas()->getPromotionPoints($query);
- if ($result->total) {
- $promotions = $result->objects;
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_block_promotions_highlight', $e);
- }
-
- if (count($promotions)) {
-
- return array(
- '#theme' => 'culturefeed_uitpas_promotions_highlight',
- '#promotions' => $promotions,
- );
-
- }
-
-}
-
-/**
- * Returns form elements for highlighted promotions settings.
- */
-function culturefeed_uitpas_promotions_highlights_settings_get(&$form) {
-
- $form['max'] = array(
- '#type' => 'textfield',
- '#title' => t('Number of promotions to display'),
- '#default_value' => variable_get('culturefeed_uitpas_promotions_highlight_max', 5),
- );
- $form['more_link_text'] = array(
- '#type' => 'textfield',
- '#title' => t('More link text'),
- '#default_value' => variable_get('culturefeed_uitpas_promotions_highlight_more_link_text', t('Show all promotions')),
- );
-
-}
-
-/**
- * Saves settings for highlighted promotions.
- */
-function culturefeed_uitpas_promotions_highlights_settings_save($values) {
-
- variable_set('culturefeed_uitpas_promotions_highlight_max', $values['max']);
- variable_set('culturefeed_uitpas_promotions_highlight_more_link_text', $values['more_link_text']);
-
-}
diff --git a/culturefeed_uitpas/includes/recent_actions.inc b/culturefeed_uitpas/includes/recent_actions.inc
deleted file mode 100644
index 8b8e9dc2..00000000
--- a/culturefeed_uitpas/includes/recent_actions.inc
+++ /dev/null
@@ -1,72 +0,0 @@
-max = variable_get('culturefeed_uitpas_recent_actions_max', 5);
- $card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
- if ($card_system_id) {
- $query->organiserCardSystemId = $card_system_id;
- }
- $result = $cf->uitpas()->searchCheckins($query, NULL, CultureFeed_Uitpas::CONSUMER_REQUEST);
- if ($result->total) {
- $actions = $result->objects;
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_block_recent_actions', $e);
- }
-
- if (count($actions)) {
-
- return array(
- '#theme' => 'culturefeed_uitpas_recent_actions',
- '#actions' => $actions,
- );
-
- }
-
-}
-
-/**
- * Returns form elements for recent actions settings.
- */
-function culturefeed_uitpas_recent_actions_settings_get(&$form) {
-
- $form['max'] = array(
- '#type' => 'textfield',
- '#title' => t('Number of actions to display'),
- '#default_value' => variable_get('culturefeed_uitpas_recent_actions_max', 5),
- );
-
- $form['default_image'] = array(
- '#type' => 'textfield',
- '#title' => t('Default image'),
- '#default_value' => variable_get('culturefeed_uitpas_user_default_image', ''),
- '#description' => t('Use full url or an absolute path.'),
- );
-
-}
-
-/**
- * Saves settings for recent actions.
- */
-function culturefeed_uitpas_recent_actions_settings_save($values) {
-
- variable_set('culturefeed_uitpas_recent_actions_max', $values['max']);
- variable_set('culturefeed_uitpas_user_default_image', $values['default_image']);
-
-}
diff --git a/culturefeed_uitpas/includes/register_where.inc b/culturefeed_uitpas/includes/register_where.inc
deleted file mode 100644
index f31203c1..00000000
--- a/culturefeed_uitpas/includes/register_where.inc
+++ /dev/null
@@ -1,197 +0,0 @@
-start = $pos_page * $pos_max;
- $query->max = $pos_max;
- $query->visible = 'true';
-
- if ($card_system_id != 'all') {
- $query->cardSystemId = $card_system_id;
- }
- elseif ($card_systems) {
- $card_systems_ids = array();
- foreach ($card_systems as $card_system) {
- $card_systems_ids[] = $card_system->id;
- }
- $query->cardSystemId = $card_systems_ids;
- }
- $query->groupName = array(
- CultureFeed_Uitpas_Counter_Query_SearchCounterOptions::GROUP_AUTHORIZED,
- );
- if (!$kansenstatuut) {
- $query->groupName[] = CultureFeed_Uitpas_Counter_Query_SearchCounterOptions::GROUP_NOT_AUTHORIZED;
- }
- if ($location != 'all') {
- $query->city = $location;
- }
-
- $result = $cf->uitpas()->searchCounters($query);
-
- if ($result->total) {
-
- $pos = $result->objects;
- $pos_total = $result->total;
- pager_default_initialize($result->total, $pos_max, 0);
-
- foreach ($result->objects as $object) {
-
- $actor = culturefeed_agenda_actor_load($object->id);
- if ($actor) {
- $actors[$object->id] = $actor;
- }
-
- }
-
- }
-
- }
- catch (Exception $e) {
-
- watchdog_exception('uitpas_ui_content_type_register_where', $e);
- pager_default_initialize(0, $pos_max, 0);
-
- }
-
- // Form.
- $filters = drupal_get_form('culturefeed_uitpas_register_where_filter_form');
-
- return array(
- '#theme' => 'culturefeed_uitpas_register_where',
- '#pos' => $pos,
- '#pos_pager_element' => $pos_pager_element,
- '#pos_total' => $pos_total,
- '#filters' => drupal_render($filters),
- '#actors' => $actors,
- );
-
-}
-
-/**
- * Returns form elements for profile summary settings.
- */
-function culturefeed_uitpas_register_where_settings_get(&$form) {
-
- $form['register_where'] = array(
- '#type' => 'fieldset',
- '#title' => t('UiTPAS register where settings'),
- '#collapsible' => TRUE,
- '#collapsed' => TRUE,
- );
- $form['register_where']['culturefeed_uitpas_register_where_pos_max'] = array(
- '#type' => 'textfield',
- '#title' => t('Number of points of sale to display'),
- '#default_value' => variable_get('culturefeed_uitpas_register_where_pos_max', 10),
- );
-
-}
-
-/**
- * Title callback for the register where page.
- */
-function culturefeed_uitpas_register_where_title() {
-
- return t('Get your UiTPAS');
-
-}
-
-/**
- * Form builder for the POS filters.
- */
-function culturefeed_uitpas_register_where_filter_form($form, $form_state) {
-
- $multiple_card_systems = culturefeed_uitpas_multiple_cardsystems();
-
- if ($multiple_card_systems) {
- // Use card system regions as filter when multiple card sytems are enabled
- $options = array('all' => t('All regions'));
- $card_systems = culturefeed_uitpas_get_card_systems();
- foreach ($card_systems as $card_system) {
- $options[$card_system->id] = $card_system->name;
- }
- $default_value = isset($_GET['region']) ? $_GET['region'] : '';
-
- $form['region'] = array(
- '#type' => 'select',
- '#title' => t('UiTPAS Region'),
- '#options' => $options,
- '#default_value' => $default_value,
- );
- }
-
- else {
- // Use custom UiTPAS locations as filter when only one card sytem is enabled
- $locations = variable_get('culturefeed_uitpas_locations');
- $location = culturefeed_uitpas_get_uitpas_location();
- $options = array('all' => t('All')) + drupal_map_assoc($locations);
- $form['location'] = array(
- '#type' => 'select',
- '#title' => t('City'),
- '#options' => $options,
- '#default_value' => $location,
- );
- }
-
- $form['kansenstatuut'] = array(
- '#type' => 'checkbox',
- '#title' => t('I have a kansenstatuut'),
- '#default_value' => isset($_GET['kansenstatuut']) ? $_GET['kansenstatuut'] : 0,
- );
-
- $form['actions'] = array(
- 'submit' => array(
- '#type' => 'submit',
- '#value' => t('Search'),
- ),
- );
-
- return $form;
-
-}
-
-/**
- * Submit handler for culturefeed_uitpas_register_where_filter_form.
- */
-function culturefeed_uitpas_register_where_filter_form_submit($form, &$form_state) {
-
- $query = array();
- if (isset($form_state['values']['location'])) {
- $query['uitpas_location'] = $form_state['values']['location'];
- }
- if (isset($form_state['values']['region'])) {
- $query['region'] = $form_state['values']['region'];
- }
- if (isset($form_state['values']['kansenstatuut'])) {
- $query['kansenstatuut'] = $form_state['values']['kansenstatuut'];
- }
-
- $form_state['redirect'] = array(current_path(), array('query' => $query));
-
-}
diff --git a/culturefeed_uitpas/includes/registration_confirmation.inc b/culturefeed_uitpas/includes/registration_confirmation.inc
deleted file mode 100644
index 285dce00..00000000
--- a/culturefeed_uitpas/includes/registration_confirmation.inc
+++ /dev/null
@@ -1,100 +0,0 @@
-user->id, 'cache_culturefeed');
- cache_clear_all('culturefeed:uitpas:passholders:' . $uitpas_user->user->mbox, 'cache_culturefeed');
-
- return array(
- 'intro' => array(
- '#type' => 'markup',
- '#markup' => t('You can now manage your points balance and personal promotions'),
- ),
- 'form' => drupal_get_form('culturefeed_uitpas_registration_confirmation_form', $uitpas_user->user, $uitpas_user->cf),
- );
-
-}
-
-/**
- * Form constructor for the registration confirmation form.
- */
-function culturefeed_uitpas_registration_confirmation_form($form, &$form_state, $uitpas_user, $cf) {
-
- form_load_include($form_state, 'inc', 'culturefeed_uitpas', 'includes/registration_confirmation.inc');
-
- $form['uitpas_user'] = array(
- '#type' => 'value',
- '#value' => $uitpas_user,
- );
- $form['cf'] = array(
- '#type' => 'value',
- '#value' => $cf,
- );
-
- $form['publish_actions'] = array(
- '#type' => 'checkbox',
- '#title' => t('Make my UiTPAS actions available for others'),
- '#default_value' => 1,
- );
-
- $form['actions'] = array(
- 'submit' => array(
- '#type' => 'submit',
- '#value' => t('Confirm'),
- ),
- );
-
- $form['#suffix'] = l(t('Complete your profile'), 'culturefeed/profile/edit');
-
- return $form;
-
-}
-
-/**
- * Submit handler for culturefeed_uitpas_registration_confirmation_form().
- */
-function culturefeed_uitpas_registration_confirmation_form_submit(&$form, &$form_state) {
-
- try {
-
- $uitpas_user = $form_state['values']['uitpas_user'];
- $cf = $form_state['values']['cf'];
-
- // Preferences.
- $preferences = new CultureFeed_Preferences();
- $private = ($form_state['values']['publish_actions']) ? FALSE : TRUE;
- $preference = new CultureFeed_ActivityPrivacyPreference(CultureFeed_Activity::TYPE_UITPAS, $private);
- $preferences->activityPrivacyPreferences[] = $preference;
- $cf->setUserPreferences($uitpas_user->id, $preferences);
-
- // Form.
- drupal_set_message(t('Your changes have been saved.'));
- $form_state['redirect'] = 'culturefeed/profile/edit';
-
- }
- catch (Exception $e) {
-
- watchdog_exception('culturefeed_uitpas_registration_confirmation', $e);
- drupal_set_message(t('An error occured.'), 'error');
-
- }
-
-}
-
-/**
- * Title callback for the registration confirmation page.
- */
-function culturefeed_uitpas_registration_confirmation_title() {
- return t('Your UiTPAS is registered');
-}
diff --git a/culturefeed_uitpas/includes/reminder.inc b/culturefeed_uitpas/includes/reminder.inc
deleted file mode 100644
index 49ae01dd..00000000
--- a/culturefeed_uitpas/includes/reminder.inc
+++ /dev/null
@@ -1,33 +0,0 @@
- $new_state,
- );
-
- user_cookie_save($values);
-
- $referrer = $_SERVER['HTTP_REFERER'];
-
- if (!$referrer) {
- $referrer = '';
- }
- drupal_goto($referrer);
-}
diff --git a/culturefeed_uitpas/includes/synchronization.inc b/culturefeed_uitpas/includes/synchronization.inc
deleted file mode 100644
index 4b72df04..00000000
--- a/culturefeed_uitpas/includes/synchronization.inc
+++ /dev/null
@@ -1,154 +0,0 @@
- 'container',
- '#attributes' => array(
- 'id' => 'uitpas-synchronize-confirmation'
- ),
- 'text' => array(
- '#markup' => t('Can we use your UiTPAS data to complete your profile?'),
- ),
- );
-
- $form['actions'] = array(
- '#type' => 'actions',
- 'yes' => array(
- '#name' => 'yes',
- '#type' => 'submit',
- '#value' => t('Yes'),
- ),
- 'no' => array(
- '#name' => 'no',
- '#type' => 'submit',
- '#value' => t('No'),
- ),
-
- );
-
- return $form;
-
-}
-
-/**
- * Submit handler for culturefeed_uitpas_synchronize_form().
- *
- * @param array $form
- * The form.
- * @param array $form_state
- * The form state.
- */
-function culturefeed_uitpas_synchronization_form_submit($form, &$form_state) {
-
- $trigger = '';
- if (isset($form_state['triggering_element']['#parents'][0])) {
- $trigger = $form_state['triggering_element']['#parents'][0];
- }
-
- if ($trigger == 'yes') {
- culturefeed_uitpas_synchronization_synchronize();
- }
-
- $form_state['redirect'] = 'culturefeed/profile/edit';
-
-}
-
-/**
- * Synchronizes the UiTPAS data to the UiTid user.
- */
-function culturefeed_uitpas_synchronization_synchronize() {
-
- $uitpas_user = culturefeed_uitpas_get_uitpas_user();
- /* @var CultureFeed_User $culturefeed_user */
- $culturefeed_user = $uitpas_user->user;
- /* @var CultureFeed_Uitpas_Passholder $passholder */
- $passholder = $uitpas_user->passholder;
- $error = FALSE;
-
- if ($uitpas_user->user && $uitpas_user->passholder) {
-
- $culturefeed_user_update = new CultureFeed_User();
- $culturefeed_user_update->id = $culturefeed_user->id;
- $culturefeed_user_update->familyName = $passholder->name;
- $culturefeed_user_update->givenName = $passholder->firstName;
- $culturefeed_user_update->street = $passholder->street;
- $culturefeed_user_update->zip = $passholder->postalCode;
- $culturefeed_user_update->city = $passholder->city;
- $belgian_nationalities = array(
- 'belg', 'belgisch', 'belgische',
- );
- if (in_array(strtolower($passholder->nationality), $belgian_nationalities)) {
- $culturefeed_user_update->country = 'BE';
- }
- $culturefeed_user_update->dob = $passholder->dateOfBirth;
- $culturefeed_user_update->gender = strtolower($passholder->gender);
-
- try {
- DrupalCultureFeed::updateUser($culturefeed_user_update);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_uitpas_synchronization', $e);
- $error = TRUE;
- }
-
- }
-
- else {
- $error = TRUE;
- }
-
- if ($error) {
- drupal_set_message(t('An error occurred.'), 'error');
- }
- else {
-
- if (module_exists('culturefeed_ui')) {
-
- /* @var CultureFeed_User $culturefeed_user */
- $message = culturefeed_ui_profile_edit_message($culturefeed_user);
- drupal_set_message($message);
-
- }
- else {
- drupal_set_message(t('Your changes have been saved.'));
- }
-
- }
-
-}
-
-/**
- * Title callback for the synchronization page.
- */
-function culturefeed_uitpas_synchronization_title() {
-
- return t('Update personal data');
-
-}
diff --git a/culturefeed_uitpas/includes/user_register.inc b/culturefeed_uitpas/includes/user_register.inc
deleted file mode 100644
index a9b178c9..00000000
--- a/culturefeed_uitpas/includes/user_register.inc
+++ /dev/null
@@ -1,230 +0,0 @@
-user)) {
- if ($uitpas_user->user->givenName && $uitpas_user->user->familyName) {
- $username_to_use = $uitpas_user->user->givenName . ' ' . $uitpas_user->user->familyName;
- }
- else {
- $username_to_use = $uitpas_user->user->nick;
- }
- }
- else {
- $username_to_use = '';
- }
-
- form_load_include($form_state, 'inc', 'culturefeed_uitpas', 'includes/user_register');
-
- $prefix = '' . t('Register your UiTPAS') . ' ';
- $prefix .= t('Register here, so you can follow your UiTPAS advantages and points balance online.');
-
- $form['prefix']['#markup'] = $prefix;
- $form['link'] = array(
- '#type' => 'value',
- );
- if (!empty($username_to_use)) {
- $form['username'] = array(
- '#type' => 'textfield',
- '#title' => t('Username'),
- '#value' => $username_to_use,
- '#disabled' => TRUE,
- );
- }
- $form['uitpasnumber'] = array(
- '#type' => 'textfield',
- '#title' => t('UiTPAS number'),
- '#required' => TRUE,
- );
-
- // Set date of birth in right timezone
- if (!empty($uitpas_user->user->dob)) {
- $dob = new DateTime();
- $time_zone = new DateTimeZone('Europe/Brussels');
- $dob->setTimestamp($uitpas_user->user->dob);
- $dob->setTimezone($time_zone);
- $default_year = $dob->format('Y');
- $default_month = $dob->format('n');
- $default_day = $dob->format('j');
- }
-
- $now = time();
- $form['dob'] = array(
- '#type' => 'date',
- '#title' => t('Date of birth'),
- '#after_build' => array('culturefeed_uitpas_user_register_form_process_year'),
- '#default_value' => array(
- 'year' => isset($default_year) ? $default_year : date('Y', $now),
- 'month' => isset($default_month) ? $default_month : date('n', $now),
- 'day' => isset($default_day) ? $default_day : date('j', $now),
- ),
- '#required' => TRUE,
- );
- $form['actions'] = array(
- '#type' => 'actions',
- 'submit' => array(
- '#type' => 'submit',
- '#value' => t('Register UiTPAS'),
- ),
- );
-
- if ($_GET['q'] != 'register_uitpas' && !$uitpas_user->user) {
-
- $args = array('@url' => url('authenticated?destination=register_uitpas'));
- $form['suffix']['#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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-advantages-promotions.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-advantages-promotions.tpl.php
deleted file mode 100644
index 6d880b6b..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-advantages-promotions.tpl.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-advantages-table.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-advantages-table.tpl.php
deleted file mode 100644
index a3eba7db..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-advantages-table.tpl.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-advantages.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-advantages.tpl.php
deleted file mode 100644
index ade5b007..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-advantages.tpl.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-event-details-advantages.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-event-details-advantages.tpl.php
deleted file mode 100644
index c986eae7..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-event-details-advantages.tpl.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-filter-labels.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-filter-labels.tpl.php
deleted file mode 100644
index 0d900fe4..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-filter-labels.tpl.php
+++ /dev/null
@@ -1,3 +0,0 @@
->
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-memberships.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-memberships.tpl.php
deleted file mode 100644
index c19e7e97..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-memberships.tpl.php
+++ /dev/null
@@ -1,19 +0,0 @@
- $membership_per_card_system):
-?>
-
-
-
-
-
-
-
-
- name; ?>
- endDate); ?>
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-my-uitpas-profile-box-item.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-my-uitpas-profile-box-item.tpl.php
deleted file mode 100644
index 076257c9..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-my-uitpas-profile-box-item.tpl.php
+++ /dev/null
@@ -1 +0,0 @@
- - ptn
\ No newline at end of file
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-actions.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-profile-actions.tpl.php
deleted file mode 100644
index 56d4fbe5..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-actions.tpl.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-advantages.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-profile-advantages.tpl.php
deleted file mode 100644
index 9316a217..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-advantages.tpl.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-coupons.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-profile-coupons.tpl.php
deleted file mode 100644
index 2d175694..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-coupons.tpl.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- $coupons_per_cardSystem): ?>
-
-
-
-
-
-
-
-
- Geldig tot:
-
-
- Beschikbaar:
-
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-details-form.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-profile-details-form.tpl.php
deleted file mode 100644
index 429c64c6..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-details-form.tpl.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-details.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-profile-details.tpl.php
deleted file mode 100644
index 50982ba9..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-details.tpl.php
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-promotions.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-profile-promotions.tpl.php
deleted file mode 100644
index 5f128b7f..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-promotions.tpl.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-section-register.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-profile-section-register.tpl.php
deleted file mode 100644
index 9f046f6a..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-section-register.tpl.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-section.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-profile-section.tpl.php
deleted file mode 100644
index 575505dc..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-section.tpl.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- :
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-summary.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-profile-summary.tpl.php
deleted file mode 100644
index 92f44d68..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-profile-summary.tpl.php
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-promotion.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-promotion.tpl.php
deleted file mode 100644
index fec49194..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-promotion.tpl.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-promotions-highlight.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-promotions-highlight.tpl.php
deleted file mode 100644
index e9448128..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-promotions-highlight.tpl.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-promotions-table.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-promotions-table.tpl.php
deleted file mode 100644
index a629391f..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-promotions-table.tpl.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-promotions.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-promotions.tpl.php
deleted file mode 100644
index 808b6edb..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-promotions.tpl.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-recent-actions.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-recent-actions.tpl.php
deleted file mode 100644
index e3e8f9a3..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-recent-actions.tpl.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-register-cta.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-register-cta.tpl.php
deleted file mode 100644
index f2f41411..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-register-cta.tpl.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
diff --git a/culturefeed_uitpas/theme/culturefeed-uitpas-register-where.tpl.php b/culturefeed_uitpas/theme/culturefeed-uitpas-register-where.tpl.php
deleted file mode 100644
index 8b0a3f57..00000000
--- a/culturefeed_uitpas/theme/culturefeed-uitpas-register-where.tpl.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
diff --git a/culturefeed_uitpas/theme/theme.inc b/culturefeed_uitpas/theme/theme.inc
deleted file mode 100644
index 779da301..00000000
--- a/culturefeed_uitpas/theme/theme.inc
+++ /dev/null
@@ -1,989 +0,0 @@
-pictures)) {
- foreach ($advantage->pictures as &$picture) {
- $picture = str_replace('http://', '//', $picture);
- }
- }
-
- // Image.
- $vars['image'] = '';
- $vars['image2'] = '';
- $vars['images_list'] = '';
- $images = array();
- if (isset($advantage->pictures[0])) {
- $vars['image'] = theme_image(array('path' => $advantage->pictures[0], 'alt' => $advantage->title, 'title' => $advantage->title, 'attributes' => array()));
- foreach ($advantage->pictures as $key => $picture) {
- $images[] = l(
- theme('image', array('path' => $advantage->pictures[$key] . '?maxwidth=300&max-height=300', 'alt' => $advantage->title, 'title' => $advantage->title, 'attributes' => array())),
- $advantage->pictures[$key],
- array('html' => TRUE)
- );
- }
- $vars['images_list'] = theme('item_list', array('items' => $images));
- }
- if (isset($advantage->pictures[1])) {
- $vars['image2'] = theme_image(array('path' => $advantage->pictures[1], 'alt' => $advantage->title, 'title' => $advantage->title, 'attributes' => array()));
- }
-
- // Get the counters information.
- $counters = array(
- '#theme' => 'item_list',
- '#type' => 'ul',
- '#items' => array(),
- );
- foreach ($advantage->counters as $counter) {
- $counters['#items'][] = l($counter->name, 'agenda/a/' . culturefeed_search_slug($counter->name) . '/' . $counter->id);
- }
- $vars['counters'] = count($counters['#items']) ? drupal_render($counters) : '';
-
- // Period.
- $period = '';
- $now = time();
- if ($advantage->cashingPeriodBegin && $advantage->cashingPeriodBegin > $now) {
- $period = t('From !date', array('!date' => date('j/m/Y', $advantage->cashingPeriodBegin))) . ' ';
- if ($advantage->cashingPeriodEnd) {
- $period .= t('until !date', array('!date' => date('j/m/Y', $advantage->cashingPeriodEnd)));
- }
- }
- else if ($advantage->cashingPeriodEnd) {
- $period .= t('Until !date', array('!date' => date('j/m/Y', $advantage->cashingPeriodEnd)));
- }
- else {
- $period = t('Until end of stock');
- }
- $vars['period'] = $period;
-
- // Provider.
- $vars['provider'] = '';
- if (isset($advantage->owningCardSystem->name)) {
- $vars['provider'] = t('Provided by @provider', array('@provider' => culturefeed_uitpas_cardsystem_name($advantage->owningCardSystem)));
- $vars['provider_raw'] = culturefeed_uitpas_cardsystem_name($advantage->owningCardSystem);
- }
-
- // Availability.
- $vars['available'] = '';
- if (count($advantage->validForCities)) {
-
- $valid_for_cities = $advantage->validForCities;
- asort($valid_for_cities);
- $list = array(
- 'title' => t('Only available for'),
- 'attributes' => array(),
- 'type' => 'ul',
- 'items' => $valid_for_cities,
- );
- $vars['available'] = theme_item_list($list);
-
- }
-
- // Description1.
- $vars['description1'] = '';
- if ($advantage->description1) {
- $vars['description1'] = $advantage->description1;
- }
-
- // Description2.
- $vars['description2'] = '';
- if ($advantage->description2) {
- $vars['description2'] = $advantage->description2;
- }
-
- drupal_add_css(drupal_get_path('module', 'culturefeed_uitpas') . '/css/promotion_advantage.css');
- drupal_add_js(drupal_get_path('module', 'culturefeed_uitpas') . '/js/script.js');
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_advantages().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_advantages(&$vars) {
-
- // Advantages.
- $vars['advantages_table'] = theme('culturefeed_uitpas_advantages_table', $vars);
-
- // Info.
- $vars['info'] = t('This page shows all advantages for which UiTPAS holders can save points.');
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_profile_advantages().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_profile_advantages(&$vars) {
-
- // Advantages.
- $total = $vars['advantages_total'];
- $vars['page_elements'] = t('Found %count advantages', array('%count' => $total));
- $vars['profile_advantages_table'] = theme('culturefeed_uitpas_advantages_table', $vars);
-
- // Info.
- $vars['info'] = t('This page only shows the advantages that you didn\'t receive yet.') . ' ';
- $vars['info'] .= t('Discover all advantages that are currently available for new UiTPAS holders.', array('@all-advantages' => url('advantages')));
-
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_promotions().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_promotions(&$vars) {
-
- // Page elements.
- $vars['page_elements'] = t('@min - @max of @total promotions',
- array(
- '@min' => $vars['promotions_pager_min'],
- '@max' => $vars['promotions_pager_max'],
- '@total' => $vars['promotions_total']
- )
- );
-
- // Promotions.
- $vars['promotions_table'] = theme('culturefeed_uitpas_promotions_table', $vars);
-
- // Info.
- $vars['info'] = t('This page shows all promotions for which UiTPAS holders can save points.');
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_profile_promotions().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_profile_promotions(&$vars) {
-
- // Page elements.
- $min = $vars['promotions_pager_min'];
- $max = $vars['promotions_pager_max'];
- $total = $vars['promotions_total'];
- $vars['page_elements'] = t('Found %count promotions', array('%count' => $total));
-
- // Promotions.
- $vars['profile_promotions_table'] = theme('culturefeed_uitpas_promotions_table', $vars);
-
- // Info.
- $vars['info'] = t('This page only shows the promotions you can get with your current points balance') . ' ';
- $vars['info'] .= t('Discover all promotions you can save for.', array('@all-promotions' => url('promotions')));
-
- // User points.
- $uitpas_user = culturefeed_uitpas_get_uitpas_user();
- $vars['passholder'] = $uitpas_user->passholder;
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_profile_actions().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_profile_actions(&$vars) {
-
- $activities = $vars['activities'];
-
- $table = array(
- 'attributes' => array(),
- 'caption' => '',
- 'colgroups' => array(),
- 'sticky' => '',
- 'empty' => '',
- );
-
- // Intro.
- $vars['intro'] = t('This page shows an overview of all your UiTPAS actions');
-
- // Actions.
- $header = array(t('Date'), t('Action'), t('Points'));
- $rows = array();
- if (count($activities)) {
-
- foreach ($activities as $activity) {
-
- /* @var \CultureFeed_Activity $activity */
- $action = culturefeed_get_human_readable_activity_type($activity->type);
- $action .= '' . $activity->nodeTitle . ' ';
- if ($activity->createdVia) {
- $action .= ' ' . t('at @location', array('@location' => $activity->createdVia));
- }
-
- // Points.
- $singular = t('@formatted_count point');
- $plural = t('@formatted_count points');
- $formatted_count = number_format($activity->points, 2, ',', '.');
- if ($activity->points > 0) {
- $formatted_count = '+' . $formatted_count;
- }
- $points = '' . format_plural($activity->points, $singular, $plural, array('@formatted_count' => $formatted_count)) . ' ';
-
- $rows[] = array(
- date('j/m/Y', $activity->creationDate) . ' ' . date('H:i', $activity->creationDate),
- $action,
- $points,
- );
-
- }
-
- }
- else {
- $rows[] = array(array('data' => t('No results found.'), 'colspan' => 4));
- }
-
- $table += array('header' => $header, 'rows' => $rows);
- $vars['actions_table'] = theme_table($table);
-
- // Publish actions form.
- $vars['activity_preferences_form'] = '';
- $uitpas_user = culturefeed_uitpas_get_uitpas_user();
- if ($uitpas_user->user) {
- $form = drupal_get_form('culturefeed_uitpas_activity_preferences_form');
- $vars['activity_preferences_form'] = drupal_render($form);
- }
-
-}
-
-/**
- * Implements hook_preprocess_preprocess_culturefeed_uitpas_profile_coupons().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_profile_coupons(&$vars) {
- $coupons = array();
-
- foreach ($vars['coupons'] as $key => $coupons_per_cardSystem) {
-
- foreach ($coupons_per_cardSystem as $coupon) {
- $newCoupon = array();
- $newCoupon['id'] = $coupon->id;
- $newCoupon['name'] = $coupon->name;
- $newCoupon['description'] = $coupon->description;
- if ($coupon->validTo !== NULL) {
- $newCoupon['validTo'] = date('d/m/Y', $coupon->validTo);
- }
- if ($coupon->remainingTotal->volume !== NULL) {
- $type = strtolower($coupon->remainingTotal->type);
- if ($type == 'day') {
- $t_type = t('day');
- }
- else {
- if ($type == 'week') {
- $t_type = t('week');
- }
- else {
- if ($type == 'month') {
- $t_type = t('month');
- }
- else {
- if ($type == 'quarter') {
- $t_type = t('quarter');
- }
- else {
- if ($type == 'year') {
- $t_type = t('year');
- }
- else {
- $t_type = '';
- }
- }
- }
- }
- }
- $t_vars = array(
- '@volume' => $coupon->remainingTotal->volume,
- '@type' => $t_type,
- '@turn' => ($coupon->remainingTotal->volume > 1 ? t('turns') : t('turn'))
- );
- if ($coupon->remainingTotal->type == 'ABSOLUTE') {
- $newCoupon['remaining'] = t('@volume @turn', $t_vars);
- }
- else {
- $newCoupon['remaining'] = t('@volume @turn this @type', $t_vars);
- }
- }
- $coupons[$key][] = $newCoupon;
- }
- }
-
- unset($vars['coupons']);
- $vars['coupons'] = $coupons;
-
- drupal_add_css(drupal_get_path('module', 'culturefeed_uitpas') . '/css/coupons.css');
-}
-
-/**
- * Implements hook_preprocess_preprocess_culturefeed_uitpas_profile_details().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_profile_details(&$vars) {
-
- $uitpas_user = $vars['uitpas_user'];
- // @codingStandardsIgnoreStart
- /** @var CultureFeed_Uitpas_Passholder $passholder */
- // @codingStandardsIgnoreEnd
- $passholder = $uitpas_user->passholder;
-
- // Intro.
- $vars['intro'] = t('This page shows the UiTPAS card(s) you own and the personal information that has been registered when buying your card.');
-
- // Card numbers.
- $uitpas_numbers = array(
- 'items' => array(),
- 'type' => 'ul',
- 'attributes' => array(),
- 'title' => '',
- );
- foreach ($passholder->cardSystemSpecific as $card_system_specific) {
-
- if (isset($card_system_specific->currentCard->uitpasNumber)) {
-
- $output = $card_system_specific->currentCard->uitpasNumber . ' (' . $card_system_specific->cardSystem->name . ')';
- if ($card_system_specific->kansenStatuut && time() < $card_system_specific->kansenStatuutEndDate) {
- $status_end_date = t('valid till !date', array('!date' => date('j/m/Y', $card_system_specific->kansenStatuutEndDate)));
- $output .= '' . t('Opportunity status') . ': ' . $status_end_date;
- }
- $uitpas_numbers['items'][] = $output;
-
- }
-
- }
- $uitpas_numbers_title = t('UiTPAS number(s)');
- $uitpas_numbers_output = '' . $uitpas_numbers_title . ': ';
- $uitpas_numbers_output .= theme('item_list', $uitpas_numbers);
- $vars['uitpas_numbers_title'] = $uitpas_numbers_title;
- $vars['uitpas_numbers'] = $uitpas_numbers_output;
-
- $vars['form_title'] = t('My personal data');
- $vars['form_intro'] = t('This information has been read from your eID and cannot be changed. Updates can only be done at official UiTPAS registration counters .', array('@counters-url' => url('register_where')));
- $form = drupal_get_form('culturefeed_uitpas_profile_details_form');
- $vars['form'] = drupal_render($form);
-
- $vars['status_title'] = t('Status');
- $vars['kansen_statuut'] = '';
- $vars['kansen_statuut_valid_end_date'] = '';
- $vars['status_valid_till'] = '';
-
- if (count($passholder->memberships)) {
-
- $memberships = array();
- foreach ($passholder->memberships as $membership) {
-
- if (isset($membership->association->association)) {
-
- $endate = t('valid till !date', array('!date' => date('j/m/Y', $membership->endDate)));
- $memberships[] = '' . $membership->association . ': ' . $endate;
-
- }
-
- }
- $vars['memberships'] = implode(' ', $memberships);
-
- }
- else {
- $vars['memberships'] = '';
- }
-
-}
-
-/**
- * Implements hook_preprocess_preprocess_culturefeed_uitpas_profile_details().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_profile_details_form(&$vars) {
-
- $form = $vars['form'];
-
- $vars['first_name'] = drupal_render($form['first_name']);
- $vars['last_name'] = drupal_render($form['last_name']);
- $vars['dob'] = drupal_render($form['dob']);
- $vars['pob'] = drupal_render($form['pob']);
- $vars['gender'] = drupal_render($form['gender']);
- $vars['nationality'] = drupal_render($form['nationality']);
- $vars['street'] = drupal_render($form['street']);
- $vars['nr'] = drupal_render($form['nr']);
- $vars['zip'] = drupal_render($form['zip']);
- $vars['city'] = drupal_render($form['city']);
- $vars['tel'] = drupal_render($form['tel']);
- $vars['mobile'] = drupal_render($form['mobile']);
- $vars['email'] = drupal_render($form['email']);
- $vars['email_description'] = drupal_render($form['email_description']);
- $vars['actions'] = drupal_render($form['actions']);
-
- $vars['main_form'] = drupal_render_children($form);
-
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_profile_summary().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_profile_summary(&$vars) {
-
- $uitpas_user = $vars['uitpas_user'];
- $passholder = $vars['passholder'];
- $advantages = $vars['advantages'];
- $promotions = $vars['promotions'];
- $upcoming_promotions = $vars['upcoming_promotions'];
-
- if (isset($uitpas_user->depiction)) {
- $vars['image'] = theme_image(array('path' => $uitpas_user->depiction . '?maxwidth=50&maxheight=50&crop=auto', 'attributes' => array()));
- }
- else {
- $vars['image'] = '';
- }
-
- $vars['name'] = l($uitpas_user->nick, 'user');
- $singular = '@count ' . t('point');
- $plural = '@count ' . t('points');
- $vars['points'] = format_plural($passholder->points, $singular, $plural);
-
- // Advantages.
- $links = array(
- 'links' => array(),
- 'heading' => array(),
- 'attributes' => array(),
- );
- foreach ($advantages as $advantage) {
-
- $links['links'][] = array(
- 'title' => $advantage->title,
- 'href' => 'advantage/' . culturefeed_search_slug($advantage->title) . '/' . $advantage->id,
- );
-
- }
- $vars['advantages_links'] = theme_links($links);
-
- // Promotions.
- $vars['promotions_title'] = variable_get('culturefeed_uitpas_profile_summary_promotions_title', t('Your UiTPAS advantages'));
- $links = array(
- 'links' => array(),
- 'heading' => array(),
- 'attributes' => array(),
- );
- foreach ($promotions as $promotion) {
-
- $links['links'][] = array(
- 'title' => $promotion->title . ' (' . t('!points points', array('!points' => $promotion->points)) . ')',
- 'href' => 'promotion/' . culturefeed_search_slug($promotion->title) . '/' . $promotion->id,
- );
-
- }
- $vars['promotions_links'] = theme_links($links);
-
- // Upcoming promotions.
- $vars['upcoming_promotions_title'] = variable_get('culturefeed_uitpas_profile_summary_upcoming_promotions_title', t('Just a few points more for'));
- $links = array(
- 'links' => array(),
- 'heading' => array(),
- 'attributes' => array(),
- );
- foreach ($upcoming_promotions as $promotion) {
-
- $links['links'][] = array(
- 'title' => $promotion->title . ' (' . t('!points points', array('!points' => $promotion->points)) . ')',
- 'href' => 'promotion/' . culturefeed_search_slug($promotion->title) . '/' . $promotion->id,
- );
-
- }
- $vars['upcoming_promotions_links'] = (count($upcoming_promotions)) ? theme_links($links) : '';
-
- // All promotions.
- $vars['all_promotions'] = l(variable_get('culturefeed_uitpas_profile_summary_more_link_text', t('Show all my promotions')), 'culturefeed/profile/uitpas/promotions');
-
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_promotion().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_promotion(&$vars) {
- $promotion = $vars['promotion'];
-
- // Ensure images are protocol-relative
- if (isset($promotion->pictures)) {
- foreach ($promotion->pictures as &$picture) {
- $picture = str_replace('http://', '//', $picture);
- }
- }
-
- // Image.
- $vars['image'] = '';
- $vars['image2'] = '';
- $vars['images_list'] = '';
- $images = array();
- if (isset($promotion->pictures[0])) {
- $vars['image'] = theme('image', array('path' => $promotion->pictures[0] . '?maxwidth=300&max-height=300', 'alt' => $promotion->title, 'title' => $promotion->title, 'attributes' => array()));
- foreach ($promotion->pictures as $key => $picture) {
- $images[] = l(
- theme('image', array('path' => $promotion->pictures[$key] . '?maxwidth=300&max-height=300', 'alt' => $promotion->title, 'title' => $promotion->title, 'attributes' => array())),
- $promotion->pictures[$key],
- array('html' => TRUE)
- );
- }
- $vars['images_list'] = theme('item_list', array('items' => $images));
- }
- if (isset($promotion->pictures[1])) {
- $vars['image2'] = theme_image(array('path' => $promotion->pictures[1] . '?maxwidth=300&max-height=300', 'alt' => $promotion->title, 'title' => $promotion->title, 'attributes' => array()));
- }
-
- // Points.
- $vars['points'] = format_plural($promotion->points, '1 point', '@count points');
-
- // Get the counters information.
- $counters = array(
- '#theme' => 'item_list',
- '#type' => 'ul',
- '#items' => array(),
- );
- foreach ($promotion->counters as $counter) {
- $counters['#items'][] = l($counter->name, 'agenda/a/' . culturefeed_search_slug($counter->name) . '/' . $counter->id);
- }
- $vars['counters'] = count($counters['#items']) ? drupal_render($counters) : '';
-
- // Stock.
- $vars['out_of_stock'] = FALSE;
- if ($promotion->maxAvailableUnits != NULL && $promotion->unitsTaken >= $promotion->maxAvailableUnits) {
- $vars['out_of_stock'] = TRUE;
- }
-
- // Period.
- $period = '';
- $now = time();
- if ($promotion->cashingPeriodBegin && $promotion->cashingPeriodBegin > $now) {
- $period = t('From !date', array('!date' => date('j/m/Y', $promotion->cashingPeriodBegin))) . ' ';
- if ($promotion->cashingPeriodEnd) {
- $period .= t('until !date', array('!date' => date('j/m/Y', $promotion->cashingPeriodEnd)));
- }
- }
- else if ($promotion->cashingPeriodEnd) {
- $period .= t('Until !date', array('!date' => date('j/m/Y', $promotion->cashingPeriodEnd)));
- }
- else {
- $period = t('Until end of stock');
- }
- $vars['period'] = $period;
-
- // Provider.
- $vars['provider'] = '';
- if (isset($promotion->owningCardSystem->name)) {
- $vars['provider'] = t('Provided by @provider', array('@provider' => culturefeed_uitpas_cardsystem_name($promotion->owningCardSystem)));
- $vars['provider_raw'] = culturefeed_uitpas_cardsystem_name($promotion->owningCardSystem);
- }
-
- // Available.
- $vars['available'] = '';
- if (count($promotion->validForCities)) {
- $valid_for_cities = $promotion->validForCities;
- $vars['available'] = t('Only available for') . " " . implode(', ', $valid_for_cities);
- }
-
- // Description1.
- $vars['description1'] = '';
- if ($promotion->description1) {
- $vars['description1'] = $promotion->description1;
- }
-
- // Description2.
- $vars['description2'] = '';
- if ($promotion->description2) {
- $vars['description2'] = $promotion->description2;
- }
-
- drupal_add_css(drupal_get_path('module', 'culturefeed_uitpas') . '/css/promotion_advantage.css');
- drupal_add_js(drupal_get_path('module', 'culturefeed_uitpas') . '/js/script.js');
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_promotions_highlight().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_promotions_highlight(&$vars) {
-
- $promotions = $vars['promotions'];
- $rows = array();
-
- foreach ($promotions as $promotion) {
-
- if (isset($promotion->pictures[0])) {
- $thumbnail = theme('image', array('path' => $promotion->pictures[0] . '?width=400&height=300&crop=auto', 'alt' => $promotion->title, 'title' => $promotion->title, 'attributes' => array()));
- }
- else {
- $thumbnail = theme('image', array('path' => drupal_get_path('module', 'culturefeed_uitpas') . '/images/default.png', 'alt' => $promotion->title, 'title' => $promotion->title, 'attributes' => array()));
- }
-
- $singular = '@count point';
- $plural = '@count points';
- $points = array(
- 'data' => format_plural($promotion->points, $singular, $plural),
- 'class' => array('points'),
- );
- $url = 'promotion/' . culturefeed_search_slug($promotion->title) . '/' . $promotion->id;
- $title = l($promotion->title, $url);
-
- $rows[] = array(
- $points,
- $title,
- );
-
- $items[] = array(
- 'thumbnail' => $thumbnail,
- 'points' => $points['data'],
- 'title' => $title,
- 'url' => $url
- );
-
- }
-
- $vars['items'] = $items;
-
- $table = array(
- 'header' => array(),
- 'rows' => $rows,
- 'attributes' => array(),
- 'caption' => '',
- 'colgroups' => array(),
- 'sticky' => '',
- 'empty' => '',
- );
-
- $vars['promotions_table'] = theme_table($table);
- $more_text = variable_get('culturefeed_uitpas_promotions_highlight_more_link_text', t('Show all promotions'));
- $vars['more'] = l($more_text, 'advantages_promotions');
-
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_register_where().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_register_where(&$vars) {
-
- $table = array(
- 'header' => array(),
- 'rows' => array(),
- 'attributes' => array(),
- 'caption' => '',
- 'colgroups' => array(),
- 'sticky' => '',
- 'empty' => '',
- );
-
- if (count($vars['pos'])) {
-
- foreach ($vars['pos'] as $pos) {
-
- // Address.
- $address = array();
-
- if (isset($vars['actors'][$pos->id])) {
-
- // @codingStandardsIgnoreStart
- /** @var CultureFeed_Cdb_Item_Actor $actor */
- // @codingStandardsIgnoreEnd
- $actor = $vars['actors'][$pos->id]->getEntity();
- $contact_info = $actor->getContactInfo();
- // @codingStandardsIgnoreStart
- /** @var CultureFeed_Cdb_Data_Address[] $addresses */
- // @codingStandardsIgnoreEnd
- $addresses = $contact_info->getAddresses();
- if ($addresses[0]) {
-
- if ($addresses[0]->getPhysicalAddress()->getZip()) {
- $address[] = $addresses[0]->getPhysicalAddress()->getZip();
- }
- if ($addresses[0]->getPhysicalAddress()->getCity()) {
- $address[] = $addresses[0]->getPhysicalAddress()->getCity();
- }
- }
-
- }
-
- elseif ($pos->city && !count($address)) {
-
- if ($pos->postalCode) {
- $address[] = $pos->postalCode;
- }
- if ($pos->city) {
- $address[] = $pos->city;
- }
-
- }
-
- // Card systems.
- $card_systems = array();
- if (!empty($pos->cardSystems)) {
- foreach ($pos->cardSystems as $card_system) {
- /* @var CultureFeed_Uitpas_CardSystem $card_system */
- $card_systems[] = $card_system->name;
- }
- }
-
- $table['rows'][] = array(
- l($pos->name, 'agenda/a/' . culturefeed_search_slug($pos->name) . '/' . $pos->id),
- (count($card_systems)) ? theme('item_list', array('items' => $card_systems, 'type' => 'ul')) : '',
- implode(' ', $address),
- );
-
- }
-
- }
- else {
- $table['rows'][] = array(array('data' => t('No results found.'), 'colspan' => 2));
- }
-
- $pager = array(
- 'element' => $vars['pos_pager_element'],
- 'quantity' => $vars['pos_total'],
- );
-
- $vars['intro'] = t('You can get an UiTPAS at one of these registration counters. An UiTPAS costs € 5. Younger than 18 years? Then you\'ll pay € 2. For people with an opportunities tarrif UiTPAS is free. You\'ll need your eID to register your UiTPAS.');
- $vars['pos_table'] = theme_table($table) . theme('pager', $pager);
- $vars['outro'] = t('Important: you\'ll need your eID to register your UiTPAS. Read more about the UiTPAS project.', array('@read-more' => 'http://www.cultuurnet.be/project/uitpas'));
-
-}
-
-/**
- * Implements hook_preprocess_culturefeed_uitpas_recent_actions().
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_recent_actions(&$vars) {
-
- $actions = $vars['actions'];
- $list = array(
- 'title' => '',
- 'attributes' => array(),
- 'type' => 'ul',
- 'items' => array(),
- );
-
- foreach ($actions as $action) {
-
- // Subject.
- $url = 'agenda/e/' . culturefeed_search_slug($action->nodeTitle) . '/' . $action->nodeId;
- $subject = l($action->nodeTitle, $url);
-
- // Args.
- $args = array(
- '!name' => ($action->nick) ? $action->nick : t('Anonymous'),
- '!location' => $action->createdVia,
- '!time_ago' => format_interval(time() - $action->creationDate, 1),
- '!subject' => $subject,
- );
-
- $singular = "!name " . t('saved') . " @count " . t('point') . " " . t('at') . " !subject, !time_ago " . t('ago') . " ";
- $plural = "!name " . t('saved') . " @count " . t('points') . " " . t('at') . " !subject, !time_ago " . t('ago') . " ";
- $image = ($action->depiction) ? $action->depiction . '?maxwidth=50&maxheight=50&crop=auto' : variable_get('culturefeed_uitpas_user_default_image');
- if ($image) {
- $image = theme_image(array('path' => $image, 'attributes' => array('class' => 'thumbnail')));
- }
-
- $list['items'][] = $image . format_plural($action->points, $singular, $plural, $args);
-
- }
-
- // Publish actions form.
- $vars['activity_preferences_form'] = '';
- $uitpas_user = culturefeed_uitpas_get_uitpas_user();
- if ($uitpas_user->user) {
- $form = drupal_get_form('culturefeed_uitpas_activity_preferences_form');
- $vars['activity_preferences_form'] = drupal_render($form);
- }
-
- $vars['actions_list'] = theme_item_list($list);
-
-}
-
-/**
- * Returns HTML for UiTPAS advantages.
- *
- * @param array $vars
- * An associative array.
- *
- * @return string
- * The HTML.
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_advantages_table(&$vars) {
- // @codingStandardsIgnoreStart
- /** @var CultureFeed_Uitpas_Passholder_WelcomeAdvantage[] $advantages */
- // @codingStandardsIgnoreEnd
- $advantages = $vars['advantages'];
- $advantages_total = $vars['advantages_total'];
- $advantages_pager_element = $vars['advantages_pager_element'];
-
- if (count($advantages)) {
- $items = array();
-
- foreach ($advantages as $key => $advantage) {
- $item = array();
- $advantage_path = 'advantage/' . culturefeed_search_slug($advantage->title) . '/' . $advantage->id;
-
- // Get the first image or fall back to a default.
- if (isset($advantage->pictures[0])) {
- $image = theme('culturefeed_uitpas_promotion_image', array(
- 'path' => $advantage->pictures[0],
- 'maxwidth' => 100,
- 'maxheight' => 100,
- 'alt' => $advantage->title,
- 'title' => $advantage->title,
- 'attributes' => array(),
- ));
- }
- else {
- $image = theme('image', array(
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/images/default.png',
- 'width' => 100,
- 'height' => 100,
- 'alt' => $advantage->title,
- 'title' => $advantage->title,
- ));
- }
- $item['image'] = l($image, $advantage_path, array('html' => TRUE));
- $item['classes'][] = ($key % 2) ? 'even' : 'odd';
-
- $item['cardsystem'] = array(
- 'class' => drupal_html_class($advantage->owningCardSystem->name),
- 'name' => $advantage->owningCardSystem->name,
- );
- $item['title'] = l($advantage->title, $advantage_path);
- $item['overlay_link'] = l(' ', $advantage_path, array('html' => TRUE, 'attributes' => array('class' => 'hulk-link')));
-
- foreach ($advantage->counters as $counter) {
- $item['counters'][] = array(
- 'class' => drupal_html_class($counter->name),
- 'name' => $counter->name,
- );
- }
-
- $points_classes = array();
- if ($advantage->cashingPeriodEnd) {
- $item['availability'] = date('j/n/Y', $advantage->cashingPeriodEnd);
- }
- else {
- $item['availability'] = t('Until end of stock');
- $points_classes[] = 'until-end-of-stock';
- }
- $item['availability'] = ($advantage->cashingPeriodEnd) ? date('j/n/Y', $advantage->cashingPeriodEnd) : t('Until end of stock');
- $item['points'] = array(
- 'value' => format_plural($advantage->points, '1 point', '@count points'),
- 'remark' => t('This is a welcome advantage'),
- 'classes' => implode(' ', $points_classes),
- );
-
- $items[] = $item;
- }
-
- $vars['items'] = $items;
- $pager = array(
- 'element' => $advantages_pager_element,
- 'quantity' => $advantages_total,
- );
- $vars['pager'] = theme('pager', $pager);
- drupal_add_css(drupal_get_path('module', 'culturefeed_uitpas') . '/css/advantages.css');
- }
-}
-
-/**
- * Returns HTML for an UiTPAS promotion image.
- *
- * @param array $vars
- * An associative array.
- *
- * @return string
- * The HTML.
- */
-function theme_culturefeed_uitpas_promotion_image($vars) {
- $vars['path'] .= '?maxheight=' . $vars['maxheight'] . '&maxwidth=' . $vars['maxwidth'];
- return theme('image', $vars);
-}
-
-/**
- * Returns HTML for UiTPAS promotions.
- *
- * @param array $vars
- * An associative array.
- *
- * @return string
- * The HTML.
- */
-function culturefeed_uitpas_preprocess_culturefeed_uitpas_promotions_table(&$vars) {
- // @codingStandardsIgnoreStart
- /** @var CultureFeed_Uitpas_Passholder_PointsPromotion[] $promotions */
- // @codingStandardsIgnoreEnd
- $promotions = $vars['promotions'];
-
- if (count($promotions)) {
- $items = array();
- $cf_account = DrupalCultureFeed::getLoggedInUser();
-
- foreach ($promotions as $key => $promotion) {
- $item = array();
- $promotion_path = 'promotion/' . culturefeed_search_slug($promotion->title) . '/' . $promotion->id;
-
- // Get the first image or fall back to a default.
- if (isset($promotion->pictures[0])) {
- $image = theme('culturefeed_uitpas_promotion_image', array(
- 'path' => $promotion->pictures[0],
- 'maxwidth' => 100,
- 'maxheight' => 100,
- 'alt' => $promotion->title,
- 'title' => $promotion->title,
- 'attributes' => array(),
- ));
- }
- else {
- $image = theme('image', array(
- 'path' => drupal_get_path('module', 'culturefeed_uitpas') . '/images/default.png',
- 'width' => 100,
- 'height' => 100,
- 'alt' => $promotion->title,
- 'title' => $promotion->title,
- ));
- }
- $item['image'] = l($image, $promotion_path, array('html' => TRUE));
- $item['classes'][] = ($key % 2) ? 'even' : 'odd';
- $item['classes'][] = drupal_clean_css_identifier('cashin-' . drupal_strtolower($promotion->cashInState));
-
- $item['cardsystem'] = array(
- 'class' => drupal_html_class($promotion->owningCardSystem->name),
- 'name' => $promotion->owningCardSystem->name,
- );
- $item['title'] = l($promotion->title, $promotion_path);
- $item['overlay_link'] = l(' ', $promotion_path, array('html' => TRUE, 'attributes' => array('class' => 'hulk-link')));
-
- $item['counters'] = array();
- foreach ($promotion->counters as $counter) {
- $item['counters'][] = array(
- 'class' => drupal_html_class($counter->name),
- 'name' => $counter->name,
- );
- }
-
- $points_classes = array();
- if ($promotion->cashInState == $promotion::CASHIN_NOT_POSSIBLE_VOLUME_CONSTRAINT) {
- $item['availability'] = t('Out of stock');
- $points_classes[] = 'until-end-of-stock';
- }
- else if ($promotion->cashingPeriodEnd) {
- $item['availability'] = t('Until @date', array('@date' => date('j/n/Y', $promotion->cashingPeriodEnd)));
- }
- else if ($promotion->cashingPeriodBegin && $promotion->cashingPeriodBegin > time()) {
- $item['availability'] = t('From @date', array('@date' => date('j/n/Y', $promotion->cashingPeriodBegin)));
- $points_classes[] = 'available-from';
- }
- else {
- $item['availability'] = t('Until end of stock');
- }
-
- $points_remark = FALSE;
- if ($cf_account) {
- if ($cf_account->points < $promotion->points) {
- $points_remark = t('You have insufficient points');
- $points_classes[] = 'insufficient-points';
- }
- }
- $item['points'] = array(
- 'value' => format_plural($promotion->points, '1 point', '@count points'),
- 'remark' => $points_remark,
- 'classes' => implode(' ', $points_classes),
- );
-
- $items[] = $item;
- }
-
- $vars['items'] = $items;
- drupal_add_css(drupal_get_path('module', 'culturefeed_uitpas') . '/css/promotions.css');
- }
-}
diff --git a/culturefeed_uitpas/translations/culturefeed_uitpas.de.po b/culturefeed_uitpas/translations/culturefeed_uitpas.de.po
deleted file mode 100644
index c6a70f29..00000000
--- a/culturefeed_uitpas/translations/culturefeed_uitpas.de.po
+++ /dev/null
@@ -1,806 +0,0 @@
-# $Id$
-#
-# German translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_uitpas.admin.inc: n/a
-# culturefeed_uitpas.blocks.inc: n/a
-# culturefeed_uitpas.menu.inc: n/a
-# culturefeed_uitpas.profile.inc: n/a
-# includes/profile_details.inc: n/a
-# includes/profile_advantages.inc: n/a
-# includes/profile_actions.inc: n/a
-# includes/profile_notifications.inc: n/a
-# culturefeed_uitpas.theme.inc: n/a
-# culturefeed_uitpas.variable.inc: n/a
-# culturefeed_uitpas.info: n/a
-# ctools/plugins/views_wizard/culturefeed_uitpas_views_wizard_promotions.inc: n/a
-# includes/advantages_promotions.inc: n/a
-# includes/registration_confirmation.inc: n/a
-# includes/promotions_highlight.inc: n/a
-# includes/event_details_advantages.inc: n/a
-# includes/recent_actions.inc: n/a
-# includes/profile_summary.inc: n/a
-# theme/theme.inc: n/a
-# includes/user_register.inc: n/a
-# views/culturefeed_uitpas.views.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_field_image.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_field_markup.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_field_title.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_filter_date.inc: n/a
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-12-06 14:30+0100\n"
-"PO-Revision-Date: 2013-12-06 14:30+0100\n"
-"Last-Translator: NAME \n"
-"Language-Team: German \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"
-
-#: culturefeed_uitpas.admin.inc:14
-msgid "Card system ID"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:15
-msgid "Culturefeed uitpas: event details advantages"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:19
-msgid "Culturefeed uitpas: profile (summary)"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:23
-msgid "Culturefeed uitpas: promotions highlight"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:27
-msgid "Culturefeed uitpas: recent actions"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:31
-msgid "Culturefeed uitpas: user register"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:118
-msgid "UiTPAS Advantages"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:129
-msgid "My UiTPAS"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:140
-msgid "Spotlight promotions"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:151
-msgid "Recent actions"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:163
-msgid "Already own an UiTPAS?"
-msgstr ""
-
-#: culturefeed_uitpas.menu.inc:39 culturefeed_uitpas.profile.inc:23 includes/profile_details.inc:55
-msgid "An overview of all your UiTPAS actions."
-msgstr ""
-
-#: culturefeed_uitpas.menu.inc:46 culturefeed_uitpas.profile.inc:17 includes/profile_details.inc:45
-msgid "Discover which promotions and advantages you are entitled to."
-msgstr ""
-
-#: culturefeed_uitpas.menu.inc:53 culturefeed_uitpas.profile.inc:29 includes/profile_details.inc:65
-msgid "Change your preferences for receiving personal notifications via email."
-msgstr ""
-
-#: culturefeed_uitpas.profile.inc:15 includes/profile_advantages.inc:156 includes/profile_details.inc:40
-msgid "My advantages"
-msgstr ""
-
-#: culturefeed_uitpas.profile.inc:21 includes/profile_actions.inc:83 includes/profile_details.inc:50
-msgid "User history"
-msgstr ""
-
-#: culturefeed_uitpas.profile.inc:27 includes/profile_details.inc:60 includes/profile_notifications.inc:248
-msgid "My notifications"
-msgstr ""
-
-#: culturefeed_uitpas.theme.inc:130
-msgid "Opportunities tariff with !system: !tariff"
-msgstr ""
-
-#: culturefeed_uitpas.theme.inc:134
-msgid "Opportunities tariff for pass holders uit other region: !tariff"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:15
-msgid "Culturefeed uitpas: advantages promotions: info"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:19
-msgid "Culturefeed uitpas: advantages promotions: title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:23
-msgid "Culturefeed uitpas: profile actions: intro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:27
-msgid "Culturefeed uitpas: profile details: menu: advantages title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:31
-msgid "Culturefeed uitpas: profile details: menu: advantages description"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:35
-msgid "Culturefeed uitpas: profile details: menu: actions title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:39
-msgid "Culturefeed uitpas: profile details: menu: actions description"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:43
-msgid "Culturefeed uitpas: profile details: menu: notifications title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:47
-msgid "Culturefeed uitpas: profile details: menu: notifications description"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:51
-msgid "Culturefeed uitpas: profile details: intro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:55
-msgid "Culturefeed uitpas: profile details: outro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:59
-msgid "Culturefeed uitpas: profile notifications: intro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:63
-msgid "Culturefeed uitpas: promotions highlight: more link text"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:67
-msgid "Culturefeed uitpas: registration confirmation: actions label"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:71
-msgid "Culturefeed uitpas: registration confirmation: intro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:75
-msgid "Culturefeed uitpas: registration confirmation: title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:79
-msgid "Culturefeed uitpas: user register: intro text"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:83
-msgid "Culturefeed uitpas: user register: number label"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:87
-msgid "Culturefeed uitpas: user register: submit value"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:91
-msgid "Culturefeed uitpas: user register: apply text"
-msgstr ""
-
-#: culturefeed_uitpas.info:0
-msgid "CultureFeed Uitpas"
-msgstr ""
-
-#: culturefeed_uitpas.info:0
-msgid "Provides Uitpas UI elements"
-msgstr ""
-
-#: culturefeed_uitpas.info:0
-msgid "CultureFeed"
-msgstr ""
-
-#: ctools/plugins/views_wizard/culturefeed_uitpas_views_wizard_promotions.inc:15
-msgid "UiTPAS Promotions"
-msgstr ""
-
-#: includes/advantages_promotions.inc:85
-msgid "UiTPAS advantages promotions settings"
-msgstr ""
-
-#: includes/advantages_promotions.inc:91 includes/registration_confirmation.inc:103
-msgid "Page title"
-msgstr ""
-
-#: includes/advantages_promotions.inc:96
-msgid "Info text"
-msgstr ""
-
-#: includes/advantages_promotions.inc:101 includes/profile_advantages.inc:135
-msgid "Number of advantages to display"
-msgstr ""
-
-#: includes/advantages_promotions.inc:106 includes/profile_advantages.inc:140 includes/promotions_highlight.inc:57
-msgid "Number of promotions to display"
-msgstr ""
-
-#: includes/event_details_advantages.inc:32
-msgid "Collect points"
-msgstr ""
-
-#: includes/event_details_advantages.inc:52
-msgid "Discount at underpriviliged tariff"
-msgstr ""
-
-#: includes/event_details_advantages.inc:69
-msgid "Show advantages at this location"
-msgstr ""
-
-#: includes/profile_actions.inc:61
-msgid "UiTPAS profile actions settings"
-msgstr ""
-
-#: includes/profile_actions.inc:67 includes/profile_details.inc:69 includes/profile_notifications.inc:237
-msgid "Intro"
-msgstr ""
-
-#: includes/profile_actions.inc:72 includes/recent_actions.inc:51
-msgid "Number of actions to display"
-msgstr ""
-
-#: includes/profile_advantages.inc:102
-msgid "My advantages (1 point saved)"
-msgstr ""
-
-#: includes/profile_advantages.inc:103
-msgid "My advantages (!points points saved)"
-msgstr ""
-
-#: includes/profile_advantages.inc:130
-msgid "UiTPAS profile advantages settings"
-msgstr ""
-
-#: includes/profile_advantages.inc:145
-msgid "Number of upcoming promotions to display"
-msgstr ""
-
-#: includes/profile_details.inc:33
-msgid "UiTPAS profile details settings"
-msgstr ""
-
-#: includes/profile_details.inc:39
-msgid "Menu: advantages title"
-msgstr ""
-
-#: includes/profile_details.inc:44
-msgid "Menu: advantages description"
-msgstr ""
-
-#: includes/profile_details.inc:49
-msgid "Menu: actions title"
-msgstr ""
-
-#: includes/profile_details.inc:54
-msgid "Menu: actions description"
-msgstr ""
-
-#: includes/profile_details.inc:59
-msgid "Menu: notifications title"
-msgstr ""
-
-#: includes/profile_details.inc:64
-msgid "Menu: notifications description"
-msgstr ""
-
-#: includes/profile_details.inc:74
-msgid "Outro"
-msgstr ""
-
-#: includes/profile_notifications.inc:72
-msgid "via e-mail"
-msgstr ""
-
-#: includes/profile_notifications.inc:78
-msgid "via sms"
-msgstr ""
-
-#: includes/profile_notifications.inc:85
-msgid "to e-mail address"
-msgstr ""
-
-#: includes/profile_notifications.inc:92
-msgid "to mobile number"
-msgstr ""
-
-#: includes/profile_notifications.inc:103 includes/registration_confirmation.inc:50
-msgid "Confirm"
-msgstr ""
-
-#: includes/profile_notifications.inc:115
-msgid "Invalid e-mail address"
-msgstr ""
-
-#: includes/profile_notifications.inc:127
-msgid "to mobile number field is required."
-msgstr ""
-
-#: includes/profile_notifications.inc:217
-msgid "An error occurred."
-msgstr ""
-
-#: includes/profile_notifications.inc:220 includes/registration_confirmation.inc:78
-msgid "Your changes have been saved."
-msgstr ""
-
-#: includes/profile_notifications.inc:232
-msgid "UiTPAS profile notifications settings"
-msgstr ""
-
-#: includes/profile_summary.inc:113
-msgid "Title for the promotions"
-msgstr ""
-
-#: includes/profile_summary.inc:114 theme/theme.inc:468
-msgid "Your UiTPAS advantages"
-msgstr ""
-
-#: includes/profile_summary.inc:118
-msgid "Title for the upcoming promotions"
-msgstr ""
-
-#: includes/profile_summary.inc:119 theme/theme.inc:485
-msgid "Just a few points more for"
-msgstr ""
-
-#: includes/profile_summary.inc:123 includes/promotions_highlight.inc:62
-msgid "More link text"
-msgstr ""
-
-#: includes/profile_summary.inc:124 theme/theme.inc:502
-msgid "Show all my promotions"
-msgstr ""
-
-#: includes/promotions_highlight.inc:63 theme/theme.inc:612
-msgid "Show all promotions"
-msgstr ""
-
-#: includes/recent_actions.inc:57
-msgid "Default image"
-msgstr ""
-
-#: includes/recent_actions.inc:59
-msgid "Use full url or an absolute path."
-msgstr ""
-
-#: includes/registration_confirmation.inc:54
-msgid "Click here to continue to the homepage"
-msgstr ""
-
-#: includes/registration_confirmation.inc:85
-msgid "An error occured."
-msgstr ""
-
-#: includes/registration_confirmation.inc:98
-msgid "UiTPAS registration confirmation settings"
-msgstr ""
-
-#: includes/registration_confirmation.inc:108 includes/user_register.inc:179
-msgid "Intro text"
-msgstr ""
-
-#: includes/registration_confirmation.inc:113
-msgid "Actions label"
-msgstr ""
-
-#: includes/user_register.inc:29;180
-msgid "Register here, so you can follow your UiTPAS advantages and points balance online."
-msgstr ""
-
-#: includes/user_register.inc:35;185
-msgid "UiTPAS number"
-msgstr ""
-
-#: includes/user_register.inc:40 theme/theme.inc:396
-msgid "Date of birth"
-msgstr ""
-
-#: includes/user_register.inc:47;190
-msgid "Continue"
-msgstr ""
-
-#: includes/user_register.inc:54;195
-msgid "Already registered? Apply here ."
-msgstr ""
-
-#: includes/user_register.inc:106
-msgid "Invalid date of birth."
-msgstr ""
-
-#: includes/user_register.inc:111
-msgid "Invalid UiTPAS number."
-msgstr ""
-
-#: includes/user_register.inc:116
-msgid "User already activated."
-msgstr ""
-
-#: includes/user_register.inc:121
-msgid "Missing required fields."
-msgstr ""
-
-#: includes/user_register.inc:126
-msgid "Invalid date."
-msgstr ""
-
-#: includes/user_register.inc:131
-msgid "Unknown UiTPAS number."
-msgstr ""
-
-#: includes/user_register.inc:136
-msgid "Action failed."
-msgstr ""
-
-#: includes/user_register.inc:141;146
-msgid "We are unable to process your request at this moment. Please try again later."
-msgstr ""
-
-#: includes/user_register.inc:184
-msgid "Label for UiTPAS number field"
-msgstr ""
-
-#: includes/user_register.inc:189
-msgid "Value for the submit button"
-msgstr ""
-
-#: includes/user_register.inc:194
-msgid "Apply text"
-msgstr ""
-
-#: theme/theme.inc:25;528
-msgid "From !date"
-msgstr ""
-
-#: theme/theme.inc:27;530
-msgid "to !date"
-msgstr ""
-
-#: theme/theme.inc:38;541
-msgid "At"
-msgstr ""
-
-#: theme/theme.inc:43;546
-msgid "Provided by !provider"
-msgstr ""
-
-#: theme/theme.inc:53;556
-msgid "Only available for"
-msgstr ""
-
-#: theme/theme.inc:100
-msgid "Welcome advantages"
-msgstr ""
-
-#: theme/theme.inc:101;136;260;302;345
-msgid "Availability"
-msgstr ""
-
-#: theme/theme.inc:102;137;261;303;346
-msgid "Description"
-msgstr ""
-
-#: theme/theme.inc:103;138
-msgid "Counters"
-msgstr ""
-
-#: theme/theme.inc:117;156;284;326;365
-msgid "Until end of stock"
-msgstr ""
-
-#: theme/theme.inc:127;166
-msgid "No results found"
-msgstr ""
-
-#: theme/theme.inc:135
-msgid "Promotions"
-msgstr ""
-
-#: theme/theme.inc:200
-msgid "Date"
-msgstr ""
-
-#: theme/theme.inc:200
-msgid "Activity name"
-msgstr ""
-
-#: theme/theme.inc:200
-msgid "Location"
-msgstr ""
-
-#: theme/theme.inc:200 views/culturefeed_uitpas.views.inc:68
-msgid "Points"
-msgstr ""
-
-#: theme/theme.inc:219;292;334;373
-msgid "No results found."
-msgstr ""
-
-#: theme/theme.inc:259
-msgid "Trade-in options"
-msgstr ""
-
-#: theme/theme.inc:268;310
-msgid "1 point"
-msgstr ""
-
-#: theme/theme.inc:269;311;477;494
-msgid "!points points"
-msgstr ""
-
-#: theme/theme.inc:301
-msgid "Coming trade-in options"
-msgstr ""
-
-#: theme/theme.inc:344
-msgid "Advantages"
-msgstr ""
-
-#: theme/theme.inc:392
-msgid "UITpas number"
-msgstr ""
-
-#: theme/theme.inc:394
-msgid "First name"
-msgstr ""
-
-#: theme/theme.inc:395
-msgid "Name"
-msgstr ""
-
-#: theme/theme.inc:397
-msgid "Place of birth"
-msgstr ""
-
-#: theme/theme.inc:398
-msgid "Gender"
-msgstr ""
-
-#: theme/theme.inc:398
-msgid "Male"
-msgstr ""
-
-#: theme/theme.inc:398
-msgid "Female"
-msgstr ""
-
-#: theme/theme.inc:399
-msgid "Nationality"
-msgstr ""
-
-#: theme/theme.inc:400
-msgid "Street"
-msgstr ""
-
-#: theme/theme.inc:401
-msgid "Nr"
-msgstr ""
-
-#: theme/theme.inc:402
-msgid "Bus"
-msgstr ""
-
-#: theme/theme.inc:403
-msgid "Zip"
-msgstr ""
-
-#: theme/theme.inc:404
-msgid "City"
-msgstr ""
-
-#: theme/theme.inc:405
-msgid "Telephone"
-msgstr ""
-
-#: theme/theme.inc:406
-msgid "Mobile"
-msgstr ""
-
-#: theme/theme.inc:407
-msgid "Email"
-msgstr ""
-
-#: theme/theme.inc:408
-msgid "Status"
-msgstr ""
-
-#: theme/theme.inc:411;416
-msgid "valid till !date"
-msgstr ""
-
-#: theme/theme.inc:412
-msgid "Opportunity status"
-msgstr ""
-
-#: theme/theme.inc:447
-msgid "1 point saved"
-msgstr ""
-
-#: theme/theme.inc:448
-msgid "%points points saved"
-msgstr ""
-
-#: theme/theme.inc:638
-msgid "Anonymous"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:19
-msgid "Culturefeed UiTPAS promotions query"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:20
-msgid "Query on UiTPAS promotions."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:34;37
-msgid "UiTPAS promotions"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:46
-msgid "ID"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:47
-msgid "The promotion ID."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:55
-msgid "Title"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:56
-msgid "The promotion title."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:69
-msgid "The points necessary to make use of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:80
-msgid "Cashin state"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:81
-msgid "The cashin state of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:89;93
-msgid "Unexpired"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:90
-msgid "If the promotion is not expired yet."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:98;102
-msgid "In spotlight"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:99
-msgid "If the promotion is in the spotlight."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:107
-msgid "Owning card system"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:108
-msgid "The card system owning the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:116
-msgid "Applicable card system"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:117
-msgid "The card system the promotion is applicable to."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:125
-msgid "Cashing period begin"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:126
-msgid "The start of the promotion's cashing period."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:138
-msgid "Cashing period end"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:139
-msgid "The end of the promotion's cashing period."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:151
-msgid "Creation date"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:152
-msgid "The creation date of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:160
-msgid "Description 1"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:161
-msgid "The description (1) of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:170
-msgid "Description 2"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:171
-msgid "The description (2) of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:179
-msgid "Image"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:180
-msgid "The images of the promotion."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:29
-msgid "Show all available images"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:30
-msgid "Enable to show all images."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:35
-msgid "Maximum height for images"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:40
-msgid "Maximum width for images"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:33 views/handlers/culturefeed_uitpas_views_handler_field_title.inc:27
-msgid "Link this field to the original piece of content"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:34 views/handlers/culturefeed_uitpas_views_handler_field_title.inc:28
-msgid "Enable to override this field's links."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:54
-msgid "filter"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:54
-msgid "Missing text format: %format."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc:22;38
-msgid "Card system ID of the Drupal installation."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_filter_date.inc:28
-msgid "now"
-msgstr ""
-
-Requested 0 API calls in 0 ms Queries exceeding 100 ms are highlighted .
\ No newline at end of file
diff --git a/culturefeed_uitpas/translations/culturefeed_uitpas.fr.po b/culturefeed_uitpas/translations/culturefeed_uitpas.fr.po
deleted file mode 100644
index fa26ac7e..00000000
--- a/culturefeed_uitpas/translations/culturefeed_uitpas.fr.po
+++ /dev/null
@@ -1,806 +0,0 @@
-# $Id$
-#
-# French translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_uitpas.admin.inc: n/a
-# culturefeed_uitpas.blocks.inc: n/a
-# culturefeed_uitpas.menu.inc: n/a
-# culturefeed_uitpas.profile.inc: n/a
-# includes/profile_details.inc: n/a
-# includes/profile_advantages.inc: n/a
-# includes/profile_actions.inc: n/a
-# includes/profile_notifications.inc: n/a
-# culturefeed_uitpas.theme.inc: n/a
-# culturefeed_uitpas.variable.inc: n/a
-# culturefeed_uitpas.info: n/a
-# ctools/plugins/views_wizard/culturefeed_uitpas_views_wizard_promotions.inc: n/a
-# includes/advantages_promotions.inc: n/a
-# includes/registration_confirmation.inc: n/a
-# includes/promotions_highlight.inc: n/a
-# includes/event_details_advantages.inc: n/a
-# includes/recent_actions.inc: n/a
-# includes/profile_summary.inc: n/a
-# theme/theme.inc: n/a
-# includes/user_register.inc: n/a
-# views/culturefeed_uitpas.views.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_field_image.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_field_markup.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_field_title.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_filter_date.inc: n/a
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-12-06 14:30+0100\n"
-"PO-Revision-Date: 2013-12-06 14:30+0100\n"
-"Last-Translator: NAME \n"
-"Language-Team: French \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"
-
-#: culturefeed_uitpas.admin.inc:14
-msgid "Card system ID"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:15
-msgid "Culturefeed uitpas: event details advantages"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:19
-msgid "Culturefeed uitpas: profile (summary)"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:23
-msgid "Culturefeed uitpas: promotions highlight"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:27
-msgid "Culturefeed uitpas: recent actions"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:31
-msgid "Culturefeed uitpas: user register"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:118
-msgid "UiTPAS Advantages"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:129
-msgid "My UiTPAS"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:140
-msgid "Spotlight promotions"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:151
-msgid "Recent actions"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:163
-msgid "Already own an UiTPAS?"
-msgstr ""
-
-#: culturefeed_uitpas.menu.inc:39 culturefeed_uitpas.profile.inc:23 includes/profile_details.inc:55
-msgid "An overview of all your UiTPAS actions."
-msgstr ""
-
-#: culturefeed_uitpas.menu.inc:46 culturefeed_uitpas.profile.inc:17 includes/profile_details.inc:45
-msgid "Discover which promotions and advantages you are entitled to."
-msgstr ""
-
-#: culturefeed_uitpas.menu.inc:53 culturefeed_uitpas.profile.inc:29 includes/profile_details.inc:65
-msgid "Change your preferences for receiving personal notifications via email."
-msgstr ""
-
-#: culturefeed_uitpas.profile.inc:15 includes/profile_advantages.inc:156 includes/profile_details.inc:40
-msgid "My advantages"
-msgstr ""
-
-#: culturefeed_uitpas.profile.inc:21 includes/profile_actions.inc:83 includes/profile_details.inc:50
-msgid "Points history"
-msgstr ""
-
-#: culturefeed_uitpas.profile.inc:27 includes/profile_details.inc:60 includes/profile_notifications.inc:248
-msgid "My notifications"
-msgstr ""
-
-#: culturefeed_uitpas.theme.inc:130
-msgid "Opportunities tariff with !system: !tariff"
-msgstr ""
-
-#: culturefeed_uitpas.theme.inc:134
-msgid "Opportunities tariff for pass holders uit other region: !tariff"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:15
-msgid "Culturefeed uitpas: advantages promotions: info"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:19
-msgid "Culturefeed uitpas: advantages promotions: title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:23
-msgid "Culturefeed uitpas: profile actions: intro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:27
-msgid "Culturefeed uitpas: profile details: menu: advantages title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:31
-msgid "Culturefeed uitpas: profile details: menu: advantages description"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:35
-msgid "Culturefeed uitpas: profile details: menu: actions title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:39
-msgid "Culturefeed uitpas: profile details: menu: actions description"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:43
-msgid "Culturefeed uitpas: profile details: menu: notifications title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:47
-msgid "Culturefeed uitpas: profile details: menu: notifications description"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:51
-msgid "Culturefeed uitpas: profile details: intro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:55
-msgid "Culturefeed uitpas: profile details: outro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:59
-msgid "Culturefeed uitpas: profile notifications: intro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:63
-msgid "Culturefeed uitpas: promotions highlight: more link text"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:67
-msgid "Culturefeed uitpas: registration confirmation: actions label"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:71
-msgid "Culturefeed uitpas: registration confirmation: intro"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:75
-msgid "Culturefeed uitpas: registration confirmation: title"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:79
-msgid "Culturefeed uitpas: user register: intro text"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:83
-msgid "Culturefeed uitpas: user register: number label"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:87
-msgid "Culturefeed uitpas: user register: submit value"
-msgstr ""
-
-#: culturefeed_uitpas.variable.inc:91
-msgid "Culturefeed uitpas: user register: apply text"
-msgstr ""
-
-#: culturefeed_uitpas.info:0
-msgid "CultureFeed Uitpas"
-msgstr ""
-
-#: culturefeed_uitpas.info:0
-msgid "Provides Uitpas UI elements"
-msgstr ""
-
-#: culturefeed_uitpas.info:0
-msgid "CultureFeed"
-msgstr ""
-
-#: ctools/plugins/views_wizard/culturefeed_uitpas_views_wizard_promotions.inc:15
-msgid "UiTPAS Promotions"
-msgstr ""
-
-#: includes/advantages_promotions.inc:85
-msgid "UiTPAS advantages promotions settings"
-msgstr ""
-
-#: includes/advantages_promotions.inc:91 includes/registration_confirmation.inc:103
-msgid "Page title"
-msgstr ""
-
-#: includes/advantages_promotions.inc:96
-msgid "Info text"
-msgstr ""
-
-#: includes/advantages_promotions.inc:101 includes/profile_advantages.inc:135
-msgid "Number of advantages to display"
-msgstr ""
-
-#: includes/advantages_promotions.inc:106 includes/profile_advantages.inc:140 includes/promotions_highlight.inc:57
-msgid "Number of promotions to display"
-msgstr ""
-
-#: includes/event_details_advantages.inc:32
-msgid "Collect points"
-msgstr ""
-
-#: includes/event_details_advantages.inc:52
-msgid "Discount at underpriviliged tariff"
-msgstr ""
-
-#: includes/event_details_advantages.inc:69
-msgid "Show advantages at this location"
-msgstr ""
-
-#: includes/profile_actions.inc:61
-msgid "UiTPAS profile actions settings"
-msgstr ""
-
-#: includes/profile_actions.inc:67 includes/profile_details.inc:69 includes/profile_notifications.inc:237
-msgid "Intro"
-msgstr ""
-
-#: includes/profile_actions.inc:72 includes/recent_actions.inc:51
-msgid "Number of actions to display"
-msgstr ""
-
-#: includes/profile_advantages.inc:102
-msgid "My advantages (1 point saved)"
-msgstr ""
-
-#: includes/profile_advantages.inc:103
-msgid "My advantages (!points points saved)"
-msgstr ""
-
-#: includes/profile_advantages.inc:130
-msgid "UiTPAS profile advantages settings"
-msgstr ""
-
-#: includes/profile_advantages.inc:145
-msgid "Number of upcoming promotions to display"
-msgstr ""
-
-#: includes/profile_details.inc:33
-msgid "UiTPAS profile details settings"
-msgstr ""
-
-#: includes/profile_details.inc:39
-msgid "Menu: advantages title"
-msgstr ""
-
-#: includes/profile_details.inc:44
-msgid "Menu: advantages description"
-msgstr ""
-
-#: includes/profile_details.inc:49
-msgid "Menu: actions title"
-msgstr ""
-
-#: includes/profile_details.inc:54
-msgid "Menu: actions description"
-msgstr ""
-
-#: includes/profile_details.inc:59
-msgid "Menu: notifications title"
-msgstr ""
-
-#: includes/profile_details.inc:64
-msgid "Menu: notifications description"
-msgstr ""
-
-#: includes/profile_details.inc:74
-msgid "Outro"
-msgstr ""
-
-#: includes/profile_notifications.inc:72
-msgid "via e-mail"
-msgstr ""
-
-#: includes/profile_notifications.inc:78
-msgid "via sms"
-msgstr ""
-
-#: includes/profile_notifications.inc:85
-msgid "to e-mail address"
-msgstr ""
-
-#: includes/profile_notifications.inc:92
-msgid "to mobile number"
-msgstr ""
-
-#: includes/profile_notifications.inc:103 includes/registration_confirmation.inc:50
-msgid "Confirm"
-msgstr ""
-
-#: includes/profile_notifications.inc:115
-msgid "Invalid e-mail address"
-msgstr ""
-
-#: includes/profile_notifications.inc:127
-msgid "to mobile number field is required."
-msgstr ""
-
-#: includes/profile_notifications.inc:217
-msgid "An error occurred."
-msgstr ""
-
-#: includes/profile_notifications.inc:220 includes/registration_confirmation.inc:78
-msgid "Your changes have been saved."
-msgstr ""
-
-#: includes/profile_notifications.inc:232
-msgid "UiTPAS profile notifications settings"
-msgstr ""
-
-#: includes/profile_summary.inc:113
-msgid "Title for the promotions"
-msgstr ""
-
-#: includes/profile_summary.inc:114 theme/theme.inc:468
-msgid "Your UiTPAS advantages"
-msgstr ""
-
-#: includes/profile_summary.inc:118
-msgid "Title for the upcoming promotions"
-msgstr ""
-
-#: includes/profile_summary.inc:119 theme/theme.inc:485
-msgid "Just a few points more for"
-msgstr ""
-
-#: includes/profile_summary.inc:123 includes/promotions_highlight.inc:62
-msgid "More link text"
-msgstr ""
-
-#: includes/profile_summary.inc:124 theme/theme.inc:502
-msgid "Show all my promotions"
-msgstr ""
-
-#: includes/promotions_highlight.inc:63 theme/theme.inc:612
-msgid "Show all promotions"
-msgstr ""
-
-#: includes/recent_actions.inc:57
-msgid "Default image"
-msgstr ""
-
-#: includes/recent_actions.inc:59
-msgid "Use full url or an absolute path."
-msgstr ""
-
-#: includes/registration_confirmation.inc:54
-msgid "Click here to continue to the homepage"
-msgstr ""
-
-#: includes/registration_confirmation.inc:85
-msgid "An error occured."
-msgstr ""
-
-#: includes/registration_confirmation.inc:98
-msgid "UiTPAS registration confirmation settings"
-msgstr ""
-
-#: includes/registration_confirmation.inc:108 includes/user_register.inc:179
-msgid "Intro text"
-msgstr ""
-
-#: includes/registration_confirmation.inc:113
-msgid "Actions label"
-msgstr ""
-
-#: includes/user_register.inc:29;180
-msgid "Register here, so you can follow your UiTPAS advantages and points balance online."
-msgstr ""
-
-#: includes/user_register.inc:35;185
-msgid "UiTPAS number"
-msgstr ""
-
-#: includes/user_register.inc:40 theme/theme.inc:396
-msgid "Date of birth"
-msgstr ""
-
-#: includes/user_register.inc:47;190
-msgid "Continue"
-msgstr ""
-
-#: includes/user_register.inc:54;195
-msgid "Already registered?Already registered ? Apply here ."
-msgstr ""
-
-#: includes/user_register.inc:106
-msgid "Invalid date of birth."
-msgstr ""
-
-#: includes/user_register.inc:111
-msgid "Invalid UiTPAS number."
-msgstr ""
-
-#: includes/user_register.inc:116
-msgid "User already activated."
-msgstr ""
-
-#: includes/user_register.inc:121
-msgid "Missing required fields."
-msgstr ""
-
-#: includes/user_register.inc:126
-msgid "Invalid date."
-msgstr ""
-
-#: includes/user_register.inc:131
-msgid "Unknown UiTPAS number."
-msgstr ""
-
-#: includes/user_register.inc:136
-msgid "Action failed."
-msgstr ""
-
-#: includes/user_register.inc:141;146
-msgid "We are unable to process your request at this moment. Please try again later."
-msgstr ""
-
-#: includes/user_register.inc:184
-msgid "Label for UiTPAS number field"
-msgstr ""
-
-#: includes/user_register.inc:189
-msgid "Value for the submit button"
-msgstr ""
-
-#: includes/user_register.inc:194
-msgid "Apply text"
-msgstr ""
-
-#: theme/theme.inc:25;528
-msgid "From !date"
-msgstr ""
-
-#: theme/theme.inc:27;530
-msgid "to !date"
-msgstr ""
-
-#: theme/theme.inc:38;541
-msgid "At"
-msgstr ""
-
-#: theme/theme.inc:43;546
-msgid "Provided by !provider"
-msgstr ""
-
-#: theme/theme.inc:53;556
-msgid "Only available for"
-msgstr ""
-
-#: theme/theme.inc:100
-msgid "Welcome advantages"
-msgstr ""
-
-#: theme/theme.inc:101;136;260;302;345
-msgid "Availability"
-msgstr ""
-
-#: theme/theme.inc:102;137;261;303;346
-msgid "Description"
-msgstr ""
-
-#: theme/theme.inc:103;138
-msgid "Counters"
-msgstr ""
-
-#: theme/theme.inc:117;156;284;326;365
-msgid "Until end of stock"
-msgstr ""
-
-#: theme/theme.inc:127;166
-msgid "No results found"
-msgstr ""
-
-#: theme/theme.inc:135
-msgid "Promotions"
-msgstr ""
-
-#: theme/theme.inc:200
-msgid "Date"
-msgstr ""
-
-#: theme/theme.inc:200
-msgid "Activity name"
-msgstr ""
-
-#: theme/theme.inc:200
-msgid "Location"
-msgstr ""
-
-#: theme/theme.inc:200 views/culturefeed_uitpas.views.inc:68
-msgid "Points"
-msgstr ""
-
-#: theme/theme.inc:219;292;334;373
-msgid "No results found."
-msgstr ""
-
-#: theme/theme.inc:259
-msgid "Trade-in options"
-msgstr ""
-
-#: theme/theme.inc:268;310
-msgid "1 point"
-msgstr ""
-
-#: theme/theme.inc:269;311;477;494
-msgid "!points points"
-msgstr ""
-
-#: theme/theme.inc:301
-msgid "Coming trade-in options"
-msgstr ""
-
-#: theme/theme.inc:344
-msgid "Advantages"
-msgstr ""
-
-#: theme/theme.inc:392
-msgid "UITpas number"
-msgstr ""
-
-#: theme/theme.inc:394
-msgid "First name"
-msgstr ""
-
-#: theme/theme.inc:395
-msgid "Name"
-msgstr ""
-
-#: theme/theme.inc:397
-msgid "Place of birth"
-msgstr ""
-
-#: theme/theme.inc:398
-msgid "Gender"
-msgstr ""
-
-#: theme/theme.inc:398
-msgid "Male"
-msgstr ""
-
-#: theme/theme.inc:398
-msgid "Female"
-msgstr ""
-
-#: theme/theme.inc:399
-msgid "Nationality"
-msgstr ""
-
-#: theme/theme.inc:400
-msgid "Street"
-msgstr ""
-
-#: theme/theme.inc:401
-msgid "Nr"
-msgstr ""
-
-#: theme/theme.inc:402
-msgid "Bus"
-msgstr ""
-
-#: theme/theme.inc:403
-msgid "Zip"
-msgstr ""
-
-#: theme/theme.inc:404
-msgid "City"
-msgstr ""
-
-#: theme/theme.inc:405
-msgid "Telephone"
-msgstr ""
-
-#: theme/theme.inc:406
-msgid "Mobile"
-msgstr ""
-
-#: theme/theme.inc:407
-msgid "Email"
-msgstr ""
-
-#: theme/theme.inc:408
-msgid "Status"
-msgstr ""
-
-#: theme/theme.inc:411;416
-msgid "valid till !date"
-msgstr ""
-
-#: theme/theme.inc:412
-msgid "Opportunity status"
-msgstr ""
-
-#: theme/theme.inc:447
-msgid "1 point saved"
-msgstr ""
-
-#: theme/theme.inc:448
-msgid "%points points saved"
-msgstr ""
-
-#: theme/theme.inc:638
-msgid "Anonymous"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:19
-msgid "Culturefeed UiTPAS promotions query"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:20
-msgid "Query on UiTPAS promotions."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:34;37
-msgid "UiTPAS promotions"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:46
-msgid "ID"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:47
-msgid "The promotion ID."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:55
-msgid "Title"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:56
-msgid "The promotion title."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:69
-msgid "The points necessary to make use of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:80
-msgid "Cashin state"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:81
-msgid "The cashin state of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:89;93
-msgid "Unexpired"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:90
-msgid "If the promotion is not expired yet."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:98;102
-msgid "In spotlight"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:99
-msgid "If the promotion is in the spotlight."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:107
-msgid "Owning card system"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:108
-msgid "The card system owning the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:116
-msgid "Applicable card system"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:117
-msgid "The card system the promotion is applicable to."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:125
-msgid "Cashing period begin"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:126
-msgid "The start of the promotion's cashing period."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:138
-msgid "Cashing period end"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:139
-msgid "The end of the promotion's cashing period."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:151
-msgid "Creation date"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:152
-msgid "The creation date of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:160
-msgid "Description 1"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:161
-msgid "The description (1) of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:170
-msgid "Description 2"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:171
-msgid "The description (2) of the promotion."
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:179
-msgid "Image"
-msgstr ""
-
-#: views/culturefeed_uitpas.views.inc:180
-msgid "The images of the promotion."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:29
-msgid "Show all available images"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:30
-msgid "Enable to show all images."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:35
-msgid "Maximum height for images"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:40
-msgid "Maximum width for images"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:33 views/handlers/culturefeed_uitpas_views_handler_field_title.inc:27
-msgid "Link this field to the original piece of content"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:34 views/handlers/culturefeed_uitpas_views_handler_field_title.inc:28
-msgid "Enable to override this field's links."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:54
-msgid "filter"
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:54
-msgid "Missing text format: %format."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc:22;38
-msgid "Card system ID of the Drupal installation."
-msgstr ""
-
-#: views/handlers/culturefeed_uitpas_views_handler_filter_date.inc:28
-msgid "now"
-msgstr ""
-
-Requested 0 API calls in 0 ms Queries exceeding 100 ms are highlighted .
\ No newline at end of file
diff --git a/culturefeed_uitpas/translations/culturefeed_uitpas.nl.mo b/culturefeed_uitpas/translations/culturefeed_uitpas.nl.mo
deleted file mode 100644
index a772d38a660083dc050885e0979894d77fc8ae95..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 19636
zcmbuG3!EiYedmvWAcGGCqVf=nL10Fvo0-9pv0-Mqp=X93=jA*DNU*wZb>Hf~x9U<=
zx0@y!iI0fEpwVcQ4I~&fQCZm}=$gbND!RH7O-!Om)VMKf)Q=`+{gCV?8h5|Hb51>O
z_Z`KgKJ)KiovKsk@qeFl?tJO2Q{H5_z6o6bwN5kUs>d1gz?1dVm^;rlMz^m4e*%09
zxD9+S_%!g_;M2jA&oL$d&j+6bUIRV@+ykBp&VXuX9$W)1gC~Qp1kVKT^zYvaol4`#mm#ms7qEJRSTbsCNDWd?NTQa0~c56z~%upPEmBn#Wf_SZ4ka)V%)%)c8+{
za09p-yaX)3jo>}tI`9#2EBGk5794?j7l8*s^_zief63#kJigK6{op+B9|U)U=bdZJ
zVQ?ChyxtFr|Br%?2TwlFm`lOaLH?PI{E?hq0E#b%Kz;WjQ1iS8WN79c9{<2U|E$Nq
z1@-;6K#lXe;8Q?zzA+(iCa7`-!Xoo>@Fei9p!o4C;IqMxfEwS|!9Ms8pp^^CsqcCo
zUk$3C`+WHUkS@)`p!oVFQ1f`oGo3!13yP0BL0Dk+fUwH6JiZj?Zs@$2_N
z&Ht0W{8>=_eic;v-v#++zVGq83*GyzpuXD$s+|{t((@Pl_qT!?&&xpR%PT?gBgjpHUz{FwLUTRq+Zs{Pl2h{)Un$}ZmT%YW?g8=%@b1!b1}&jt^H
z7lX31MNoXW3sgU^2cHA}GKgz29|0w=&w-NvKl$gUVIB60y#tgzKLYa4e2+ik+lBnm`)fV6L5<^XQ2hQ~a5MNhQ1UpP&eiYvpzL}hxE{P2
z906Yqz8!oY_%`rH8W*4b9UKSGy%gKlbMSibJsuwgCC_a*wI#3s9}j*Tl)io!gazgd
zoQB3R;&BHky?miB-vY`WZUv=Bul4Wm_2u_~`u>BU>U|nSmCQFm@$CsrM*Kbtlzy)F
zxCNAcOn{pI5m4iaLHUQfz$bve4(huHz;5jf^<2eQ9N*~S#Wp`UZwR70xaquL{H-XaUpYqQaz*8xwp!m56J_&pY
zsPBIsOu@TBz5fBI`lpOK|9%Fj=Vybbfam)1g`np7Y*2jO=-*Fx+y%}*4!;UMnfLEU
z`NX%6ffL~8LD|g(8y){Pg8}6|;FG`w|9lx#|Gx-s0e=}h9sCri@%$wy{(ccuKi>g0
z{~v&A{|t;?c5o3m4&LDL9+07#FMzVQH7GfsmK8A6Da;Y0IHo2fcpMn|NKwEvnYQNM1{Bw8boEyouJ)1bcpHYol0HxSmD$H81aF;{}>Ck7>-)IVPaWfu>EvX>8l(&NvA
zs`n@;KKuYwy)|2%9M1-yN_j09gUF^`q!Z5^Y`FSfd32iBDErto?(FmiQ2m4;s$|-r+Wj?9-+vHPdw&j!kN+E#
z{XB8Pz25@r`@J3ygVM(vL0DpDz-NK?gBODz1~uQWfolJI;6>nBD2w`eE~xj1z^8+4
zP;$Bh6de#kYI>`*(q;n)xs&{(c|48@%*7V}2EUAE@~poh0W6Zv`cf4}qw>IcKNy
zU;98^ubHOyFtn2AyDK0G^p>s
z=Ym0u;Y~0lWZwJBZ6N9|kW2{{__eF1+5^@d$W`
z@>WoKco#@l=3ek5@T=hWz^{WZ0KbBAsGTcNYRUOH_~&2-N*=qYBssna48WIwPXO-)
zPXpfxo(#Sh)O>&2mp=raO8KLp`1uGZef$ilaeNtk8TeK36tK0|)sI27-vibDGN|u=
z)|X!mia)Od#n-oj`u^P>9|Rvq`OhGxXnoghAnIVR+xhzz=x3l&NV0e(Gy`dT?}y$F
z{Q~qssJyP`hNjKE(4YE;Zv!<3T?e6gNIZNG^jS!Hp-bccIP^^w{Pk||@1S3S{s(jy
z^y|>dOT15^pM<^yy$kv!NORV;0s0FFw`?!z`o+-aAY6-i5p)CeM-Z$wzY9seuY>M^
zbbT0-jwH~Rp#mzeH*k|dW6+iU;f>(5zyAa%ySfOPfI84eAnBg$U?cP!kgiGSBxoBH
zL%Mzr>Ox;pf$MMWU;LX#>y!L_?(uGq4|x0lpRbj4!_&T=w_B10I9^61u=YyBWL>8izt?
z3DPCo{#EFwRN#7v1M^<+kD*hc*F#^0?tp#|S_j<;eIC;FYUp8T6Z8d0*Vmw((3_#n
zkglW92kagBDEQaVY0%}+JD?-bUqM@-=Rto0={f`YZRl1NxYk0yW$%b{;G3Wi`Lf{Y
z&{@#apv$1YhuTmJ`gus#EznK&&i(ms{{B+%wa^sw`~KM?_&3nUpkMUQ{wMec&?Qg=
z9e}QdPKI6vt-Q|W!E2zOg`V4Z`C{(B0j+`l7xYp{*OQ@r_Rjq|)VSZH`-^&MoD_NB
zz-)3iW_%{?Cq?=6nlNZ*(d@Rh<5@Hp=S7r_EVZL7TDyH$oV0?pUj(*%%@yJHph$zc
zs0hL&I2s>0IC0pF&!$;7EQ+XgOQY2jJkHH{H%@|)V7wdN7NoPmc##%iC+KBqH!b2c
zp~7O?>31XE^s{8J6cp_^=f!d_G7~eZ?je{B<4)8XH50AHFe$>hC^r+GjwqN3vsREV
zGp(+D*z8O1HD~oZ(aEB)wH%~NNjotf!pc3cBb%17y9lr6^5k{A&(l;yPVxf*n%?sSyp?YPItl3+;9tgISZPUN=R
zA65_P^qA<6tk>vTb<YCQ-K8%{U)-k?JE>u#
zHrJ&|D|Q;o?QEQN&2=b{o~SLx)bF6d(XJ?>-};{Zie8wPk7jvY4xu)J;MRVW!A|#?
zt<$%kjRnzSgypuP0=DNtSnK<+%AUo+y1d`*hS~D^p-q;x5-e~Q5!+df!S5nVPxOJe
z)}S5FwL4Jpm@AG2-874WPMjLMv7h0+DYFE?^JCWHHcM!80Zp5Vj
zz$kacSzb72vx^wm3NCR$tDc=1cwY0(>>@@57g^i3x8wG9H+}{E+dU8yRcbgubG;M4
z_48%mv;vL7EUDzM9Q4Ahh-cy+CWtq~y>+5E$B9@&Sj62#m^_1yZkuU`$()!Ob){?c
zup|##zA#fkTe=bk3t^H+@|;D#Uzn*$Gv%CWHL-w@N>6gMc`q%jF^>+dg@2%fUQGB3
zmZO47*0QF$y)-KbyJMR3Wf)2#r)K9L;l&wN89bXz8EsgbBJYUY!rJYJxV0X_>S;Kw
z>_cPohQzSvqZ##$HI&1puo!mY%8{1tyL>D`RenLAy4reNm!gp_8jF#)vMA5Zo<4dK
z2D8|(&!Mc_60i4K*QHd%s<9@h5vEy8*ikYQ?OR#dQDRE_{0n(q
zeL&VW7F^2T0F?^_P8b9sZ|c3&eap?I*)+9>&au)1sb%OH;msWg)+>owg=
z^KHWrsq1qVebz`zRIEH3QVi{bdNBKyOYFCC47DIH*`M;SWIC$5Lq)_)ctD8q1FIg4
zn*EvCZ}R|awl2w%tXpy3>x48~zpSG0V|njf+%yi+s!e5x@`icQXx8f;ij<=Y!<%k=
z-5A<|*;$fN>xT~{E8~(m(38RT6X#EgFpFnrtpbske#jTgHg_YjJkaQY685ec7wOD`Ik1#SlN%|#IoJuEak(IW
z(5`QcgEEwrMNG6v$)g&2THgjl@9{L73zImvs-kL(L@2Q>7>BVcWaZNw^-wunn%Yvf^EbE8(cGI*{}gg%_eHK@YIiZr+77G7
zE1z}ouq0(tX{B*_Af1t?_deus>DdQbQw+<^;UbHo!W=;ey>^;J<_NymYKWE)8`NMc
zKu$I_QDmcYtuydJ-iD_;=+FY@i1H)Cu7aA@
ze8Z<&37;jMZ=_TaCnWcf6eY8!KftZwVYf8JSbza}BT{FZ?Tt&jZBd+JOmX6Zw$_?$RDC*%5t4LJkKNE?+WuKJ5pmUbCH+~KueXeG+gmKz-2-VVlx2TItK5#D
zl)sIZP4}0jp;pDzEc4b9(Eau1*YKbDiWmJJ3ZVvS&KN()iBd`O^2x!{O;k@5;n?)^
zU(`CY`bnK}`pWoxtE^R9Zjn%a=}IuEe6V_e^^;YNJ8K|Mviqcs*NI;*nWM=FRi(T4PTS=|&T4C!*}V5CUU#;SE5SBdfMD@KIGwYB%7TYgWSbte
zO%nROO|3T;v3O
z2=Rw5o-wtd-flFQsN^}5=By-|@
z+1B1X8tg)By(nd4)Hy3T<&_CK8G5NXuxgeB$oBHs*V@%QQ9|N%BKBGv_VL_%LmM$F
zuTU$z{Tz2}IbSKeZNLk_I%g*CUZI^>iIyZ+Z#K{I+
zOXc=|cs~J~LD~+sKCF&Y<+yIKajMQx8qUqeW7L6#xz>J;1=CRy&Blmtb!y$*qbL|@
zCvuHXrgntVS#Jtnk*)r_FbFfM4e*AiYCcAm<)GOlwr^aJW)-I08ynZP=ZC%C823y#
zmzuEPUoc*}Gt*)vN_wk3&@S5zZ9_hxFWsCB@-`?~%_SHfCu_G`sM3>i6pkTYr0|KQ
zuG<)0)?|h##xR~4t5fc8Zf@<9)-gCc4P(!A^d~pg<9OHS_G9osr7v8Hq6H(n(eg_h
zJ|k1Dkz<4_-2Yf`@X&!hJFhzu9NT&5@YI3*YYrYbGE#27k4)lx#)8coH(fQd@p&T~
zHwT+GjcvK=@{OA}ZlvPKp=dEyD=X`54K_Z1?8+^!-rg`TMvi1`o#D#TY%JJ6v2SN^
z&CY!jQ+vlJCMOT=JbZZjn!Rkn^|7RpBT?8L3nu#oo@-^LeN+2()+66Ex^WH11=Um7*Xs=g*VWIFo8t}0sX){Tt8KB|Xgi(*fDS#GY6rUO_(MqP7bhq;z9
zxTgdPmrB$7u%pE=>9SQGCC;hTGbrMD7!c31^!jlo^Pg{kk!vsic2e0QkVu$XzdGn(
z7q%OQMUE=>da!0sTE9~ej&<~~*5|;^ZDF_qy>;nRG87-fSzoF7oYQf1WkFRm
zEamH3VM^+*_mOH$d}ilJYS~rxb+}+XNCq>pGPqBU);X?;=Nfag>Mf&1$LMO2
z1TTgW{xCBl%j|Qq=?)@?oMqad05p#ty}jR_iuJ9GWDYHg@;qh4xNydPdm=7bZCh$C^r`HBkV1P7WcwNRM`!j}+;
zW5Z@JwB{IxH{_}?KMVNTM6{4|wvsFiZNMFO;w7ww46Wk%>YW8k8GGD`Y<5S}uorh~
zC56N%`98(nEjgR{Vr6!|dpu+w5o&kt?2ha&zE9`M`ZG)oiChIZOhBo1f7
z1sh8$3uiOEO~B8j1MG3IxWI{exu}_;U%+~lqLL&7BQauOAyh7d
zCkd#*FV1TDhW?^tfm;}W&S9GEXu7a2Ai;?le;B$-xayAIJKz?4jf!FQn`7|bEo8Y1
z`DG6Z8KIq|P;_Lj4~Y|W>-5+alYZlg_h()qyePdOEN?MFl#010+I!
zRd9S*q3ba*ZlV$z%E07KJNSEw*JQJ~->Xfv0T?D-twXq!%cN7P_S8*}JE~(HN7G~0|)zzhT4QKNh>RYGu
zBkKk3>^0QM>p*2r<>rv)0KVWdhr6k86zsW{8avjPM9pN
zTxx-TNU9^>cACy%2iEO1y+c)DnjM1H&>E#s?X=Mv{ids}ny`?0X;EEk0FIBA@E7pa
z2C%e8a)%lZ92!R*v(L_;+?6JmD!sid$7ONu*~&z%QBldfEqV{pxL+M@7$|b;;7paP
zG^^I0X?2zA-H$oIfxN3sxSDNf?8*Z9qaPUQ(3yP2?2n={|4&flx!TfqU|q1=9YNzK
zrBU9)p6CS!(l)a*6Z(Z?XD||!nZwX`tK50r#EKx!f?qaXpswuqI#t&hAzOO!JUf5N
zgO$ftjKt9m8x4vj_vWG~zdkFIlJzI3j?uc+9IeU4NEKZ;l^ru8>#Wo(8Mc1UqVwly
z)>(k}VcsMOssWj$OC9yo99i^WCcNrUdUcy8I=*h!G!w4*a;3LFhC4RhlVfMBSs1pI
z9>Ad`H$yzq>XnG|sB8hSY%&MkGTVX8Kl~$imL0P#a;)N3b;mE>=2skMui#|kK>OMl
z-%xt~qf;X|SMB4X!Z$XPcF$H##L31TXxkXTuK=j8pqkiU;4aGkz1>b|D^}$y*vprS
z7i@9jaCz+X!p=_b2F$DK57k=L5MHdPoXX;~PN22!JL>{hecX6A
z;96~0m|a({Z540)TSCdISJ$$>RHmiO&1P*U(ArwA^1^l0CZqSq-YAICvG*+IY2A%Y
zAMBzpSZ6aGnXKYQBRFvkjs?-84?7%wFRcHOTIn=v(DYVnZgWX%=OkzEXTg`mO!>5E
zj#X%HaH-*BOq~-hM(P^ns>J7O^^#dj<2uVijn2&M(a5HOexxp^X&f%wd~*)FL8}^P%T#Y3E!+I2UOZa{pg1^R
z5+8U#e#K}=Oi4+nv+c*@`P=n_Hv({(ZQD#u-q#AA#KngYwC~|}J^U`$24kpaRGu84
z;A}bKT!JklP0q2)Z{H1CEpoJD_ZgL<7mT%$gU$x)Y7w9y$4n$37Nh(?Sm#a!^P6)&
z4W%okdc&J@s?cbLRYSF!umO^$+kLhbIAUoyI&*!DPh<(+Qs2XUPt!AuR4e1vAJ${A
zI^tYT{lQM=IJiXz8(e(hO}S`h6y8@US
zQ#HYvC%F$NTCyftZ>P0^vu?LV=%+24Dcydv=|)I$oQN`a(mSy#2Xz}RT{*Yf!r@JG
z_Gn6DevQTl4w12F{+E$W4y_^EwL`%VvHW3A^X#PRN;CD7kt1~zZcN3UxGXh-vrlBE
zBbyJ6^5fXN;2<$FitMB~hQ)(u;81z4I#h<4Ez^nm&D}(nq6SA$$8mqEES}r&7TPID
z3rf3h1Oto<<~8|6Jw#c}(Z?u;C!12i)@gefBBjyy_75{ySmHPiyD)CUBr?-l
Zp}4=iCROxak?jv{d({u@L9@)u{C@$SMJWIP
diff --git a/culturefeed_uitpas/translations/culturefeed_uitpas.nl.po b/culturefeed_uitpas/translations/culturefeed_uitpas.nl.po
deleted file mode 100644
index c1de2d1e..00000000
--- a/culturefeed_uitpas/translations/culturefeed_uitpas.nl.po
+++ /dev/null
@@ -1,1030 +0,0 @@
-# $Id$
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_uitpas.admin.inc: n/a
-# culturefeed_uitpas.blocks.inc: n/a
-# culturefeed_uitpas.profile.inc: n/a
-# culturefeed_uitpas.module: n/a
-# includes/profile_details.inc: n/a
-# culturefeed_uitpas.forms.inc: n/a
-# includes/registration_confirmation.inc: n/a
-# culturefeed_uitpas.helpers.inc: n/a
-# culturefeed_uitpas.menu.inc: n/a
-# includes/profile_promotions.inc: n/a
-# includes/profile_actions.inc: n/a
-# culturefeed_uitpas.theme.inc: n/a
-# includes/advantages.inc: n/a
-# includes/promotions.inc: n/a
-# includes/user_register.inc: n/a
-# culturefeed_uitpas.variable.inc: n/a
-# culturefeed_uitpas.info: n/a
-# ctools/plugins/views_wizard/culturefeed_uitpas_views_wizard_promotions.inc: n/a
-# includes/profile_advantages.inc: n/a
-# theme/theme.inc: n/a
-# includes/promotions_highlight.inc: n/a
-# includes/event_details_advantages.inc: n/a
-# includes/profile_coupons.inc: n/a
-# includes/profile_memberships.inc: n/a
-# includes/register_where.inc: n/a
-# includes/synchronization.inc: n/a
-# includes/profile_summary.inc: n/a
-# views/culturefeed_uitpas.views.inc: n/a
-# includes/recent_actions.inc: n/a
-# theme/culturefeed-uitpas-advantage.tpl.php: n/a
-# theme/culturefeed-uitpas-promotion.tpl.php: n/a
-# views/handlers/culturefeed_uitpas_views_handler_field_image.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_field_markup.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_field_title.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc: n/a
-# views/handlers/culturefeed_uitpas_views_handler_filter_date.inc: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2017-06-02 11:57+0200\n"
-"PO-Revision-Date: 2017-06-08 09:35+0200\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 2.0.1\n"
-
-#: culturefeed_uitpas.admin.inc:14
-msgid "Your cardsystem id"
-msgstr ""
-
-#: culturefeed_uitpas.admin.inc:16
-msgid "Use the id of your cardsystem. Leave empty when your site is using multiple cardsystems."
-msgstr ""
-
-#: culturefeed_uitpas.admin.inc:29
-msgid "Or select multiple cardsystems"
-msgstr ""
-
-#: culturefeed_uitpas.admin.inc:31
-msgid "Only use this if your site is intended for passholders of multiple UiTPAS regions"
-msgstr ""
-
-#: culturefeed_uitpas.admin.inc:36
-msgid "The card name, used as title in profile sections block."
-msgstr "Naam van kaart (deze wordt gebruikt als titel in profielblok)"
-
-#: culturefeed_uitpas.admin.inc:37
-msgid "Card name"
-msgstr "Naam kaart"
-
-#: culturefeed_uitpas.admin.inc:43
-msgid "Show message to users without UiTPAS"
-msgstr "Bericht weergeven voor UiTPAS gebruikers"
-
-#: culturefeed_uitpas.admin.inc:44
-msgid "When checked a message is shown on each page when the UiTiD user does not have a UiTPAS activated, to remind him/her to activate their card."
-msgstr "Ja, herinner UiTiD gebruikers eraan om hun UiTPAS online te activeren."
-
-#: culturefeed_uitpas.admin.inc:59
-msgid "UiTPAS locations"
-msgstr "UiTPAS steden / gemeenten"
-
-#: culturefeed_uitpas.admin.inc:71
-msgid "Locations"
-msgstr "Steden / Gemeenten (Voeg alle beschikbare steden en gemeenten toe. Deze worden gebruikt als filter opties op /register_where)"
-
-#: culturefeed_uitpas.admin.inc:74
-msgid "These locations will only be used when only 1 card system is enabled"
-msgstr ""
-
-#: culturefeed_uitpas.blocks.inc:15
-msgid "Culturefeed uitpas: event details advantages"
-msgstr "Culturefeed uitpas: beschikbare voordelen voor een activiteit of locatie"
-
-#: culturefeed_uitpas.blocks.inc:19
-msgid "Culturefeed uitpas: profile (summary)"
-msgstr "Culturefeed uitpas: profielinformatie"
-
-#: culturefeed_uitpas.blocks.inc:23
-msgid "Culturefeed uitpas: promotions highlight"
-msgstr "Culturefeed uitpas: voordeel in de kijker"
-
-#: culturefeed_uitpas.blocks.inc:27
-msgid "Culturefeed uitpas: recent actions"
-msgstr "Culturefeed uitpas: recente acties"
-
-#: culturefeed_uitpas.blocks.inc:31
-msgid "Culturefeed uitpas: register for logged in users."
-msgstr "Culturefeed uitpas: UiTPAS registratie voor ingelogde gebruikers."
-
-#: culturefeed_uitpas.blocks.inc:35
-msgid "Culturefeed uitpas: register for not authenticated users."
-msgstr "Culturefeed uitpas: UiTPAS registratie voor niet geauthenticeerde gebruikers."
-
-#: culturefeed_uitpas.blocks.inc:109
-msgid "UiTPAS Advantages"
-msgstr "UiTPAS voordelen"
-
-#: culturefeed_uitpas.blocks.inc:119 culturefeed_uitpas.profile.inc:22
-#: culturefeed_uitpas.module:67 includes/profile_details.inc:256
-msgid "My UiTPAS"
-msgstr "Mijn UiTPAS"
-
-#: culturefeed_uitpas.blocks.inc:130
-msgid "Spotlight promotions"
-msgstr "Voordelen in de kijker"
-
-#: culturefeed_uitpas.blocks.inc:141
-msgid "Recent actions"
-msgstr "Recente gebeurtenissen"
-
-#: culturefeed_uitpas.blocks.inc:152
-msgid "Already own an UiTPAS?"
-msgstr "Heb je al een UiTPAS?"
-
-#: culturefeed_uitpas.forms.inc:31 includes/registration_confirmation.inc:47
-msgid "Make my UiTPAS actions available for others"
-msgstr "Toon op mijn profielpagina wanneer ik ergens een punt gespaard heb"
-
-#: culturefeed_uitpas.forms.inc:38 includes/registration_confirmation.inc:54
-msgid "Confirm"
-msgstr "Bevestigen"
-
-#: culturefeed_uitpas.helpers.inc:143
-msgid "Other regions"
-msgstr "Andere regio's"
-
-#: culturefeed_uitpas.menu.inc:53 culturefeed_uitpas.profile.inc:53
-msgid "An overview of all your UiTPAS actions."
-msgstr "Jouw UiTPAS acties."
-
-#: culturefeed_uitpas.menu.inc:60;68
-msgid "Discover which promotions and advantages you are entitled to."
-msgstr "Ontdek jouw UiTPAS voordelen."
-
-#: culturefeed_uitpas.menu.inc:75
-msgid "My Memberships"
-msgstr "Mijn lidmaatschappen"
-
-#: culturefeed_uitpas.menu.inc:76
-msgid "An overview of all you UiTPAS memberships"
-msgstr "Een overzicht van al uw UiTPAS lidmaatschappen"
-
-#: culturefeed_uitpas.menu.inc:82
-msgid "My Coupons"
-msgstr "Mijn voordeelbonnen"
-
-#: culturefeed_uitpas.menu.inc:83
-msgid "An overview of all you UiTPAS coupons"
-msgstr ""
-
-#: culturefeed_uitpas.profile.inc:25
-msgid "Check your personal UiTPAS data and cardnumber."
-msgstr "Bekijk je persoonlijke UiTPAS-gegevens en kaartnummer."
-
-#: culturefeed_uitpas.profile.inc:29 culturefeed_uitpas.module:73
-#: includes/profile_promotions.inc:66;113
-msgid "My promotions"
-msgstr "Mijn voordelen"
-
-#: culturefeed_uitpas.profile.inc:32
-msgid "Find out which promotions and advantages you are entitled to."
-msgstr "Ontdek op welke voordelen en geschenken je recht hebt"
-
-#: culturefeed_uitpas.profile.inc:36 culturefeed_uitpas.module:79
-msgid "My coupons"
-msgstr "Mijn voordeelbonnen"
-
-#: culturefeed_uitpas.profile.inc:39
-msgid "An overview of all your UiTPAS coupons."
-msgstr "Een overzicht van al jouw UiTPAS voordeelbonnen."
-
-#: culturefeed_uitpas.profile.inc:43 culturefeed_uitpas.module:85
-msgid "My memberships"
-msgstr "Mijn lidmaatschappen"
-
-#: culturefeed_uitpas.profile.inc:46
-msgid "An overview of all your UiTPAS memberships."
-msgstr "Een overzicht van al jouw UiTPAS lidmaatschappen"
-
-#: culturefeed_uitpas.profile.inc:50 culturefeed_uitpas.module:91
-#: includes/profile_actions.inc:77
-msgid "Points history"
-msgstr "Puntenhistoriek"
-
-#: culturefeed_uitpas.profile.inc:62
-msgid "Points balance"
-msgstr "Puntensaldo"
-
-#: culturefeed_uitpas.theme.inc:31
-msgid "Advantages"
-msgstr "Voordelen"
-
-#: culturefeed_uitpas.theme.inc:99 includes/advantages.inc:90
-#: includes/promotions.inc:121
-msgid "Promotions"
-msgstr "Voordelen"
-
-#: culturefeed_uitpas.theme.inc:252
-msgid "Opportunities tariff with @system: € !tariff"
-msgstr "Kansentarief voor @system: € !tariff"
-
-#: culturefeed_uitpas.theme.inc:256
-msgid "Opportunities tariff for pass holders from another region: € !tariff"
-msgstr "Kansentarief voor UiTPAS gebruikers uit een andere stad of gemeente: € !tariff"
-
-#: culturefeed_uitpas.theme.inc:314;327 includes/user_register.inc:55
-msgid "Register here, so you can follow your UiTPAS advantages and points balance online."
-msgstr "Activeer je UiTPAS en raadpleeg je puntensaldo en persoonlijke voordelen."
-
-#: culturefeed_uitpas.theme.inc:315;328 culturefeed_uitpas.module:111
-#: includes/user_register.inc:54
-msgid "Register your UiTPAS"
-msgstr "Activeer je UiTPAS"
-
-#: culturefeed_uitpas.theme.inc:316;332
-msgid "No UiTPAS yet?"
-msgstr "Heb je nog geen UiTPAS?"
-
-#: culturefeed_uitpas.theme.inc:317;334
-msgid "Get an UiTPAS"
-msgstr "Haal je UiTPAS"
-
-#: culturefeed_uitpas.theme.inc:326
-msgid "You did not register your UiTPAS yet."
-msgstr "Je hebt je UiTPAS nog niet geactiveerd."
-
-#: culturefeed_uitpas.theme.inc:333
-msgid "Holders of an UiTPAS can earn points by participating in leisure activities and exchange them for"
-msgstr "UiTPAS-houders sparen punten door deel te nemen aan vrijetijdsactiviteiten en kunnen deze inwisselen voor"
-
-#: culturefeed_uitpas.theme.inc:333
-msgid "nice benefits"
-msgstr "leuke voordelen"
-
-#: culturefeed_uitpas.variable.inc:15
-msgid "Culturefeed uitpas: profile notifications: intro"
-msgstr "Culturefeed uitpas: meldingen: inleiding"
-
-#: culturefeed_uitpas.variable.inc:19
-msgid "Culturefeed uitpas: promotions highlight: more link text"
-msgstr "Culturefeed uitpas: voordeel in de kijker: lees meer > tekstlink"
-
-#: culturefeed_uitpas.module:138
-msgid "You have successfully logged in, but you did not register your UiTPAS yet. Fill in the necessary information to consult your benefits and points balance. Do not show this message again ."
-msgstr "Je bent goed aangemeld, maar je UiTPAS is nog niet geactiveerd. Activeer je UiTPAS om je voordelen en puntensaldo te raadplegen. Dit bericht niet meer tonen ."
-
-#: culturefeed_uitpas.info:0
-msgid "CultureFeed Uitpas"
-msgstr "CultureFeed UiTPAS"
-
-#: culturefeed_uitpas.info:0
-msgid "Provides Uitpas UI elements"
-msgstr "Biedt UiTPAS UI-elementen"
-
-#: culturefeed_uitpas.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: ctools/plugins/views_wizard/culturefeed_uitpas_views_wizard_promotions.inc:15
-msgid "UiTPAS Promotions"
-msgstr "UiTPAS ruilvoordelen"
-
-#: includes/advantages.inc:64
-msgid "UiTPAS advantages settings"
-msgstr "UiTPAS welkomstvoordelen instellingen"
-
-#: includes/advantages.inc:70 includes/profile_advantages.inc:94
-msgid "Number of advantages to display"
-msgstr "Aantal weer te geven welkomstvoordelen"
-
-#: includes/advantages.inc:94 includes/profile_advantages.inc:125
-#: includes/profile_promotions.inc:133 includes/promotions.inc:125
-msgid "Welcome Advantages"
-msgstr "Welkomstvoordelen"
-
-#: includes/advantages.inc:119 theme/theme.inc:118
-msgid "This page shows all advantages for which UiTPAS holders can save points."
-msgstr "Hier vind je alle welkomstvoordelen voor UiTPAS-houders."
-
-#: includes/advantages.inc:122 includes/promotions.inc:158
-msgid "Discover your personal promotions and points balance."
-msgstr "Bekijk je persoonlijke voordelen en puntensaldo."
-
-#: includes/advantages.inc:125 includes/promotions.inc:161
-msgid "Find out where to get an UiTPAS"
-msgstr "Ontdek waar je een UiTPAS kan halen"
-
-#: includes/advantages.inc:127 includes/promotions.inc:163
-msgid "or login and register your UiTPAS to discover your personal promotions and points balance."
-msgstr "of meld je aan en activeer je UiTPAS om je puntensaldo en de voordelen waar jij recht op hebt te bekijken."
-
-#: includes/advantages.inc:147 includes/promotions.inc:183
-msgid "Filter by"
-msgstr "Filter op"
-
-#: includes/advantages.inc:149 includes/profile_advantages.inc:148
-#: includes/profile_promotions.inc:156 includes/promotions.inc:185
-msgid "All card systems"
-msgstr "Alle kaartsystemen"
-
-#: includes/advantages.inc:160 includes/promotions.inc:234
-msgid "Show all advantages"
-msgstr "Toon alle welkomstvoordelen"
-
-#: includes/advantages.inc:171 theme/theme.inc:128
-msgid "Found %count advantages"
-msgstr "%count welkomstvoordelen gevonden"
-
-#: includes/advantages.inc:173 includes/promotions.inc:196
-#: includes/promotions_highlight.inc:63 theme/theme.inc:631
-msgid "Show all promotions"
-msgstr "Toon alle UiTPAS voordelen"
-
-#: includes/advantages.inc:186 includes/promotions.inc:241
-msgid "No results found"
-msgstr "Geen resultaten gevonden"
-
-#: includes/advantages.inc:213
-msgid "UiTPAS advantages"
-msgstr "UiTPAS welkomstvoordelen"
-
-#: includes/event_details_advantages.inc:58
-msgid "Promotions at @organisation"
-msgstr "Voordelen bij @organisation"
-
-#: includes/event_details_advantages.inc:59
-msgid "All promotions"
-msgstr "Alle voordelen"
-
-#: includes/event_details_advantages.inc:83 theme/theme.inc:959
-msgid "You have insufficient points"
-msgstr "Je hebt onvoldoende punten"
-
-#: includes/event_details_advantages.inc:92 theme/theme.inc:512;846;964
-msgid "1 point"
-msgid_plural "@count points"
-msgstr[0] "1 punt"
-msgstr[1] "@count punten"
-
-#: includes/profile_advantages.inc:60;105
-msgid "My advantages"
-msgstr "Mijn voordelen"
-
-#: includes/profile_advantages.inc:88
-msgid "My UiTPAS advantages settings"
-msgstr "Mijn UiTPAS welkomstvoordelen instellingen"
-
-#: includes/profile_advantages.inc:121 includes/profile_promotions.inc:129
-msgid "My Promotions"
-msgstr "Mijn voordelen"
-
-#: includes/profile_advantages.inc:146 includes/profile_promotions.inc:154
-msgid "Distributed by"
-msgstr "Verdeeld door"
-
-#: includes/profile_coupons.inc:28
-msgid "There were no coupons found for this user"
-msgstr "Je hebt momenteel geen voordeelbonnen."
-
-#: includes/profile_details.inc:30
-msgid "First name"
-msgstr "Voornaam"
-
-#: includes/profile_details.inc:37 includes/profile_memberships.inc:20
-msgid "Name"
-msgstr "Naam"
-
-#: includes/profile_details.inc:53 includes/user_register.inc:87
-msgid "Date of birth"
-msgstr "Geboortedatum"
-
-#: includes/profile_details.inc:60
-msgid "Place of birth"
-msgstr "Geboorteplaats"
-
-#: includes/profile_details.inc:65
-msgid "Male"
-msgstr "Man"
-
-#: includes/profile_details.inc:65
-msgid "Female"
-msgstr "Vrouw"
-
-#: includes/profile_details.inc:67
-msgid "Gender"
-msgstr "Geslacht"
-
-#: includes/profile_details.inc:74
-msgid "Nationality"
-msgstr "Nationaliteit"
-
-#: includes/profile_details.inc:81
-msgid "Street"
-msgstr "Straat"
-
-#: includes/profile_details.inc:88
-msgid "Nr"
-msgstr "Nummer"
-
-#: includes/profile_details.inc:95
-msgid "Zip"
-msgstr "Postcode"
-
-#: includes/profile_details.inc:102 includes/register_where.inc:156
-msgid "City"
-msgstr "Stad of gemeente"
-
-#: includes/profile_details.inc:108
-msgid "Telephone"
-msgstr "Telefoon"
-
-#: includes/profile_details.inc:114
-msgid "Mobile"
-msgstr "Mobiel"
-
-#: includes/profile_details.inc:121
-msgid "Email"
-msgstr "E-mail"
-
-#: includes/profile_details.inc:130
-msgid "This email address is synchronized with your online account and will be used for all communication regarding @site-name and @card-name."
-msgstr "Dit e-mailadres wordt gebruikt voor je logingegevens en voor alle communicatie aangaande @site-name en @card-name."
-
-#: includes/profile_details.inc:137
-msgid "Save"
-msgstr "Opslaan"
-
-#: includes/profile_details.inc:159
-msgid "Invalid e-mail address"
-msgstr "Gelieve een geldig e-mailadres in te vullen"
-
-#: includes/profile_details.inc:225 includes/synchronization.inc:128
-msgid "An error occurred."
-msgstr "Er is een tijdelijke fout opgetreden. Probeer het later opnieuw."
-
-#: includes/profile_details.inc:228 includes/registration_confirmation.inc:82
-#: includes/synchronization.inc:140
-msgid "Your changes have been saved."
-msgstr "Jouw wijzigingen werden bewaard."
-
-#: includes/profile_memberships.inc:20
-msgid "Valid until"
-msgstr "Vervalt op"
-
-#: includes/profile_memberships.inc:30
-msgid "There were no memberships found for this user"
-msgstr "Je hebt momenteel geen lidmaatschappen."
-
-#: includes/profile_promotions.inc:96
-msgid "My UiTPAS promotions settings"
-msgstr "Mijn UiTPAS voordelen instellingen"
-
-#: includes/profile_promotions.inc:102 includes/promotions.inc:85
-#: includes/promotions_highlight.inc:57
-msgid "Number of promotions to display"
-msgstr "Aantal weer te geven voordelen"
-
-#: includes/profile_summary.inc:113
-msgid "Title for the promotions"
-msgstr "Voordelen"
-
-#: includes/profile_summary.inc:114 theme/theme.inc:440
-msgid "Your UiTPAS advantages"
-msgstr "Jouw UiTPAS voordelen"
-
-#: includes/profile_summary.inc:118
-msgid "Title for the upcoming promotions"
-msgstr "Wordt verwacht"
-
-#: includes/profile_summary.inc:119 theme/theme.inc:457
-msgid "Just a few points more for"
-msgstr "Nog enkele punten sparen ..."
-
-#: includes/profile_summary.inc:123 includes/promotions_highlight.inc:62
-msgid "More link text"
-msgstr "Meer informatie"
-
-#: includes/profile_summary.inc:124 theme/theme.inc:474
-msgid "Show all my promotions"
-msgstr "Toon al mijn UiTPAS voordelen"
-
-#: includes/promotions.inc:79
-msgid "UiTPAS promotions settings"
-msgstr "UiTPAS voordelen instellingen"
-
-#: includes/promotions.inc:90
-msgid "Show advantages above the promotions list."
-msgstr "Toon welkomstvoordelen boven de lijst met ruilvoordelen"
-
-#: includes/promotions.inc:95
-msgid "Number of advantages to show above the promotions list"
-msgstr "Aantal welkomstvoordelen die getoond worden boven lijst met ruilvoordelen."
-
-#: includes/promotions.inc:155 theme/theme.inc:155
-msgid "This page shows all promotions for which UiTPAS holders can save points."
-msgstr "Hier vind je alle voordelen voor UiTPAS-houders."
-
-#: includes/promotions.inc:211 theme/theme.inc:167
-msgid "Found %count promotions"
-msgstr "%count voordelen gevonden"
-
-#: includes/promotions.inc:268 views/culturefeed_uitpas.views.inc:34;37
-msgid "UiTPAS promotions"
-msgstr "UiTPAS voordelen"
-
-#: includes/recent_actions.inc:51
-msgid "Number of actions to display"
-msgstr "Aantal weer te geven acties"
-
-#: includes/recent_actions.inc:57
-msgid "Default image"
-msgstr "Standaardafbeelding"
-
-#: includes/recent_actions.inc:59
-msgid "Use full url or an absolute path."
-msgstr "Gebruik een volledige URL of een absolute hyperlink."
-
-#: includes/register_where.inc:104
-msgid "UiTPAS register where settings"
-msgstr "UiTPAS registreren / aankopen instellingen"
-
-#: includes/register_where.inc:110
-msgid "Number of points of sale to display"
-msgstr "Aantal weer te geven verkooppunten (standaard)"
-
-#: includes/register_where.inc:121
-msgid "Get your UiTPAS"
-msgstr "Haal nu je UiTPAS"
-
-#: includes/register_where.inc:134
-msgid "All regions"
-msgstr "Alle regio's"
-
-#: includes/register_where.inc:143
-msgid "UiTPAS Region"
-msgstr "UiTPAS-regio"
-
-#: includes/register_where.inc:153
-msgid "All"
-msgstr "Alle"
-
-#: includes/register_where.inc:164
-msgid "I have a kansenstatuut"
-msgstr "Ik heb een kansenstatuut"
-
-#: includes/register_where.inc:171
-msgid "Search"
-msgstr "Zoeken"
-
-#: includes/registration_confirmation.inc:22
-msgid "You can now manage your points balance and personal promotions"
-msgstr "Je kan voortaan je puntensaldo en persoonlijke voordelen online raadplegen."
-
-#: includes/registration_confirmation.inc:58
-msgid "Complete your profile"
-msgstr "Vervolledig je profiel"
-
-#: includes/registration_confirmation.inc:89
-msgid "An error occured."
-msgstr "Er is een tijdelijke fout opgetreden. Probeer het later opnieuw."
-
-#: includes/registration_confirmation.inc:99
-msgid "Your UiTPAS is registered"
-msgstr "Je UiTPAS werd goed geactiveerd"
-
-#: includes/synchronization.inc:37
-msgid "Can we use your UiTPAS data to complete your profile?"
-msgstr "Mogen we je profiel updaten met de gegevens op je UiTPAS?"
-
-#: includes/synchronization.inc:46
-msgid "Yes"
-msgstr "Ja"
-
-#: includes/synchronization.inc:51
-msgid "No"
-msgstr "Nee"
-
-#: includes/synchronization.inc:152
-msgid "Update personal data"
-msgstr "Update persoonlijke gegevens"
-
-#: includes/user_register.inc:63
-msgid "Username"
-msgstr "Gebruikersnaam"
-
-#: includes/user_register.inc:69
-msgid "UiTPAS number"
-msgstr "UiTPAS nummer"
-
-#: includes/user_register.inc:100
-msgid "Register UiTPAS"
-msgstr "Activeer UiTPAS"
-
-#: includes/user_register.inc:107
-msgid "Already registered? Apply here ."
-msgstr "Ben je al geregistreerd? Aanmelden ."
-
-#: includes/user_register.inc:159
-msgid "Invalid date of birth."
-msgstr "Gelieve een geldige geboortedatum in te vullen."
-
-#: includes/user_register.inc:164
-msgid "Invalid UiTPAS number."
-msgstr "Gelieve een geldig UiTPAS nummer in te vullen."
-
-#: includes/user_register.inc:169
-msgid "User already activated."
-msgstr "Dit UiTPAS nummer is reeds geactiveerd."
-
-#: includes/user_register.inc:174
-msgid "Missing required fields."
-msgstr "Gelieve alle verplichte velden in te vullen."
-
-#: includes/user_register.inc:179
-msgid "Invalid date."
-msgstr "Gelieve een geldige datum in te vullen."
-
-#: includes/user_register.inc:184
-msgid "Unknown UiTPAS number."
-msgstr "Dit UiTPAS nummer is niet in gebruik."
-
-#: includes/user_register.inc:189
-msgid "Action failed."
-msgstr "Er is een fout opgetreden. Probeer het later opnieuw."
-
-#: includes/user_register.inc:194;199
-msgid "We are unable to process your request at this moment. Please try again later."
-msgstr "Het activeren van je UiTPAS is tijdelijk niet mogelijk. Probeer het later opnieuw."
-
-#: theme/culturefeed-uitpas-advantage.tpl.php:25
-#: theme/culturefeed-uitpas-promotion.tpl.php:28
-msgid "Offered by"
-msgstr "Aangeboden door"
-
-#: theme/culturefeed-uitpas-advantage.tpl.php:30
-#: theme/culturefeed-uitpas-promotion.tpl.php:33
-msgid "Availability"
-msgstr "Geldigheidsperiode"
-
-#: theme/culturefeed-uitpas-advantage.tpl.php:35
-#: theme/culturefeed-uitpas-promotion.tpl.php:42 theme/theme.inc:84;559
-msgid "Only available for"
-msgstr "Enkel geldig voor"
-
-#: theme/culturefeed-uitpas-advantage.tpl.php:40
-#: theme/culturefeed-uitpas-promotion.tpl.php:47
-msgid "Conditions"
-msgstr "Voorwaarden"
-
-#: theme/culturefeed-uitpas-advantage.tpl.php:48
-#: theme/culturefeed-uitpas-promotion.tpl.php:55
-msgid "How to exchange"
-msgstr "Hoe omruilen"
-
-#: theme/culturefeed-uitpas-promotion.tpl.php:35 theme/theme.inc:942
-msgid "Out of stock"
-msgstr "Niet meer op voorraad"
-
-#: theme/theme.inc:57;535
-msgid "From !date"
-msgstr "Van !date"
-
-#: theme/theme.inc:59;537
-msgid "until !date"
-msgstr "tot !date"
-
-#: theme/theme.inc:63;541
-msgid "Until !date"
-msgstr "Tot !date"
-
-#: theme/theme.inc:66;544;841;844;953
-msgid "Until end of stock"
-msgstr "Zolang voorraad strekt"
-
-#: theme/theme.inc:73;551
-msgid "Provided by @provider"
-msgstr "Aangeboden door @provider"
-
-#: theme/theme.inc:132
-msgid "This page only shows the advantages that you didn't receive yet."
-msgstr "Deze pagina toont enkel de welkomstvoordelen die je nog niet in ontvangst nam."
-
-#: theme/theme.inc:133
-msgid "Discover all advantages that are currently available for new UiTPAS holders."
-msgstr "Ontdek alle welkomstvoordelen die momenteel beschikbaar zijn voor nieuwe UiTPAS-houders."
-
-#: theme/theme.inc:143
-msgid "@min - @max of @total promotions"
-msgstr "@min - @max van @total voordelen"
-
-#: theme/theme.inc:173
-msgid "This page only shows the promotions you can get with your current points balance"
-msgstr "Deze pagina toont enkel de voordelen die je kan omruilen met je huidige puntensaldo"
-
-#: theme/theme.inc:174
-msgid "Discover all promotions you can save for."
-msgstr "Ontdek alle voordelen waar je voor kan sparen."
-
-#: theme/theme.inc:197
-msgid "This page shows an overview of all your UiTPAS actions"
-msgstr "Een overzicht van de plaatsen waar je je UiTPAS reeds gebruikte"
-
-#: theme/theme.inc:200
-msgid "Date"
-msgstr "Datum"
-
-#: theme/theme.inc:200
-msgid "Action"
-msgstr "Actie"
-
-#: theme/theme.inc:200 views/culturefeed_uitpas.views.inc:68
-msgid "Points"
-msgstr "Punten"
-
-#: theme/theme.inc:210
-msgid "at @location"
-msgstr "bij @location"
-
-#: theme/theme.inc:214
-msgid "@formatted_count point"
-msgstr "@formatted_count punt"
-
-#: theme/theme.inc:215
-msgid "@formatted_count points"
-msgstr "@formatted_count punten"
-
-#: theme/theme.inc:232;711
-msgid "No results found."
-msgstr "Geen resultaten gevonden."
-
-#: theme/theme.inc:264
-msgid "day"
-msgstr "dag"
-
-#: theme/theme.inc:267
-msgid "week"
-msgstr "week"
-
-#: theme/theme.inc:270
-msgid "month"
-msgstr "maand"
-
-#: theme/theme.inc:273
-msgid "quarter"
-msgstr "kwartaal"
-
-#: theme/theme.inc:276
-msgid "year"
-msgstr "jaar"
-
-#: theme/theme.inc:284
-msgid "turns"
-msgstr "beurten"
-
-#: theme/theme.inc:284
-msgid "turn"
-msgstr "beurt"
-
-#: theme/theme.inc:287
-msgid "@volume @turn"
-msgstr "@volume @turn"
-
-#: theme/theme.inc:289
-msgid "@volume @turn this @type"
-msgstr "@volume @turn per @type"
-
-#: theme/theme.inc:312
-msgid "This page shows the UiTPAS card(s) you own and the personal information that has been registered when buying your card."
-msgstr "Alle details van je UiTPAS-kaart(en) en de persoonlijke gegevens waarmee je UiTPAS geactiveerd werd."
-
-#: theme/theme.inc:327;358
-msgid "valid till !date"
-msgstr "Geldig tot !date"
-
-#: theme/theme.inc:328
-msgid "Opportunity status"
-msgstr "Kansentarief"
-
-#: theme/theme.inc:335
-msgid "UiTPAS number(s)"
-msgstr "UiTPAS nummer(s)"
-
-#: theme/theme.inc:341
-msgid "My personal data"
-msgstr "Mijn persoonlijke gegevens"
-
-#: theme/theme.inc:342
-msgid "This information has been read from your eID and cannot be changed. Updates can only be done at official UiTPAS registration counters ."
-msgstr "Deze informatie werd ingelezen van je eID. Wijzigingen kunnen enkel uitgevoerd worden in één van de UiTPAS registratiebalies ."
-
-#: theme/theme.inc:346
-msgid "Status"
-msgstr "Status"
-
-#: theme/theme.inc:419;752
-msgid "point"
-msgstr "punt"
-
-#: theme/theme.inc:420;753
-msgid "points"
-msgstr "punten"
-
-#: theme/theme.inc:449;466
-msgid "!points points"
-msgstr "!points punten"
-
-#: theme/theme.inc:719
-msgid "You can get an UiTPAS at one of these registration counters. An UiTPAS costs € 5. Younger than 18 years? Then you'll pay € 2. For people with an opportunities tarrif UiTPAS is free. You'll need your eID to register your UiTPAS."
-msgstr "Je kan een UiTPAS halen op één van deze registratiepunten. Een UiTPAS kost € 5. Ben je jonger dan 18 jaar? Dan betaal je slechts € 2. Voor mensen met een kansenstatuut is de UiTPAS gratis. Voor de registratie van een UiTPAS heb je een eID nodig."
-
-#: theme/theme.inc:721
-msgid "Important: you'll need your eID to register your UiTPAS. Read more about the UiTPAS project."
-msgstr "Belangrijk: voor de aankoop van een UiTPAS heb je je eID nodig. Lees meer over het UiTPAS-project."
-
-#: theme/theme.inc:746
-msgid "Anonymous"
-msgstr "Anoniem"
-
-#: theme/theme.inc:752;753
-msgid "saved"
-msgstr "spaarde"
-
-#: theme/theme.inc:752;753
-msgid "at"
-msgstr "bij"
-
-#: theme/theme.inc:752;753
-msgid "ago"
-msgstr "geleden"
-
-#: theme/theme.inc:847
-msgid "This is a welcome advantage"
-msgstr "Dit is een welkomstvoordeel"
-
-#: theme/theme.inc:946
-msgid "Until @date"
-msgstr "Tot @date"
-
-#: theme/theme.inc:949
-msgid "From @date"
-msgstr "Vanaf @date"
-
-#: views/culturefeed_uitpas.views.inc:19
-msgid "Culturefeed UiTPAS promotions query"
-msgstr "Culturefeed UiTPAS zoekopdracht voordelen"
-
-#: views/culturefeed_uitpas.views.inc:20
-msgid "Query on UiTPAS promotions."
-msgstr "Zoekopdracht UiTPAS voordelen"
-
-#: views/culturefeed_uitpas.views.inc:46
-msgid "ID"
-msgstr "ID"
-
-#: views/culturefeed_uitpas.views.inc:47
-msgid "The promotion ID."
-msgstr "Voordeel ID"
-
-#: views/culturefeed_uitpas.views.inc:55
-msgid "Title"
-msgstr "Titel"
-
-#: views/culturefeed_uitpas.views.inc:56
-msgid "The promotion title."
-msgstr "Voordeel titel"
-
-#: views/culturefeed_uitpas.views.inc:69
-msgid "The points necessary to make use of the promotion."
-msgstr "Omruilwaarde."
-
-#: views/culturefeed_uitpas.views.inc:80
-msgid "Cashin state"
-msgstr "Omruilstatus"
-
-#: views/culturefeed_uitpas.views.inc:81
-msgid "The cashin state of the promotion."
-msgstr "Omruilstatus voordeel"
-
-#: views/culturefeed_uitpas.views.inc:89;93
-msgid "Unexpired"
-msgstr "Beschikbaar"
-
-#: views/culturefeed_uitpas.views.inc:90
-msgid "If the promotion is not expired yet."
-msgstr "Als het voordeel beschikbaar is."
-
-#: views/culturefeed_uitpas.views.inc:98;102
-msgid "In spotlight"
-msgstr "In de kijker"
-
-#: views/culturefeed_uitpas.views.inc:99
-msgid "If the promotion is in the spotlight."
-msgstr "Bij voordeel in de kijker"
-
-#: views/culturefeed_uitpas.views.inc:107
-msgid "Owning card system"
-msgstr "Verantwoordelijk [kaartsysteem]"
-
-#: views/culturefeed_uitpas.views.inc:108
-msgid "The card system owning the promotion."
-msgstr "Verantwoordelijk [kaartsysteem]"
-
-#: views/culturefeed_uitpas.views.inc:116
-msgid "Applicable card system"
-msgstr "Gekoppeld [kaartsysteem]"
-
-#: views/culturefeed_uitpas.views.inc:117
-msgid "The card system the promotion is applicable to."
-msgstr "Voordeel geldig voor [kaartsysteem]"
-
-#: views/culturefeed_uitpas.views.inc:125
-msgid "Cashing period begin"
-msgstr "Omruilen mogelijk vanaf"
-
-#: views/culturefeed_uitpas.views.inc:126
-msgid "The start of the promotion's cashing period."
-msgstr "Omruilen mogelijk vanaf"
-
-#: views/culturefeed_uitpas.views.inc:138
-msgid "Cashing period end"
-msgstr "Omruilen mogelijk tot"
-
-#: views/culturefeed_uitpas.views.inc:139
-msgid "The end of the promotion's cashing period."
-msgstr "Omruilen mogelijk tot"
-
-#: views/culturefeed_uitpas.views.inc:151
-msgid "Creation date"
-msgstr "Creatiedatum"
-
-#: views/culturefeed_uitpas.views.inc:152
-msgid "The creation date of the promotion."
-msgstr "Voordeel toegevoegd op"
-
-#: views/culturefeed_uitpas.views.inc:160
-msgid "Description 1"
-msgstr "Beschrijving (inleiding)"
-
-#: views/culturefeed_uitpas.views.inc:161
-msgid "The description (1) of the promotion."
-msgstr "Beschrijving voordeel (inleiding)"
-
-#: views/culturefeed_uitpas.views.inc:170
-msgid "Description 2"
-msgstr "Beschrijving (extra)"
-
-#: views/culturefeed_uitpas.views.inc:171
-msgid "The description (2) of the promotion."
-msgstr "Beschrijving voordeel (extra)"
-
-#: views/culturefeed_uitpas.views.inc:179
-msgid "Image"
-msgstr "Afbeelding"
-
-#: views/culturefeed_uitpas.views.inc:180
-msgid "The images of the promotion."
-msgstr "Afbeeldingen (voordeel)"
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:29
-msgid "Show all available images"
-msgstr "Toon alle afbeeldingen"
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:30
-msgid "Enable to show all images."
-msgstr "Maak het mogelijk om alle afbeeldingen weer te geven."
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:35
-msgid "Maximum height for images"
-msgstr "Maximum hoogte voor afbeeldingen"
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_image.inc:40
-msgid "Maximum width for images"
-msgstr "Maximum breedte voor afbeeldingen"
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:33
-#: views/handlers/culturefeed_uitpas_views_handler_field_title.inc:27
-msgid "Link this field to the original piece of content"
-msgstr "Link dit veld aan de oorspronkelijke inhoud"
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:34
-#: views/handlers/culturefeed_uitpas_views_handler_field_title.inc:28
-msgid "Enable to override this field's links."
-msgstr "Maak het mogelijk om hyperlinks te overschrijven."
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:54
-msgid "filter"
-msgstr "filter"
-
-#: views/handlers/culturefeed_uitpas_views_handler_field_markup.inc:54
-msgid "Missing text format: %format."
-msgstr "Ontbrekende tekstopmaak: %format."
-
-#: views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc:22;38
-msgid "Card system ID of the Drupal installation."
-msgstr "Kaartsysteem ID (Drupal)"
-
-#: views/handlers/culturefeed_uitpas_views_handler_filter_date.inc:28
-msgid "now"
-msgstr "Nu"
diff --git a/culturefeed_uitpas/views/culturefeed_uitpas.views.inc b/culturefeed_uitpas/views/culturefeed_uitpas.views.inc
deleted file mode 100644
index 8509f842..00000000
--- a/culturefeed_uitpas/views/culturefeed_uitpas.views.inc
+++ /dev/null
@@ -1,189 +0,0 @@
- TRUE,
- 'path' => $path . '/plugins',
- 'title' => t('Culturefeed UiTPAS promotions query'),
- 'help' => t('Query on UiTPAS promotions.'),
- 'handler' => 'culturefeed_uitpas_promotions_query',
- 'use pager' => TRUE,
- );
-
- return $plugins;
-}
-
-/**
- * Implements hook_views_data().
- */
-function culturefeed_uitpas_views_data() {
-
- $data['uitpas_promotions']['table'] = array(
- 'group' => t('UiTPAS promotions'),
- 'base' => array(
- 'field' => 'id',
- 'title' => t('UiTPAS promotions'),
- 'query class' => 'culturefeed_uitpas_promotions_query',
- 'defaults' => array(
- 'field' => 'title',
- ),
- ),
- );
-
- $data['uitpas_promotions']['id'] = array(
- 'title' => t('ID'),
- 'help' => t('The promotion ID.'),
- 'field' => array(
- 'handler' => 'views_handler_field',
- 'click sortable' => TRUE,
- ),
- );
-
- $data['uitpas_promotions']['title'] = array(
- 'title' => t('Title'),
- 'help' => t('The promotion title.'),
- 'field' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_field_title',
- 'base_path' => 'promotion',
- ),
- 'sort' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_sort',
- 'sort_property' => 'TITLE',
- ),
- );
-
- $data['uitpas_promotions']['points'] = array(
- 'title' => t('Points'),
- 'help' => t('The points necessary to make use of the promotion.'),
- 'field' => array(
- 'handler' => 'views_handler_field_numeric',
- ),
- 'sort' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_sort',
- 'sort_property' => 'POINTS',
- ),
- );
-
- $data['uitpas_promotions']['cashinstate'] = array(
- 'title' => t('Cashin state'),
- 'help' => t('The cashin state of the promotion.'),
- 'field' => array(
- 'handler' => 'views_handler_field',
- 'click sortable' => TRUE,
- ),
- );
-
- $data['uitpas_promotions']['unexpired'] = array(
- 'title' => t('Unexpired'),
- 'help' => t('If the promotion is not expired yet.'),
- 'filter' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_filter_boolean',
- 'label' => t('Unexpired'),
- ),
- );
-
- $data['uitpas_promotions']['inSpotlight'] = array(
- 'title' => t('In spotlight'),
- 'help' => t('If the promotion is in the spotlight.'),
- 'filter' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_filter_boolean',
- 'label' => t('In spotlight'),
- ),
- );
-
- $data['uitpas_promotions']['owningcardsystemid'] = array(
- 'title' => t('Owning card system'),
- 'help' => t('The card system owning the promotion.'),
- 'filter' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_filter_card_system_id',
- 'filter_property' => 'owningCardSystemId',
- ),
- );
-
- $data['uitpas_promotions']['applicablecardsystemid'] = array(
- 'title' => t('Applicable card system'),
- 'help' => t('The card system the promotion is applicable to.'),
- 'filter' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_filter_card_system_id',
- 'filter_property' => 'applicableCardSystemId',
- ),
- );
-
- $data['uitpas_promotions']['cashing_period_begin'] = array(
- 'title' => t('Cashing period begin'),
- 'help' => t("The start of the promotion's cashing period."),
- 'field' => array(
- 'handler' => 'views_handler_field_date',
- 'real field' => 'cashingperiodbegin',
- ),
- 'filter' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_filter_date',
- 'real field' => 'cashingPeriodBegin',
- ),
- );
-
- $data['uitpas_promotions']['cashing_period_end'] = array(
- 'title' => t('Cashing period end'),
- 'help' => t("The end of the promotion's cashing period."),
- 'field' => array(
- 'handler' => 'views_handler_field_date',
- 'real field' => 'cashingperiodend',
- ),
- 'sort' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_sort',
- 'sort_property' => 'CASHING_PERIOD_END',
- ),
- );
-
- $data['uitpas_promotions']['creation_date'] = array(
- 'title' => t('Creation date'),
- 'help' => t("The creation date of the promotion."),
- 'sort' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_sort',
- 'sort_property' => 'CREATION_DATE',
- ),
- );
-
- $data['uitpas_promotions']['description_1'] = array(
- 'title' => t('Description 1'),
- 'help' => t('The description (1) of the promotion.'),
- 'field' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_field_markup',
- 'real field' => 'description1',
- 'format' => 'full_html',
- ),
- );
-
- $data['uitpas_promotions']['description_2'] = array(
- 'title' => t('Description 2'),
- 'help' => t('The description (2) of the promotion.'),
- 'field' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_field_markup',
- 'real field' => 'description2',
- ),
- );
-
- $data['uitpas_promotions']['image'] = array(
- 'title' => t('Image'),
- 'help' => t('The images of the promotion.'),
- 'field' => array(
- 'handler' => 'culturefeed_uitpas_views_handler_field_image',
- 'real field' => 'pictures',
- ),
- );
-
- return $data;
-
-}
diff --git a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_image.inc b/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_image.inc
deleted file mode 100644
index cf98a00a..00000000
--- a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_image.inc
+++ /dev/null
@@ -1,82 +0,0 @@
- FALSE);
- $options['maxheight'] = array('default' => '');
- $options['maxwidth'] = array('default' => '');
- return $options;
-
- }
-
- /**
- * {@inheritdoc}
- */
- function options_form(&$form, &$form_state) {
-
- $form['multiple'] = array(
- '#title' => t('Show all available images'),
- '#description' => t('Enable to show all images.'),
- '#type' => 'checkbox',
- '#default_value' => !empty($this->options['multiple']),
- );
- $form['maxheight'] = array(
- '#title' => t('Maximum height for images'),
- '#type' => 'textfield',
- '#default_value' => !empty($this->options['maxheight']) ? $this->options['maxheight'] : '',
- );
- $form['maxwidth'] = array(
- '#title' => t('Maximum width for images'),
- '#type' => 'textfield',
- '#default_value' => !empty($this->options['maxwidth']) ? $this->options['maxwidth'] : '',
- );
- parent::options_form($form, $form_state);
-
- }
-
- /**
- * {@inheritdoc}
- */
- function render($values) {
-
- $value = $this->get_value($values);
-
- $vars = array('attributes' => array());
- if ($this->options['maxheight']) {
- $vars['maxheight'] = $this->options['maxheight'];
- }
- if ($this->options['maxwidth']) {
- $vars['maxwidth'] = $this->options['maxwidth'];
- }
-
- if ($value) {
-
- if ($this->options['multiple']) {
-
- $images = array();
- foreach ($value as $image) {
- $images[] = theme('culturefeed_uitpas_promotion_image', $vars + array('path' => $image));
- }
- return implode('', $images);
-
- }
- else {
- return theme('culturefeed_uitpas_promotion_image', $vars + array('path' => $value[0]));
- }
-
- }
-
- }
-
-}
diff --git a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_markup.inc b/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_markup.inc
deleted file mode 100644
index 662174b8..00000000
--- a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_markup.inc
+++ /dev/null
@@ -1,63 +0,0 @@
- filter_default_format());
- return $options;
-
- }
-
- /**
- * {@inheritdoc}
- */
- function options_form(&$form, &$form_state) {
-
- $formats = filter_formats();
- $options = array();
- foreach ($formats as $key => $format) {
- $options[$key] = $format->name;
- }
-
- $form['format'] = array(
- '#title' => t('Link this field to the original piece of content'),
- '#description' => t("Enable to override this field's links."),
- '#type' => 'select',
- '#default_value' => !empty($this->options['format']),
- '#options' => $options,
- );
- parent::options_form($form, $form_state);
-
- }
-
- /**
- * {@inheritdoc}
- */
- function render($values) {
-
- $value = $this->get_value($values);
-
- $format = $this->options['format'];
-
- // If the requested text format does not exist, the text cannot be filtered.
- if (!filter_format_load($format)) {
- watchdog('filter', 'Missing text format: %format.', array('%format' => $format), WATCHDOG_ALERT);
- return '';
- }
-
- return check_markup($value, $format, '');
-
- }
-
-
-}
diff --git a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_title.inc b/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_title.inc
deleted file mode 100644
index a176b25e..00000000
--- a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_field_title.inc
+++ /dev/null
@@ -1,51 +0,0 @@
- TRUE);
- return $options;
-
- }
-
- /**
- * {@inheritdoc}
- */
- function options_form(&$form, &$form_state) {
-
- $form['link'] = array(
- '#title' => t('Link this field to the original piece of content'),
- '#description' => t("Enable to override this field's links."),
- '#type' => 'checkbox',
- '#default_value' => !empty($this->options['link']),
- );
- parent::options_form($form, $form_state);
-
- }
-
- /**
- * {@inheritdoc}
- */
- function render($values) {
-
- $value = $this->get_value($values);
- if ($this->options['link']) {
- return l($value, $this->definition['base_path'] . '/' . culturefeed_search_slug($value) . '/' . $values->id);
- }
- else {
- return $value;
- }
-
- }
-
-}
diff --git a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_boolean.inc b/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_boolean.inc
deleted file mode 100644
index b058030c..00000000
--- a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_boolean.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-value)) {
- $this->query->object->{$this->real_field} = $this->value == 1 ? TRUE : FALSE;
- }
-
-
-
- /*
- if (empty($this->value)) {
-
- if ($this->accept_null) {
- $or = db_or()
- ->condition($field, 0, '=')
- ->condition($field, NULL, 'IS NULL');
- $this->query->add_where($this->options['group'], $or);
- }
- else {
- $this->query->add_where($this->options['group'], $field, 0, '=');
- }
- }
- else {
- if (!empty($this->definition['use equal'])) {
- $this->query->add_where($this->options['group'], $field, 1, '=');
- }
- else {
- $this->query->add_where($this->options['group'], $field, 0, '<>');
- }
- }*/
- }
-}
diff --git a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc b/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc
deleted file mode 100644
index 01058cb7..00000000
--- a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_card_system_id.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-query->object->{$this->definition['filter_property']} = $card_system_id;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- function admin_summary()
- {
- return '= ' . t('Card system ID of the Drupal installation.');
- }
-
- /**
- * {@inheritdoc}
- */
- function can_expose() {
- return FALSE;
- }
-
- function options_form(&$form, &$form_state) {
- parent::options_form($form, $form_state);
-
- $form['static_filter_value'] = array(
- '#weight' => -100,
- '#type' => 'markup',
- '#markup' => '= ' . t('Card system ID of the Drupal installation.'),
- );
- }
-}
diff --git a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_date.inc b/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_date.inc
deleted file mode 100644
index d35177f7..00000000
--- a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_filter_date.inc
+++ /dev/null
@@ -1,31 +0,0 @@
-query->object->{$this->real_field} = time();
- }
-
- /**
- * {@inheritdoc}
- */
- function can_expose() {
- return FALSE;
- }
-
- /**
- * {@inheritdoc}
- */
- function admin_summary() {
- return '= ' . t('now');
- }
-
-}
diff --git a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_sort.inc b/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_sort.inc
deleted file mode 100644
index bd2f33be..00000000
--- a/culturefeed_uitpas/views/handlers/culturefeed_uitpas_views_handler_sort.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-options['order']) {
- case 'ASC':
- case 'asc':
- default:
- $order = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::ORDER_ASC;
- break;
- case 'DESC';
- case 'desc';
- $order = CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions::ORDER_DESC;
- break;
- }
-
- $this->query->object->sort = $this->definition['sort_property'];
- $this->query->object->order = $order;
-
- }
-
- /**
- * {@inheritdoc}
- */
- function can_expose() {
- return FALSE;
- }
-
-}
\ No newline at end of file
diff --git a/culturefeed_uitpas/views/plugins/culturefeed_uitpas_promotions_query.inc b/culturefeed_uitpas/views/plugins/culturefeed_uitpas_promotions_query.inc
deleted file mode 100644
index 1a435812..00000000
--- a/culturefeed_uitpas/views/plugins/culturefeed_uitpas_promotions_query.inc
+++ /dev/null
@@ -1,82 +0,0 @@
-object = new CultureFeed_Uitpas_Passholder_Query_SearchPromotionPointsOptions();
- }
-
- /**
- * {@inheritdoc}
- */
- function build(&$view) {
-
- // Store the view in the object to be able to use it later.
- $this->view = $view;
-
- // Initialise the pager.
- $view->init_pager();
-
- }
-
- /**
- * {@inheritdoc}
- */
- function execute(&$view) {
-
- $cf = DrupalCultureFeed::getConsumerInstance();
-
- $max = $this->pager->get_items_per_page();
- $page = $this->pager->get_current_page();
- $offset = $this->pager->get_offset();
-
- $this->object->max = $this->pager->get_items_per_page();
- $this->object->start = ($page * $max) + $offset;
-
- $promotions_result = $cf->uitpas()->getPromotionPoints($this->object);
-
- $this->pager->total_items = $promotions_result->total;
- $this->pager->update_page_info();
-
- $view->result = array();
- foreach ($promotions_result->objects as $promotion) {
- $promotion_properties = get_object_vars($promotion);
- foreach (array_keys($promotion_properties) as $promotion_property_name) {
- $lowercase_promotion_property_name = strtolower($promotion_property_name);
- if ($promotion_property_name !== $lowercase_promotion_property_name) {
- $promotion_properties[$lowercase_promotion_property_name] = $promotion_properties[$promotion_property_name];
- unset($promotion_properties[$promotion_property_name]);
- }
- }
- // Views does not handle mixed case field names well, so lowercase everything.
- $view->result[] = (object) $promotion_properties;
- }
-
- }
-
- function add_field($table, $field, $alias = '', $params = array()) {
- if ($alias) {
- return $alias;
- }
- else {
- return $field;
- }
- }
-}
From c9c12185b3d807d388496acb4687e8a3bbf3b8a9 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 5 Nov 2019 14:21:18 +0100
Subject: [PATCH 08/16] Moved culturefeed_userpoints_ui to
https://github.com/cultuurnet/culturefeed_userpoints_ui
---
.../culturefeed_userpoints_ui.info | 9 -
.../culturefeed_userpoints_ui.module | 533 ------------------
culturefeed_userpoints_ui/includes/admin.inc | 170 ------
culturefeed_userpoints_ui/includes/blocks.inc | 78 ---
.../includes/helpers.inc | 114 ----
culturefeed_userpoints_ui/includes/pages.inc | 453 ---------------
culturefeed_userpoints_ui/js/promotions.js | 19 -
.../Drupal/CultureFeedUserpointsWishlist.php | 174 ------
...urefeed-userpoints-earned-overview.tpl.php | 13 -
...d-userpoints-exchange-confirmation.tpl.php | 1 -
...serpoints-ui-block-more-promotions.tpl.php | 36 --
...turefeed-userpoints-ui-detail-page.tpl.php | 52 --
...refeed-userpoints-ui-exchange-form.tpl.php | 27 -
...refeed-userpoints-ui-exchange-page.tpl.php | 47 --
...lturefeed-userpoints-ui-my-balance.tpl.php | 29 -
...userpoints-ui-promotions-list-item.tpl.php | 65 ---
...feed-userpoints-ui-promotions-list.tpl.php | 14 -
...userpoints-ui-promotions-page-item.tpl.php | 20 -
...feed-userpoints-ui-promotions-page.tpl.php | 15 -
...refeed-userpoints-ui-wishlist-item.tpl.php | 15 -
...culturefeed-userpoints-ui-wishlist.tpl.php | 30 -
culturefeed_userpoints_ui/theme/theme.inc | 430 --------------
.../culturefeed_userpoints_ui.de.po | 442 ---------------
.../culturefeed_userpoints_ui.fr.po | 442 ---------------
.../culturefeed_userpoints_ui.nl.po | 428 --------------
25 files changed, 3656 deletions(-)
delete mode 100644 culturefeed_userpoints_ui/culturefeed_userpoints_ui.info
delete mode 100644 culturefeed_userpoints_ui/culturefeed_userpoints_ui.module
delete mode 100644 culturefeed_userpoints_ui/includes/admin.inc
delete mode 100644 culturefeed_userpoints_ui/includes/blocks.inc
delete mode 100644 culturefeed_userpoints_ui/includes/helpers.inc
delete mode 100644 culturefeed_userpoints_ui/includes/pages.inc
delete mode 100644 culturefeed_userpoints_ui/js/promotions.js
delete mode 100644 culturefeed_userpoints_ui/lib/Drupal/CultureFeedUserpointsWishlist.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-earned-overview.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-exchange-confirmation.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-block-more-promotions.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-detail-page.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-exchange-form.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-exchange-page.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-my-balance.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-list.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-page.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-wishlist-item.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-wishlist.tpl.php
delete mode 100644 culturefeed_userpoints_ui/theme/theme.inc
delete mode 100755 culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.de.po
delete mode 100755 culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.fr.po
delete mode 100644 culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.nl.po
diff --git a/culturefeed_userpoints_ui/culturefeed_userpoints_ui.info b/culturefeed_userpoints_ui/culturefeed_userpoints_ui.info
deleted file mode 100644
index 81f10359..00000000
--- a/culturefeed_userpoints_ui/culturefeed_userpoints_ui.info
+++ /dev/null
@@ -1,9 +0,0 @@
-name = CultureFeed Userpoints UI
-description = CultureFeed Userpoints blocks and other interface components.
-package = CultureFeed
-version = VERSION
-core = 7.x
-
-dependencies[] = culturefeed_social
-
-files[] = lib/Drupal/CultureFeedUserpointsWishlist.php
diff --git a/culturefeed_userpoints_ui/culturefeed_userpoints_ui.module b/culturefeed_userpoints_ui/culturefeed_userpoints_ui.module
deleted file mode 100644
index 0ca6eb20..00000000
--- a/culturefeed_userpoints_ui/culturefeed_userpoints_ui.module
+++ /dev/null
@@ -1,533 +0,0 @@
- 'Exchange your points',
- 'title callback' => FALSE,
- 'description' => 'Exchange your userpoints',
- 'page callback' => 'culturefeed_userpoints_ui_exchange_page',
- 'access arguments' => array('access content'),
- //'access callback' => 'culturefeed_is_culturefeed_user',
- 'file' => 'includes/pages.inc',
- );
-
- $items['userpoints/promotions/list'] = array(
- 'title' => 'Promotions',
- 'title callback' => FALSE,
- 'description' => 'Promotions list',
- 'page callback' => 'culturefeed_userpoints_ui_promotions_page',
- 'access arguments' => array('access content'),
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/userpoints/%/%/select/%'] = array(
- 'title' => 'Select promotion',
- 'title callback' => FALSE,
- 'description' => 'Select the promotion to exchange for userpoints.',
- 'page callback' => 'culturefeed_userpoints_ui_promotion_select_page',
- 'page arguments' => array(2, 3, 5),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/userpoints/%/remove/%'] = array(
- 'title' => 'Deselect promotion',
- 'title callback' => FALSE,
- 'description' => 'Remove the promotion from the wishlist.',
- 'page callback' => 'culturefeed_userpoints_ui_page_remove_promotion',
- 'page arguments' => array(2, 4),
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'file' => 'includes/pages.inc',
- );
-
- $items['userpoints/promotions/confirmation'] = array(
- 'title' => 'Promotions',
- 'title callback' => FALSE,
- 'page callback' => 'culturefeed_userpoints_ui_page_exchange_confirmation',
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'file' => 'includes/pages.inc',
- );
-
- $items['admin/config/culturefeed/userpoints'] = array(
- 'title' => 'CultureFeed Userpoints User Interface',
- 'description' => 'All configurations to adjust the behavior of userpoints for this site',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_userpoints_ui_settings_form'),
- 'access arguments' => array('administer site configuration'),
- 'file' => 'includes/admin.inc',
- );
-
- $items['userpoints/promotion/%culturefeed_userpoints_promotion'] = array(
- 'title' => 'Detail',
- 'title callback' => FALSE,
- 'description' => 'Detail of a promotion',
- 'page callback' => 'culturefeed_userpoints_ui_detail_page',
- 'page arguments' => array(2),
- 'access arguments' => array('access content'),
- 'file' => 'includes/pages.inc',
- );
-
- $items['culturefeed/userpoints'] = array(
- 'title' => 'Points list',
- 'title callback' => FALSE,
- 'page callback' => 'culturefeed_userpoints_ui_page_points_overview',
- 'access callback' => 'culturefeed_is_culturefeed_user',
- 'file' => 'includes/pages.inc',
- );
-
- return $items;
-}
-
-/**
- * Load callback for one userpoints promotion.
- * @param Integer $id
- */
-function culturefeed_userpoints_promotion_load($id) {
-
- $detail = NULL;
-
- try {
- $detail = DrupalCulturefeed::getActivityPointsPromotion($id);
- }
- catch (Exception\ClientErrorResponseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error while loading the promotion.');
- }
- catch (Exception\CurlException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error while loading the promotion.');
- }
- catch (CultureFeed_ParseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error while loading the promotion.');
- }
-
- return $detail;
-
-}
-
-/**
- * Implements hook_theme().
- */
-function culturefeed_userpoints_ui_theme() {
-
- $path = drupal_get_path('module', 'culturefeed_userpoints_ui') . '/theme';
-
- return array(
- 'culturefeed_userpoints_ui_my_balance' => array(
- 'variables' => array(),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-userpoints-ui-my-balance',
- ),
- 'culturefeed_userpoints_ui_promotions_page' => array(
- 'variables' => array(
- 'promotions' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-userpoints-ui-promotions-page',
- ),
- 'culturefeed_userpoints_ui_promotions_page_item' => array(
- 'variables' => array(
- 'promotion' => NULL,
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-userpoints-ui-promotions-page-item',
- ),
- 'culturefeed_userpoints_ui_exchange_page' => array(
- 'variables' => array(
- 'cf_user' => NULL,
- 'promotions' => NULL,
- 'promotions_form' => array(),
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-userpoints-ui-exchange-page',
- ),
- 'culturefeed_userpoints_ui_promotions_list' => array(
- 'file' => 'theme.inc',
- 'path' => $path,
- 'template' => 'culturefeed-userpoints-ui-promotions-list',
- 'render element' => 'form',
- ),
- 'culturefeed_userpoints_ui_promotions_list_item' => array(
- 'file' => 'theme.inc',
- 'path' => $path,
- 'template' => 'culturefeed-userpoints-ui-promotions-list-item',
- 'render element' => 'form',
- ),
- 'culturefeed_userpoints_ui_block_more_promotions' => array(
- 'file' => 'theme.inc',
- 'path' => $path,
- 'template' => 'culturefeed-userpoints-ui-block-more-promotions',
- 'variables' => array(
- 'previous_item' => NULL,
- 'next_item' => NULL,
- ),
- ),
- 'culturefeed_userpoints_ui_exchange_form' => array(
- 'template' => 'culturefeed-userpoints-ui-exchange-form',
- 'path' => $path,
- 'render element' => 'form',
- ),
- 'culturefeed_userpoints_ui_wishlist' => array(
- 'variables' => array(
- 'promotions' => array(),
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-userpoints-ui-wishlist',
- ),
- 'culturefeed_userpoints_ui_wishlist_item' => array(
- 'variables' => array(
- 'item' => array(),
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-userpoints-ui-wishlist-item',
- ),
- 'culturefeed_userpoints_ui_points_earned_message' => array(
- 'variables' => array('activity' => NULL),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_userpoints_ui_points_lost_message' => array(
- 'variables' => array('activity' => NULL),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_userpoints_ui_points_exchanged_message' => array(
- 'variables' => array('promotions' => NULL, 'points_lef' => 0),
- 'path' => $path,
- 'file' => 'theme.inc',
- ),
- 'culturefeed_userpoints_ui_detail_page' => array(
- 'variables' => array(
- 'promotion' => array(),
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-userpoints-ui-detail-page',
- ),
- 'culturefeed_userpoints_earned_overview' => array(
- 'variables' => array(
- 'activities' => array(),
- ),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-userpoints-earned-overview',
- ),
- 'culturefeed_userpoints_ui_page_exchange_confirmation' => array(
- 'variables' => array(),
- 'path' => $path,
- 'file' => 'theme.inc',
- 'template' => 'culturefeed-userpoints-exchange-confirmation',
- ),
- );
-
-}
-
-/**
- * Implements hook_block_info().
- */
-function culturefeed_userpoints_ui_block_info() {
- $blocks = array();
-
- $blocks['culturefeed-userpoints-balance'] = array(
- 'info' => t('Culturefeed Userpoints UI: Your balance'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- $blocks['culturefeed-userpoints-more'] = array(
- 'info' => t('Culturefeed Userpoints UI: More promotions'),
- 'cache' => DRUPAL_NO_CACHE,
- );
-
- return $blocks;
-}
-
-/**
- * Implements hook_block_view().
- */
-function culturefeed_userpoints_ui_block_view($delta) {
-
- module_load_include('inc', 'culturefeed_userpoints_ui', 'includes/blocks');
- $block = array();
-
- switch ($delta) {
-
- case 'culturefeed-userpoints-balance':
- $block['subject'] = t('My points balance');
- $block['content'] = culturefeed_userpoints_ui_block_balance();
- break;
-
- case 'culturefeed-userpoints-more':
- $block['subject'] = t('More promotions');
- $block['content'] = culturefeed_userpoints_ui_block_more_promotions();
- break;
- }
-
- return $block;
-
-}
-
-/**
- * Implements hook_mail().
- */
-function culturefeed_userpoints_ui_mail($key, &$message, $params) {
-
- switch ($key) {
-
- case 'userpoints-exchange-request':
-
- $wishlistPromotions = $params['wishlist'];
- $values = $params['values'];
- $cf_account = $params['cf_account'];
- $language = $message['language'];
-
- $message['subject'] .= t('Promotion request by') . ' ' . $cf_account->nick;
-
- $variables = array();
- $variables['@code'] = $cf_account->id;
- $variables['@givenName'] = $values['givenName'];
- $variables['@familyName'] = $values['familyName'];
- $variables['@street'] = $values['street'];
- $variables['@zip'] = $values['zip'];
- $variables['@city'] = $values['city'];
- $variables['@mbox'] = $values['mbox'];
-
- $promotions = array();
- foreach ($wishlistPromotions as $data) {
- $promotions[] = $data['title'] . ' (' . t('amount') . ': ' . $data['count'] . ' | ' . t('resale value') . ': ' . CultureFeedUserpointsWishlist::getRealPoints($data['points']) . ' ' . t('points'). ')
- ' . t('View online') . ': ' . url('userpoints/promotion/' . $data['promotion_id'], array('absolute' => TRUE)) . '
-';
- }
-
- $variables['@url_admin'] = url('http://www.uitid.be/uitid/rest/dashboard/grantedpointspromotions', array('absolute' => TRUE));
- $variables['@promotion'] = implode("\n", $promotions);
-
- $message['body'][] = format_string(t('UiTiD User ID:
-@code
-
-Promotion request:
-@promotion
-
-Address:
-- @givenName @familyName
-- @street
-- @zip @city
-- @mbox
-
-Manage requests:
-@url_admin'), $variables);
-
- break;
-
- }
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_menu().
- */
-function culturefeed_userpoints_ui_culturefeed_ui_profile_menu() {
-
- return array(
- 'points' => array(
- 'title' => t('My points balance'),
- 'url' => 'culturefeed/userpoints',
- 'description' => t('See the overview of your earned points'),
- 'weight' => -13,
- ),
- );
-
-}
-
-/**
- * Implements hook_culturefeed_ui_profile_box_dropdown_items().
- */
-function culturefeed_userpoints_ui_culturefeed_ui_profile_box_main_items($cf_account) {
-
- $items = array();
-
- $points_left = CultureFeedUserpointsWishlist::getPointsLeft($cf_account->points);
-
- $data = '';
- $data .= '' . l($points_left, 'culturefeed/userpoints') . ' ';
- $data .= ' punten ';
- $data .= ' ' . l(t('Exchange'), 'userpoints/promotions/exchange', array('attributes' => array('class' => array('uppercase')))) . ' ';
- $data .= '
';
-
- $items['my-points'] = array(
- 'data' => $data,
- 'class' => 'points-balance',
- 'weight' => -18,
- );
-
- return $items;
-
-}
-
-/**
- * Implements hook_culturefeed_social_activity_created().
- */
-function culturefeed_userpoints_ui_culturefeed_social_activity_created($activity) {
-
- if (!empty($activity->points) && (arg(5) != 'noredirect' && arg(5) != 'ajax')) {
- try {
- $cf_account = DrupalCultureFeed::getLoggedInUser();
- if ($cf_account->id == $activity->userpointsUserId) {
- drupal_set_message(theme('culturefeed_userpoints_ui_points_earned_message', array('activity' => $activity)));
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- }
- }
-
-}
-
-/**
- * Implements hook_culturefeed_social_activity_deleted().
- */
-function culturefeed_userpoints_ui_culturefeed_social_activity_deleted($activity) {
-
- if (!empty($activity->points) && (arg(5) != 'noredirect' && arg(5) != 'ajax')) {
- try {
- $cf_account = DrupalCultureFeed::getLoggedInUser();
- if ($cf_account->id == $activity->userpointsUserId) {
- drupal_set_message(theme('culturefeed_userpoints_ui_points_lost_message', array('activity' => $activity)));
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- }
- }
-}
-
-/**
- * Implements hook_culturefeed_social_page_do_ajax_commmands_alter().
- */
-function culturefeed_userpoints_ui_culturefeed_social_page_do_ajax_commmands_alter(&$commands, CultureFeed_Activity $activity) {
-
- if (!empty($activity->points)) {
-
- try {
- $cf_account = DrupalCultureFeed::getLoggedInUser();
- if ($cf_account->id == $activity->userpointsUserId) {
- $points_left = CultureFeedUserpointsWishlist::getPointsLeft($cf_account->points);
- $points_earned = CultureFeedUserpointsWishlist::getRealPoints($activity->points);
-
- $commands[] = ajax_command_invoke('.userpoints-points-left', 'html', array($points_left + $points_earned));
- $commands[] = ajax_command_invoke('.userpoints-points-new', 'html', array(' + ' . $points_earned));
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- }
- }
-}
-
-/**
- * Implements hook_culturefeed_social_page_undo_ajax_commmands_alter().
- */
-function culturefeed_userpoints_ui_culturefeed_social_page_undo_ajax_commmands_alter(&$commands, $activity) {
-
- if (!empty($activity->points)) {
-
- try {
- $cf_account = DrupalCultureFeed::getLoggedInUser();
- if ($cf_account->id == $activity->userpointsUserId) {
- $points_left = CultureFeedUserpointsWishlist::getPointsLeft($cf_account->points);
- $points_earned = CultureFeedUserpointsWishlist::getRealPoints($activity->points);
-
- $commands[] = ajax_command_invoke('.userpoints-points-left', 'html', array($points_left));
- $commands[] = ajax_command_invoke('.userpoints-points-new', 'html', array(' - ' . $points_earned));
- }
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- }
- }
-}
-
-/**
- * Submit handler to add/remove points promotions.
- */
-function culturefeed_userpoints_ui_promotions_list_form_submit($form, &$form_state) {
-
- $form_state['rebuild'] = TRUE;
-
- $promotion_id = $form_state['promotion_id'];
- $promotion_count = $form_state['values']['list'][$promotion_id]['select_count'];
-
- // Retrieve 1 item.
- CultureFeedUserpointsWishlist::add($promotion_id, $promotion_count, $form_state['promotion']);
-
- // Check if this is a non ajax submit.
- if (arg(1) != 'ajax') {
- drupal_set_message(t('The promotion has been added to your basket promotion.'));
- }
-
-}
-
-/**
- * Validate the ajax callback when a user clicked on 'add to cart'.
- */
-function culturefeed_userpoints_ui_promotions_list_form_validate($form, &$form_state) {
-
- $selected_button = $form_state['clicked_button']['#name'];
- $form_state['promotion_id'] = $promotion_id = str_replace("select_btn_", "", $selected_button);
- $promotion_count = $form_state['values']['list'][$promotion_id]['select_count'];
-
-
- try {
- $user_points = DrupalCultureFeed::getLoggedInUser()->points;
- $points_left = CultureFeedUserpointsWishlist::getPointsLeft($user_points);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- return;
- }
-
- // When an item was already in the list, check how many new that are beïng added.
- $form_state['promotion'] = DrupalCultureFeed::getActivityPointsPromotion($promotion_id);
- if (CultureFeedUserpointsWishlist::has($promotion_id)) {
- $promotion_count -= $_SESSION['culturefeed_userpoints_wishlist'][$promotion_id]['count'];
- }
-
- // Calculate how many points that will be spent for the new request.
- $points_spent = $promotion_count * CultureFeedUserpointsWishlist::getRealPoints($form_state['promotion']->points);
-
- if ($points_left < $points_spent) {
- form_set_error($form_state['clicked_button']['#name'], t('You do not have enough points'));
- }
-
-}
-
-/**
- * Ajax Callback handler to add/remove points promotions.
- * Save functionality is already done. This should just do the commands.
- */
-function culturefeed_userpoints_ui_promotions_list_form_callback($form, &$form_state) {
- $points = culturefeed_userpoints_ui_get_pointspromotions();
- return culturefeed_userpoints_ui_promotions_list_ajax_refresh($form, $points);
-}
-
diff --git a/culturefeed_userpoints_ui/includes/admin.inc b/culturefeed_userpoints_ui/includes/admin.inc
deleted file mode 100644
index afb53685..00000000
--- a/culturefeed_userpoints_ui/includes/admin.inc
+++ /dev/null
@@ -1,170 +0,0 @@
- 'textfield',
- '#title' => t('Exchange ratio'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_ratio'),
- '#description' => t('Exchange ratio to recalculate points for this site. E.g. "0.01 points is worth 1 point on this site."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_email'] = array(
- '#type' => 'textfield',
- '#title' => t('Destination email when an exchange has been done'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_email', ''),
- );
-
- $form['culturefeed_userpoints_ui_exchange_minimum'] = array(
- '#type' => 'textfield',
- '#title' => t('Minimum points collected before exchanging'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_minimum', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_list'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for a list view'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_list', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_detail'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for a detail view'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_detail', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_like'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for liking an item'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_like', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_mail'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for mailing an item'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_mail', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_print'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for printing an item'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_print', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_facebook'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for sharing an item on Facebook'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_facebook', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_twitter'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for sharing an item on Twitter'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_twitter', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_go'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for referring to an item as "I go"'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_go', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_ticket'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for consulting ticketing'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_ticket', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_route'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for consulting a route of an item'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_route', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_more_info'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for consulting more information'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_more_info', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_checkin'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for checking in'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_checkin', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_comment'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for posting a comment'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_comment', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_recommend'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for recommending an activity'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_recommend', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_recommend_review'] = array(
- '#type' => 'textfield',
- '#title' => t('Points when recommending a review'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_recommend_review', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_connect_channel'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for connecting to a channel'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_connect_channel', '100'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_review'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for posting a review'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_review', '100'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_media_photo'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for uploading a photo'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_media_photo', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_media_video'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for uploading a video'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_media_video', '0'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- $form['culturefeed_userpoints_ui_exchange_page_created'] = array(
- '#type' => 'textfield',
- '#title' => t('Points for creating a page'),
- '#default_value' => variable_get('culturefeed_userpoints_ui_exchange_page_created', '100'),
- '#description' => t('This value is only used as a variable for text, labels, ... . Points management is managed through the UiTiD admin and the corresponding channel / service consumer. Visit www.uitid.be/uitid/rest/admin."'),
- );
-
- return system_settings_form($form);
-
-}
\ No newline at end of file
diff --git a/culturefeed_userpoints_ui/includes/blocks.inc b/culturefeed_userpoints_ui/includes/blocks.inc
deleted file mode 100644
index d6dc2d8a..00000000
--- a/culturefeed_userpoints_ui/includes/blocks.inc
+++ /dev/null
@@ -1,78 +0,0 @@
- 'culturefeed_userpoints_ui_my_balance',
- );
-
- return $output;
-
-}
-
-/**
- * Returns a block with previous en next promotions.
- */
-function culturefeed_userpoints_ui_block_more_promotions() {
-
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- if (!$cf_user) {
- return;
- }
-
- try {
-
- $current_item = menu_get_object('culturefeed_userpoints_promotion', 2);
- $data = culturefeed_userpoints_ui_get_pointspromotions(array('sort' => 'CREATION_DATE', 'order' => 'ASC'));
-
- $previous_item = NULL;
- $next_item = NULL;
-
- foreach ($data->objects as $i => $pointsPromotion) {
-
- if ($current_item->creationDate == $pointsPromotion->creationDate) {
- if (isset($data->objects[$i - 1])) {
- $previous_item = $data->objects[$i - 1];
- }
- if (isset($data->objects[$i + 1])) {
- $next_item = $data->objects[$i + 1];
- }
- }
-
- }
-
- $output = array(
- '#previous_item' => $previous_item,
- '#next_item' => $next_item,
- '#theme' => 'culturefeed_userpoints_ui_block_more_promotions',
- );
-
- }
- catch (Exception\ClientErrorResponseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $output = t('There was an error while loading the promotions.');
- }
- catch (Exception\CurlException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $output = t('There was an error while loading the promotions.');
- }
- catch (CultureFeed_ParseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $output = t('There was an error while loading the promotions.');
- }
-
- return $output;
-
-}
diff --git a/culturefeed_userpoints_ui/includes/helpers.inc b/culturefeed_userpoints_ui/includes/helpers.inc
deleted file mode 100644
index 697c66cb..00000000
--- a/culturefeed_userpoints_ui/includes/helpers.inc
+++ /dev/null
@@ -1,114 +0,0 @@
-points;
- $commands[] = ajax_command_invoke('.userpoints-points-left', 'html', array(
- CultureFeedUserpointsWishlist::getPointsLeft($user_points)));
-
- // Update the wishlist.
- $wishlist_build = culturefeed_userpoints_ui_get_wishlist($promotion_points->objects);
- $wishlist = render($wishlist_build);
- $commands[] = ajax_command_html('#culturefeed-userpoints-wishlist', $wishlist);
-
- // Update the list.
- $commands[] = ajax_command_replace('#culturefeed-userpoints-promotions-list', render($form['list']));
-
- // Add status messages.
- $commands[] = ajax_command_prepend(NULL, theme('status_messages'));
-
- return (array('#type' => 'ajax', '#commands' => $commands));
-
-}
-
-/**
- * Helper function to render the wishlist of selected promotions.
- * @param array $promotions
- */
-function culturefeed_userpoints_ui_get_wishlist($promotions) {
-
- $selected_promotions = CultureFeedUserpointsWishlist::getItems($promotions);
-
- $build = array(
- '#theme' => 'culturefeed_userpoints_ui_wishlist',
- '#promotions' => $selected_promotions,
- );
-
- return $build;
-
-}
-
-/**
- * Utility function + facade method to ease the request.
- * @param $params
- * Array of options the remote service call supports.
- * see
- * @return array of PointsPromotions.
- */
-function culturefeed_userpoints_ui_get_pointspromotions($params = array()) {
-
- $default_params = array('sort' => 'POINTS', 'order' => 'ASC');
- $params += $default_params;
-
- // Get the available promotions for the current user from the API.
- $pointsPromotions = DrupalCultureFeed::getActivityPointsPromotions($params);
-
- $list = array();
-
- // Filter out the natural constraints.
- // Also adjust properties according to the ones currently in wishlist.
- if (!empty($pointsPromotions->objects)) {
- foreach ($pointsPromotions->objects as $pointsPromotion) {
-
- // Filter out the natural constraints.
- if ($pointsPromotion->cashInState == CultureFeed_PointsPromotion::NOT_POSSIBLE_POINTS_CONSTRAINT
- || $pointsPromotion->cashInState == CultureFeed_PointsPromotion::NOT_POSSIBLE_USER_VOLUME_CONSTRAINT) {
- continue;
- }
-
- // Filter out when the units taken exceed the maximum available units.
- if (!empty($pointsPromotion->maxAvailableUnits) && $pointsPromotion->unitsTaken >= $pointsPromotion->maxAvailableUnits) {
- continue;
- }
-
- // Update the item according to the one in the wishlist.
- $wishlistItem = CultureFeedUserpointsWishlist::get($pointsPromotion->id);
- if (!empty($wishlistItem)) {
- $pointsPromotion->maxAvailableUnits = $pointsPromotion->maxAvailableUnits - $wishlistItem['count'];
- }
-
- $list[] = $pointsPromotion;
-
- }
- }
- $pointsPromotions->objects = $list;
-
- return $pointsPromotions;
-
-}
-
-/**
- * Helper function to get options for the maximum available units.
- * @param Integer $maxAvailableUnits
- * @return array
- */
-function culturefeed_userpoints_ui_get_max_available_units_options($maxAvailableUnits) {
-
- $options = array();
- for ($i = 1; $i <= $maxAvailableUnits; $i++) {
- $options[$i] = $i;
- }
-
- return $options;
-
-}
diff --git a/culturefeed_userpoints_ui/includes/pages.inc b/culturefeed_userpoints_ui/includes/pages.inc
deleted file mode 100644
index 1a0d92f3..00000000
--- a/culturefeed_userpoints_ui/includes/pages.inc
+++ /dev/null
@@ -1,453 +0,0 @@
- 'culturefeed_userpoints_ui_promotions_page',
- '#promotions' => $pointsPromotions,
- );
-
- }
- catch (Exception\ClientErrorResponseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error while loading the promotions.');
- }
- catch (Exception\CurlException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error while loading the promotions.');
- }
- catch (CultureFeed_ParseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error while loading the promotions.');
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = '';
- }
-
- return $build;
-
-}
-
-/**
- * Page callback to list the gifts and exchange the points for a gift.
- */
-function culturefeed_userpoints_ui_exchange_page() {
-
- try {
-
- $cf_account = DrupalCultureFeed::getLoggedInUser();
-
- $pointsPromotions = culturefeed_userpoints_ui_get_pointspromotions();
-
- $build = array();
-
- if (!culturefeed_is_culturefeed_user()) {
-
- $build['message'] = array(
- '#theme' => 'culturefeed_ui_connect_hover',
- '#url' => $_GET['q'],
- );
-
- return $build;
-
- }
-
- $form = drupal_get_form('culturefeed_userpoints_ui_exchange_form', $cf_account);
-
- $js_setting = array(
- 'cultureFeedUserpointsWishlist' => array(
- 'selectedIds' => CultureFeedUserpointsWishlist::getIds(),
- ),
- );
- $build = array(
- '#theme' => 'culturefeed_userpoints_ui_exchange_page',
- '#points' => CultureFeedUserpointsWishlist::getRealPoints($cf_account->points),
- '#cf_user' => $cf_account,
- '#promotions' => $pointsPromotions,
- '#promotions_form' => drupal_render($form),
- '#attached' => array(
- 'library' => array(array('system', 'drupal.ajax')),
- 'js' => array(
- array('data' => $js_setting, 'type' => 'setting'),
- ),
- ),
- );
-
- }
- catch (Exception\ClientErrorResponseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error while loading the promotions.');
- }
- catch (Exception\CurlException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error while loading the promotions.');
- }
- catch (CultureFeed_ParseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error while loading the promotions.');
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- drupal_not_found();
- exit();
- }
-
- return $build;
-
-}
-
-/**
- * Page callback to show a confirmation page.
- */
-function culturefeed_userpoints_ui_page_exchange_confirmation() {
-
- return array('#theme' => 'culturefeed_userpoints_ui_page_exchange_confirmation');
-
-}
-
-/**
- * Page callback to remove a promotion in the wishlist.
- */
-function culturefeed_userpoints_ui_page_remove_promotion($promotion_id, $request_type = 'nojs') {
-
- $promotion_points = culturefeed_userpoints_ui_get_pointspromotions();
-
- // Get the correct promotion
- $promotion = NULL;
- foreach ($promotion_points->objects as $object) {
- if ($object->id == $promotion_id) {
- $promotion = $object;
- }
- }
-
- CultureFeedUserpointsWishlist::remove($promotion_id);
-
- // Check if this is a non ajax request.
- if ($request_type != 'ajax') {
- drupal_set_message(t('The advantage was removed from your promotions.'));
- drupal_goto('userpoints/promotions/exchange');
- }
- else {
- $form = drupal_get_form('culturefeed_userpoints_ui_promotions_list_form', $promotion_points);
- ajax_deliver(culturefeed_userpoints_ui_promotions_list_ajax_refresh($form, $promotion_points));
- exit();
- }
-
-}
-
-/**
- * Page callback to load and display one promotion.
- * @param CultureFeed_PointsPromotion $pointsPromotion
- */
-function culturefeed_userpoints_ui_detail_page($pointsPromotion) {
- return array(
- '#theme' => 'culturefeed_userpoints_ui_detail_page',
- '#promotion' => $pointsPromotion,
- );
-}
-
-/**
- * Helper to create a list / form of all available points promotions.
- *
- * @param array $form
- * @param array $form_state
- * @param array $promotions
- * @return array
- */
-function culturefeed_userpoints_ui_promotions_list_form($form, $form_state, $promotions) {
-
- if ($promotions->total < 0) {
- return array();
- }
-
- $cf_user = DrupalCultureFeed::getLoggedInUser();
-
- $objects = array();
- foreach ($promotions->objects as $object) {
- $objects[] = $object;
- }
-
- $form['#tree'] = TRUE;
-
- $form['list'] = array(
- '#theme' => 'culturefeed_userpoints_ui_promotions_list',
- '#promotions' => $objects,
- '#total' => $promotions->total,
- '#attached' => array(
- 'js' => array(
- drupal_get_path('module', 'culturefeed_userpoints_ui') . '/js/promotions.js',
- ),
- ),
- '#prefix' => '',
- '#suffix' => '
',
- );
-
- foreach ($promotions->objects as $promotion) {
-
- $form['list'][$promotion->id] = array(
- '#theme' => 'culturefeed_userpoints_ui_promotions_list_item',
- '#promotion' => $promotion,
- );
-
- $max_count = floor($cf_user->points / $promotion->points);
- if (!empty($promotion->maxAvailableUnits)) {
- $max_count = $promotion->maxAvailableUnits < $max_count ? $promotion->maxAvailableUnits : $max_count;
- }
- $options = culturefeed_userpoints_ui_get_max_available_units_options($max_count);
- $form['list'][$promotion->id]['select_id'] = array(
- '#type' => 'hidden',
- '#default_value' => $promotion->id,
- );
-
- $default_count = 1;
- $submit_label = t('Add');
- if ($wishlistItem = CultureFeedUserpointsWishlist::get($promotion->id)) {
- $default_count = $wishlistItem['count'];
- $submit_label = t('Edit');
- }
-
- $form['list'][$promotion->id]['select_count'] = array(
- '#type' => 'select',
- '#title' => '',
- '#default_value' => $default_count,
- '#options' => $options,
- );
-
- $form['list'][$promotion->id]['select_btn'] = array(
- '#name' => 'select_btn_' . $promotion->id,
- '#type' => 'submit',
- '#value' => $submit_label,
- '#ajax' => array(
- 'callback' => 'culturefeed_userpoints_ui_promotions_list_form_callback',
- 'wrapper' => 'culturefeed-userpoints-promotions-list',
- ),
- '#submit' => array('culturefeed_userpoints_ui_promotions_list_form_submit'),
- '#validate' => array('culturefeed_userpoints_ui_promotions_list_form_validate'),
- );
-
- }
-
- return $form;
-
-}
-
-/**
- * Form to exchange selected promotions for userpoints.
- * @param array $form
- * @param array $form_state
- * @param Culturefeed_User $cf_account
- */
-function culturefeed_userpoints_ui_exchange_form($form, $form_state, $cf_account) {
-
- $cf_user = DrupalCultureFeed::getLoggedInUser();
-
- $form = array(
- '#theme' => 'culturefeed_userpoints_ui_exchange_form',
- );
-
- $form['mbox'] = array(
- '#type' => 'textfield',
- '#title' => t('Email address'),
- '#default_value' => $cf_user->mbox,
- '#required' => TRUE,
- );
-
- $form['familyName'] = array(
- '#type' => 'textfield',
- '#title' => t('Family name'),
- '#default_value' => $cf_user->familyName,
- '#required' => TRUE,
- );
-
- $form['givenName'] = array(
- '#type' => 'textfield',
- '#title' => t('First name'),
- '#default_value' => $cf_user->givenName,
- '#required' => TRUE,
- );
-
- $form['street'] = array(
- '#type' => 'textfield',
- '#title' => t('Street'),
- '#default_value' => $cf_user->street,
- '#required' => TRUE,
- );
-
- $form['zip'] = array(
- '#type' => 'textfield',
- '#title' => t('Zipcode'),
- '#default_value' => $cf_user->zip,
- '#required' => TRUE,
- );
-
- $form['city'] = array(
- '#type' => 'textfield',
- '#title' => t('City'),
- '#default_value' => $cf_user->city,
- '#required' => TRUE,
- );
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Get promotion')
- );
-
- return $form;
-
-}
-
-/**
- * Validate handler to exchange selected promotions for userpoints.
- * @param array $form
- * @param array $form_state
- * @param Culturefeed_User $cf_account
- */
-function culturefeed_userpoints_ui_exchange_form_validate($form, &$form_state) {
-
- $count = CultureFeedUserpointsWishlist::getIds();
- if ($count <= 0) {
- form_set_error('', t('You must choose at least one promotion.'));
- }
-
- try {
-
- $user_points = DrupalCultureFeed::getLoggedInUser()->points;
- $form_state['points_left'] = CultureFeedUserpointsWishlist::getPointsLeft($user_points);
- if ($form_state['points_left'] < 0) {
- form_set_error('', t('You do not have enough points to order this'));
- }
-
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- }
-
- try {
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- $form_state['pointsPromotions'] = DrupalCultureFeed::cashInPromotion($cf_user->id, CultureFeedUserpointsWishlist::getIds(), CultureFeedUserpointsWishlist::getCounts());
- }
- catch (CultureFeed_Exception $e) {
-
- if ($e->getCode() == CultureFeed_PointsPromotion::CASHIN_PROMOTION_NOT_ALLOWED) {
- form_set_error('', t('You are not allowed to cashin this promotions because the allowed amount has been exceeded.'));
- }
- else {
- form_set_error('', t('It is not possible to process the order'));
- }
- watchdog_exception('culturefeed_userpoints_ui', $e);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- form_set_error('', t('It is not possible to process the order'));
- }
-}
-
-/**
- * Submit handler to exchange selected promotions for userpoints.
- */
-function culturefeed_userpoints_ui_exchange_form_submit($form, &$form_state) {
-
- try {
-
- $pointsPromotions = $form_state['pointsPromotions'];
- $wishlistPromotions = CultureFeedUserpointsWishlist::getItems($pointsPromotions);
-
- // Always update the user profile.
- $values = $form_state['values'];
- $user_update = new CultureFeed_User();
- $user_update->id = DrupalCultureFeed::getLoggedInUserId();
- $user_update->givenName = $values['givenName'];
- $user_update->familyName = $values['familyName'];
- $user_update->street = $values['street'];
- $user_update->zip = $values['zip'];
- $user_update->city = $values['city'];
- $user_update->mbox = $values['mbox'];
- $fields = array('id', 'givenName', 'familyName', 'street', 'zip', 'city', 'mbox');
-
- try {
- DrupalCultureFeed::updateUser($user_update, $fields);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- drupal_set_message(t('An error occurred while saving your data.'), 'error');
- $success = FALSE;
- }
-
- // Thank you message if successful.
- if (count($pointsPromotions) >= 1) {
- $message = theme('culturefeed_userpoints_ui_points_exchanged_message', array(
- 'promotions' => $pointsPromotions,
- 'points_left' => $form_state['points_left'],
- ));
- drupal_set_message($message);
- CultureFeedUserpointsWishlist::clear();
-
- // Send mail to administrator.
- $to_email = variable_get('culturefeed_userpoints_ui_exchange_email', '');
-
- $params = array(
- 'promotions' => $pointsPromotions,
- 'wishlist' => $wishlistPromotions,
- 'values' => $values,
- 'cf_account' => DrupalCultureFeed::getLoggedInUser(),
- );
-
- drupal_mail('culturefeed_userpoints_ui', 'userpoints-exchange-request', $to_email, $GLOBALS['language']->language, $params);
-
- }
-
- $form_state['redirect'] = 'userpoints/promotions/confirmation';
-
- }
- catch (CultureFeed_Exception $e) {
- drupal_set_message($e->getMessage());
- }
- catch (CultureFeed_InvalidCodeException $e) {
- drupal_set_message($e->getMessage());
- }
- catch (Exception\ClientErrorResponseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error during the exchange of your promotions.');
- }
- catch (Exception\CurlException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error during the exchange of your promotions.');
- }
- catch (CultureFeed_ParseException $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- $build = t('There was an error during the exchange of your promotions.');
- }
-
-}
-
-/**
- * Page callback to show the overview of points for current user.
- */
-function culturefeed_userpoints_ui_page_points_overview() {
-
- $activities = array();
- try {
- $timeline = DrupalCultureFeed::getActivityPointsTimeline(DrupalCultureFeed::getLoggedInUserId());
- $activities = $timeline->objects;
- }
- catch (Exception $e) {
- drupal_set_message(t('There was an error loading your points list'), 'error');
- watchdog_exception('culturefeed_userpoints_ui', $e);
- }
-
- return array(
- '#theme' => 'culturefeed_userpoints_earned_overview',
- '#activities' => $activities,
- );
-
-}
diff --git a/culturefeed_userpoints_ui/js/promotions.js b/culturefeed_userpoints_ui/js/promotions.js
deleted file mode 100644
index 17913249..00000000
--- a/culturefeed_userpoints_ui/js/promotions.js
+++ /dev/null
@@ -1,19 +0,0 @@
-(function ($) {
-
- Drupal.CultureFeed = Drupal.CultureFeed || {};
- Drupal.CultureFeed.Userpoints = {};
-
- Drupal.behaviors.culturefeedActivitiesOverview = {
- attach: function (context, settings) {
-
- if ($('.culturefeed-userpoints-ui-promotions-list-item.item-selected').length > 0) {
- $('#culturefeed-userpoints-exchange-form-wrapper').show();
- }
- else {
- $('#culturefeed-userpoints-exchange-form-wrapper').hide();
- }
-
- }
- };
-
-})(jQuery);
diff --git a/culturefeed_userpoints_ui/lib/Drupal/CultureFeedUserpointsWishlist.php b/culturefeed_userpoints_ui/lib/Drupal/CultureFeedUserpointsWishlist.php
deleted file mode 100644
index 5b67f455..00000000
--- a/culturefeed_userpoints_ui/lib/Drupal/CultureFeedUserpointsWishlist.php
+++ /dev/null
@@ -1,174 +0,0 @@
- $data) {
- $counts['promotionCount' . $promotionId] = $data['count'];
- }
- }
-
- return $counts;
-
- }
-
- /**
- * Get all the items in the wishlist.
- */
- public static function getItems($promotions) {
-
- $selected = array();
-
- if (isset($_SESSION['culturefeed_userpoints_wishlist'])) {
- foreach ($promotions as $key => $promotion) {
- $promotionId = $promotion->id;
- if (isset($_SESSION['culturefeed_userpoints_wishlist'][$promotionId])) {
- $selected[$promotionId] = $_SESSION['culturefeed_userpoints_wishlist'][$promotionId];
- $selected[$promotionId]['title'] = $promotion->title;
- }
- }
- }
-
- return $selected;
-
- }
-
- /**
- * Get all the points in the wishlist.
- */
- public static function getPointsInWishlist() {
-
- $points = 0;
-
- if (isset($_SESSION['culturefeed_userpoints_wishlist'])) {
- foreach ($_SESSION['culturefeed_userpoints_wishlist'] as $promotionId => $item) {
- $points += $item['count'] * $item['points'];
- }
- }
-
- return $points;
-
- }
-
- /**
- * Get the points left for this user.
- * @param unknown $userPoints
- */
- public static function getPointsLeft($userPoints) {
- $userPoints = self::getRealPoints($userPoints);
- $wishlistPoints = self::getRealPoints(self::getPointsInWishlist());
- return $userPoints - $wishlistPoints;
- }
-
- /**
- * @param Integer $promotionId
- */
- public static function add($promotionId, $promotionCount, $promotion) {
-
- if (!isset($_SESSION['culturefeed_userpoints_wishlist'][$promotionId])) {
- $_SESSION['culturefeed_userpoints_wishlist'][$promotionId] = array(
- 'count' => 0,
- 'points' => $promotion->points,
- 'promotion_id' => $promotionId,
- );
- }
-
- $_SESSION['culturefeed_userpoints_wishlist'][$promotionId]['count'] = $promotionCount;
-
- }
-
- /**
- * @param Integer $promotionId
- */
- public static function remove($promotionId) {
-
- if (isset($_SESSION['culturefeed_userpoints_wishlist'][$promotionId])) {
- unset($_SESSION['culturefeed_userpoints_wishlist'][$promotionId]);
- }
-
- }
-
- /**
- * @param Integer $promotionId
- */
- public static function has($promotionId) {
-
- return isset($_SESSION['culturefeed_userpoints_wishlist'], $_SESSION['culturefeed_userpoints_wishlist'][$promotionId]);
-
- }
-
- /**
- * Clears the wishlist.
- */
- public static function clear() {
- unset($_SESSION['culturefeed_userpoints_wishlist']);
- }
-
- /**
- * Calculate the real points for this site.
- * @param Integer $points
- * @return number
- */
- public static function getRealPoints($points) {
-
- $exchange = variable_get('culturefeed_userpoints_ui_exchange_ratio');
- if (!empty($exchange) && is_numeric($exchange)) {
- $points = round($points / $exchange);
- }
-
- return $points;
-
- }
-
-}
diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-earned-overview.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-earned-overview.tpl.php
deleted file mode 100644
index 70589860..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-earned-overview.tpl.php
+++ /dev/null
@@ -1,13 +0,0 @@
-:
-
-
diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-exchange-confirmation.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-exchange-confirmation.tpl.php
deleted file mode 100644
index 44b1f2a2..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-exchange-confirmation.tpl.php
+++ /dev/null
@@ -1 +0,0 @@
-:
\ 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 @@
-
-
-
-
-
-
-
-
diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-detail-page.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-detail-page.tpl.php
deleted file mode 100644
index 93b5ac03..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-detail-page.tpl.php
+++ /dev/null
@@ -1,52 +0,0 @@
-#culturefeed-userpoints-notifications"
- *
- */
-
-?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ 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-exchange-page.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-exchange-page.tpl.php
deleted file mode 100644
index 92967af9..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-exchange-page.tpl.php
+++ /dev/null
@@ -1,47 +0,0 @@
- will trigger
- * updates on the amount of the points. Example cases:
- * 1)
- * 2)
- *
- * - that the id "culturefeed-userpoints-notifications" is used to anchor the external pages
- * to this page bringing the points left and notifications in the picture.
- */
-
-?>
-
- :
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-my-balance.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-my-balance.tpl.php
deleted file mode 100644
index 9b82c86f..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-my-balance.tpl.php
+++ /dev/null
@@ -1,29 +0,0 @@
- will trigger
- * updates on the amount of the points. Example cases:
- * 1)
- * 2)
- */
-
-?>
-
-
- |
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php
deleted file mode 100644
index a34db588..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php
+++ /dev/null
@@ -1,65 +0,0 @@
- should be available as wrapper
- * for ajax requests updating the userpoint promotions.
- */
-$label = $can_exchange ? 'label-success' : 'label-important';
-?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-list.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-list.tpl.php
deleted file mode 100644
index 274fc7f6..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-list.tpl.php
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php
deleted file mode 100644
index e999c736..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php
+++ /dev/null
@@ -1,20 +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 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-wishlist-item.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-wishlist-item.tpl.php
deleted file mode 100644
index 363049bd..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-wishlist-item.tpl.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-wishlist.tpl.php b/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-wishlist.tpl.php
deleted file mode 100644
index eb349eb7..00000000
--- a/culturefeed_userpoints_ui/theme/culturefeed-userpoints-ui-wishlist.tpl.php
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- Je koos voor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/culturefeed_userpoints_ui/theme/theme.inc b/culturefeed_userpoints_ui/theme/theme.inc
deleted file mode 100644
index b1982c24..00000000
--- a/culturefeed_userpoints_ui/theme/theme.inc
+++ /dev/null
@@ -1,430 +0,0 @@
-pictures)) {
- $variables['prev_image_url'] = $variables['previous_item']->pictures[0];
- }
- $variables['prev_item_url'] = url('userpoints/promotion/' . $variables['previous_item']->id);
- $variables['prev_item_title'] = $variables['previous_item']->title;
- }
-
- if (isset($variables['next_item'])) {
- if (!empty($variables['next_item']->pictures)) {
- $variables['next_image_url'] = $variables['next_item']->pictures[0];
- }
- $variables['next_item_url'] = url('userpoints/promotion/' . $variables['next_item']->id);
- $variables['next_item_title'] = $variables['next_item']->title;
- }
-
-}
-
-/**
- * Preprocess the culturefeed userpoints my exchange page.
- *
- * @see culturefeed-userpoints-ui-exchange-page.tpl.php
- */
-function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_exchange_page(&$variables) {
-
- _culturefeed_userpoints_ui_preprocess_userpoints($variables);
-
- //$build = culturefeed_userpoints_ui_promotions_list($variables['promotions']);
- $build = drupal_get_form('culturefeed_userpoints_ui_promotions_list_form', $variables['promotions']);
- $list = drupal_render($build);
-
- $minimum_points = NULL;
- foreach ($variables['promotions']->objects as $promotion) {
- if (!isset($minimum_points) || $promotion->points < $minimum_points) {
- $minimum_points = $promotion->points;
- }
- }
- $variables['minimum_points'] = CultureFeedUserpointsWishlist::getRealPoints($minimum_points);
-
- $variables['promotions_list'] = $list;
- $variables['wishlist'] = '';
- $wishlist_build = culturefeed_userpoints_ui_get_wishlist($variables['promotions']->objects);
- $variables['wishlist'] .= drupal_render($wishlist_build);
- $variables['wishlist'] .= '
';
-
-}
-
-/**
- * Helper function to set the variables for the points, with and with wishlist items.
- */
-function _culturefeed_userpoints_ui_preprocess_userpoints(&$variables) {
-
- $cf_user = DrupalCultureFeed::getLoggedInUser();
-
- $variables['real_points'] = CultureFeedUserpointsWishlist::getRealPoints($cf_user->points);
- $variables['real_points_in_wishlist'] = CultureFeedUserpointsWishlist::getPointsInWishlist();
- $variables['real_points_left'] = CultureFeedUserpointsWishlist::getPointsLeft($cf_user->points);
-
-}
-
-/**
- * Preprocess function for the promotions list.
- *
- * @see culturefeed-userpoints-ui-promotions-list.tpl.php
- */
-function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_promotions_list(&$variables) {
-
- // Always include the javascript for ajax behavior.
- drupal_add_library('system', 'drupal.ajax');
-
- $form = $variables['form'];
-
- $list = array();
- foreach (element_children($form) as $form_key) {
- $list[] = drupal_render($form[$form_key]);
- }
-
- $variables['items'] = $list;
-
-
-}
-
-/**
- * Preprocess a promotions list item.
- *
- * @see culturefeed-userpoints-ui-promotions-list-item.tpl.php
- */
-function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_promotions_list_item(&$variables) {
-
- //$pointsPromotion = $variables['promotion'];
- $form = $variables['form'];
- $pointsPromotion = $variables['form']['#promotion'];
-
- _culturefeed_userpoints_ui_preprocess_detail($variables, $pointsPromotion);
-
- $promotion_id = $pointsPromotion->id;
-
- $variables['link'] = l($pointsPromotion->title, 'userpoints/promotion/' . $promotion_id);
- $variables['item_url'] = url('userpoints/promotion/' . $pointsPromotion->id);
- $variables['add_link'] = '';
- $variables['remove_link'] = '';
- $variables['select_list'] = '';
- $variables['select_btn'] = '';
- $variables['select_id'] = drupal_render($form['select_id']);
-
- // Make the width 100% so it will fit the container.
- $form['select_count']['#attributes']['class'][] = 'span12';
- $form['select_btn']['#attributes']['class'][] = 'btn-primary';
-
- if ($variables['can_exchange']) {
- $variables['select_list'] = drupal_render($form['select_count']);
- $variables['select_btn'] = drupal_render($form['select_btn']);
- if (!$variables['active']) {
- }
- else {
- $variables['classes_array'][] = 'item-selected';
- $variables['remove_link'] = l(t('Delete'), 'culturefeed/userpoints/' . $promotion_id . '/remove/nojs',
- array('attributes' => array('class' => array('use-ajax')), 'query' => drupal_get_destination()));
- }
- }
-}
-
-/**
- * Preprocess a wishlist.
- *
- * @see culturefeed-userpoints-ui-wishlist.tpl.php
- */
-function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_wishlist(&$variables) {
-
- $items = array();
- foreach ($variables['promotions'] as $promotion) {
- $items[] = theme('culturefeed_userpoints_ui_wishlist_item', array(
- 'item' => $promotion,
- ));
- }
-
- $variables['items'] = $items;
-
-}
-
-/**
- * Preprocess a wishlist item.
- *
- * @see culturefeed-userpoints-ui-wishlist-item.tpl.php
- */
-function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_wishlist_item(&$variables) {
-
- $variables['title'] = check_plain($variables['item']['title']);
- $variables['count'] = $variables['item']['count'];
- $variables['id'] = $variables['item']['promotion_id'];
- $variables['points'] = CultureFeedUserpointsWishlist::getRealPoints($variables['item']['points']);
- $variables['remove_link'] = l(t('Delete'), 'culturefeed/userpoints/' . $variables['item']['promotion_id'] . '/remove/nojs', array('attributes' => array('class' => array('use-ajax'))));
-
-}
-
-/**
- * Preprocess a promotion detail.
- *
- * @see culturefeed-userpoints-ui-detail-page.tpl.php
- */
-function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_detail_page(&$variables) {
-
- $pointsPromotion = $variables['promotion'];
-
- _culturefeed_userpoints_ui_preprocess_detail($variables, $pointsPromotion);
-
- $variables['exchange_url'] = url('userpoints/promotions/exchange');
- $variables['exchange_link'] = l(t('Order promotion'), 'userpoints/promotions/exchange', array('fragment' => 'culturefeed-userpoints-notifications'));
-
-}
-
-/**
- * Helper preprocessor for one pointsPromotion.
- */
-function _culturefeed_userpoints_ui_preprocess_detail(&$variables, $pointsPromotion) {
-
- $promotion_id = $pointsPromotion->id;
-
- $variables['unitsTaken'] = $pointsPromotion->unitsTaken;
- $variables['unlimited'] = empty($pointsPromotion->maxAvailableUnits);
- $variables['unitsLeft'] = -1;
- if (!$variables['unlimited']) {
- $variables['maxAvailableUnits'] = $pointsPromotion->maxAvailableUnits;
- $variables['unitsLeft'] = $pointsPromotion->maxAvailableUnits - $pointsPromotion->unitsTaken;
- }
-
- $variables['active'] = FALSE;
- $variables['can_exchange'] = FALSE;
- $variables['real_points'] = CultureFeedUserpointsWishlist::getRealPoints($pointsPromotion->points);
- // Calculate the points.
- if (DrupalCultureFeed::isCultureFeedUser()) {
- $cf_account = DrupalCultureFeed::getLoggedInUser();
- $user_points = CultureFeedUserpointsWishlist::getPointsLeft($cf_account->points);
- $variables['points'] = $pointsPromotion->points;
- $variables['active'] = CultureFeedUserpointsWishlist::has($promotion_id);
- $variables['can_exchange'] = $variables['active'] || $user_points >= $variables['real_points'];
- }
-
- $variables['title'] = $pointsPromotion->title;
- $variables['description1'] = $pointsPromotion->description1;
- $variables['description2'] = $pointsPromotion->description2;
- $variables['picture_url'] = '';
- if (!empty($pointsPromotion->pictures)) {
- $variables['picture_url'] = reset($pointsPromotion->pictures);
- }
- $variables['id'] = $promotion_id;
- $variables['cashInState'] = $pointsPromotion->cashInState;
- $variables['cashedIn'] = $pointsPromotion->cashedIn;
- $variables['cashingPeriodBegin'] = date('d/m/Y', $pointsPromotion->cashingPeriodBegin);
- $variables['cashingPeriodEnd'] = '';
- if (!empty($pointsPromotion->cashingPeriodEnd)) {
- $variables['cashingPeriodEnd'] = date('d/m/Y', $pointsPromotion->cashingPeriodEnd);
- }
- $variables['creationDate'] = date('d/m/Y', $pointsPromotion->creationDate);
- $variables['inSpotlight'] = $pointsPromotion->inSpotlight;
-
- $variables['period_volume'] = '';
- $variables['period_type'] = '';
- if (!empty($pointsPromotion->periodConstraint)) {
- $variables['period_volume'] = $pointsPromotion->periodConstraint->periodVolume;
- $variables['period_type'] = $pointsPromotion->periodConstraint->periodType;
- }
-
-}
-
-/**
- * Preprocess a promotion list.
- *
- * @see culturefeed-userpoints-ui-promotions-list.tpl.php
- */
-function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_promotions_page(&$variables) {
-
- $items = array();
- foreach ($variables['promotions']->objects as $promotion) {
- $items[] = theme('culturefeed_userpoints_ui_promotions_page_item', array(
- 'promotion' => $promotion,
- ));
- }
-
- $variables['items'] = $items;
-
-}
-
-/**
- * Preprocess a promotion item.
- *
- * @see culturefeed-userpoints-ui-promotions-item.tpl.php
- */
-function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_promotions_page_item(&$variables) {
- $pointsPromotion = $variables['promotion'];
-
- _culturefeed_userpoints_ui_preprocess_detail($variables, $pointsPromotion);
-
- $variables['item_url'] = url('userpoints/promotion/' . $pointsPromotion->id);
-}
-
-/**
- * Preprocess promotion exchange form.
- *
- * @see culturefeed-userpoints-ui-exchange-form.tpl.php
- */
-function culturefeed_userpoints_ui_preprocess_culturefeed_userpoints_ui_exchange_form(&$variables) {
-
- // Email
- $variables['form']['mbox']['#attributes']['class'][] = 'span12';
-
- // Last name
- $variables['form']['familyName']['#attributes']['class'][] = 'span12';
-
- // First name
- $variables['form']['givenName']['#attributes']['class'][] = 'span12';
-
- // Street
- $variables['form']['street']['#attributes']['class'][] = 'span12';
-
- // Zip
- $variables['form']['zip']['#attributes']['class'][] = 'span12';
-
- // City
- $variables['form']['city']['#attributes']['class'][] = 'span12';
-
- // Submit button
- $variables['form']['submit']['#attributes']['class'][] = 'btn-primary';
-
-}
-
-
-/**
- * Preprocess the userpoints earned overview.
- * @see culturefeed-userpoints-earned-overview.tpl.php
- */
-function culturefeed_preprocess_culturefeed_userpoints_earned_overview(&$variables) {
-
- $variables['intro'] = check_plain(variable_get('culturefeed_userpoints_ui_points_overview_intro'));
- $variables['total_points'] = 0;
- $variables['exchange_link'] = l(t('Exchange'), 'userpoints/promotions/exchange', array('attributes' => array('class' => array('btn btn-large btn-warning'))));
-
- try {
- $cf_user = DrupalCultureFeed::getLoggedInUser();
- $variables['total_points'] = CultureFeedUserpointsWishlist::getRealPoints($cf_user->points);
- }
- catch (Exception $e) {
- watchdog_exception('culturefeed_userpoints_ui', $e);
- }
-
- $variables['items'] = array();
- foreach ($variables['activities'] as $activity) {
-
- $item = array();
- $item['date'] = format_date($activity->creationDate, 'custom', 'd/m/Y');
- $item['points'] = format_plural(CultureFeedUserpointsWishlist::getRealPoints($activity->points), '@count punt', '@count punten');
- $item['created_via'] = $activity->createdVia;
-
- $config = culturefeed_social_activity_get_config($activity->type);
- $description = '';
- if (!empty($config->pointsOverviewPrefix)) {
- $description = $config->pointsOverviewPrefix . ' ';
- }
-
- $description .= $activity->nodeTitle;
- if (!empty($config->pointsOverviewSuffix)) {
- $description .= ' ' . $config->pointsOverviewSuffix;
- }
-
- $item['description'] = $description;
-
- $variables['items'][] = $item;
-
- }
-
-}
-
-/**
- * Theme the message when a user earned some points.
- */
-function theme_culturefeed_userpoints_ui_points_earned_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('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
-# Generated from files:
-# culturefeed_userpoints_ui.module: n/a
-# theme/culturefeed-userpoints-earned-overview.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-exchange-page.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-wishlist.tpl.php: n/a
-# theme/theme.inc: n/a
-# culturefeed_userpoints_ui.info: n/a
-# includes/admin.inc: n/a
-# includes/blocks.inc: n/a
-# includes/pages.inc: n/a
-# theme/culturefeed-userpoints-exchange-confirmation.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-detail-page.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-exchange-form.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-my-balance.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-list.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-page.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-08-02 09:32+0200\n"
-"PO-Revision-Date: 2013-11-22 09:57+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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_userpoints_ui.module:109;113;117
-msgid "There was an error while loading the promotion."
-msgstr "Beim Laden der Werbeaktion ist ein Fehler aufgetreten."
-
-#: culturefeed_userpoints_ui.module:265
-msgid "Culturefeed Userpoints UI: Your balance"
-msgstr ""
-
-#: culturefeed_userpoints_ui.module:270
-msgid "Culturefeed Userpoints UI: More promotions"
-msgstr ""
-
-#: culturefeed_userpoints_ui.module:288;363
-msgid "My points balance"
-msgstr "Mein Punkteguthaben"
-
-#: culturefeed_userpoints_ui.module:293
-msgid "More promotions"
-msgstr "Mehr Vorteile"
-
-#: culturefeed_userpoints_ui.module:316
-msgid "Request a promotion | request by"
-msgstr "Antrag auf Erhalt von Vorteil | Antrag von"
-
-#: culturefeed_userpoints_ui.module:328
-msgid "amount"
-msgstr "Anzahl"
-
-#: culturefeed_userpoints_ui.module:328
-msgid "resale value"
-msgstr "Tauschwert"
-
-#: culturefeed_userpoints_ui.module:328
-#: theme/culturefeed-userpoints-earned-overview.tpl.php:1
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:60
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:9
-msgid "points"
-msgstr "Punkte"
-
-#: culturefeed_userpoints_ui.module:329
-msgid "View online"
-msgstr "Online ansehen"
-
-#: culturefeed_userpoints_ui.module:336
-msgid ""
-"Culturefeed User ID:\n"
-" @code\n"
-"\n"
-" Promotion:\n"
-" @promotion\n"
-"\n"
-" Contact:\n"
-" - @givenName @familyName\n"
-" - @street\n"
-" - @city\n"
-" - @mbox\n"
-"\n"
-" Admin:\n"
-" @url_admin "
-msgstr ""
-"CultureFeed User ID:\n"
-" @code\n"
-"\n"
-" Vorteil:\n"
-" @promotion\n"
-"\n"
-" Kontaktangaben:\n"
-" - @givenName @familyName\n"
-" - @street\n"
-" - @city\n"
-" - @mbox\n"
-"\n"
-" Verwaltung:\n"
-" @url_admin"
-
-#: culturefeed_userpoints_ui.module:365
-msgid "See the overview of your earned points"
-msgstr "Ihre Punkteübersicht ansehen"
-
-#: culturefeed_userpoints_ui.module:383 theme/theme.inc:324
-msgid "Exchange"
-msgstr "Eintauschen"
-
-#: culturefeed_userpoints_ui.module:443
-msgid "The promotion has been added to your basket promotion."
-msgstr "Der Vorteil wurde Ihrem Werbeaktions-Warenkorb hinzugefügt."
-
-#: culturefeed_userpoints_ui.module:477
-msgid "You do not have enough points"
-msgstr "Sie haben nicht genug Punkte"
-
-#: culturefeed_userpoints_ui.module:21
-msgid "Exchange your points"
-msgstr "Ihre Punkte eintauschen"
-
-#: culturefeed_userpoints_ui.module:23
-msgid "Exchange your userpoints"
-msgstr "Ihre Punkte eintauschen"
-
-#: culturefeed_userpoints_ui.module:30;59
-msgid "Promotions"
-msgstr "Vorteile"
-
-#: culturefeed_userpoints_ui.module:32
-msgid "Promotions list"
-msgstr "Übersicht der Vorteile"
-
-#: culturefeed_userpoints_ui.module:39
-msgid "Select promotion"
-msgstr "Vorteil auswählen"
-
-#: culturefeed_userpoints_ui.module:41
-msgid "Select the promotion to exchange for userpoints."
-msgstr "Einen Vorteil auswählen, um Ihre Punkte einzutauschen"
-
-#: culturefeed_userpoints_ui.module:49
-msgid "Deselect promotion"
-msgstr "Vorteil aus Auswahl löschen"
-
-#: culturefeed_userpoints_ui.module:51
-msgid "Remove the promotion from the wishlist."
-msgstr "Vorteil aus Ihrer Wunschliste löschen"
-
-#: culturefeed_userpoints_ui.module:67
-msgid "Culturefeed Userpoints User Interface"
-msgstr ""
-
-#: culturefeed_userpoints_ui.module:68
-msgid "All configurations to adjust the behavior of userpoints for this site"
-msgstr ""
-"Alle Änderungen der Konfiguration beeinflussen die Funktionsweise der Punkte"
-
-#: culturefeed_userpoints_ui.module:76
-msgid "Detail"
-msgstr "Details"
-
-#: culturefeed_userpoints_ui.module:78
-msgid "Detail of a promotion"
-msgstr "Details eines Vorteils"
-
-#: culturefeed_userpoints_ui.module:86
-msgid "Points list"
-msgstr "Punkteübersicht"
-
-#: culturefeed_userpoints_ui.info:0
-msgid "CultureFeed Userpoints UI"
-msgstr ""
-
-#: culturefeed_userpoints_ui.info:0
-msgid "CultureFeed Userpoints blocks and other interface components."
-msgstr ""
-
-#: culturefeed_userpoints_ui.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/admin.inc:10
-msgid "Exchange ratio"
-msgstr "Tauschverhältnis"
-
-#: includes/admin.inc:12
-msgid ""
-"Exchange ratio to recalculate points for this site. E.g. \"0.03 points is "
-"worth 1 point on this site.\""
-msgstr ""
-"Das Tauschverhältnis, um Punkte für diese Site erneut zu berechnen: z. B. "
-"\"0,03 Punkte sind auf dieser Site 1 Punkt wert"
-
-#: includes/admin.inc:17
-msgid "Destination email when an exchange has been done"
-msgstr "Benachrichtigen, wenn ein Tausch stattgefunden hat."
-
-#: includes/blocks.inc:65;69;73 includes/pages.inc:22;26;30;78;82;86
-msgid "There was an error while loading the promotions."
-msgstr "Beim Laden der Werbeaktionen ist ein Fehler aufgetreten."
-
-#: includes/pages.inc:126
-msgid "The advantage was removed from your promotions."
-msgstr "Der Vorteil wurde aus Ihren Vorteilen gelöscht."
-
-#: includes/pages.inc:202
-msgid "Add"
-msgstr "Hinzufügen"
-
-#: includes/pages.inc:205
-msgid "Edit"
-msgstr "Bearbeiten"
-
-#: includes/pages.inc:249
-msgid "Email address"
-msgstr "E-Mail-Adresse"
-
-#: includes/pages.inc:256
-msgid "Family name"
-msgstr "Name"
-
-#: includes/pages.inc:263
-msgid "First name"
-msgstr "Vorname"
-
-#: includes/pages.inc:270
-msgid "Street"
-msgstr "Straße und Hausnummer"
-
-#: includes/pages.inc:277
-msgid "Zipcode"
-msgstr "Postleitzahl"
-
-#: includes/pages.inc:284
-msgid "City"
-msgstr "Wohnort"
-
-#: includes/pages.inc:291
-msgid "Get promotion"
-msgstr "Geschenk anfordern"
-
-#: includes/pages.inc:308
-msgid "You must choose at least one promotion."
-msgstr "Sie müssen mindestens 1 Werbeaktion auswählen."
-
-#: includes/pages.inc:316
-msgid "You do not have enough points to order this"
-msgstr "Sie haben nicht genug Punkte, um dies zu bestellen"
-
-#: includes/pages.inc:331
-msgid ""
-"You are not allowed to cashin this promotions because the allowed amount has "
-"been exceeded."
-msgstr ""
-"Der Vorteil kann nicht angefordert werden. Die maximal zulässige Anzahl "
-"wurde überschritten."
-
-#: includes/pages.inc:334;340
-msgid "It is not possible to process the order"
-msgstr "Die Bestellung kann nicht weitergeleitet werden"
-
-#: includes/pages.inc:371
-msgid "An error occurred while saving your data."
-msgstr "Beim Speichern hat etwas nicht geklappt."
-
-#: includes/pages.inc:409;413;417
-msgid "There was an error during the exchange of your promotions."
-msgstr "Beim Eintauschen Ihrer Vorteile hat etwas nicht geklappt."
-
-#: includes/pages.inc:433
-msgid "There was an error loading your points list"
-msgstr "Beim Laden Ihrer Punkte hat etwas nicht geklappt."
-
-#: theme/culturefeed-userpoints-earned-overview.tpl.php:3
-msgid ""
-"As an UiTiD user, you can save points by performing actions. Points can be "
-"exchanged for one or more gifts."
-msgstr ""
-"Als UiTiD-Nutzer können Sie Punkte sammeln. Punkte können Sie gegen tolle "
-"Vorteile eintauschen"
-
-#: theme/culturefeed-userpoints-earned-overview.tpl.php:3
-msgid "More info"
-msgstr "Mehr Info"
-
-#: theme/culturefeed-userpoints-exchange-confirmation.tpl.php:1
-msgid "Your current points balance"
-msgstr "Ihr Punkteguthaben"
-
-#: theme/culturefeed-userpoints-ui-detail-page.tpl.php:29
-msgid "Expires"
-msgstr "Verfällt"
-
-#: theme/culturefeed-userpoints-ui-detail-page.tpl.php:29
-#: theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php:13
-msgid "unlimited"
-msgstr "unbegrenzt"
-
-#: theme/culturefeed-userpoints-ui-detail-page.tpl.php:29
-#: theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php:13
-msgid "x in stock"
-msgstr "x vorrätig"
-
-#: theme/culturefeed-userpoints-ui-exchange-form.tpl.php:16
-msgid "Enter your details"
-msgstr "Tragen Sie Ihre Angaben ein"
-
-#: theme/culturefeed-userpoints-ui-exchange-form.tpl.php:18
-msgid ""
-"This information will only be used to send the chosen gift(s) to the address "
-"listed below, so it will not be published on this website."
-msgstr ""
-"Diese Informationen werden nur für den Versand Ihres Vorteils genutzt und "
-"sind nicht öffentlich."
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:35
-msgid "Remaining number of points"
-msgstr "Restliche Anzahl Punkte"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-msgid "You do not have enough points."
-msgstr "Sie haben nicht genug Punkte"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-msgid "From"
-msgstr "Von"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-msgid ""
-"you can redeem your points for tickets, gadgets, coupons, discounts, ... ."
-msgstr ""
-"Ihre Punkte können Sie auch eintauschen gegen Tickets, Gadgets, Gutscheine, "
-"Rabatte..."
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:40
-msgid ""
-"Not enough points? Do not worry, learn how and how many points you can save "
-"each time."
-msgstr ""
-"Nicht genug Punkte? Erfahren Sie, wie und wie viele Punkte Sie jeweils "
-"sammeln können."
-
-#: theme/culturefeed-userpoints-ui-my-balance.tpl.php:26
-msgid "How does everything work?"
-msgstr "Wie funktioniert alles?"
-
-#: theme/culturefeed-userpoints-ui-my-balance.tpl.php:27
-msgid "How can I earn extra points?"
-msgstr "Wie kann ich zusätzliche Punkte sammeln?"
-
-#: theme/culturefeed-userpoints-ui-my-balance.tpl.php:28
-msgid "Wherefore can I use my points?"
-msgstr "Wofür kann ich meine Punkte einsetzen?"
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:38
-msgid "Valid from"
-msgstr "Gültig ab"
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:38
-msgid "till"
-msgstr "bis"
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:44
-msgid "This promotion is no longer in stock."
-msgstr "Dieser Vorteil ist nicht mehr vorrätig."
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:60
-msgid "You do not have enough points for this promotion."
-msgstr "Sie haben nicht genug Punkte für diesen Vorteil."
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:60
-msgid "How to save extra points?"
-msgstr "Wie kann ich zusätzliche Punkte sammeln?"
-
-#: theme/culturefeed-userpoints-ui-promotions-list.tpl.php:26
-msgid "Select one or more gifts"
-msgstr "Wählen Sie einen oder mehrere Vorteile aus"
-
-#: theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php:13
-msgid "Valid till"
-msgstr "Gültig bis"
-
-#: theme/culturefeed-userpoints-ui-promotions-page.tpl.php:9
-msgid "Collect extra points? That possible ..."
-msgstr "Zusätzliche Punkte sammeln? Das ist möglich..."
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:14
-msgid "Title"
-msgstr "Titel"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:15
-msgid "Amount"
-msgstr "Anzahl"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:16
-msgid "Points"
-msgstr "Punkte"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:17 theme/theme.inc:145;180
-msgid "Delete"
-msgstr "Löschen"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:28
-msgid "You have not selected any items."
-msgstr "Sie haben keine Items ausgewählt"
-
-#: theme/theme.inc:196
-msgid "Order promotion"
-msgstr "Geschenk anfordern"
-
-#: theme/theme.inc:371
-msgid "Congratulations! you collected"
-msgstr "Es hat geklappt! Sie haben gesammelt"
-
-#: theme/theme.inc:371
-msgid "and have now"
-msgstr "und Sie haben jetzt"
-
-#: theme/theme.inc:383
-msgid ""
-"Thank you, your points have been exchanged. Your gift will be sent shortly "
-"to the specified address."
-msgstr ""
-"Vielen Dank. Ihr Vorteil wurde angefordert! Schauen Sie in Ihrem Postfach "
-"nach."
-
-#: theme/theme.inc:339;368;369
-msgid "@count punt"
-msgid_plural "@count punten"
-msgstr[0] "@count Punkt"
-msgstr[1] "@count Punkte"
diff --git a/culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.fr.po b/culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.fr.po
deleted file mode 100755
index 1d455236..00000000
--- a/culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.fr.po
+++ /dev/null
@@ -1,442 +0,0 @@
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_userpoints_ui.module: n/a
-# theme/culturefeed-userpoints-earned-overview.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-exchange-page.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-wishlist.tpl.php: n/a
-# theme/theme.inc: n/a
-# culturefeed_userpoints_ui.info: n/a
-# includes/admin.inc: n/a
-# includes/blocks.inc: n/a
-# includes/pages.inc: n/a
-# theme/culturefeed-userpoints-exchange-confirmation.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-detail-page.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-exchange-form.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-my-balance.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-list.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-page.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-08-02 09:32+0200\n"
-"PO-Revision-Date: 2013-11-21 16:06+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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_userpoints_ui.module:109;113;117
-msgid "There was an error while loading the promotion."
-msgstr "Une erreur s'est produite lors du chargement de la promotion."
-
-#: culturefeed_userpoints_ui.module:265
-msgid "Culturefeed Userpoints UI: Your balance"
-msgstr ""
-
-#: culturefeed_userpoints_ui.module:270
-msgid "Culturefeed Userpoints UI: More promotions"
-msgstr ""
-
-#: culturefeed_userpoints_ui.module:288;363
-msgid "My points balance"
-msgstr "Mon solde de points"
-
-#: culturefeed_userpoints_ui.module:293
-msgid "More promotions"
-msgstr "Plus de promotions"
-
-#: culturefeed_userpoints_ui.module:316
-msgid "Request a promotion | request by"
-msgstr "Demander un avantage | demande introduite par"
-
-#: culturefeed_userpoints_ui.module:328
-msgid "amount"
-msgstr "nombre"
-
-#: culturefeed_userpoints_ui.module:328
-msgid "resale value"
-msgstr "valeur de reprise"
-
-#: culturefeed_userpoints_ui.module:328
-#: theme/culturefeed-userpoints-earned-overview.tpl.php:1
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:60
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:9
-msgid "points"
-msgstr "points"
-
-#: culturefeed_userpoints_ui.module:329
-msgid "View online"
-msgstr "Consulter en ligne"
-
-#: culturefeed_userpoints_ui.module:336
-msgid ""
-"Culturefeed User ID:\n"
-" @code\n"
-"\n"
-" Promotion:\n"
-" @promotion\n"
-"\n"
-" Contact:\n"
-" - @givenName @familyName\n"
-" - @street\n"
-" - @city\n"
-" - @mbox\n"
-"\n"
-" Admin:\n"
-" @url_admin "
-msgstr ""
-"Culturefeed User ID :\n"
-" @code\n"
-"\n"
-" Avantage:\n"
-" @promotion\n"
-"\n"
-" Coordonnées:\n"
-" - @givenName @familyName\n"
-" - @street\n"
-" - @city\n"
-" - @mbox\n"
-"\n"
-" Gestion:\n"
-" @url_admin"
-
-#: culturefeed_userpoints_ui.module:365
-msgid "See the overview of your earned points"
-msgstr "Découvrez votre solde de points"
-
-#: culturefeed_userpoints_ui.module:383 theme/theme.inc:324
-msgid "Exchange"
-msgstr "Échanger"
-
-#: culturefeed_userpoints_ui.module:443
-msgid "The promotion has been added to your basket promotion."
-msgstr "L'avantage a été ajouté à votre panier de promotions."
-
-#: culturefeed_userpoints_ui.module:477
-msgid "You do not have enough points"
-msgstr "Vous n'avez pas assez de points"
-
-#: culturefeed_userpoints_ui.module:21
-msgid "Exchange your points"
-msgstr "Échangez vos points"
-
-#: culturefeed_userpoints_ui.module:23
-msgid "Exchange your userpoints"
-msgstr "Échangez vos points"
-
-#: culturefeed_userpoints_ui.module:30;59
-msgid "Promotions"
-msgstr "Promotions"
-
-#: culturefeed_userpoints_ui.module:32
-msgid "Promotions list"
-msgstr "Aperçu des promotions"
-
-#: culturefeed_userpoints_ui.module:39
-msgid "Select promotion"
-msgstr "Sélectionnez une promotion"
-
-#: culturefeed_userpoints_ui.module:41
-msgid "Select the promotion to exchange for userpoints."
-msgstr "Sélectionnez une promotion afin d'échanger vos points"
-
-#: culturefeed_userpoints_ui.module:49
-msgid "Deselect promotion"
-msgstr "Supprimer la promotion de la sélection"
-
-#: culturefeed_userpoints_ui.module:51
-msgid "Remove the promotion from the wishlist."
-msgstr "Supprimer la promotion de votre liste"
-
-#: culturefeed_userpoints_ui.module:67
-msgid "Culturefeed Userpoints User Interface"
-msgstr ""
-
-#: culturefeed_userpoints_ui.module:68
-msgid "All configurations to adjust the behavior of userpoints for this site"
-msgstr ""
-"Toutes les modifications de la configuration influencent l'action des points"
-
-#: culturefeed_userpoints_ui.module:76
-msgid "Detail"
-msgstr "Détails"
-
-#: culturefeed_userpoints_ui.module:78
-msgid "Detail of a promotion"
-msgstr "Détails d'un avantage"
-
-#: culturefeed_userpoints_ui.module:86
-msgid "Points list"
-msgstr "Aperçu des points"
-
-#: culturefeed_userpoints_ui.info:0
-msgid "CultureFeed Userpoints UI"
-msgstr ""
-
-#: culturefeed_userpoints_ui.info:0
-msgid "CultureFeed Userpoints blocks and other interface components."
-msgstr ""
-
-#: culturefeed_userpoints_ui.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/admin.inc:10
-msgid "Exchange ratio"
-msgstr "Rapport d'échange"
-
-#: includes/admin.inc:12
-msgid ""
-"Exchange ratio to recalculate points for this site. E.g. \"0.03 points is "
-"worth 1 point on this site.\""
-msgstr ""
-"Le rapport d'échange de points à recalculer pour ce site est de \"0.03 point "
-"vaut 1 point sur ce site"
-
-#: includes/admin.inc:17
-msgid "Destination email when an exchange has been done"
-msgstr "Me prévenir lorsqu'un échange a eu lieu"
-
-#: includes/blocks.inc:65;69;73 includes/pages.inc:22;26;30;78;82;86
-msgid "There was an error while loading the promotions."
-msgstr "Une erreur s'est produite lors du chargement de la promotion."
-
-#: includes/pages.inc:126
-msgid "The advantage was removed from your promotions."
-msgstr "L'avantage a été supprimé de vos promotions"
-
-#: includes/pages.inc:202
-msgid "Add"
-msgstr "Ajouter"
-
-#: includes/pages.inc:205
-msgid "Edit"
-msgstr "Modifier"
-
-#: includes/pages.inc:249
-msgid "Email address"
-msgstr "Adresse électronique"
-
-#: includes/pages.inc:256
-msgid "Family name"
-msgstr "Nom"
-
-#: includes/pages.inc:263
-msgid "First name"
-msgstr "Prénom"
-
-#: includes/pages.inc:270
-msgid "Street"
-msgstr "Rue et numéro"
-
-#: includes/pages.inc:277
-msgid "Zipcode"
-msgstr "Code postal"
-
-#: includes/pages.inc:284
-msgid "City"
-msgstr "Localité"
-
-#: includes/pages.inc:291
-msgid "Get promotion"
-msgstr "Demander un cadeau"
-
-#: includes/pages.inc:308
-msgid "You must choose at least one promotion."
-msgstr "Vous devez sélectionner au moins une promotion."
-
-#: includes/pages.inc:316
-msgid "You do not have enough points to order this"
-msgstr "Vous n'avez pas assez de points pour passer cette commande."
-
-#: includes/pages.inc:331
-msgid ""
-"You are not allowed to cashin this promotions because the allowed amount has "
-"been exceeded."
-msgstr ""
-"Il est impossible de demander la promotion. Le nombre maximum autorisé a été "
-"dépassé."
-
-#: includes/pages.inc:334;340
-msgid "It is not possible to process the order"
-msgstr "La commande ne peut être transmise."
-
-#: includes/pages.inc:371
-msgid "An error occurred while saving your data."
-msgstr "Une erreur s'est produite lors du chargement."
-
-#: includes/pages.inc:409;413;417
-msgid "There was an error during the exchange of your promotions."
-msgstr "Une erreur s'est produite lors de l'échange de vos promotions."
-
-#: includes/pages.inc:433
-msgid "There was an error loading your points list"
-msgstr "Une erreur s'est produite lors du chargement de vos points."
-
-#: theme/culturefeed-userpoints-earned-overview.tpl.php:3
-msgid ""
-"As an UiTiD user, you can save points by performing actions. Points can be "
-"exchanged for one or more gifts."
-msgstr ""
-"En tant qu'utilisateur UiTiD, vous avez la possibilité d'épargner des points "
-"et de les échanger contre de chouettes cadeaux."
-
-#: theme/culturefeed-userpoints-earned-overview.tpl.php:3
-msgid "More info"
-msgstr "Plus d'infos"
-
-#: theme/culturefeed-userpoints-exchange-confirmation.tpl.php:1
-msgid "Your current points balance"
-msgstr "Votre solde de points"
-
-#: theme/culturefeed-userpoints-ui-detail-page.tpl.php:29
-msgid "Expires"
-msgstr "Expire"
-
-#: theme/culturefeed-userpoints-ui-detail-page.tpl.php:29
-#: theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php:13
-msgid "unlimited"
-msgstr "illimité"
-
-#: theme/culturefeed-userpoints-ui-detail-page.tpl.php:29
-#: theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php:13
-msgid "x in stock"
-msgstr "x en réserve"
-
-#: theme/culturefeed-userpoints-ui-exchange-form.tpl.php:16
-msgid "Enter your details"
-msgstr "Indiquez vos coordonnées"
-
-#: theme/culturefeed-userpoints-ui-exchange-form.tpl.php:18
-msgid ""
-"This information will only be used to send the chosen gift(s) to the address "
-"listed below, so it will not be published on this website."
-msgstr ""
-"Ces informations servent uniquement à vous envoyer votre cadeau et ne sont "
-"pas divulguées."
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:35
-msgid "Remaining number of points"
-msgstr "Nombre de points restants"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-msgid "You do not have enough points."
-msgstr "Vous n'avez pas assez de points"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-msgid "From"
-msgstr "De"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-msgid ""
-"you can redeem your points for tickets, gadgets, coupons, discounts, ... ."
-msgstr ""
-"Vous pouvez également échanger vos points contre des tickets, des gadgets, "
-"des bons, des réductions…"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:40
-msgid ""
-"Not enough points? Do not worry, learn how and how many points you can save "
-"each time."
-msgstr ""
-"Vous n'avez pas assez de points ? Découvrez de quelle manière vous pouvez en "
-"obtenir davantage."
-
-#: theme/culturefeed-userpoints-ui-my-balance.tpl.php:26
-msgid "How does everything work?"
-msgstr "Quel est le principe ?"
-
-#: theme/culturefeed-userpoints-ui-my-balance.tpl.php:27
-msgid "How can I earn extra points?"
-msgstr "Comment épargner des points supplémentaires ?"
-
-#: theme/culturefeed-userpoints-ui-my-balance.tpl.php:28
-msgid "Wherefore can I use my points?"
-msgstr "À quoi ai-je droit en échange de mes points ?"
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:38
-msgid "Valid from"
-msgstr "Valable à partir du"
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:38
-msgid "till"
-msgstr "jusqu'au"
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:44
-msgid "This promotion is no longer in stock."
-msgstr "Cette promotion n'est plus disponible."
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:60
-msgid "You do not have enough points for this promotion."
-msgstr "Vous n'avez pas assez de points pour bénéficier de cette promotion."
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:60
-msgid "How to save extra points?"
-msgstr "Comment puis-je épargner davantage de points ?"
-
-#: theme/culturefeed-userpoints-ui-promotions-list.tpl.php:26
-msgid "Select one or more gifts"
-msgstr "Choisissez une ou plusieurs promotions"
-
-#: theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php:13
-msgid "Valid till"
-msgstr "Valable jusqu'au"
-
-#: theme/culturefeed-userpoints-ui-promotions-page.tpl.php:9
-msgid "Collect extra points? That possible ..."
-msgstr "Vous souhaitez obtenir davantage de points ? Aucun problème…"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:14
-msgid "Title"
-msgstr "Titre"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:15
-msgid "Amount"
-msgstr "Nombre"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:16
-msgid "Points"
-msgstr "Points"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:17 theme/theme.inc:145;180
-msgid "Delete"
-msgstr "Supprimer"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:28
-msgid "You have not selected any items."
-msgstr "Vous n'avez pas sélectionné d'objet"
-
-#: theme/theme.inc:196
-msgid "Order promotion"
-msgstr "Demander un cadeau"
-
-#: theme/theme.inc:371
-msgid "Congratulations! you collected"
-msgstr "Mission accomplie ! Vous avez épargné"
-
-#: theme/theme.inc:371
-msgid "and have now"
-msgstr "et vous avez à présent"
-
-#: theme/theme.inc:383
-msgid ""
-"Thank you, your points have been exchanged. Your gift will be sent shortly "
-"to the specified address."
-msgstr ""
-"Merci, nous avons bien reçu votre demande de promotion. Surveillez votre "
-"boîte aux lettres !"
-
-#: theme/theme.inc:339;368;369
-msgid "@count punt"
-msgid_plural "@count punten"
-msgstr[0] ""
-msgstr[1] ""
diff --git a/culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.nl.po b/culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.nl.po
deleted file mode 100644
index 919bbba2..00000000
--- a/culturefeed_userpoints_ui/translations/culturefeed_userpoints_ui.nl.po
+++ /dev/null
@@ -1,428 +0,0 @@
-# $Id$
-#
-# Dutch translation of Drupal (general)
-# Copyright YEAR NAME
-# Generated from files:
-# culturefeed_userpoints_ui.module: n/a
-# theme/culturefeed-userpoints-earned-overview.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-exchange-page.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-wishlist.tpl.php: n/a
-# theme/theme.inc: n/a
-# culturefeed_userpoints_ui.info: n/a
-# includes/admin.inc: n/a
-# includes/blocks.inc: n/a
-# includes/pages.inc: n/a
-# theme/culturefeed-userpoints-exchange-confirmation.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-detail-page.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-exchange-form.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-my-balance.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-list.tpl.php: n/a
-# theme/culturefeed-userpoints-ui-promotions-page.tpl.php: n/a
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2013-08-02 09:32+0200\n"
-"PO-Revision-Date: 2013-08-05 12:26+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"
-"X-Generator: Poedit 1.5.7\n"
-
-#: culturefeed_userpoints_ui.module:109;113;117
-msgid "There was an error while loading the promotion."
-msgstr "Er is een fout opgetreden tijdens het laden van de promotie."
-
-#: culturefeed_userpoints_ui.module:265
-msgid "Culturefeed Userpoints UI: Your balance"
-msgstr ""
-
-#: culturefeed_userpoints_ui.module:270
-msgid "Culturefeed Userpoints UI: More promotions"
-msgstr ""
-
-#: culturefeed_userpoints_ui.module:288;363
-msgid "My points balance"
-msgstr "Mijn puntensaldo"
-
-#: culturefeed_userpoints_ui.module:293
-msgid "More promotions"
-msgstr "Meer voordelen"
-
-#: culturefeed_userpoints_ui.module:316
-msgid "Promotion request by"
-msgstr "Aanvraag voordeel door"
-
-#: culturefeed_userpoints_ui.module:328
-msgid "amount"
-msgstr "aantal"
-
-#: culturefeed_userpoints_ui.module:328
-msgid "resale value"
-msgstr "inruilwaarde"
-
-#: culturefeed_userpoints_ui.module:328
-#: theme/culturefeed-userpoints-earned-overview.tpl.php:1
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:60
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:9
-msgid "points"
-msgstr "punten"
-
-#: culturefeed_userpoints_ui.module:329
-msgid "View online"
-msgstr "Bekijk online"
-
-#: culturefeed_userpoints_ui.module:336
-msgid ""
-"UiTiD User ID:\n"
-"@code\n"
-"\n"
-"Promotion request:\n"
-"@promotion\n"
-"\n"
-"Address:\n"
-"- @givenName @familyName\n"
-"- @street\n"
-"- @city\n"
-"- @mbox\n"
-"\n"
-"Manage requests:\n"
-"@url_admin"
-msgstr ""
-"UiTiD User ID:\n"
-" @code\n"
-"\n"
-"Aanvraag voordeel:\n"
-"@promotion\n"
-"\n"
-"Adresgegevens:\n"
-"- @givenName @familyName\n"
-"- @street\n"
-"- @city\n"
-"- @mbox\n"
-"\n"
-"Beheer aanvragen:\n"
-"@url_admin"
-
-#: culturefeed_userpoints_ui.module:365
-msgid "See the overview of your earned points"
-msgstr "Bekijk je puntenoverzicht"
-
-#: culturefeed_userpoints_ui.module:383 theme/theme.inc:324
-msgid "Exchange"
-msgstr "Inruilen"
-
-#: culturefeed_userpoints_ui.module:443
-msgid "The promotion has been added to your basket promotion."
-msgstr "Het voordeel werd toegevoegd aan uw promotie mandje."
-
-#: culturefeed_userpoints_ui.module:477
-msgid "You do not have enough points"
-msgstr "Je hebt onvoldoende punten"
-
-#: culturefeed_userpoints_ui.module:21
-msgid "Exchange your points"
-msgstr "Ruil je punten in"
-
-#: culturefeed_userpoints_ui.module:23
-msgid "Exchange your userpoints"
-msgstr "Ruil je punten in"
-
-#: culturefeed_userpoints_ui.module:30;59
-msgid "Promotions"
-msgstr "Voordelen"
-
-#: culturefeed_userpoints_ui.module:32
-msgid "Promotions list"
-msgstr "Overzicht voordelen"
-
-#: culturefeed_userpoints_ui.module:39
-msgid "Select promotion"
-msgstr "Selecteer voordeel"
-
-#: culturefeed_userpoints_ui.module:41
-msgid "Select the promotion to exchange for userpoints."
-msgstr "Selecteer een voordeel om je punten in te ruilen"
-
-#: culturefeed_userpoints_ui.module:49
-msgid "Deselect promotion"
-msgstr "Verwijder voordeel uit selectie"
-
-#: culturefeed_userpoints_ui.module:51
-msgid "Remove the promotion from the wishlist."
-msgstr "Verwijder voordeel uit je wenslijst"
-
-#: culturefeed_userpoints_ui.module:67
-msgid "Culturefeed Userpoints User Interface"
-msgstr ""
-
-#: culturefeed_userpoints_ui.module:68
-msgid "All configurations to adjust the behavior of userpoints for this site"
-msgstr ""
-"Alle aanpassingen aan de configuratie beïnvloeden de werking van de punten"
-
-#: culturefeed_userpoints_ui.module:76
-msgid "Detail"
-msgstr "Details"
-
-#: culturefeed_userpoints_ui.module:78
-msgid "Detail of a promotion"
-msgstr "Details van een voordeel"
-
-#: culturefeed_userpoints_ui.module:86
-msgid "Points list"
-msgstr "Puntenoverzicht"
-
-#: culturefeed_userpoints_ui.info:0
-msgid "CultureFeed Userpoints UI"
-msgstr ""
-
-#: culturefeed_userpoints_ui.info:0
-msgid "CultureFeed Userpoints blocks and other interface components."
-msgstr ""
-
-#: culturefeed_userpoints_ui.info:0
-msgid "CultureFeed"
-msgstr "CultureFeed"
-
-#: includes/admin.inc:10
-msgid "Exchange ratio"
-msgstr "Inruil verhouding"
-
-#: includes/admin.inc:12
-msgid ""
-"Exchange ratio to recalculate points for this site. E.g. \"0.03 points is "
-"worth 1 point on this site.\""
-msgstr ""
-"De inruilverhouding om punten voor deze site te herberekenen is \"0.03 "
-"punten is op deze site 1 punt waard\""
-
-#: includes/admin.inc:17
-msgid "Destination email when an exchange has been done"
-msgstr "Verwittig als er een ruil gebeurt is. "
-
-#: includes/blocks.inc:65;69;73 includes/pages.inc:22;26;30;78;82;86
-msgid "There was an error while loading the promotions."
-msgstr "Er is een fout opgetreden tijdens het laden van de promotie."
-
-#: includes/pages.inc:126
-msgid "The advantage was removed from your promotions."
-msgstr "Het voordeel werd verwijderd van uw voordelen."
-
-#: includes/pages.inc:202
-msgid "Add"
-msgstr "Toevoegen"
-
-#: includes/pages.inc:205
-msgid "Edit"
-msgstr "Bewerken"
-
-#: includes/pages.inc:249
-msgid "Email address"
-msgstr "E-mailadres"
-
-#: includes/pages.inc:256
-msgid "Family name"
-msgstr "Naam"
-
-#: includes/pages.inc:263
-msgid "First name"
-msgstr "Voornaam"
-
-#: includes/pages.inc:270
-msgid "Street"
-msgstr "Straat en huisnummer"
-
-#: includes/pages.inc:277
-msgid "Zipcode"
-msgstr "Postcode"
-
-#: includes/pages.inc:284
-msgid "City"
-msgstr "Woonplaats"
-
-#: includes/pages.inc:291
-msgid "Get promotion"
-msgstr "Geschenk aanvragen"
-
-#: includes/pages.inc:308
-msgid "You must choose at least one promotion."
-msgstr "Je moet minstens 1 promotie selecteren."
-
-#: includes/pages.inc:316
-msgid "You do not have enough points to order this"
-msgstr "Je hebt niet voldoende punten om dit te bestellen"
-
-#: includes/pages.inc:331
-msgid ""
-"You are not allowed to cashin this promotions because the allowed amount has "
-"been exceeded."
-msgstr ""
-"Het is niet mogelijk het voordeel aan te vragen. Het maximum toegelaten "
-"aantal is overschreden."
-
-#: includes/pages.inc:334;340
-msgid "It is not possible to process the order"
-msgstr "Het is niet mogelijk om de bestelling door te sturen"
-
-#: includes/pages.inc:371
-msgid "An error occurred while saving your data."
-msgstr "Er is iets foutgelopen tijdens het opslaan."
-
-#: includes/pages.inc:409;413;417
-msgid "There was an error during the exchange of your promotions."
-msgstr "Er is iets fout gelopen tijdens het inruilen van jouw voordelen."
-
-#: includes/pages.inc:433
-msgid "There was an error loading your points list"
-msgstr "Er is iets fout gelopen tijdens het laden van jouw punten."
-
-#: theme/culturefeed-userpoints-earned-overview.tpl.php:3
-msgid "As an UiTiD user, you can save points by performing actions. Points can be exchanged for one or more gifts."
-msgstr "Als UiTiD gebruiker kan je punten sparen. Punten kan je inruilen tegen leuke voordelen"
-
-#: theme/culturefeed-userpoints-earned-overview.tpl.php:3
-msgid "More info"
-msgstr "Meer info"
-
-#: theme/culturefeed-userpoints-exchange-confirmation.tpl.php:1
-msgid "Your current points balance"
-msgstr "Jouw puntensaldo"
-
-#: theme/culturefeed-userpoints-ui-detail-page.tpl.php:29
-msgid "Expires"
-msgstr "Vervalt"
-
-#: theme/culturefeed-userpoints-ui-detail-page.tpl.php:29
-#: theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php:13
-msgid "unlimited"
-msgstr "onbeperkt"
-
-#: theme/culturefeed-userpoints-ui-detail-page.tpl.php:29
-#: theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php:13
-msgid "x in stock"
-msgstr "x in voorraad"
-
-#: theme/culturefeed-userpoints-ui-exchange-form.tpl.php:16
-msgid "Enter your details"
-msgstr "Vul jouw gegevens in"
-
-#: theme/culturefeed-userpoints-ui-exchange-form.tpl.php:18
-msgid "This information will only be used to send the chosen gift(s) to the address listed below, so it will not be published on this website."
-msgstr "Deze informatie wordt enkel gebruikt voor het verzenden van je voordeel en is niet publiek."
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:35
-msgid "Remaining number of points"
-msgstr "Overblijvend aantal punten"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-msgid "You do not have enough points."
-msgstr "U hebt niet voldoende punten"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-msgid "From"
-msgstr "Van"
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:39
-msgid ""
-"you can redeem your points for tickets, gadgets, coupons, discounts, ... ."
-msgstr ""
-"Je punten kan je ook inruilen voor tickets, gadgets, bonnen, kortingen,..."
-
-#: theme/culturefeed-userpoints-ui-exchange-page.tpl.php:40
-msgid ""
-"Not enough points? Do not worry, learn how and how many points you can save "
-"each time."
-msgstr "Niet genoeg punten? Leer hoe en hoeveel punten je telkens kan sparen. "
-
-#: theme/culturefeed-userpoints-ui-my-balance.tpl.php:26
-msgid "How does everything work?"
-msgstr "Hoe werkt alles?"
-
-#: theme/culturefeed-userpoints-ui-my-balance.tpl.php:27
-msgid "How can I earn extra points?"
-msgstr "Hoe kan ik extra punten sparen? "
-
-#: theme/culturefeed-userpoints-ui-my-balance.tpl.php:28
-msgid "Wherefore can I use my points?"
-msgstr "Waarvoor kan ik mijn punten gebruiken?"
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:38
-msgid "Valid from"
-msgstr "Geldig vanaf"
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:38
-msgid "till"
-msgstr "tot"
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:44
-msgid "This promotion is no longer in stock."
-msgstr "Dit voordeel is niet meer in voorraad."
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:60
-msgid "You do not have enough points for this promotion."
-msgstr "Je hebt niet voldoende punten voor dit voordeel."
-
-#: theme/culturefeed-userpoints-ui-promotions-list-item.tpl.php:60
-msgid "How to save extra points?"
-msgstr "Hoe kan ik extra punten sparen?"
-
-#: theme/culturefeed-userpoints-ui-promotions-list.tpl.php:26
-msgid "Select one or more gifts"
-msgstr "Kies één of meerdere voordelen"
-
-#: theme/culturefeed-userpoints-ui-promotions-page-item.tpl.php:13
-msgid "Valid till"
-msgstr "Geldig tot"
-
-#: theme/culturefeed-userpoints-ui-promotions-page.tpl.php:9
-msgid "Collect extra points? That possible ..."
-msgstr "Extra punten verzamelen? Het is mogelijk..."
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:14
-msgid "Title"
-msgstr "Titel"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:15
-msgid "Amount"
-msgstr "Aantal"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:16
-msgid "Points"
-msgstr "Punten"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:17 theme/theme.inc:145;180
-msgid "Delete"
-msgstr "Verwijder"
-
-#: theme/culturefeed-userpoints-ui-wishlist.tpl.php:28
-msgid "You have not selected any items."
-msgstr "Je hebt geen items geselecteerd"
-
-#: theme/theme.inc:196
-msgid "Order promotion"
-msgstr "Geschenk aanvragen"
-
-#: theme/theme.inc:371
-msgid "Congratulations! you collected"
-msgstr "Gelukt! Je spaarde"
-
-#: theme/theme.inc:371
-msgid "and have now"
-msgstr "en je hebt nu"
-
-#: theme/theme.inc:383
-msgid "Thank you, your points have been exchanged. Your gift will be sent shortly to the specified address."
-msgstr "Bedankt, je voordeel werd aangevraagd! Hou je brievenbus in de gaten."
-
-#: theme/theme.inc:339;368;369
-msgid "@count punt"
-msgid_plural "@count punten"
-msgstr[0] ""
-msgstr[1] ""
From 7b5089780d5b61edf5f0977a939dce6831f37292 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 5 Nov 2019 14:23:45 +0100
Subject: [PATCH 09/16] Moved culturefeed curator to
https://github.com/cultuurnet/culturefeed_curator
---
culturefeed_curator/culturefeed_curator.info | 9 --
.../culturefeed_curator.install | 14 ---
.../culturefeed_curator.module | 79 ------------
.../includes/culturefeed_curator.admin.inc | 27 ----
.../includes/culturefeed_curator.helpers.inc | 15 ---
culturefeed_curator/lib/CuratorArticle.php | 64 ----------
.../Drupal/DrupalCultureFeedCuratorClient.php | 93 --------------
.../DrupalCultureFeedCuratorClient_Cache.php | 119 ------------------
8 files changed, 420 deletions(-)
delete mode 100644 culturefeed_curator/culturefeed_curator.info
delete mode 100644 culturefeed_curator/culturefeed_curator.install
delete mode 100644 culturefeed_curator/culturefeed_curator.module
delete mode 100644 culturefeed_curator/includes/culturefeed_curator.admin.inc
delete mode 100644 culturefeed_curator/includes/culturefeed_curator.helpers.inc
delete mode 100644 culturefeed_curator/lib/CuratorArticle.php
delete mode 100644 culturefeed_curator/lib/Drupal/DrupalCultureFeedCuratorClient.php
delete mode 100644 culturefeed_curator/lib/Drupal/DrupalCultureFeedCuratorClient_Cache.php
diff --git a/culturefeed_curator/culturefeed_curator.info b/culturefeed_curator/culturefeed_curator.info
deleted file mode 100644
index 4665bfff..00000000
--- a/culturefeed_curator/culturefeed_curator.info
+++ /dev/null
@@ -1,9 +0,0 @@
-name = CultureFeed Curator
-description = Allows making requests to the Curator API to be able to retrieve external articles for a UDB item.
-package = CultureFeed
-version = VERSION
-core = 7.x
-
-files[] = lib/Drupal/DrupalCultureFeedCuratorClient.php
-files[] = lib/Drupal/DrupalCultureFeedCuratorClient_Cache.php
-files[] = lib/CuratorArticle.php
diff --git a/culturefeed_curator/culturefeed_curator.install b/culturefeed_curator/culturefeed_curator.install
deleted file mode 100644
index 68c973f5..00000000
--- a/culturefeed_curator/culturefeed_curator.install
+++ /dev/null
@@ -1,14 +0,0 @@
- 'CultureFeed Curator API',
- 'description' => 'All configurations to the curator api for this site',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('culturefeed_curator_api_settings_form'),
- 'access arguments' => array('administer site configuration'),
- 'file' => 'includes/culturefeed_curator.admin.inc',
- );
-
- return $items;
-
-}
-
-/**
- * Implements hook_flush_caches().
- */
-function culturefeed_curator_flush_caches() {
- return array('cache_culturefeed_curator');
-}
-
-/**
- * Implements hook_preprocess_culturefeed_agenda_detail().
- */
-function culturefeed_curator_preprocess_culturefeed_event(&$variables) {
-
- // Check for external articles.
- $variables['external_article_links'] = [];
- $curatorClient = culturefeed_get_curator_client();
-
- try {
- if ($external_articles = $curatorClient->getExternalArticlesForCdbItem($variables['item']->getId())) {
- foreach ($external_articles as $external_article) {
-
- // Add the utm params.
- $url = parse_url($external_article->url);
- $query = !empty($url['query']) ? $url['query'] : '';
- parse_str($query,$query_params);
- $query_params['utm_source'] = $_SERVER['HTTP_HOST'];
- $query_params['utm_campaign'] = 'editorial-tools';
- $query_params['utm_medium'] = 'referral';
-
- $scheme = isset($url['scheme']) ? $url['scheme'] . '://' : '';
- $host = isset($url['host']) ? $url['host'] : '';
- $path = isset($url['path']) ? $url['path'] : '';
-
- $new_url = $scheme . $host . $path . '?' . http_build_query($query_params);
-
- $variables['external_article_links'][] = l("$external_article->headline ($external_article->publisher)", $new_url, [
- 'attributes' => [
- 'class' => 'external-article-link',
- 'target' => '_blank',
- ],
- ]);
- }
- }
- }
- catch (\Exception $e) {
- watchdog_exception('culturefeed_curator', $e);
- }
-}
diff --git a/culturefeed_curator/includes/culturefeed_curator.admin.inc b/culturefeed_curator/includes/culturefeed_curator.admin.inc
deleted file mode 100644
index 288fd56d..00000000
--- a/culturefeed_curator/includes/culturefeed_curator.admin.inc
+++ /dev/null
@@ -1,27 +0,0 @@
- 'textfield',
- '#title' => t('Curator API endpoint'),
- '#description' => t('The URL where the CultureFeed Curator API resides. End with a slash. Example: https://curator-test.uitdatabank.be/ (test) or https://curator.uitdatabank.be/ (production)'),
- '#default_value' => variable_get('culturefeed_curator_api_endpoint', CULTUREFEED_CURATOR_API_ENDPOINT),
- );
-
- $form['culturefeed_curator_api_cache_enabled'] = array(
- '#type' => 'checkbox',
- '#title' => t('Cache API requests'),
- '#default_value' => variable_get('culturefeed_curator_api_cache_enabled', TRUE),
- );
-
- return system_settings_form($form);
-
-}
diff --git a/culturefeed_curator/includes/culturefeed_curator.helpers.inc b/culturefeed_curator/includes/culturefeed_curator.helpers.inc
deleted file mode 100644
index 0f8ecd67..00000000
--- a/culturefeed_curator/includes/culturefeed_curator.helpers.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-client = new Client($endpoint);
- }
-
- /**
- * getClient().
- *
- * @param bool $use_cache
- * @return \DrupalCultureFeedCuratorClient
- */
- public static function getClient($use_cache = TRUE) {
- if ($use_cache && variable_get('culturefeed_curator_api_cache_enabled', TRUE) && !self::$cachedCuratorClient) {
- self::$cachedCuratorClient = new DrupalCultureFeedCuratorClient_Cache(new DrupalCultureFeedCuratorClient($use_cache), DrupalCultureFeed::getLoggedInUserId());
- }
- elseif (!$use_cache && !self::$curatorClient) {
- self::$curatorClient = new DrupalCultureFeedCuratorClient($use_cache);
- }
-
- return $use_cache ? self::$cachedCuratorClient : self::$curatorClient;
- }
-
- /**
- * Get external articles for a given CDB ID.
- *
- * @param $cdb_id
- *
- * @return \CultureFeed_CuratorArticle[]
- */
- public function getExternalArticlesForCdbItem($cdb_id) {
-
- $request = $this->client->get('news_articles', null, [
- 'query' => ['about' => $cdb_id]
- ]);
-
- $response = $request->send();
-
- $json = $response->getBody(TRUE);
-
- $result = json_decode($json);
- $results = !empty($result->{'hydra:member'}) ? $result->{'hydra:member'} : [];
-
- $articles = [];
- $properties = array_keys(get_class_vars(CultureFeed_CuratorArticle::class));
- foreach ($results as $result) {
- $article = new CultureFeed_CuratorArticle();
- foreach ($properties as $property) {
- $article->{$property} = !empty($result->{$property}) ? $result->{$property} : '';
- }
- $articles[] = $article;
- }
-
- return $articles;
- }
-
-}
diff --git a/culturefeed_curator/lib/Drupal/DrupalCultureFeedCuratorClient_Cache.php b/culturefeed_curator/lib/Drupal/DrupalCultureFeedCuratorClient_Cache.php
deleted file mode 100644
index cb7a065b..00000000
--- a/culturefeed_curator/lib/Drupal/DrupalCultureFeedCuratorClient_Cache.php
+++ /dev/null
@@ -1,119 +0,0 @@
-loggedInUserId = $loggedInUserId;
- $this->realCuratorClient = $realCuratorClient;
- }
-
- /**
- * Get the curator cache prefix.
- *
- * @return string
- */
- protected function getCachePrefix() {
- return 'culturefeed:curator:';
- }
-
- /**
- * Get the curator cache suffix.
- *
- * @return string
- */
- protected function getCacheSuffix() {
- // Don't cache per user. Curator requests are the same for every user. (for now)
- return '';
- }
-
- /**
- * Add prefix/suffix to given cid.
- *
- * @param $cid
- *
- * @return string
- */
- protected function getCacheCid($cid) {
- return self::getCachePrefix() . $cid . self::getCacheSuffix();
- }
-
- /**
- * Cache data into curator cache.
- *
- * @param $cid
- * @param $data
- * @param int $expires
- */
- protected function cacheSet($cid, $data, $expires = CACHE_PERMANENT) {
- $cid = $this->getCacheCid($cid);
- cache_set($cid, $data, 'cache_culturefeed_curator', $expires);
- }
-
- /**
- * Get cached data from curator cache.
- *
- * @param $cid
- *
- * @return mixed
- */
- protected function cacheGet($cid) {
- $cid = $this->getCacheCid($cid);
- return cache_get($cid, 'cache_culturefeed_curator');
- }
-
- /**
- * Clear CultureFeed curator cache.
- *
- * @param null $cid
- * @param bool $wildcard
- */
- protected function cacheClear($cid = NULL, $wildcard = FALSE) {
- cache_clear_all($cid, 'cache_culturefeed_curator', $wildcard);
- }
-
- /**
- * Get external articles for a given CDB ID.
- *
- * @param $cdb_id
- *
- * @return \CultureFeed_CuratorArticle[]
- */
- public function getExternalArticlesForCdbItem($cdb_id) {
-
- $cid = 'news_articles:' . md5($cdb_id);
- if ($cache = $this->cacheGet($cid)) {
- return $cache->data;
- }
-
- $results = $this->realCuratorClient->getExternalArticlesForCdbItem($cdb_id);
-
- $this->cacheSet($cid, $results, REQUEST_TIME + CULTUREFEED_CURATOR_API_CACHE_EXPIRES);
-
- return $results;
-
- }
-
-}
\ No newline at end of file
From 675416d40aabc6375b94b8cc650c734cc3efe231 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Thu, 7 Nov 2019 17:22:38 +0100
Subject: [PATCH 10/16] Remove usage of getLoggedinAccount
---
culturefeed.helpers.inc | 10 ----------
culturefeed_agenda/culturefeed_agenda.module | 1 +
2 files changed, 1 insertion(+), 10 deletions(-)
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_agenda/culturefeed_agenda.module b/culturefeed_agenda/culturefeed_agenda.module
index acd43f62..177f7957 100644
--- a/culturefeed_agenda/culturefeed_agenda.module
+++ b/culturefeed_agenda/culturefeed_agenda.module
@@ -1056,6 +1056,7 @@ function culturefeed_agenda_url_inbound_alter(&$path, $original_path, $path_lang
// No postal, search flanders region.
else {
$flanders_region = culturefeed_search_get_category_by_slug($city_slug, 'flandersregion');
+ print_r($flanders_region);die();
}
if ($flanders_region) {
From e8ae1537d2f788afe0b259a3b5414a1cec94dd77 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Tue, 12 Nov 2019 10:33:30 +0100
Subject: [PATCH 11/16] PUBS-201: Show other message for anonymous
---
culturefeed_ui/culturefeed_ui.forms.inc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/culturefeed_ui/culturefeed_ui.forms.inc b/culturefeed_ui/culturefeed_ui.forms.inc
index 5a1f281c..883f90df 100644
--- a/culturefeed_ui/culturefeed_ui.forms.inc
+++ b/culturefeed_ui/culturefeed_ui.forms.inc
@@ -137,14 +137,14 @@ function culturefeed_ui_account_edit_form_submit(array $form, array &$form_state
// Passholder.
/* @var CultureFeed $cf */
$cf = DrupalCultureFeed::getLoggedInUserInstance();
-
+
try {
$passholder = $cf->uitpas()->getPassholderByUser($culturefeed_user->id);
}
catch (Exception $e) {
$passholder = NULL;
}
-
+
if ($passholder) {
$card_system_id = variable_get('culturefeed_uitpas_cardsystem_id');
@@ -379,6 +379,8 @@ function culturefeed_ui_privacy_settings_form_submit(array $form, array &$form_s
if ($setting == 'anonymous') {
+ $message = 'Your privacy settings have been saved. Your profile has been set to Anonymous';
+
// Activities.
$query = new CultureFeed_SearchActivitiesQuery();
$query->userId = $culturefeed_user->id;
@@ -407,6 +409,7 @@ function culturefeed_ui_privacy_settings_form_submit(array $form, array &$form_s
else {
+ $message = 'Your privacy settings have been saved.';
// Preferences.
culturefeed_ui_set_all_activity_privacy_preferences($culturefeed_user, FALSE);
@@ -414,7 +417,7 @@ function culturefeed_ui_privacy_settings_form_submit(array $form, array &$form_s
try {
DrupalCultureFeed::updateUserPrivacy($culturefeed_user->id, $privacy_config);
- drupal_set_message(t('Your privacy settings have been saved.'));
+ drupal_set_message(t($message));
}
catch (Exception $e) {
form_set_error('submit', t('Error occurred while saving your privacy settings.'));
From acefd7f65f797341cdf57ef43976fbb3810ab725 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Wed, 13 Nov 2019 11:10:10 +0100
Subject: [PATCH 12/16] Logout all the users
---
culturefeed.install | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/culturefeed.install b/culturefeed.install
index 4cda985b..e325ac39 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_truncate('sessions')->execute();
+}
From 73b470b357fdb9c0c36037893f63ad6591ee3bd8 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Wed, 13 Nov 2019 11:10:19 +0100
Subject: [PATCH 13/16] Remove debug code
---
culturefeed_agenda/culturefeed_agenda.module | 1 -
culturefeed_search_ui/includes/pages.inc | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/culturefeed_agenda/culturefeed_agenda.module b/culturefeed_agenda/culturefeed_agenda.module
index 177f7957..acd43f62 100644
--- a/culturefeed_agenda/culturefeed_agenda.module
+++ b/culturefeed_agenda/culturefeed_agenda.module
@@ -1056,7 +1056,6 @@ function culturefeed_agenda_url_inbound_alter(&$path, $original_path, $path_lang
// No postal, search flanders region.
else {
$flanders_region = culturefeed_search_get_category_by_slug($city_slug, 'flandersregion');
- print_r($flanders_region);die();
}
if ($flanders_region) {
diff --git a/culturefeed_search_ui/includes/pages.inc b/culturefeed_search_ui/includes/pages.inc
index 64051cea..f0a78a79 100644
--- a/culturefeed_search_ui/includes/pages.inc
+++ b/culturefeed_search_ui/includes/pages.inc
@@ -63,7 +63,7 @@ function culturefeed_search_ui_search_page($name, $class_name = NULL, $request_t
drupal_set_breadcrumb($breadcrumb);
}
-
+
// Add rss to head if we're on a valid search path
if (current_path() == 'agenda/search') {
drupal_add_html_head_link(array(
@@ -103,14 +103,14 @@ function culturefeed_search_ui_search_page($name, $class_name = NULL, $request_t
ajax_deliver(array('#type' => 'ajax', '#commands' => $commands));
exit;
}
- elseif ($rss) {
+ elseif ($rss) {
// Add the RSS content-type header.
drupal_add_http_header('Content-Type', 'application/rss+xml; charset=utf-8');
$data = array();
foreach ($page->getSearchResult()->getItems() as $item) {
$object['cdbid'] = $item->getEntity()->getCdbId();
$details = $item->getEntity()->getDetails()->getDetailByLanguage(culturefeed_search_get_preferred_language());
- $object['title'] = $details->getTitle();
+ $object['title'] = $details->getTitle();
$object['created'] = $item->getEntity()->getCreationDate();
if ($item->getType() == 'event' && method_exists($item->getEntity()->getLocation()->getAddress()->getPhysicalAddress(), 'getCity')) {
$object['city'] = $item->getEntity()->getLocation()->getAddress()->getPhysicalAddress()->getCity();
From e9fc186be9f971eaefc9f6a17d9d3b1de2a86c9c Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Wed, 13 Nov 2019 11:18:00 +0100
Subject: [PATCH 14/16] Only delete the logged in sessions
---
culturefeed.install | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/culturefeed.install b/culturefeed.install
index e325ac39..881ee918 100644
--- a/culturefeed.install
+++ b/culturefeed.install
@@ -283,5 +283,5 @@ function culturefeed_update_7003() {
* Logout all users, as the uitid session will be gone.
*/
function culturefeed_update_7005() {
- db_truncate('sessions')->execute();
+ db_delete('sessions')->condition('uid', 0, '!=')->execute();
}
From 1ed001ccca2421f2b495b27f4c26f21a5e2508c4 Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Wed, 13 Nov 2019 14:05:23 +0100
Subject: [PATCH 15/16] Fix getUserlist to fit new culturefeed-php
---
lib/Drupal/DrupalCultureFeedPages_Cache.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Drupal/DrupalCultureFeedPages_Cache.php b/lib/Drupal/DrupalCultureFeedPages_Cache.php
index 49351952..a67beb0e 100644
--- a/lib/Drupal/DrupalCultureFeedPages_Cache.php
+++ b/lib/Drupal/DrupalCultureFeedPages_Cache.php
@@ -178,7 +178,7 @@ public function changePermissions($id, array $params) {
/**
* @see CultureFeed_Pages::getUserList()
*/
- public function getUserList($id, $roles = array(), $use_auth = TRUE) {
+ public function getUserList($id, $roles = array(), $use_auth = TRUE, $mboxIncludePrivate = FALSE) {
$cid = 'userList:' . $id . ':' . md5(serialize($roles)) . ':' . $use_auth;
From 0d22323f8ab154cf870ad1e45f9021ca4ea3d6fa Mon Sep 17 00:00:00 2001
From: Nils Destoop
Date: Thu, 14 Nov 2019 16:20:44 +0100
Subject: [PATCH 16/16] Update the readme with the EOL message
---
README.md | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
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)__