From 7e83b8f165492d136ae9a56dd62b56c6fbe1c856 Mon Sep 17 00:00:00 2001 From: sherakama Date: Wed, 10 Jun 2015 17:19:03 -0700 Subject: [PATCH] CAW-532: Export caw specific items back to module --- stanford_news.ds.inc | 28 +++--- stanford_news.features.field_instance.inc | 103 +++++++++++++++------- stanford_news.field_group.inc | 79 +++++++++++------ stanford_news.info | 3 + stanford_news.strongarm.inc | 6 +- 5 files changed, 139 insertions(+), 80 deletions(-) diff --git a/stanford_news.ds.inc b/stanford_news.ds.inc index 8070b58..512a6d5 100644 --- a/stanford_news.ds.inc +++ b/stanford_news.ds.inc @@ -20,32 +20,24 @@ function stanford_news_ds_layout_settings_info() { $ds_layout->settings = array( 'regions' => array( 'ds_content' => array( - 0 => 'group_s_postcard', + 0 => 'group_descriptor_info', 1 => 'group_s_postcard_image', - 2 => 'group_s_postcard_content', - 3 => 'group_descriptor_info', - 4 => 'body', - 5 => 'field_s_news_date', - 6 => 'field_s_news_link', - 7 => 'field_s_news_attachment', - 8 => 'field_s_news_source', - 9 => 'field_s_image_info', - 10 => 'group_s_news_postedin', - 11 => 'field_s_news_categories', + 2 => 'field_s_image_info', + 3 => 'group_s_postcard_content', + 4 => 'group_s_postcard', + 5 => 'body', + 6 => 'field_s_news_date', + 7 => 'field_s_news_categories', ), ), 'fields' => array( - 'group_s_postcard' => 'ds_content', + 'group_descriptor_info' => 'ds_content', 'group_s_postcard_image' => 'ds_content', + 'field_s_image_info' => 'ds_content', 'group_s_postcard_content' => 'ds_content', - 'group_descriptor_info' => 'ds_content', + 'group_s_postcard' => 'ds_content', 'body' => 'ds_content', 'field_s_news_date' => 'ds_content', - 'field_s_news_link' => 'ds_content', - 'field_s_news_attachment' => 'ds_content', - 'field_s_news_source' => 'ds_content', - 'field_s_image_info' => 'ds_content', - 'group_s_news_postedin' => 'ds_content', 'field_s_news_categories' => 'ds_content', ), 'classes' => array(), diff --git a/stanford_news.features.field_instance.inc b/stanford_news.features.field_instance.inc index f089b14..b7cbe7f 100644 --- a/stanford_news.features.field_instance.inc +++ b/stanford_news.features.field_instance.inc @@ -66,7 +66,49 @@ function stanford_news_field_default_field_instances() { 'summary_rows' => 5, ), 'type' => 'text_textarea_with_summary', - 'weight' => 4, + 'weight' => 3, + ), + ); + + // Exported field_instance: 'node-stanford_news_item-field_related_content' + $field_instances['node-stanford_news_item-field_related_content'] = array( + 'bundle' => 'stanford_news_item', + 'default_value' => NULL, + 'deleted' => 0, + 'description' => 'Choose the appropriate Related Content tag(s).', + 'display' => array( + 'default' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 2, + ), + 'full' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 12, + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_related_content', + 'label' => 'Related Content', + 'required' => 0, + 'settings' => array( + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'options', + 'settings' => array(), + 'type' => 'options_buttons', + 'weight' => 6, ), ); @@ -98,10 +140,10 @@ function stanford_news_field_default_field_instances() { 'delete' => '', 'description' => 0, 'edit' => '', - 'view_mode' => 'stanford_large_scaled', + 'view_mode' => 'caw_banner_9_column', ), 'type' => 'field_collection_view', - 'weight' => 7, + 'weight' => 1, ), 'taxonomy' => array( 'label' => 'hidden', @@ -135,7 +177,7 @@ function stanford_news_field_default_field_instances() { 'module' => 'field_collection', 'settings' => array(), 'type' => 'field_collection_embed', - 'weight' => 3, + 'weight' => 2, ), ); @@ -154,10 +196,9 @@ function stanford_news_field_default_field_instances() { ), 'full' => array( 'label' => 'hidden', - 'module' => 'file', 'settings' => array(), - 'type' => 'file_default', - 'weight' => 6, + 'type' => 'hidden', + 'weight' => 16, ), 'taxonomy' => array( 'label' => 'inline', @@ -243,8 +284,7 @@ function stanford_news_field_default_field_instances() { 'bundle' => 'stanford_news_item', 'default_value' => NULL, 'deleted' => 0, - 'description' => 'Choose the appropriate category tag(s). To select more than one tag, hold the Ctrl or Command keyboard key on the Mac. If you do not have any Categories yet, a site administrator can add -them, and integrate them with the site architecture.', + 'description' => 'Choose the appropriate category tag(s).', 'display' => array( 'default' => array( 'label' => 'hidden', @@ -257,14 +297,14 @@ them, and integrate them with the site architecture.', 'weight' => 15, ), 'full' => array( - 'label' => 'hidden', + 'label' => 'above', 'module' => 'ds', 'settings' => array( 'taxonomy_term_link' => 0, 'taxonomy_term_separator' => ', ', ), 'type' => 'ds_taxonomy_separator', - 'weight' => 11, + 'weight' => 6, ), 'taxonomy' => array( 'label' => 'hidden', @@ -292,7 +332,7 @@ them, and integrate them with the site architecture.', 'module' => 'options', 'settings' => array(), 'type' => 'options_buttons', - 'weight' => 2, + 'weight' => 5, ), ); @@ -300,13 +340,13 @@ them, and integrate them with the site architecture.', $field_instances['node-stanford_news_item-field_s_news_date'] = array( 'bundle' => 'stanford_news_item', 'deleted' => 0, - 'description' => 'Use this Date field to indicate the date when a story appeared in an external publication.', + 'description' => 'Add the date this story was published.', 'display' => array( 'default' => array( 'label' => 'hidden', 'module' => 'date', 'settings' => array( - 'format_type' => 'short', + 'format_type' => 'stanford_month_date_year', 'fromto' => 'both', 'multiple_from' => '', 'multiple_number' => '', @@ -319,7 +359,7 @@ them, and integrate them with the site architecture.', 'label' => 'hidden', 'module' => 'date', 'settings' => array( - 'format_type' => 'short', + 'format_type' => 'stanford_month_date_year', 'fromto' => 'both', 'multiple_from' => '', 'multiple_number' => '', @@ -365,14 +405,14 @@ them, and integrate them with the site architecture.', 'settings' => array( 'display_all_day' => 0, 'increment' => 15, - 'input_format' => 'M j Y - g:i:sa', + 'input_format' => 'Y-m-d H:i:s', 'input_format_custom' => '', 'label_position' => 'above', 'text_parts' => array(), 'year_range' => '-3:+3', ), 'type' => 'date_popup', - 'weight' => 2, + 'weight' => 1, ), ); @@ -397,7 +437,7 @@ them, and integrate them with the site architecture.', 'label' => 'above', 'settings' => array(), 'type' => 'hidden', - 'weight' => 20, + 'weight' => 18, ), 'taxonomy' => array( 'label' => 'above', @@ -450,7 +490,7 @@ them, and integrate them with the site architecture.', 'label' => 'hidden', 'settings' => array(), 'type' => 'hidden', - 'weight' => 0, + 'weight' => 17, ), 'taxonomy' => array( 'label' => 'above', @@ -535,7 +575,7 @@ them, and integrate them with the site architecture.', 'progress_indicator' => 'throbber', ), 'type' => 'image_image', - 'weight' => 6, + 'weight' => 4, ), ); @@ -555,10 +595,9 @@ them, and integrate them with the site architecture.', ), 'full' => array( 'label' => 'hidden', - 'module' => 'link', 'settings' => array(), - 'type' => 'link_default', - 'weight' => 5, + 'type' => 'hidden', + 'weight' => 15, ), 'taxonomy' => array( 'label' => 'hidden', @@ -578,6 +617,7 @@ them, and integrate them with the site architecture.', 'label' => 'External Link', 'required' => 0, 'settings' => array( + 'absolute_url' => 1, 'attributes' => array( 'class' => '', 'configurable_title' => 0, @@ -590,6 +630,7 @@ them, and integrate them with the site architecture.', ), 'enable_tokens' => 1, 'title' => 'optional', + 'title_label_use_field_label' => FALSE, 'title_maxlength' => 128, 'title_value' => '', 'url' => 0, @@ -601,7 +642,7 @@ them, and integrate them with the site architecture.', 'module' => 'link', 'settings' => array(), 'type' => 'link_field', - 'weight' => 5, + 'weight' => 6, ), ); @@ -621,10 +662,9 @@ them, and integrate them with the site architecture.', ), 'full' => array( 'label' => 'hidden', - 'module' => 'link', 'settings' => array(), - 'type' => 'link_default', - 'weight' => 6, + 'type' => 'hidden', + 'weight' => 14, ), 'taxonomy' => array( 'label' => 'hidden', @@ -645,6 +685,7 @@ them, and integrate them with the site architecture.', 'label' => 'Source', 'required' => 0, 'settings' => array( + 'absolute_url' => 1, 'attributes' => array( 'class' => '', 'configurable_title' => 0, @@ -657,6 +698,7 @@ them, and integrate them with the site architecture.', ), 'enable_tokens' => 1, 'title' => 'required', + 'title_label_use_field_label' => FALSE, 'title_maxlength' => 128, 'title_value' => '', 'url' => 0, @@ -674,10 +716,11 @@ them, and integrate them with the site architecture.', // Translatables // Included for use with string extractors like potx. + t('Add the date this story was published.'); t('Body'); t('Categories'); - t('Choose the appropriate category tag(s). To select more than one tag, hold the Ctrl or Command keyboard key on the Mac. If you do not have any Categories yet, a site administrator can add -them, and integrate them with the site architecture.'); + t('Choose the appropriate Related Content tag(s).'); + t('Choose the appropriate category tag(s).'); t('Date'); t('External Link'); t('Featured'); @@ -686,10 +729,10 @@ them, and integrate them with the site architecture.'); t('Insert the article\'s source and URL link. (e.g. Stanford Report, http://news.stanford.edu/sr/)'); t('News Image'); t('Optional external link associated with this news item.'); + t('Related Content'); t('Source'); t('This is a setting used to feature a news item in various places on the site (e.g., check "Featured" if you want to display this item, leave unchecked if you do not want to display this item).'); t('Upload file attachments associated with this news item.'); - t('Use this Date field to indicate the date when a story appeared in an external publication.'); t('Use this to Insert images into the text.'); return $field_instances; diff --git a/stanford_news.field_group.inc b/stanford_news.field_group.inc index f22acf8..badcb8c 100644 --- a/stanford_news.field_group.inc +++ b/stanford_news.field_group.inc @@ -51,20 +51,19 @@ function stanford_news_field_group_info() { $field_group->entity_type = 'node'; $field_group->bundle = 'stanford_news_item'; $field_group->mode = 'full'; - $field_group->parent_name = 'group_s_postcard_content'; + $field_group->parent_name = ''; $field_group->data = array( - 'label' => 'Descriptor Info', - 'weight' => '3', + 'label' => 'Date Styles', + 'weight' => '0', 'children' => array( 0 => 'field_s_news_date', - 1 => 'field_s_news_source', - 2 => 'group_s_news_postedin', ), 'format_type' => 'div', 'format_settings' => array( - 'label' => 'Descriptor Info', + 'label' => 'Date Styles', 'instance_settings' => array( - 'classes' => 'descriptor', + 'id' => '', + 'classes' => 'summary', 'description' => '', 'show_label' => '0', 'label_element' => 'h3', @@ -76,6 +75,35 @@ function stanford_news_field_group_info() { ); $export['group_descriptor_info|node|stanford_news_item|full'] = $field_group; + $field_group = new stdClass(); + $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */ + $field_group->api_version = 1; + $field_group->identifier = 'group_related_content|node|stanford_news_item|form'; + $field_group->group_name = 'group_related_content'; + $field_group->entity_type = 'node'; + $field_group->bundle = 'stanford_news_item'; + $field_group->mode = 'form'; + $field_group->parent_name = ''; + $field_group->data = array( + 'label' => 'Category/Related Content Tags', + 'weight' => '5', + 'children' => array( + 0 => 'field_s_news_categories', + 1 => 'field_related_content', + ), + 'format_type' => 'fieldset', + 'format_settings' => array( + 'label' => 'Category/Related Content Tags', + 'instance_settings' => array( + 'required_fields' => 1, + 'classes' => 'group-related-content field-group-fieldset', + 'description' => '', + ), + 'formatter' => 'collapsed', + ), + ); + $export['group_related_content|node|stanford_news_item|form'] = $field_group; + $field_group = new stdClass(); $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */ $field_group->api_version = 1; @@ -86,14 +114,14 @@ function stanford_news_field_group_info() { $field_group->mode = 'form'; $field_group->parent_name = ''; $field_group->data = array( - 'label' => 'Advanced', - 'weight' => '11', + 'label' => 'Add/Edit Homepage Featured Item', + 'weight' => '9', 'children' => array( 0 => 'field_s_news_featured', ), 'format_type' => 'fieldset', 'format_settings' => array( - 'label' => 'Advanced', + 'label' => 'Add/Edit Homepage Featured Item', 'instance_settings' => array( 'required_fields' => 0, 'classes' => '', @@ -175,10 +203,9 @@ function stanford_news_field_group_info() { $field_group->parent_name = ''; $field_group->data = array( 'label' => 'Add/Edit External Article Information', - 'weight' => '1', + 'weight' => '8', 'children' => array( - 0 => 'field_s_news_date', - 1 => 'field_s_news_source', + 0 => 'field_s_news_source', ), 'format_type' => 'fieldset', 'format_settings' => array( @@ -232,13 +259,11 @@ function stanford_news_field_group_info() { $field_group->entity_type = 'node'; $field_group->bundle = 'stanford_news_item'; $field_group->mode = 'full'; - $field_group->parent_name = 'group_descriptor_info'; + $field_group->parent_name = ''; $field_group->data = array( 'label' => 'Posted In: ', - 'weight' => '7', - 'children' => array( - 0 => 'field_s_news_categories', - ), + 'weight' => '13', + 'children' => array(), 'format_type' => 'div', 'format_settings' => array( 'label' => 'Posted In: ', @@ -333,9 +358,9 @@ function stanford_news_field_group_info() { 'label' => 'Postcard Content', 'weight' => '11', 'children' => array( - 0 => 'body', - 1 => 'field_s_news_attachment', - 2 => 'field_s_news_link', + 0 => 'field_s_news_attachment', + 1 => 'field_s_news_link', + 2 => 'body', 3 => 'group_descriptor_info', ), 'format_type' => 'div', @@ -367,10 +392,8 @@ function stanford_news_field_group_info() { 'label' => 'Postcard Content', 'weight' => '2', 'children' => array( - 0 => 'field_s_news_attachment', - 1 => 'field_s_news_link', - 2 => 'body', - 3 => 'group_descriptor_info', + 0 => 'field_s_news_categories', + 1 => 'body', ), 'format_type' => 'div', 'format_settings' => array( @@ -463,9 +486,7 @@ function stanford_news_field_group_info() { $field_group->data = array( 'label' => 'Postcard Image', 'weight' => '1', - 'children' => array( - 0 => 'field_s_image_info', - ), + 'children' => array(), 'format_type' => 'div', 'format_settings' => array( 'label' => 'Postcard Image', @@ -525,7 +546,7 @@ function stanford_news_field_group_info() { $field_group->parent_name = ''; $field_group->data = array( 'label' => 'Postcard', - 'weight' => '0', + 'weight' => '2', 'children' => array( 0 => 'group_s_postcard_content', 1 => 'group_s_postcard_image', diff --git a/stanford_news.info b/stanford_news.info index 9a0c74c..992f8f4 100644 --- a/stanford_news.info +++ b/stanford_news.info @@ -16,6 +16,7 @@ dependencies[] = image dependencies[] = link dependencies[] = list dependencies[] = options +dependencies[] = stanford_events_importer dependencies[] = stanford_image dependencies[] = stanford_image_styles dependencies[] = strongarm @@ -37,6 +38,7 @@ features[field_base][] = field_s_news_link features[field_base][] = field_s_news_source features[field_group][] = group_descriptor_info|node|stanford_news_item|default features[field_group][] = group_descriptor_info|node|stanford_news_item|full +features[field_group][] = group_related_content|node|stanford_news_item|form features[field_group][] = group_s_news_advanced|node|stanford_news_item|form features[field_group][] = group_s_news_categories_style|node|stanford_news_item|taxonomy features[field_group][] = group_s_news_categories|node|stanford_news_item|default @@ -54,6 +56,7 @@ features[field_group][] = group_s_postcard|node|stanford_news_item|default features[field_group][] = group_s_postcard|node|stanford_news_item|full features[field_group][] = group_s_postcard|node|stanford_news_item|taxonomy features[field_instance][] = node-stanford_news_item-body +features[field_instance][] = node-stanford_news_item-field_related_content features[field_instance][] = node-stanford_news_item-field_s_image_info features[field_instance][] = node-stanford_news_item-field_s_news_attachment features[field_instance][] = node-stanford_news_item-field_s_news_categories diff --git a/stanford_news.strongarm.inc b/stanford_news.strongarm.inc index 3d281e9..b3fc521 100644 --- a/stanford_news.strongarm.inc +++ b/stanford_news.strongarm.inc @@ -66,13 +66,13 @@ function stanford_news_strongarm() { 'weight' => '0', ), 'path' => array( - 'weight' => '8', + 'weight' => '10', ), 'metatags' => array( - 'weight' => '10', + 'weight' => '12', ), 'redirect' => array( - 'weight' => '9', + 'weight' => '11', ), ), 'display' => array(),