Commit c7773d70 authored by kpaxman's avatar kpaxman
Browse files

Create 1.14.2

parents
.view .event {border-bottom: solid 1px #ddd; margin-bottom: 1em;}
.view .event .event-title {border: none; font-size: 1.1em; font-weight: normal; margin-bottom: .2em;}
.view .event .event-title a {text-decoration: underline;}
.view .event .event-date {color: #555; margin-bottom: .5em;}
.view .event img {float: left; margin-right: 10px; margin-bottom: 1em;}
.page-events .view-footer {text-align: right;}
.event-content .field_event_date .field-data {font-size: 1.3em; color: #555; margin-bottom: 1em;}
.event-content .field_event_date .date-display-end {white-space: nowrap;}
.event-content .field_event_date .field-data.multiple {font-size: 1em;}
.event-content .field_event_location .address-content {margin-top: .5em; color: #333;}
.event-content .details {border-top: solid 1px #ddd; margin-top: .5em;}
.event-content .details .field {border-bottom: solid 1px #ddd; padding: .5em 0;}
.event-content .details .field .field-label {width: 8em; font-weight: normal; font-style: italic; color: #555;}
.event-content .details .field .field-data {margin-left: 9em;}
.front .block-events li {margin-bottom: 0;}
.front .block-events ol {margin-bottom: .5em; padding: 0;}
.front .event-date {display: inline-block; width: 110px; font-size: .85em; color: #444;}
.front .event-link-title {width: 380px; display: inline-block; vertical-align: top;}
.front .events-more-link {display: inline-block; margin-left: 110px; font-weight: bold;}
.block-events .feed-icon a {
background: url("images/ical-feed-icon-34x14.png") no-repeat scroll 0 0 transparent;
display: inline-block;
line-height: 16px;
margin-bottom: 10px;
padding-left: 40px;
}
\ No newline at end of file
This diff is collapsed.
/** Adds the ability to select a pre-existing location, making an AJAX call to populate the data from a central location
*/
(function ($) {
Drupal.behaviors.uw_ct_event = {
attach: function (context, settings) {
if($("#autofill-location-data").length === 0){
$locations = $('<select>').addClass('form-select').attr('id', settings.uw_ct_event.selectId);
// create the list of locations
if (settings.uw_ct_event.data) {
// add first location placeholder
$locations.append($('<option>').text(settings.uw_ct_event.custom).attr('value', 'custom'));
// add location selections
$.each(settings.uw_ct_event.data, function(key, value) {
$locations.append($('<option>').text(value.name).attr('value', key));
});
//add the list to the page
$locations.insertBefore('#' + settings.uw_ct_event.containerId, context)
$locations.wrap($('<div>').addClass('form-item'));
$locations.before($('<label>').text(settings.uw_ct_event.label).attr('for', settings.uw_ct_event.selectId));
$locations.after($('<div>').text(settings.uw_ct_event.description).addClass('description'));
//set location data when the list changes
$locations.change(function() {
if ($locations.val() != 'custom') {
_populate_location_data(settings.uw_ct_event.data[$locations.val()])
}
else {
_populate_location_data(
{
name: '',
additional: '',
street: '',
city: '',
province: '',
postal_code: '',
country: 'ca',
latitude: '',
longitude: ''
}
);
}
});
}
}
}
};
// TODO: use a variable setting from Drupal for the field name / language id selector
function _populate_location_data(data) {
$('#edit-field-event-location-und-0-name').val(data.name);
$('#edit-field-event-location-und-0-additional').val(data.additional);
$('#edit-field-event-location-und-0-street').val(data.street);
$('#edit-field-event-location-und-0-city').val(data.city);
$('#edit-field-event-location-und-0-province').val(data.province);
$('#edit-field-event-location-und-0-postal-code').val(data.postal_code);
$('#edit-field-event-location-und-0-country').val(data.country);
$('#edit-field-event-location-und-0-locpick-user-latitude').val(data.latitude);
$('#edit-field-event-location-und-0-locpick-user-longitude').val(data.longitude);
}
}(jQuery));
<?php
/**
* @file
* Default theme implementation to display a block.
*
* Available variables:
* - $block->subject: Block title.
* - $content: Block content.
* - $block->module: Module that generated the block.
* - $block->delta: An ID for the block, unique within each module.
* - $block->region: The block region embedding the current block.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
* - block: The current template type, i.e., "theming hook".
* - block-[module]: The module generating the block. For example, the user module
* is responsible for handling the default user navigation block. In that case
* the class would be "block-user".
* - $title_prefix (array): An array containing additional output populated by
* modules, intended to be displayed in front of the main title tag that
* appears in the template.
* - $title_suffix (array): An array containing additional output populated by
* modules, intended to be displayed after the main title tag that appears in
* the template.
*
* Helper variables:
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
* - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
* - $zebra: Same output as $block_zebra but independent of any block region.
* - $block_id: Counter dependent on each block region.
* - $id: Same output as $block_id but independent of any block region.
* - $is_front: Flags true when presented in the front page.
* - $logged_in: Flags true when the current user is a logged-in member.
* - $is_admin: Flags true when the current user is an administrator.
* - $block_html_id: A valid HTML ID and guaranteed unique.
*
* @see template_preprocess()
* @see template_preprocess_block()
* @see template_process()
*/
?>
<div class="block-events block-list-archive"<?php print $attributes; ?>>
<?php if ($block->subject): ?>
<?php print render($title_prefix); ?>
<h2<?php print $title_attributes; ?>><?php print $block->subject ?></h2>
<?php print render($title_suffix); ?>
<?php endif;?>
<?php print $content ?>
</div>
\ No newline at end of file
<?php
/**
* @file
* Default theme implementation to display a block.
*
* Available variables:
* - $block->subject: Block title.
* - $content: Block content.
* - $block->module: Module that generated the block.
* - $block->delta: An ID for the block, unique within each module.
* - $block->region: The block region embedding the current block.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
* - block: The current template type, i.e., "theming hook".
* - block-[module]: The module generating the block. For example, the user module
* is responsible for handling the default user navigation block. In that case
* the class would be "block-user".
* - $title_prefix (array): An array containing additional output populated by
* modules, intended to be displayed in front of the main title tag that
* appears in the template.
* - $title_suffix (array): An array containing additional output populated by
* modules, intended to be displayed after the main title tag that appears in
* the template.
*
* Helper variables:
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
* - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
* - $zebra: Same output as $block_zebra but independent of any block region.
* - $block_id: Counter dependent on each block region.
* - $id: Same output as $block_id but independent of any block region.
* - $is_front: Flags true when presented in the front page.
* - $logged_in: Flags true when the current user is a logged-in member.
* - $is_admin: Flags true when the current user is an administrator.
* - $block_html_id: A valid HTML ID and guaranteed unique.
*
* @see template_preprocess()
* @see template_preprocess_block()
* @see template_process()
*/
?>
<div class="block-list-audience"<?php print $attributes; ?>>
<?php if ($block->subject): ?>
<?php print render($title_prefix); ?>
<h2<?php print $title_attributes; ?>><?php print $block->subject ?></h2>
<?php print render($title_suffix); ?>
<?php endif;?>
<?php print $content ?>
</div>
\ No newline at end of file
<?php
/**
* @file field.tpl.php
* Default template implementation to display the value of a field.
*
* This file is not used and is here as a starting point for customization only.
* @see theme_field()
*
* Possible override templates are:
*
* field.tpl.php
* field--field-type.tpl.php
* field--field-name.tpl.php
* field--content-type.tpl.php
* field--field-name--content-type.tpl.php
*
* Available variables:
* - $items: An array of field values. Use render() to output them.
* - $label: The item label.
* - $label_hidden: Whether the label display is set to 'hidden'.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the
* following:
* - field: The current template type, i.e., "theming hook".
* - field-name-[field_name]: The current field name. For example, if the
* field name is "field_description" it would result in
* "field-name-field-description".
* - field-type-[field_type]: The current field type. For example, if the
* field type is "text" it would result in "field-type-text".
* - field-label-[label_display]: The current label position. For example, if
* the label position is "above" it would result in "field-label-above".
*
* Other variables:
* - $element['#object']: The entity to which the field is attached.
* - $element['#view_mode']: View mode, e.g. 'full', 'teaser'...
* - $element['#field_name']: The field name.
* - $element['#field_type']: The field type.
* - $element['#field_language']: The field language.
* - $element['#field_translatable']: Whether the field is translatable or not.
* - $element['#label_display']: Position of label display, inline, above, or
* hidden.
* - $field_name_css: The css-compatible field name.
* - $field_type_css: The css-compatible field type.
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
*
* @see template_preprocess_field()
* @see theme_field()
*/
?>
<div class="field <?php print $element['#field_name'] ?> field-label-<?php print $element['#label_display']; ?> clearfix"<?php print $attributes; ?>>
<?php if (!$label_hidden): ?>
<div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>&nbsp;</div>
<?php endif; ?>
<div class="field-data <?php if (count($items)>1): print 'multiple'; endif; ?>"<?php print $content_attributes; ?>>
<?php foreach ($items as $delta => $item): ?>
<div<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div>
<?php endforeach; ?>
</div>
</div>
<?php
/**
* @file
* Default theme implementation to display a node.
*
* Available variables:
* - $title: the (sanitized) title of the node.
* - $content: An array of node items. Use render($content) to print them all,
* or print a subset such as render($content['field_example']). Use
* hide($content['field_example']) to temporarily suppress the printing of a
* given element.
* - $user_picture: The node author's picture from user-picture.tpl.php.
* - $date: Formatted creation date. Preprocess functions can reformat it by
* calling format_date() with the desired parameters on the $created variable.
* - $name: Themed username of node author output from theme_username().
* - $node_url: Direct url of the current node.
* - $display_submitted: Whether submission information should be displayed.
* - $submitted: Submission information created from $name and $date during
* template_preprocess_node().
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the
* following:
* - node: The current template type, i.e., "theming hook".
* - node-[type]: The current node type. For example, if the node is a
* "Blog entry" it would result in "node-blog". Note that the machine
* name will often be in a short form of the human readable label.
* - node-teaser: Nodes in teaser form.
* - node-preview: Nodes in preview mode.
* The following are controlled through the node publishing options.
* - node-promoted: Nodes promoted to the front page.
* - node-sticky: Nodes ordered above other non-sticky nodes in teaser
* listings.
* - node-unpublished: Unpublished nodes visible only to administrators.
* - $title_prefix (array): An array containing additional output populated by
* modules, intended to be displayed in front of the main title tag that
* appears in the template.
* - $title_suffix (array): An array containing additional output populated by
* modules, intended to be displayed after the main title tag that appears in
* the template.
*
* Other variables:
* - $node: Full node object. Contains data that may not be safe.
* - $type: Node type, i.e. story, page, blog, etc.
* - $comment_count: Number of comments attached to the node.
* - $uid: User ID of the node author.
* - $created: Time the node was published formatted in Unix timestamp.
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
* - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
* teaser listings.
* - $id: Position of the node. Increments each time it's output.
*
* Node status variables:
* - $view_mode: View mode, e.g. 'full', 'teaser'...
* - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser').
* - $page: Flag for the full page state.
* - $promote: Flag for front page promotion state.
* - $sticky: Flags for sticky post setting.
* - $status: Flag for published status.
* - $comment: State of comment settings for the node.
* - $readmore: Flags true if the teaser content of the node cannot hold the
* main body content.
* - $is_front: Flags true when presented in the front page.
* - $logged_in: Flags true when the current user is a logged-in member.
* - $is_admin: Flags true when the current user is an administrator.
*
* Field variables: for each field instance attached to the node a corresponding
* variable is defined, e.g. $node->body becomes $body. When needing to access
* a field's raw values, developers/themers are strongly encouraged to use these
* variables. Otherwise they will have to explicitly specify the desired field
* language, e.g. $node->body['en'], thus overriding any language negotiation
* rule that was previously applied.
*
* @see template_preprocess()
* @see template_preprocess_node()
* @see template_process()
*/
?>
<div class="clearfix"<?php print $attributes; ?>>
<?php if (!$page): ?>
<?php print render($title_prefix); ?>
<h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
<?php print render($title_suffix); ?>
<?php endif; ?>
<div class="event-content"<?php print $content_attributes; ?>>
<?php print render($content['field_event_date']); ?>
<?php print render($content['body']); ?>
<div class="details">
<?php
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
print render($content);
?>
</div>
</div>
<?php print render($content['links']); ?>
</div>
\ No newline at end of file
<?php
/**
* @file views-view-rss.tpl.php
* Default template for feed displays that use the RSS style.
*
* @ingroup views_templates
*/
?>
<?php print "<?xml"; ?> version="1.0" encoding="utf-8" <?php print "?>"; ?>
<rss version="2.0" xml:base="<?php print $link; ?>"<?php print $namespaces; ?>>
<channel>
<title><?php print $title.' | Events Feed'; ?></title>
<link><?php print $link; ?></link>
<description><?php print $description; ?></description>
<language><?php print $langcode; ?></language>
<?php print $channel_elements; ?>
<?php print $items; ?>
</channel>
</rss>
<?php
/**
* @file views-view-unformatted.tpl.php
* Default simple view template to display a list of rows.
*
* @ingroup views_templates
*/
?>
<?php if (!empty($title)): ?>
<h3><?php print $title; ?></h3>
<?php endif; ?>
<?php foreach ($rows as $id => $row): ?>
<div class="event clearfix">
<?php print $row; ?>
</div>
<?php endforeach; ?>
\ No newline at end of file
<?php
/**
* @file views-view-unformatted.tpl.php
* Default simple view template to display a list of rows.
*
* @ingroup views_templates
*/
?>
<?php if (!empty($title)): ?>
<h3><?php print $title; ?></h3>
<?php endif; ?>
<?php foreach ($rows as $id => $row): ?>
<div class="event clearfix">
<?php print $row; ?>
</div>
<?php endforeach; ?>
\ No newline at end of file
<?php
/**
* @file
* uw_ct_event.context.inc
*/
/**
* Implements hook_context_default_contexts().
*/
function uw_ct_event_context_default_contexts() {
$export = array();
$context = new stdClass();
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'event-front_page';
$context->description = 'Displays event block on a site\'s front page.';
$context->tag = 'Content';
$context->conditions = array(
'path' => array(
'values' => array(
'<front>' => '<front>',
),
),
);
$context->reactions = array(
'block' => array(
'blocks' => array(
'uw_ct_event-front_page' => array(
'module' => 'uw_ct_event',
'delta' => 'front_page',
'region' => 'content',
'weight' => '9',
),
),
),
);
$context->condition_mode = 0;
// Translatables
// Included for use with string extractors like potx.
t('Content');
t('Displays event block on a site\'s front page.');
$export['event-front_page'] = $context;
$context = new stdClass();
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'event_categories';
$context->description = 'Displays event categories (taxonomy) blocks.';
$context->tag = 'Content';
$context->conditions = array(
'path' => array(
'values' => array(
'events' => 'events',
'events/*' => 'events/*',
),
),
);
$context->reactions = array(
'block' => array(
'blocks' => array(
'uw_ct_event-events_public_feed' => array(
'module' => 'uw_ct_event',
'delta' => 'events_public_feed',
'region' => 'sidebar_second',
'weight' => '-28',
),
'views-event_category_blocks-block' => array(
'module' => 'views',
'delta' => 'event_category_blocks-block',
'region' => 'sidebar_second',
'weight' => '-27',
),
'uw_ct_event-events_by_date' => array(
'module' => 'uw_ct_event',
'delta' => 'events_by_date',
'region' => 'sidebar_second',
'weight' => '-25',
),
'uw_ct_event-event-calendar-block-id' => array(
'module' => 'uw_ct_event',
'delta' => 'event-calendar-block-id',
'region' => 'sidebar_second',
'weight' => '-29',
),
),
),
);
$context->condition_mode = 0;
// Translatables
// Included for use with string extractors like potx.
t('Content');
t('Displays event categories (taxonomy) blocks.');
$export['event_categories'] = $context;
return $export;
}
This diff is collapsed.
<?php
/**
* @file
* uw_ct_event.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function uw_ct_event_ctools_plugin_api() {
list($module, $api) = func_get_args();
if ($module == "context" && $api == "context") {
return array("version" => "3");
}
list($module, $api) = func_get_args();
if ($module == "field_group" && $api == "field_group") {
return array("version" => "1");
}
list($module, $api) = func_get_args();
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}
/**
* Implements hook_views_api().
*/
function uw_ct_event_views_api() {
return array("version" => "3.0");
}
/**
* Implements hook_node_info().
*/
function uw_ct_event_node_info() {
$items = array(
'uw_event' => array(
'name' => t('Event'),
'base' => 'node_content',
'description' => t('An event, which is automatically promoted to the front page and appears under the "Events" section of your site.'),
'has_title' => '1',
'title_label' => t('Event Title'),
'help' => '',
),
);
return $items;
}
/**
* Implements hook_rdf_default_mappings().
*/
function uw_ct_event_rdf_default_mappings() {
$schemaorg = array();
// Exported RDF mapping: uw_event
$schemaorg['node']['uw_event'] = array(
'rdftype' => array(
0 => 'schema:Event',
1 => 'sioc:Item',
2 => 'foaf:Document',
),
'title' => array(
'predicates' => array(
0 => 'schema:name',
1 => 'dc:title',
),
),
'created' => array(
'predicates' => array(
0 => 'dc:date',
1 => 'dc:created',
),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
),
'changed' => array(
'predicates' => array(
0 => 'dc:modified',
),
'datatype' => 'xsd:dateTime',