diff --git a/sites/all/modules/features/materio_home_v2/materio_home_v2.views_default.inc b/sites/all/modules/features/materio_home_v2/materio_home_v2.views_default.inc index ab979d26..d7d1d6b1 100644 --- a/sites/all/modules/features/materio_home_v2/materio_home_v2.views_default.inc +++ b/sites/all/modules/features/materio_home_v2/materio_home_v2.views_default.inc @@ -270,6 +270,10 @@ function materio_home_v2_views_default_views() { $handler->display->display_options['fields']['title']['label'] = ''; $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE; $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE; + /* Critère de tri: Contenu : weight (field_weight) */ + $handler->display->display_options['sorts']['field_weight_value']['id'] = 'field_weight_value'; + $handler->display->display_options['sorts']['field_weight_value']['table'] = 'field_data_field_weight'; + $handler->display->display_options['sorts']['field_weight_value']['field'] = 'field_weight_value'; /* Critère de tri: Contenu : Date de publication */ $handler->display->display_options['sorts']['created']['id'] = 'created'; $handler->display->display_options['sorts']['created']['table'] = 'node'; diff --git a/sites/all/modules/features/materio_publications/materio_publications.features.field_base.inc b/sites/all/modules/features/materio_publications/materio_publications.features.field_base.inc index ba2715ca..b1321265 100644 --- a/sites/all/modules/features/materio_publications/materio_publications.features.field_base.inc +++ b/sites/all/modules/features/materio_publications/materio_publications.features.field_base.inc @@ -39,5 +39,74 @@ function materio_publications_field_default_field_bases() { 'type' => 'image', ); + // Exported field_base: 'field_weight' + $field_bases['field_weight'] = array( + 'active' => 1, + 'cardinality' => 1, + 'deleted' => 0, + 'entity_types' => array(), + 'field_name' => 'field_weight', + 'field_permissions' => array( + 'type' => 2, + ), + 'indexes' => array( + 'value' => array( + 0 => 'value', + ), + ), + 'locked' => 0, + 'module' => 'list', + 'settings' => array( + 'allowed_values' => array( + -20 => -20, + -19 => -19, + -18 => -18, + -17 => -17, + -16 => -16, + -15 => -15, + -14 => -14, + -13 => -13, + -12 => -12, + -11 => -11, + -10 => -10, + '-09' => '-09', + '-08' => '-08', + '-07' => '-07', + '-06' => '-06', + '-05' => '-05', + '-04' => '-04', + '-03' => '-03', + '-02' => '-02', + '-01' => '-01', + '00' => '00', + '01' => '01', + '02' => '02', + '03' => '03', + '04' => '04', + '05' => '05', + '06' => '06', + '07' => '07', + '08' => '08', + '09' => '09', + 10 => 10, + 11 => 11, + 12 => 12, + 13 => 13, + 14 => 14, + 15 => 15, + 16 => 16, + 17 => 17, + 18 => 18, + 19 => 19, + 20 => 20, + ), + 'allowed_values_function' => '', + 'entity_translation_sync' => FALSE, + 'profile2_private' => FALSE, + ), + 'translatable' => 0, + 'type' => 'list_integer', + ); + return $field_bases; } diff --git a/sites/all/modules/features/materio_publications/materio_publications.features.field_instance.inc b/sites/all/modules/features/materio_publications/materio_publications.features.field_instance.inc index 3258ea40..ea7bed91 100644 --- a/sites/all/modules/features/materio_publications/materio_publications.features.field_instance.inc +++ b/sites/all/modules/features/materio_publications/materio_publications.features.field_instance.inc @@ -182,10 +182,87 @@ function materio_publications_field_default_field_instances() { ), ); + // Exported field_instance: 'node-publication-field_weight' + $field_instances['node-publication-field_weight'] = array( + 'bundle' => 'publication', + 'default_value' => NULL, + 'deleted' => 0, + 'description' => '', + 'display' => array( + 'bookmark' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'cardbig' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'cardfull' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'cardmedium' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'cardsmall' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'default' => array( + 'label' => 'above', + 'module' => 'list', + 'settings' => array(), + 'type' => 'list_default', + 'weight' => 3, + ), + 'homeblock' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 0, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_weight', + 'label' => 'weight', + 'required' => 0, + 'settings' => array( + 'entity_translation_sync' => FALSE, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'options', + 'settings' => array( + 'content_taxonomy_opt_groups' => FALSE, + ), + 'type' => 'options_select', + 'weight' => 9, + ), + ); + // Translatables // Included for use with string extractors like potx. t('Body'); t('Couverture'); + t('weight'); return $field_instances; } diff --git a/sites/all/modules/features/materio_publications/materio_publications.info b/sites/all/modules/features/materio_publications/materio_publications.info index cb335914..fb2d4fdd 100644 --- a/sites/all/modules/features/materio_publications/materio_publications.info +++ b/sites/all/modules/features/materio_publications/materio_publications.info @@ -8,14 +8,18 @@ dependencies[] = materio_page_title dependencies[] = materio_subscriptions dependencies[] = metatag dependencies[] = node +dependencies[] = options +dependencies[] = strongarm dependencies[] = text dependencies[] = workflow dependencies[] = workflow_access features[ctools][] = strongarm:strongarm:1 features[features_api][] = api:2 features[field_base][] = field_couverture +features[field_base][] = field_weight features[field_instance][] = node-publication-body features[field_instance][] = node-publication-field_couverture +features[field_instance][] = node-publication-field_weight features[node][] = publication features[user_permission][] = create publication content features[user_permission][] = delete any publication content @@ -63,5 +67,4 @@ features[variable][] = unique_field_show_matches_publication features[variable][] = workflow_publication features[workflow][] = Publication features[workflow_access][] = Publication -features_exclude[dependencies][strongarm] = strongarm project path = sites/all/modules/features diff --git a/sites/all/modules/features/materio_publications/materio_publications.strongarm.inc b/sites/all/modules/features/materio_publications/materio_publications.strongarm.inc index fc68f4f8..26e29cd9 100644 --- a/sites/all/modules/features/materio_publications/materio_publications.strongarm.inc +++ b/sites/all/modules/features/materio_publications/materio_publications.strongarm.inc @@ -160,6 +160,9 @@ function materio_publications_strongarm() { 'language' => array( 'weight' => '3', ), + 'title' => array( + 'weight' => '-5', + ), ), 'display' => array( 'workflow_current_state' => array( @@ -228,14 +231,14 @@ function materio_publications_strongarm() { ), 'actions' => array( 'region' => 'right', - 'weight' => '3', + 'weight' => '4', 'has_required' => FALSE, 'title' => 'Enregistrer', 'hidden' => 0, ), 'entity_translation_entity_form_language_update' => array( 'region' => 'right', - 'weight' => '2', + 'weight' => '3', 'has_required' => FALSE, 'title' => NULL, 'hidden' => 0, @@ -254,12 +257,6 @@ function materio_publications_strongarm() { 'title' => 'Body', 'hidden' => 0, ), - 'title_field' => array( - 'region' => 'main', - 'weight' => '1', - 'has_required' => TRUE, - 'title' => 'Titre', - ), 'field_couverture' => array( 'region' => 'main', 'weight' => '2', @@ -269,11 +266,18 @@ function materio_publications_strongarm() { ), 'workflow' => array( 'region' => 'right', - 'weight' => '1', + 'weight' => '2', 'has_required' => FALSE, 'title' => 'Importé', 'hidden' => 0, ), + 'field_weight' => array( + 'region' => 'right', + 'weight' => '1', + 'has_required' => FALSE, + 'title' => 'weight', + 'hidden' => 0, + ), ); $export['nodeformscols_field_placements_publication_default'] = $strongarm;