diff --git a/sites/all/modules/features/clameurs/clameurs.features.field_base.inc b/sites/all/modules/features/clameurs/clameurs.features.field_base.inc index acb95b62..19d1eaaa 100644 --- a/sites/all/modules/features/clameurs/clameurs.features.field_base.inc +++ b/sites/all/modules/features/clameurs/clameurs.features.field_base.inc @@ -430,6 +430,34 @@ function clameurs_field_default_field_bases() { 'type' => 'entityreference', ); + // Exported field_base: 'field_vignette'. + $field_bases['field_vignette'] = array( + 'active' => 1, + 'cardinality' => 1, + 'deleted' => 0, + 'entity_types' => array(), + 'field_name' => 'field_vignette', + 'field_permissions' => array( + 'type' => 0, + ), + 'indexes' => array( + 'fid' => array( + 0 => 'fid', + ), + ), + 'locked' => 0, + 'module' => 'image', + 'settings' => array( + 'default_image' => 0, + 'entity_translation_sync' => array( + 0 => 'fid', + ), + 'uri_scheme' => 'public', + ), + 'translatable' => 0, + 'type' => 'image', + ); + // Exported field_base: 'title_field'. $field_bases['title_field'] = array( 'active' => 1, diff --git a/sites/all/modules/features/clameurs/clameurs.features.field_instance.inc b/sites/all/modules/features/clameurs/clameurs.features.field_instance.inc index 40643d9f..18212098 100644 --- a/sites/all/modules/features/clameurs/clameurs.features.field_instance.inc +++ b/sites/all/modules/features/clameurs/clameurs.features.field_instance.inc @@ -223,121 +223,6 @@ function clameurs_field_default_field_instances() { ), ); - // Exported field_instance: 'node-documentair-body'. - $field_instances['node-documentair-body'] = array( - 'bundle' => 'documentair', - 'default_value' => NULL, - 'deleted' => 0, - 'description' => '', - 'display' => array( - 'accueil' => array( - 'label' => 'hidden', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 2, - ), - 'attente' => array( - 'label' => 'above', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 0, - ), - 'default' => array( - 'label' => 'hidden', - 'module' => 'text', - 'settings' => array(), - 'type' => 'text_default', - 'weight' => 0, - ), - 'teaser' => array( - 'label' => 'hidden', - 'module' => 'text', - 'settings' => array( - 'trim_length' => 600, - ), - 'type' => 'text_summary_or_trimmed', - 'weight' => 1, - ), - ), - 'entity_type' => 'node', - 'field_name' => 'body', - 'label' => 'Body', - 'required' => FALSE, - 'settings' => array( - 'display_summary' => TRUE, - 'entity_translation_sync' => FALSE, - 'text_processing' => 1, - 'user_register_form' => FALSE, - ), - 'widget' => array( - 'module' => 'text', - 'settings' => array( - 'rows' => 20, - 'summary_rows' => 5, - ), - 'type' => 'text_textarea_with_summary', - 'weight' => 5, - ), - ); - - // Exported field_instance: 'node-documentair-field_description'. - $field_instances['node-documentair-field_description'] = array( - 'bundle' => 'documentair', - 'default_value' => NULL, - 'deleted' => 0, - 'description' => '', - 'display' => array( - 'accueil' => array( - 'label' => 'above', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 6, - ), - 'attente' => array( - 'label' => 'above', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 0, - ), - 'default' => array( - 'label' => 'above', - 'module' => 'text', - 'settings' => array(), - 'type' => 'text_default', - 'weight' => 4, - ), - 'teaser' => array( - 'label' => 'above', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 6, - ), - ), - 'entity_type' => 'node', - 'field_name' => 'field_description', - 'label' => 'Description', - 'required' => 0, - 'settings' => array( - 'entity_translation_sync' => FALSE, - 'linkit' => array( - 'button_text' => 'Recherche', - 'enable' => 0, - 'profile' => '', - ), - 'text_processing' => 1, - 'user_register_form' => FALSE, - ), - 'widget' => array( - 'active' => 1, - 'module' => 'text', - 'settings' => array( - 'rows' => 5, - ), - 'type' => 'text_textarea', - 'weight' => 103, - ), - ); - // Exported field_instance: 'node-documentair-field_doc'. $field_instances['node-documentair-field_doc'] = array( 'bundle' => 'documentair', @@ -530,6 +415,88 @@ function clameurs_field_default_field_instances() { ), ); + // Exported field_instance: 'node-documentair-field_vignette'. + $field_instances['node-documentair-field_vignette'] = array( + 'bundle' => 'documentair', + 'deleted' => 0, + 'description' => '', + 'display' => array( + 'accueil' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'attente' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'default' => array( + 'label' => 'above', + 'module' => 'image', + 'settings' => array( + 'image_link' => '', + 'image_style' => '', + ), + 'type' => 'image', + 'weight' => 7, + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_vignette', + 'label' => 'vignette', + 'required' => 0, + 'settings' => array( + 'alt_field' => 0, + 'default_image' => 0, + 'entity_translation_sync' => FALSE, + 'file_directory' => 'vignettes', + 'file_extensions' => 'png gif jpg jpeg', + 'max_filesize' => '', + 'max_resolution' => '', + 'min_resolution' => '', + 'title_field' => 0, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'image', + 'settings' => array( + 'insert' => 0, + 'insert_absolute' => 0, + 'insert_class' => '', + 'insert_default' => 'auto', + 'insert_styles' => array( + 'auto' => 'auto', + 'icon_link' => 0, + 'image' => 0, + 'image_large' => 0, + 'image_linkit_thumb' => 0, + 'image_medium' => 0, + 'image_thumbnail' => 0, + 'image_video_thumb_docu' => 0, + 'image_video_thumb_episode' => 0, + 'image_video_thumb_themat' => 0, + 'image_video_thumbnail' => 0, + 'link' => 0, + ), + 'insert_width' => '', + 'preview_image_style' => 'thumbnail', + 'progress_indicator' => 'throbber', + ), + 'type' => 'image_image', + 'weight' => 5, + ), + ); + // Exported field_instance: 'node-documentair-title_field'. $field_instances['node-documentair-title_field'] = array( 'bundle' => 'documentair', @@ -586,127 +553,6 @@ function clameurs_field_default_field_instances() { ), ); - // Exported field_instance: 'node-episode-body'. - $field_instances['node-episode-body'] = array( - 'bundle' => 'episode', - 'default_value' => NULL, - 'deleted' => 0, - 'description' => '', - 'display' => array( - 'accueil' => array( - 'label' => 'above', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 6, - ), - 'attente' => array( - 'label' => 'above', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 0, - ), - 'default' => array( - 'label' => 'hidden', - 'module' => 'text', - 'settings' => array(), - 'type' => 'text_default', - 'weight' => 0, - ), - 'teaser' => array( - 'label' => 'hidden', - 'module' => 'text', - 'settings' => array( - 'trim_length' => 600, - ), - 'type' => 'text_summary_or_trimmed', - 'weight' => 1, - ), - ), - 'entity_type' => 'node', - 'field_name' => 'body', - 'label' => 'Body', - 'required' => 0, - 'settings' => array( - 'display_summary' => 1, - 'entity_translation_sync' => FALSE, - 'linkit' => array( - 'button_text' => 'Recherche', - 'enable' => 0, - 'profile' => '', - ), - 'text_processing' => 1, - 'user_register_form' => FALSE, - ), - 'widget' => array( - 'active' => 1, - 'module' => 'text', - 'settings' => array( - 'rows' => 20, - 'summary_rows' => 5, - ), - 'type' => 'text_textarea_with_summary', - 'weight' => 2, - ), - ); - - // Exported field_instance: 'node-episode-field_description'. - $field_instances['node-episode-field_description'] = array( - 'bundle' => 'episode', - 'default_value' => NULL, - 'deleted' => 0, - 'description' => '', - 'display' => array( - 'accueil' => array( - 'label' => 'above', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 7, - ), - 'attente' => array( - 'label' => 'above', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 0, - ), - 'default' => array( - 'label' => 'above', - 'module' => 'text', - 'settings' => array(), - 'type' => 'text_default', - 'weight' => 2, - ), - 'teaser' => array( - 'label' => 'above', - 'settings' => array(), - 'type' => 'hidden', - 'weight' => 5, - ), - ), - 'entity_type' => 'node', - 'field_name' => 'field_description', - 'label' => 'Description', - 'required' => 0, - 'settings' => array( - 'entity_translation_sync' => FALSE, - 'linkit' => array( - 'button_text' => 'Recherche', - 'enable' => 0, - 'profile' => '', - ), - 'text_processing' => 0, - 'user_register_form' => FALSE, - ), - 'widget' => array( - 'active' => 1, - 'module' => 'text', - 'settings' => array( - 'rows' => 5, - ), - 'type' => 'text_textarea', - 'weight' => 103, - ), - ); - // Exported field_instance: 'node-episode-field_emvideo'. $field_instances['node-episode-field_emvideo'] = array( 'bundle' => 'episode', @@ -902,6 +748,88 @@ function clameurs_field_default_field_instances() { ), ); + // Exported field_instance: 'node-episode-field_vignette'. + $field_instances['node-episode-field_vignette'] = array( + 'bundle' => 'episode', + 'deleted' => 0, + 'description' => '', + 'display' => array( + 'accueil' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'attente' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'default' => array( + 'label' => 'above', + 'module' => 'image', + 'settings' => array( + 'image_link' => '', + 'image_style' => '', + ), + 'type' => 'image', + 'weight' => 7, + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_vignette', + 'label' => 'vignette', + 'required' => 0, + 'settings' => array( + 'alt_field' => 0, + 'default_image' => 0, + 'entity_translation_sync' => FALSE, + 'file_directory' => 'vignettes', + 'file_extensions' => 'png gif jpg jpeg', + 'max_filesize' => '', + 'max_resolution' => '', + 'min_resolution' => '', + 'title_field' => 0, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'image', + 'settings' => array( + 'insert' => 0, + 'insert_absolute' => 0, + 'insert_class' => '', + 'insert_default' => 'auto', + 'insert_styles' => array( + 'auto' => 'auto', + 'icon_link' => 0, + 'image' => 0, + 'image_large' => 0, + 'image_linkit_thumb' => 0, + 'image_medium' => 0, + 'image_thumbnail' => 0, + 'image_video_thumb_docu' => 0, + 'image_video_thumb_episode' => 0, + 'image_video_thumb_themat' => 0, + 'image_video_thumbnail' => 0, + 'link' => 0, + ), + 'insert_width' => '', + 'preview_image_style' => 'thumbnail', + 'progress_indicator' => 'throbber', + ), + 'type' => 'image_image', + 'weight' => 4, + ), + ); + // Exported field_instance: 'node-episode-title_field'. $field_instances['node-episode-title_field'] = array( 'bundle' => 'episode', @@ -1390,6 +1318,88 @@ function clameurs_field_default_field_instances() { ), ); + // Exported field_instance: 'node-thematique-field_vignette'. + $field_instances['node-thematique-field_vignette'] = array( + 'bundle' => 'thematique', + 'deleted' => 0, + 'description' => '', + 'display' => array( + 'accueil' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'attente' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'default' => array( + 'label' => 'above', + 'module' => 'image', + 'settings' => array( + 'image_link' => '', + 'image_style' => '', + ), + 'type' => 'image', + 'weight' => 9, + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_vignette', + 'label' => 'vignette', + 'required' => 0, + 'settings' => array( + 'alt_field' => 0, + 'default_image' => 0, + 'entity_translation_sync' => FALSE, + 'file_directory' => 'vignettes', + 'file_extensions' => 'png gif jpg jpeg', + 'max_filesize' => '', + 'max_resolution' => '', + 'min_resolution' => '', + 'title_field' => 0, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'image', + 'settings' => array( + 'insert' => 0, + 'insert_absolute' => 0, + 'insert_class' => '', + 'insert_default' => 'auto', + 'insert_styles' => array( + 'auto' => 'auto', + 'icon_link' => 0, + 'image' => 0, + 'image_large' => 0, + 'image_linkit_thumb' => 0, + 'image_medium' => 0, + 'image_thumbnail' => 0, + 'image_video_thumb_docu' => 0, + 'image_video_thumb_episode' => 0, + 'image_video_thumb_themat' => 0, + 'image_video_thumbnail' => 0, + 'link' => 0, + ), + 'insert_width' => '', + 'preview_image_style' => 'thumbnail', + 'progress_indicator' => 'throbber', + ), + 'type' => 'image_image', + 'weight' => 102, + ), + ); + // Translatables // Included for use with string extractors like potx. t('Bidirectional'); @@ -1406,6 +1416,7 @@ function clameurs_field_default_field_instances() { t('Titre'); t('Video'); t('Weight'); + t('vignette'); t('À la maison commune'); t('Écouter'); t('éclairages'); diff --git a/sites/all/modules/features/clameurs/clameurs.field_group.inc b/sites/all/modules/features/clameurs/clameurs.field_group.inc index 25b9d5b1..03a1c05d 100644 --- a/sites/all/modules/features/clameurs/clameurs.field_group.inc +++ b/sites/all/modules/features/clameurs/clameurs.field_group.inc @@ -166,8 +166,7 @@ function clameurs_field_group_info() { 'label' => 'htabs', 'weight' => '3', 'children' => array( - 0 => 'group_texte', - 1 => 'group_video', + 0 => 'group_video', ), 'format_type' => 'htabs', 'format_settings' => array( @@ -192,8 +191,7 @@ function clameurs_field_group_info() { 'label' => 'htabs', 'weight' => '3', 'children' => array( - 0 => 'group_texte', - 1 => 'group_video', + 0 => 'group_video', ), 'format_type' => 'htabs', 'format_settings' => array( @@ -218,10 +216,10 @@ function clameurs_field_group_info() { 'label' => 'htabs', 'weight' => '2', 'children' => array( - 0 => 'group_video', - 1 => 'group_texte', - 2 => 'group_episodes', - 3 => 'group_eclairage', + 0 => 'group_eclairage', + 1 => 'group_episodes', + 2 => 'group_texte', + 3 => 'group_video', ), 'format_type' => 'htabs', 'format_settings' => array( @@ -316,7 +314,7 @@ function clameurs_field_group_info() { $field_groups['group_right|node|thematique|accueil'] = $field_group; $field_group = new stdClass(); - $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */ + $field_group->disabled = TRUE; /* Edit this to true to make a default field_group disabled initially */ $field_group->api_version = 1; $field_group->identifier = 'group_texte|node|documentair|form'; $field_group->group_name = 'group_texte'; @@ -344,7 +342,7 @@ function clameurs_field_group_info() { $field_groups['group_texte|node|documentair|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->disabled = TRUE; /* Edit this to true to make a default field_group disabled initially */ $field_group->api_version = 1; $field_group->identifier = 'group_texte|node|episode|form'; $field_group->group_name = 'group_texte'; @@ -540,9 +538,8 @@ function clameurs_field_group_info() { 'label' => 'Video', 'weight' => '5', 'children' => array( - 0 => 'field_video', - 1 => 'field_description', - 2 => 'field_emvideo', + 0 => 'field_emvideo', + 1 => 'field_vignette', ), 'format_type' => 'htab', 'format_settings' => array( @@ -602,9 +599,8 @@ function clameurs_field_group_info() { 'label' => 'Video', 'weight' => '10', 'children' => array( - 0 => 'field_video', - 1 => 'field_description', - 2 => 'field_emvideo', + 0 => 'field_emvideo', + 1 => 'field_vignette', ), 'format_type' => 'htab', 'format_settings' => array( @@ -667,6 +663,7 @@ function clameurs_field_group_info() { 'children' => array( 0 => 'field_description', 1 => 'field_emvideo', + 2 => 'field_vignette', ), 'format_type' => 'htab', 'format_settings' => array( diff --git a/sites/all/modules/features/clameurs/clameurs.info b/sites/all/modules/features/clameurs/clameurs.info index 44c8ea73..c3c6c185 100644 --- a/sites/all/modules/features/clameurs/clameurs.info +++ b/sites/all/modules/features/clameurs/clameurs.info @@ -70,6 +70,7 @@ features[field_base][] = field_habiter features[field_base][] = field_legende features[field_base][] = field_poid features[field_base][] = field_thematique +features[field_base][] = field_vignette features[field_base][] = title_field features[field_group][] = group_body|node|thematique|teaser features[field_group][] = group_bottom|node|thematique|accueil @@ -101,17 +102,15 @@ features[field_instance][] = cer-cer-cer_left features[field_instance][] = cer-cer-cer_right features[field_instance][] = cer-cer-cer_weight features[field_instance][] = file-image-field_legende -features[field_instance][] = node-documentair-body -features[field_instance][] = node-documentair-field_description features[field_instance][] = node-documentair-field_doc features[field_instance][] = node-documentair-field_emvideo features[field_instance][] = node-documentair-field_thematique +features[field_instance][] = node-documentair-field_vignette features[field_instance][] = node-documentair-title_field -features[field_instance][] = node-episode-body -features[field_instance][] = node-episode-field_description features[field_instance][] = node-episode-field_emvideo features[field_instance][] = node-episode-field_habiter features[field_instance][] = node-episode-field_thematique +features[field_instance][] = node-episode-field_vignette features[field_instance][] = node-episode-title_field features[field_instance][] = node-thematique-body features[field_instance][] = node-thematique-field_description @@ -120,6 +119,7 @@ features[field_instance][] = node-thematique-field_ecouter features[field_instance][] = node-thematique-field_emvideo features[field_instance][] = node-thematique-field_episodes features[field_instance][] = node-thematique-field_poid +features[field_instance][] = node-thematique-field_vignette features[image][] = video_thumb_docu features[image][] = video_thumb_episode features[image][] = video_thumb_themat diff --git a/sites/all/modules/features/clameurs/clameurs.strongarm.inc b/sites/all/modules/features/clameurs/clameurs.strongarm.inc index 121b4f3c..b9d2088f 100644 --- a/sites/all/modules/features/clameurs/clameurs.strongarm.inc +++ b/sites/all/modules/features/clameurs/clameurs.strongarm.inc @@ -230,8 +230,9 @@ function clameurs_strongarm() { 'title' => array( 'region' => 'main', 'weight' => '0', - 'has_required' => TRUE, + 'has_required' => FALSE, 'title' => 'Titre', + 'hidden' => 0, ), 'additional_settings' => array( 'region' => 'footer', @@ -280,7 +281,7 @@ function clameurs_strongarm() { 'weight' => '4', 'has_required' => FALSE, 'title' => 'Texte (Field group)', - 'hidden' => 0, + 'hidden' => 1, ), 'group_video' => array( 'region' => 'main', @@ -293,9 +294,15 @@ function clameurs_strongarm() { 'region' => 'right', 'weight' => '2', 'has_required' => FALSE, - 'title' => 'Brouillon', + 'title' => 'Target state', 'hidden' => 0, ), + 'title_field' => array( + 'region' => 'main', + 'weight' => '0', + 'has_required' => TRUE, + 'title' => 'Titre', + ), ); $export['nodeformscols_field_placements_documentair_default'] = $strongarm; diff --git a/sites/all/modules/figureslibres/clameursmod/clameursmod.module b/sites/all/modules/figureslibres/clameursmod/clameursmod.module index 5c3bd2fc..f10691e9 100644 --- a/sites/all/modules/figureslibres/clameursmod/clameursmod.module +++ b/sites/all/modules/figureslibres/clameursmod/clameursmod.module @@ -225,3 +225,17 @@ function theme_thematiques_anchor_links($vars){ return theme('item_list', $list); } + +function clameursmod_field_attach_view_alter(&$output, $context) { + if(isset($output['field_emvideo'])){ + $entity = $context['entity']; + $field_vignette = field_get_items('node', $entity, 'field_vignette'); + // dsm($field_vignette, $entity->title.' : field_vignette'); + if($field_vignette){ + // dsm($output, $entity->title.' : output'); + // dsm($context, $entity->title.' : context'); + $uri = $field_vignette[0]['uri']; + $output['field_emvideo'][0]['#item']['uri'] = $uri; + } + } +}