Commit 320cb5b0 authored by l26yan's avatar l26yan
Browse files

Merge branch 'ISTWCMS-2636-Leaflet-location-map' into 7.x-2.x

parents 44282e80 cafc0b19
/**
* @file
*/
(function ($) {
$(function () {
$("div.leaflet-container").addClass("element-invisible");
});
}(jQuery));
......@@ -107,9 +107,9 @@
<?php
print render($content['field_event_date']);
print render($content['title_field']);
if (!empty($content['body']['#items'][0])) {
if (!empty($content['body']['#items'][0])):
$content['body'][0]['#markup'] = uw_ct_web_page_filter_summary($content['body']['#items'][0]);
}
endif;
hide($content['title_field']);
hide($content['field_blog_date']);
print render($content);
......@@ -121,11 +121,11 @@
<div class="details">
<?php
// We hide the comments and links now so that we can render them later.
// Hide the comments and links now so that render them later.
hide($content['comments']);
hide($content['links']);
hide($content['links']);;
print render($content);
?>
?>
</div>
<?php endif; ?>
</div>
......
<?php
/**
* @file
* uw_ct_event.features.field_instance.inc
......@@ -670,10 +669,45 @@ function uw_ct_event_field_default_field_instances() {
'description' => '',
'display' => array(
'default' => array(
'label' => 'inline',
'module' => 'location_cck',
'settings' => array(),
'type' => 'location_all',
'label' => 'above',
'module' => 'leaflet',
'settings' => array(
'address' => array(
'show' => 1,
'text' => '<div class="address-content">[node:field_event_location:name:0]<div class="steet-address">[node:field_event_location:street:0]</div><span class="locality">[node:field_event_location:city:0] [node:field_event_location:province:0] [node:field_event_location:postal_code:0]</span><div class="country-name">[node:field_event_location:country_name:0]</div></div>',
),
'height' => 300,
'icon' => array(
'html' => '',
'htmlClass' => 'leaflet_map_icon',
'iconAnchor' => array(
'x' => '',
'y' => '',
),
'iconImageStyle' => '',
'iconSize' => array(
'x' => '',
'y' => '',
),
'iconType' => 'marker',
'iconUrl' => '/profiles/uw_base_profile/libraries/gmap_markers/university.png',
'popupAnchor' => array(
'x' => 20,
'y' => 20,
),
'shadowAnchor' => array(
'x' => '',
'y' => '',
),
'shadowUrl' => '',
),
'leaflet_map' => 'OSM Mapnik',
'popup' => array(
'show' => 1,
'text' => '<div class="field-label">[node:field_event_location:name:0]</div><div class="address-content"><div class="steet-address">[node:field_event_location:street:0]</div><span class="locality">[node:field_event_location:city:0] [node:field_event_location:province:0] [node:field_event_location:postal_code:0]</span><div class="country-name">[node:field_event_location:country_name:0]</div></div>',
),
),
'type' => 'location_cck_leaflet',
'weight' => 5,
),
'embedded' => array(
......@@ -734,7 +768,9 @@ function uw_ct_event_field_default_field_instances() {
'widget' => array(
'active' => 0,
'module' => 'location_cck',
'settings' => array(),
'settings' => array(
'label_help_description' => '',
),
'type' => 'location',
'weight' => 8,
),
......@@ -841,8 +877,7 @@ function uw_ct_event_field_default_field_instances() {
'bundle' => 'uw_event',
'default_value' => NULL,
'deleted' => 0,
'description' => 'Optional: provide the name of the event website and a link to a website with more information specific to this event (e.g.
https://uwaterloo.ca/&lt;event details web page&gt;).',
'description' => 'Optional: provide the name of the event website and a link to a website with more information specific to this event (e.g. https://uwaterloo.ca/&lt;event details web page&gt;).',
'display' => array(
'default' => array(
'label' => 'inline',
......@@ -1385,8 +1420,7 @@ https://uwaterloo.ca/&lt;event details web page&gt;).',
t('Location');
t('Map');
t('Optional: provide a link to a map with the event location (e.g. https://uwaterloo.ca/map/)');
t('Optional: provide the name of the event website and a link to a website with more information specific to this event (e.g.
https://uwaterloo.ca/&lt;event details web page&gt;).');
t('Optional: provide the name of the event website and a link to a website with more information specific to this event (e.g. https://uwaterloo.ca/&lt;event details web page&gt;).');
t('Optional: provide the name of the host and a link to the host\'s website (e.g. https://uwaterloo.ca/&lt;host website&gt;).');
t('The listing page image is used on the event listing pages. You can re-use this image by inserting it into the event description.');
t('Title');
......
......@@ -84,17 +84,6 @@ function uw_ct_event_user_default_permissions() {
'module' => 'override_node_options',
);
// Exported permission: 'merge uw_event_tags terms'.
$permissions['merge uw_event_tags terms'] = array(
'name' => 'merge uw_event_tags terms',
'roles' => array(
'WCMS support' => 'WCMS support',
'administrator' => 'administrator',
'site manager' => 'site manager',
),
'module' => 'term_merge',
);
// Exported permission: 'override uw_event authored by option'.
$permissions['override uw_event authored by option'] = array(
'name' => 'override uw_event authored by option',
......
......@@ -21,6 +21,7 @@ dependencies[] = features
dependencies[] = field_group
dependencies[] = file
dependencies[] = image
dependencies[] = leaflet
dependencies[] = link
dependencies[] = location
dependencies[] = location_cck
......@@ -38,11 +39,11 @@ dependencies[] = services_api_key_auth
dependencies[] = services_views
dependencies[] = strongarm
dependencies[] = taxonomy
dependencies[] = term_merge
dependencies[] = term_reference_tree
dependencies[] = text
dependencies[] = title
dependencies[] = uw_ct_web_page
dependencies[] = uw_gmap_config
dependencies[] = uw_roles_fdsu
dependencies[] = uw_value_lists
dependencies[] = uw_vocab_audience
......
......@@ -866,6 +866,7 @@ function uw_ct_event_page_build() {
if (isset($node) && is_object($node) && $node->type == 'uw_event') {
$breadcrumb = drupal_get_breadcrumb();
$breadcrumb[1] = l(t('Events'), 'events');
drupal_add_js(drupal_get_path('module', 'uw_ct_event') . '/js/uw_ct_event.js');
// TODO: determine how to handle repeating dates (edge case)
......@@ -879,6 +880,11 @@ function uw_ct_event_page_build() {
$breadcrumb[2] = l($year, 'events/archive/' . $year);
$breadcrumb[3] = l($month_name, 'events/archive/' . $year . '-' . $month_number);
drupal_set_breadcrumb($breadcrumb);
// Add element-invisible to leaflet-container when there is no latitude and longitude.
if ($node->field_event_location[LANGUAGE_NONE][0]['latitude'] == '0.000000' && $node->field_event_location[LANGUAGE_NONE][0]['longitude'] == '0.000000') {
drupal_add_js(drupal_get_path('module', 'uw_ct_event') . '/js/leaflet-map-invisible.js');
}
}
break;
......
<?php
/**
* @file
* uw_ct_event.strongarm.inc
......@@ -97,6 +96,12 @@ function uw_ct_event_strongarm() {
'ical' => array(
'custom_settings' => TRUE,
),
'embedded' => array(
'custom_settings' => TRUE,
),
'diff_standard' => array(
'custom_settings' => FALSE,
),
),
'extra_fields' => array(
'form' => array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment