Commit cad154b3 authored by ccarigna's avatar ccarigna
Browse files

Added events node styling, added fieldgroups

parent 2f7e26a4
.block-events ol {list-style-type: none; margin-left: 0;}
.block-events li ol {list-style-type: square; margin-left: 1.2em;}
.block-events li .item-list {margin-top: .2em;}
\ No newline at end of file
.block-events-audience {margin-bottom: 1em;}
.block-events-archive ol {list-style-type: none; margin-left: 0;}
.block-events-archive li ol {list-style-type: square; margin-left: 1.2em;}
.block-events-archive li .item-list {margin-top: .2em;}
.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;}
.page-events .view-footer {text-align: right;}
.view .date-nav-wrapper {margin-top: 0;}
.view .date-nav-wrapper .date-nav {min-height: inherit; height: auto; padding: 0;}
.view .date-nav-wrapper .date-heading {text-align: left; float: none;}
.view .date-nav-wrapper .date-prev, .view .date-nav-wrapper .date-next {padding: 0; margin: 0; background: none;}
.view .date-nav-wrapper .date-prev {right: 6.5em;}
.view .date-nav-wrapper .date-prev a, .view .date-nav-wrapper .date-next a {font-size: 1em; background: #ddd; padding: .2em; width:6em; display: block; text-align: center;}
.view .date-nav-wrapper .date-prev a:hover, .view .date-nav-wrapper .date-next a:hover {color: #03f; background: #eee;}
.view .date-nav-wrapper .date-prev a {border-radius:5px 0 0 0;}
.view .date-nav-wrapper .date-next a {border-radius:0 5px 0 0;}
.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: #555;}
.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;}
.event-content .details .field .field-data {margin-left: 9em;}
\ No newline at end of file
......@@ -41,11 +41,11 @@
* @see template_process()
*/
?>
<div class="block-events"<?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;?>
<div class="block-events-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-events-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
* Template file for the example display.
*
* Variables available:
* - $plugin: The pager plugin object. This contains the view as well as a lot
*
* $nav_title
* The formatted title for this view. In the case of block
* views, it will be a link to the full view, otherwise it will
* be the formatted name of the year, month, day, or week.
*
* $prev_url
* $next_url
* Urls for the previous and next calendar pages. The links are
* composed in the template to make it easier to change the text,
* add images, etc.
*
* $prev_options
* $next_options
* Query strings and other options for the links that need to
* be used in the l() function, including rel=nofollow.
*
* $block:
* Whether or not this view is in a block.
*
* $view
* The view object for this navigation.
*
* $pager_prefix
* Additional information that might be added by overriding template_process_date_views_pager().
*
* $extra_classes
* Extra classes for the wrapper, if any.
*
*/
?>
<?php if (!empty($pager_prefix)) print $pager_prefix; ?>
<div class="date-nav-wrapper clearfix<?php if (!empty($extra_classes)) print $extra_classes; ?>">
<div class="date-nav">
<div class="date-prev">
<?php if (!empty($prev_url)) : ?>
<?php print l('&laquo;' . ($mini ? '' : t('Previous', array(), array('context' => 'date_nav'))), $prev_url, $prev_options); ?>
<?php endif; ?>
</div>
<div class="date-heading">
<h2><?php print $nav_title ?></h2>
</div>
<div class="date-next">
<?php if (!empty($next_url)) : ?>
<?php print l(($mini ? '' : t('Next', array(), array('context' => 'date_nav'))) . ' &raquo;', $next_url, $next_options); ?>
<?php endif; ?>
</div>
</div>
</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';} ?>"<?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>
\ No newline at end of file
<?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-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">
<?php print $row; ?>
</div>
<?php endforeach; ?>
\ No newline at end of file
......@@ -27,17 +27,17 @@ function uw_ct_event_context_default_contexts() {
$context->reactions = array(
'block' => array(
'blocks' => array(
'uw_ct_event-events_by_date' => array(
'module' => 'uw_ct_event',
'delta' => 'events_by_date',
'region' => 'sidebar_second',
'weight' => '-23',
),
'views-event_category_blocks-block' => array(
'module' => 'views',
'delta' => 'event_category_blocks-block',
'region' => 'sidebar_second',
'weight' => '-22',
'weight' => '-25',
),
'uw_ct_event-events_by_date' => array(
'module' => 'uw_ct_event',
'delta' => 'events_by_date',
'region' => 'sidebar_second',
'weight' => '-24',
),
),
),
......
......@@ -49,7 +49,7 @@ function uw_ct_event_field_default_fields() {
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => '4',
'weight' => '1',
),
'full' => array(
'label' => 'above',
......@@ -85,7 +85,7 @@ function uw_ct_event_field_default_fields() {
'summary_rows' => 5,
),
'type' => 'text_textarea_with_summary',
'weight' => '7',
'weight' => '2',
),
),
);
......@@ -132,7 +132,7 @@ function uw_ct_event_field_default_fields() {
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'label' => 'inline',
'module' => 'taxonomy',
'settings' => array(),
'type' => 'taxonomy_term_reference_link',
......@@ -213,7 +213,7 @@ function uw_ct_event_field_default_fields() {
'multiple_from' => '',
'multiple_number' => '',
'multiple_to' => '',
'show_repeat_rule' => 'show',
'show_repeat_rule' => 'hide',
),
'type' => 'date_default',
'weight' => '0',
......@@ -263,7 +263,7 @@ function uw_ct_event_field_default_fields() {
'year_range' => '-1:+3',
),
'type' => 'date_popup_repeat',
'weight' => '2',
'weight' => '1',
),
),
);
......@@ -307,7 +307,7 @@ function uw_ct_event_field_default_fields() {
'module' => 'link',
'settings' => array(),
'type' => 'link_default',
'weight' => '3',
'weight' => '2',
),
'teaser' => array(
'label' => 'above',
......@@ -343,7 +343,7 @@ function uw_ct_event_field_default_fields() {
'module' => 'link',
'settings' => array(),
'type' => 'link_field',
'weight' => '5',
'weight' => '6',
),
),
);
......@@ -388,41 +388,41 @@ function uw_ct_event_field_default_fields() {
'additional' => array(
'collect' => '1',
'default' => '',
'weight' => '6',
'weight' => '-99',
),
'city' => array(
'collect' => '1',
'default' => '',
'weight' => '8',
'weight' => '-97',
),
'country' => array(
'collect' => '1',
'default' => 'ca',
'weight' => '14',
'weight' => '-94',
),
'locpick' => array(
'collect' => '0',
'weight' => '20',
'weight' => '-93',
),
'name' => array(
'collect' => '1',
'default' => '',
'weight' => '2',
'weight' => '-100',
),
'postal_code' => array(
'collect' => '1',
'default' => '',
'weight' => '12',
'weight' => '-95',
),
'province' => array(
'collect' => '1',
'default' => '',
'weight' => '10',
'weight' => '-96',
),
'street' => array(
'collect' => '1',
'default' => '',
'weight' => '4',
'weight' => '-98',
),
),
),
......@@ -438,11 +438,11 @@ function uw_ct_event_field_default_fields() {
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'label' => 'inline',
'module' => 'location_cck',
'settings' => array(),
'type' => 'location_default',
'weight' => '1',
'weight' => '4',
),
'full' => array(
'label' => 'above',
......@@ -470,7 +470,7 @@ function uw_ct_event_field_default_fields() {
'module' => 'location_cck',
'settings' => array(),
'type' => 'location',
'weight' => '3',
'weight' => '8',
),
),
);
......@@ -555,7 +555,7 @@ function uw_ct_event_field_default_fields() {
'module' => 'options',
'settings' => array(),
'type' => 'options_select',
'weight' => '1',
'weight' => '7',
),
),
);
......@@ -592,14 +592,14 @@ function uw_ct_event_field_default_fields() {
'bundle' => 'uw_event',
'default_value' => NULL,
'deleted' => '0',
'description' => 'Optional: provide a link to an external website map for directions to the event location.',
'description' => 'Optional: provide a link to a map with the event location (e.g. http://www.uwaterloo.ca/map/)',
'display' => array(
'default' => array(
'label' => 'inline',
'module' => 'link',
'settings' => array(),
'type' => 'link_default',
'weight' => '2',
'weight' => '5',
),
'full' => array(
'label' => 'above',
......@@ -617,7 +617,7 @@ function uw_ct_event_field_default_fields() {
),
'entity_type' => 'node',
'field_name' => 'field_event_map_link',
'label' => 'Map link',
'label' => 'Map',
'required' => 0,
'settings' => array(
'attributes' => array(
......@@ -642,7 +642,7 @@ function uw_ct_event_field_default_fields() {
'module' => 'link',
'settings' => array(),
'type' => 'link_field',
'weight' => '4',
'weight' => '9',
),
),
);
......@@ -679,14 +679,14 @@ function uw_ct_event_field_default_fields() {
'bundle' => 'uw_event',
'default_value' => NULL,
'deleted' => '0',
'description' => 'Optional: provide a link to the event website for more information.',
'description' => 'Optional: a link to a website with more information specific to this event.',
'display' => array(
'default' => array(
'label' => 'inline',
'module' => 'link',
'settings' => array(),
'type' => 'link_default',
'weight' => '5',
'weight' => '3',
),
'full' => array(
'label' => 'above',
......@@ -704,7 +704,7 @@ function uw_ct_event_field_default_fields() {
),
'entity_type' => 'node',
'field_name' => 'field_event_moreinfo_link',
'label' => 'More information',
'label' => 'Event website',
'required' => 0,
'settings' => array(
'attributes' => array(
......@@ -729,7 +729,7 @@ function uw_ct_event_field_default_fields() {
'module' => 'link',
'settings' => array(),
'type' => 'link_field',
'weight' => '6',
'weight' => '7',
),
),
);
......@@ -985,41 +985,41 @@ function uw_ct_event_field_default_fields() {
'additional' => array(
'collect' => '1',
'default' => '',
'weight' => '6',
'weight' => '-99',
),
'city' => array(
'collect' => '1',
'default' => '',
'weight' => '8',
'weight' => '-97',
),
'country' => array(
'collect' => '1',
'default' => 'ca',
'weight' => '14',
'weight' => '-94',
),
'locpick' => array(
'collect' => '0',
'weight' => '20',
'weight' => '-93',
),
'name' => array(
'collect' => '0',
'default' => '',
'weight' => '2',
'weight' => '-100',
),
'postal_code' => array(
'collect' => '1',
'default' => '',
'weight' => '12',
'weight' => '-95',
),
'province' => array(
'collect' => '1',