Commit 1a001f5e authored by ccarigna's avatar ccarigna
Browse files

Added event image to listing pages

parent 90cd2a77
......@@ -2,6 +2,7 @@
.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;}
......
......@@ -10,7 +10,7 @@
<h3><?php print $title; ?></h3>
<?php endif; ?>
<?php foreach ($rows as $id => $row): ?>
<div class="event">
<div class="event clearfix">
<?php print $row; ?>
</div>
<?php endforeach; ?>
\ No newline at end of file
......@@ -85,7 +85,7 @@ function uw_ct_event_field_default_fields() {
'summary_rows' => 5,
),
'type' => 'text_textarea_with_summary',
'weight' => '2',
'weight' => '3',
),
),
);
......@@ -164,7 +164,7 @@ function uw_ct_event_field_default_fields() {
'track_list' => 0,
),
'type' => 'term_reference_tree',
'weight' => '10',
'weight' => '8',
),
),
);
......@@ -350,6 +350,111 @@ function uw_ct_event_field_default_fields() {
),
);
// Exported field: 'node-uw_event-field_event_image'
$fields['node-uw_event-field_event_image'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_event_image',
'foreign keys' => array(
'fid' => array(
'columns' => array(
'fid' => 'fid',
),
'table' => 'file_managed',
),
),
'indexes' => array(
'fid' => array(
0 => 'fid',
),
),
'module' => 'image',
'settings' => array(
'default_image' => 0,
'uri_scheme' => 'public',
),
'translatable' => '0',
'type' => 'image',
),
'field_instance' => array(
'bundle' => 'uw_event',
'deleted' => '0',
'description' => 'The event image is used on the event listing pages. You can re-use this image by inserting it into the event description.',
'display' => array(
'default' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => '10',
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_event_image',
'label' => 'Event image',
'required' => 0,
'settings' => array(
'alt_field' => 1,
'file_directory' => 'uploads/images',
'file_extensions' => 'png gif jpg jpeg',
'max_filesize' => '10 MB',
'max_resolution' => '3000x3000',
'min_resolution' => '10x10',
'title_field' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'image',
'settings' => array(
'filefield_sources' => array(
'filefield_sources' => array(
'attach' => 0,
'imce' => 'imce',
'reference' => 'reference',
'remote' => 'remote',
),
'source_attach' => array(
'absolute' => '0',
'attach_mode' => 'copy',
'path' => 'file_attach',
),
'source_reference' => array(
'autocomplete' => '1',
),
),
'insert' => 1,
'insert_class' => '',
'insert_default' => 'image',
'insert_styles' => array(
'auto' => 0,
'image' => 'image',
'image_body-500px-wide' => 'image_body-500px-wide',
'image_large' => 0,
'image_medium' => 0,
'image_profile-photo-block' => 0,
'image_sidebar-220px-wide' => 'image_sidebar-220px-wide',
'image_thumbnail' => 0,
'link' => 0,
),
'insert_width' => '500',
'preview_image_style' => 'thumbnail',
'progress_indicator' => 'throbber',
),
'type' => 'image_image',
'weight' => '2',
),
),
);
// Exported field: 'node-uw_event-field_event_location'
$fields['node-uw_event-field_event_location'] = array(
'field_config' => array(
......@@ -735,7 +840,7 @@ function uw_ct_event_field_default_fields() {
'module' => 'link',
'settings' => array(),
'type' => 'link_field',
'weight' => '7',
'weight' => '8',
),
),
);
......@@ -1079,6 +1184,7 @@ function uw_ct_event_field_default_fields() {
t('Choose an image');
t('Date and time');
t('Description');
t('Event image');
t('Event website');
t('Host');
t('Location');
......@@ -1088,6 +1194,7 @@ function uw_ct_event_field_default_fields() {
t('Optional: a link to a website with more information specific to this event.');
t('Optional: provide a host name and link to the host website (e.g. Housing and Residences)');
t('Optional: provide a link to a map with the event location (e.g. http://www.uwaterloo.ca/map/)');
t('The event image is used on the event listing pages. You can re-use this image by inserting it into the event description.');
return $fields;
}
......@@ -149,6 +149,14 @@ function uw_ct_event_rdf_default_mappings() {
'predicates' => array(),
'type' => 'rel',
),
'field_event_photo' => array(
'predicates' => array(),
'type' => 'rel',
),
'field_event_image' => array(
'predicates' => array(),
'type' => 'rel',
),
);
return $rdf_mappings;
......
......@@ -80,9 +80,9 @@ function uw_ct_event_user_default_permissions() {
'module' => 'override_node_options',
);
// Exported permission: override uw_event published option
$permissions['override uw_event published option'] = array(
'name' => 'override uw_event published option',
// Exported permission: override uw_event promote to front page option
$permissions['override uw_event promote to front page option'] = array(
'name' => 'override uw_event promote to front page option',
'roles' => array(
0 => 'administrator',
1 => 'content author',
......@@ -92,9 +92,9 @@ function uw_ct_event_user_default_permissions() {
'module' => 'override_node_options',
);
// Exported permission: override uw_event promote to front page option
$permissions['override uw_event promote to front page option'] = array(
'name' => 'override uw_event promote to front page option',
// Exported permission: override uw_event published option
$permissions['override uw_event published option'] = array(
'name' => 'override uw_event published option',
'roles' => array(
0 => 'administrator',
1 => 'content author',
......
......@@ -21,10 +21,10 @@ function uw_ct_event_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Additional information',
'weight' => '5',
'weight' => '6',
'children' => array(
0 => 'field_event_moreinfo_link',
1 => 'field_event_host_link',
0 => 'field_event_host_link',
1 => 'field_event_moreinfo_link',
),
'format_type' => 'fieldset',
'format_settings' => array(
......@@ -50,7 +50,7 @@ function uw_ct_event_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Event location',
'weight' => '6',
'weight' => '7',
'children' => array(
0 => 'field_event_location',
1 => 'field_event_location_lookup',
......@@ -80,7 +80,7 @@ function uw_ct_event_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Upload a file',
'weight' => '4',
'weight' => '5',
'children' => array(
0 => 'field_file',
),
......@@ -108,7 +108,7 @@ function uw_ct_event_field_group_info() {
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'Upload an image',
'weight' => '3',
'weight' => '4',
'children' => array(
0 => 'field_image',
),
......
......@@ -32,6 +32,7 @@ features[field][] = "node-uw_event-body"
features[field][] = "node-uw_event-field_audience"
features[field][] = "node-uw_event-field_event_date"
features[field][] = "node-uw_event-field_event_host_link"
features[field][] = "node-uw_event-field_event_image"
features[field][] = "node-uw_event-field_event_location"
features[field][] = "node-uw_event-field_event_location_lookup"
features[field][] = "node-uw_event-field_event_map_link"
......@@ -52,8 +53,8 @@ features[user_permission][] = "delete own uw_event content"
features[user_permission][] = "edit any uw_event content"
features[user_permission][] = "edit own uw_event content"
features[user_permission][] = "enter uw_event revision log entry"
features[user_permission][] = "override uw_event published option"
features[user_permission][] = "override uw_event promote to front page option"
features[user_permission][] = "override uw_event published option"
features[user_permission][] = "override uw_event revision option"
features[user_permission][] = "override uw_event sticky option"
features[variable][] = "comment_anonymous_uw_event"
......@@ -108,4 +109,4 @@ php = "5.2.4"
project = "uw_ct_event"
project status url = "http://wms-sand6.uwaterloo.ca/features/fserver/uw_ct_event/7.x"
version = "7.x-1.0"
stylesheets[all][] = "css/uw_ct_event.css"
stylesheets[all][] = "css/uw_ct_event.css"
\ No newline at end of file
......@@ -234,6 +234,34 @@ function uw_ct_event_views_default_views() {
$handler->display->display_options['fields']['field_event_date']['delta_reversed'] = 0;
$handler->display->display_options['fields']['field_event_date']['multi_type'] = 'ul';
$handler->display->display_options['fields']['field_event_date']['field_api_classes'] = 0;
/* Field: Content: Event image */
$handler->display->display_options['fields']['field_event_image']['id'] = 'field_event_image';
$handler->display->display_options['fields']['field_event_image']['table'] = 'field_data_field_event_image';
$handler->display->display_options['fields']['field_event_image']['field'] = 'field_event_image';
$handler->display->display_options['fields']['field_event_image']['label'] = '';
$handler->display->display_options['fields']['field_event_image']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_event_image']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_event_image']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_event_image']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_event_image']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_event_image']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_event_image']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_event_image']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_event_image']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_event_image']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_event_image']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_event_image']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_event_image']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_event_image']['element_default_classes'] = 0;
$handler->display->display_options['fields']['field_event_image']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_event_image']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_event_image']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_event_image']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['field_event_image']['settings'] = array(
'image_style' => 'thumbnail',
'image_link' => '',
);
$handler->display->display_options['fields']['field_event_image']['field_api_classes'] = 0;
/* Field: Content: Body */
$handler->display->display_options['fields']['body']['id'] = 'body';
$handler->display->display_options['fields']['body']['table'] = 'field_data_body';
......@@ -313,99 +341,6 @@ function uw_ct_event_views_default_views() {
$handler->display->display_options['empty']['area']['content'] = 'No events found.';
$handler->display->display_options['empty']['area']['format'] = 'uw_tf_standard';
$handler->display->display_options['empty']['area']['tokenize'] = 0;
$handler->display->display_options['defaults']['fields'] = FALSE;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_type'] = 'h2';
$handler->display->display_options['fields']['title']['element_class'] = 'event-title';
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['title']['element_default_classes'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Content: Date and time */
$handler->display->display_options['fields']['field_event_date']['id'] = 'field_event_date';
$handler->display->display_options['fields']['field_event_date']['table'] = 'field_data_field_event_date';
$handler->display->display_options['fields']['field_event_date']['field'] = 'field_event_date';
$handler->display->display_options['fields']['field_event_date']['label'] = '';
$handler->display->display_options['fields']['field_event_date']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_event_date']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_event_date']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_event_date']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_event_date']['element_type'] = 'div';
$handler->display->display_options['fields']['field_event_date']['element_class'] = 'event-date';
$handler->display->display_options['fields']['field_event_date']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_event_date']['element_default_classes'] = 0;
$handler->display->display_options['fields']['field_event_date']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_event_date']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_event_date']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_event_date']['settings'] = array(
'format_type' => 'event_full',
'fromto' => 'both',
'multiple_number' => '1',
'multiple_from' => '',
'multiple_to' => '',
'show_repeat_rule' => 'hide',
);
$handler->display->display_options['fields']['field_event_date']['group_rows'] = 0;
$handler->display->display_options['fields']['field_event_date']['delta_offset'] = '0';
$handler->display->display_options['fields']['field_event_date']['delta_reversed'] = 0;
$handler->display->display_options['fields']['field_event_date']['multi_type'] = 'ul';
$handler->display->display_options['fields']['field_event_date']['field_api_classes'] = 0;
/* Field: Content: Body */
$handler->display->display_options['fields']['body']['id'] = 'body';
$handler->display->display_options['fields']['body']['table'] = 'field_data_body';
$handler->display->display_options['fields']['body']['field'] = 'body';
$handler->display->display_options['fields']['body']['label'] = '';
$handler->display->display_options['fields']['body']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['body']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['body']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['body']['alter']['external'] = 0;
$handler->display->display_options['fields']['body']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['body']['alter']['trim_whitespace'] = 1;
$handler->display->display_options['fields']['body']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['body']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['body']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['body']['alter']['strip_tags'] = 1;
$handler->display->display_options['fields']['body']['alter']['trim'] = 0;
$handler->display->display_options['fields']['body']['alter']['preserve_tags'] = '<p> <strong> <em>';
$handler->display->display_options['fields']['body']['alter']['html'] = 0;
$handler->display->display_options['fields']['body']['element_type'] = 'div';
$handler->display->display_options['fields']['body']['element_class'] = 'event-summary';
$handler->display->display_options['fields']['body']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['body']['element_default_classes'] = 0;
$handler->display->display_options['fields']['body']['hide_empty'] = 0;
$handler->display->display_options['fields']['body']['empty_zero'] = 0;
$handler->display->display_options['fields']['body']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['body']['type'] = 'text_summary_or_trimmed';
$handler->display->display_options['fields']['body']['settings'] = array(
'trim_length' => '300',
);
$handler->display->display_options['fields']['body']['field_api_classes'] = 0;
$handler->display->display_options['defaults']['arguments'] = FALSE;
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Content: Published */
......
Supports Markdown
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