added accriche field to Chapters

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-13 16:47:10 +02:00
parent 727f4d1709
commit d170d93591
16 changed files with 813 additions and 217 deletions
@@ -10,6 +10,36 @@
function chapitre_field_default_field_bases() {
$field_bases = array();
// Exported field_base: 'field_accroche'
$field_bases['field_accroche'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_accroche',
'field_permissions' => array(
'type' => 0,
),
'foreign keys' => array(
'format' => array(
'columns' => array(
'format' => 'format',
),
'table' => 'filter_format',
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'locked' => 0,
'module' => 'text',
'settings' => array(),
'translatable' => 0,
'type' => 'text_long',
);
// Exported field_base: 'field_agir'
$field_bases['field_agir'] = array(
'active' => 1,
@@ -132,13 +162,13 @@ function chapitre_field_default_field_bases() {
'type' => 'text',
);
// Exported field_base: 'field_nom'
$field_bases['field_nom'] = array(
// Exported field_base: 'field_partager'
$field_bases['field_partager'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_nom',
'field_name' => 'field_partager',
'field_permissions' => array(
'type' => 0,
),
@@ -190,6 +220,70 @@ function chapitre_field_default_field_bases() {
'type' => 'field_collection',
);
// Exported field_base: 'field_sous_titre'
$field_bases['field_sous_titre'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_sous_titre',
'field_permissions' => array(
'type' => 0,
),
'foreign keys' => array(
'format' => array(
'columns' => array(
'format' => 'format',
),
'table' => 'filter_format',
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'locked' => 0,
'module' => 'text',
'settings' => array(
'max_length' => 255,
),
'translatable' => 0,
'type' => 'text',
);
// Exported field_base: 'field_titre'
$field_bases['field_titre'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_titre',
'field_permissions' => array(
'type' => 0,
),
'foreign keys' => array(
'format' => array(
'columns' => array(
'format' => 'format',
),
'table' => 'filter_format',
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'locked' => 0,
'module' => 'text',
'settings' => array(
'max_length' => 255,
),
'translatable' => 0,
'type' => 'text',
);
// Exported field_base: 'field_video'
$field_bases['field_video'] = array(
'active' => 1,
@@ -209,5 +303,38 @@ function chapitre_field_default_field_bases() {
'type' => 'video_embed_field',
);
// 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,
),
'foreign keys' => array(
'fid' => array(
'columns' => array(
'fid' => 'fid',
),
'table' => 'file_managed',
),
),
'indexes' => array(
'fid' => array(
0 => 'fid',
),
),
'locked' => 0,
'module' => 'image',
'settings' => array(
'default_image' => 0,
'uri_scheme' => 'public',
),
'translatable' => 0,
'type' => 'image',
);
return $field_bases;
}
@@ -18,11 +18,24 @@ function chapitre_field_default_field_instances() {
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 1,
'weight' => 3,
),
'full' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 3,
),
'token' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 3,
),
),
'entity_type' => 'field_collection_item',
@@ -45,28 +58,41 @@ function chapitre_field_default_field_instances() {
'size' => 60,
),
'type' => 'text_textfield',
'weight' => 32,
'weight' => 3,
),
);
// Exported field_instance: 'field_collection_item-field_partie-field_nom'
$field_instances['field_collection_item-field_partie-field_nom'] = array(
// Exported field_instance: 'field_collection_item-field_partie-field_sous_titre'
$field_instances['field_collection_item-field_partie-field_sous_titre'] = array(
'bundle' => 'field_partie',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 0,
'weight' => 2,
),
'full' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 2,
),
'token' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 2,
),
),
'entity_type' => 'field_collection_item',
'field_name' => 'field_nom',
'label' => 'Nom',
'field_name' => 'field_sous_titre',
'label' => 'Sous titre',
'required' => 0,
'settings' => array(
'linkit' => array(
@@ -84,7 +110,59 @@ function chapitre_field_default_field_instances() {
'size' => 60,
),
'type' => 'text_textfield',
'weight' => 31,
'weight' => 2,
),
);
// Exported field_instance: 'field_collection_item-field_partie-field_titre'
$field_instances['field_collection_item-field_partie-field_titre'] = array(
'bundle' => 'field_partie',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 1,
),
'full' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 1,
),
'token' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 1,
),
),
'entity_type' => 'field_collection_item',
'field_name' => 'field_titre',
'label' => 'Titre',
'required' => 0,
'settings' => array(
'linkit' => array(
'button_text' => 'Recherche',
'enable' => 0,
'profile' => '',
),
'text_processing' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'size' => 60,
),
'type' => 'text_textfield',
'weight' => 1,
),
);
@@ -96,7 +174,7 @@ function chapitre_field_default_field_instances() {
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'label' => 'hidden',
'module' => 'video_embed_field',
'settings' => array(
'description' => 1,
@@ -104,7 +182,24 @@ function chapitre_field_default_field_instances() {
'video_style' => 'normal',
),
'type' => 'video_embed_field',
'weight' => 2,
'weight' => 4,
),
'full' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 4,
),
'token' => array(
'label' => 'hidden',
'module' => 'video_embed_field',
'settings' => array(
'description' => 1,
'description_position' => 'bottom',
'video_style' => 'normal',
),
'type' => 'video_embed_field',
'weight' => 4,
),
),
'entity_type' => 'field_collection_item',
@@ -121,7 +216,121 @@ function chapitre_field_default_field_instances() {
'module' => 'video_embed_field',
'settings' => array(),
'type' => 'video_embed_field_video',
'weight' => 33,
'weight' => 2,
),
);
// Exported field_instance: 'field_collection_item-field_partie-field_vignette'
$field_instances['field_collection_item-field_partie-field_vignette'] = array(
'bundle' => 'field_partie',
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'image',
'settings' => array(
'image_link' => '',
'image_style' => '',
),
'type' => 'image',
'weight' => 0,
),
'full' => array(
'label' => 'hidden',
'module' => 'image',
'settings' => array(
'image_link' => '',
'image_style' => '',
),
'type' => 'image',
'weight' => 0,
),
'token' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'field_collection_item',
'field_name' => 'field_vignette',
'label' => 'Vignette',
'required' => 0,
'settings' => array(
'alt_field' => 0,
'default_image' => 0,
'file_directory' => '',
'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(
'preview_image_style' => 'thumbnail',
'progress_indicator' => 'throbber',
),
'type' => 'image_image',
'weight' => 0,
),
);
// Exported field_instance: 'node-chapitre-field_accroche'
$field_instances['node-chapitre-field_accroche'] = array(
'bundle' => 'chapitre',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'chapter' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 5,
),
'teaser' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(
'trim_length' => 150,
),
'type' => 'text_trimmed',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_accroche',
'label' => 'Accroche',
'required' => 0,
'settings' => array(
'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' => 104,
),
);
@@ -132,18 +341,25 @@ function chapitre_field_default_field_instances() {
'deleted' => 0,
'description' => '',
'display' => array(
'chapter' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 1,
),
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 3,
'weight' => 2,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
'weight' => 5,
),
),
'entity_type' => 'node',
@@ -166,7 +382,7 @@ function chapitre_field_default_field_instances() {
'rows' => 10,
),
'type' => 'text_textarea',
'weight' => 102,
'weight' => 107,
),
);
@@ -177,18 +393,25 @@ function chapitre_field_default_field_instances() {
'deleted' => 0,
'description' => '',
'display' => array(
'chapter' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 0,
),
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 4,
'weight' => 3,
),
'teaser' => array(
'label' => 'above',
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
'weight' => 1,
),
),
'entity_type' => 'node',
@@ -211,7 +434,7 @@ function chapitre_field_default_field_instances() {
'rows' => 10,
),
'type' => 'text_textarea',
'weight' => 100,
'weight' => 105,
),
);
@@ -222,18 +445,25 @@ function chapitre_field_default_field_instances() {
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'chapter' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 2,
),
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 1,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
'weight' => 6,
),
),
'entity_type' => 'node',
@@ -256,7 +486,58 @@ function chapitre_field_default_field_instances() {
'rows' => 10,
),
'type' => 'text_textarea',
'weight' => 101,
'weight' => 106,
),
);
// Exported field_instance: 'node-chapitre-field_partager'
$field_instances['node-chapitre-field_partager'] = array(
'bundle' => 'chapitre',
'default_value' => NULL,
'deleted' => 0,
'description' => 'provide twitter hashtag without #',
'display' => array(
'chapter' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 0,
),
'default' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 4,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 3,
),
),
'entity_type' => 'node',
'field_name' => 'field_partager',
'label' => 'Partager',
'required' => 0,
'settings' => array(
'linkit' => array(
'button_text' => 'Recherche',
'enable' => 0,
'profile' => '',
),
'text_processing' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'size' => 60,
),
'type' => 'text_textfield',
'weight' => 108,
),
);
@@ -267,8 +548,17 @@ function chapitre_field_default_field_instances() {
'deleted' => 0,
'description' => '',
'display' => array(
'chapter' => array(
'label' => 'hidden',
'module' => 'field_collection',
'settings' => array(
'view_mode' => 'token',
),
'type' => 'field_collection_fields',
'weight' => 3,
),
'default' => array(
'label' => 'above',
'label' => 'hidden',
'module' => 'field_collection',
'settings' => array(
'add' => 'Ajouter',
@@ -278,13 +568,16 @@ function chapitre_field_default_field_instances() {
'view_mode' => 'full',
),
'type' => 'field_collection_view',
'weight' => 1,
'weight' => 0,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
'label' => 'hidden',
'module' => 'field_collection',
'settings' => array(
'view_mode' => 'full',
),
'type' => 'field_collection_fields',
'weight' => 2,
),
),
'entity_type' => 'node',
@@ -305,13 +598,18 @@ function chapitre_field_default_field_instances() {
// Translatables
// Included for use with string extractors like potx.
t('Accroche');
t('Agir');
t('Comprendre');
t('Description');
t('Débatre');
t('Nom');
t('Partager');
t('Partie');
t('Sous titre');
t('Titre');
t('Video');
t('Vignette');
t('provide twitter hashtag without #');
return $field_instances;
}
@@ -26,6 +26,8 @@ function chapitre_field_group_info() {
0 => 'field_dbatre',
1 => 'field_agir',
2 => 'field_comprendre',
3 => 'field_partager',
4 => 'field_accroche',
),
'format_type' => 'htab',
'format_settings' => array(
@@ -94,5 +96,35 @@ function chapitre_field_group_info() {
);
$export['group_parties|node|chapitre|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;
$field_group->identifier = 'group_texts|field_collection_item|field_partie|form';
$field_group->group_name = 'group_texts';
$field_group->entity_type = 'field_collection_item';
$field_group->bundle = 'field_partie';
$field_group->mode = 'form';
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'texts',
'weight' => '1',
'children' => array(
0 => 'field_description',
1 => 'field_titre',
2 => 'field_sous_titre',
),
'format_type' => 'html5',
'format_settings' => array(
'label' => 'texts',
'instance_settings' => array(
'id' => '',
'classes' => 'group-texts',
'wrapper' => 'section',
),
'formatter' => '',
),
);
$export['group_texts|field_collection_item|field_partie|form'] = $field_group;
return $export;
}
@@ -5,6 +5,7 @@ dependencies[] = ctools
dependencies[] = features
dependencies[] = field_collection
dependencies[] = field_group
dependencies[] = image
dependencies[] = node
dependencies[] = strongarm
dependencies[] = text
@@ -12,22 +13,31 @@ dependencies[] = video_embed_field
features[ctools][] = field_group:field_group:1
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[field_base][] = field_accroche
features[field_base][] = field_agir
features[field_base][] = field_comprendre
features[field_base][] = field_dbatre
features[field_base][] = field_description
features[field_base][] = field_nom
features[field_base][] = field_partager
features[field_base][] = field_partie
features[field_base][] = field_sous_titre
features[field_base][] = field_titre
features[field_base][] = field_video
features[field_base][] = field_vignette
features[field_group][] = group_general|node|chapitre|form
features[field_group][] = group_htabs|node|chapitre|form
features[field_group][] = group_parties|node|chapitre|form
features[field_group][] = group_texts|field_collection_item|field_partie|form
features[field_instance][] = field_collection_item-field_partie-field_description
features[field_instance][] = field_collection_item-field_partie-field_nom
features[field_instance][] = field_collection_item-field_partie-field_sous_titre
features[field_instance][] = field_collection_item-field_partie-field_titre
features[field_instance][] = field_collection_item-field_partie-field_video
features[field_instance][] = field_collection_item-field_partie-field_vignette
features[field_instance][] = node-chapitre-field_accroche
features[field_instance][] = node-chapitre-field_agir
features[field_instance][] = node-chapitre-field_comprendre
features[field_instance][] = node-chapitre-field_dbatre
features[field_instance][] = node-chapitre-field_partager
features[field_instance][] = node-chapitre-field_partie
features[node][] = chapitre
features[user_permission][] = create chapitre content
@@ -113,7 +113,23 @@ function chapitre_strongarm() {
$strongarm->api_version = 1;
$strongarm->name = 'field_bundle_settings_node__chapitre';
$strongarm->value = array(
'view_modes' => array(),
'view_modes' => array(
'teaser' => array(
'custom_settings' => TRUE,
),
'full' => array(
'custom_settings' => FALSE,
),
'rss' => array(
'custom_settings' => FALSE,
),
'token' => array(
'custom_settings' => FALSE,
),
'chapter' => array(
'custom_settings' => TRUE,
),
),
'extra_fields' => array(
'form' => array(
'title' => array(
@@ -129,7 +145,36 @@ function chapitre_strongarm() {
'weight' => '99',
),
),
'display' => array(),
'display' => array(
'workflow_current_state' => array(
'default' => array(
'weight' => '5',
'visible' => FALSE,
),
'teaser' => array(
'weight' => '4',
'visible' => FALSE,
),
'chapter' => array(
'weight' => '4',
'visible' => FALSE,
),
),
'workflow' => array(
'default' => array(
'weight' => '4',
'visible' => FALSE,
),
'teaser' => array(
'weight' => '7',
'visible' => FALSE,
),
'chapter' => array(
'weight' => '5',
'visible' => FALSE,
),
),
),
),
);
$export['field_bundle_settings_node__chapitre'] = $strongarm;