updated features for home v2

This commit is contained in:
Bachir Soussi Chiadmi
2015-05-26 18:24:48 +02:00
parent 580c97dc49
commit 0c29476b3f
9 changed files with 921 additions and 18 deletions

View File

@@ -52,7 +52,7 @@ function materio_publications_field_default_field_instances() {
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 0,
'weight' => 1,
),
'teaser' => array(
'label' => 'hidden',
@@ -81,13 +81,95 @@ function materio_publications_field_default_field_instances() {
'summary_rows' => 5,
),
'type' => 'text_textarea_with_summary',
'weight' => 31,
'weight' => 1,
),
);
// Exported field_instance: 'node-publication-field_couverture'
$field_instances['node-publication-field_couverture'] = array(
'bundle' => 'publication',
'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' => 'hidden',
'module' => 'image',
'settings' => array(
'image_link' => '',
'image_style' => 'large',
),
'type' => 'image',
'weight' => 2,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_couverture',
'label' => 'Couverture',
'required' => 0,
'settings' => array(
'alt_field' => 0,
'default_image' => 0,
'entity_translation_sync' => FALSE,
'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' => 2,
),
);
// Translatables
// Included for use with string extractors like potx.
t('Body');
t('Couverture');
return $field_instances;
}

View File

@@ -30,3 +30,144 @@ function materio_publications_node_info() {
drupal_alter('node_info', $items);
return $items;
}
/**
* Implements hook_workflow_default_workflows().
*/
function materio_publications_workflow_default_workflows() {
$workflows = array();
// Exported workflow: Publication
$workflows['Publication'] = array(
'name' => 'Publication',
'tab_roles' => '',
'options' => 'a:4:{s:16:"comment_log_node";i:0;s:15:"comment_log_tab";i:0;s:13:"name_as_title";i:0;s:12:"watchdog_log";i:1;}',
'states' => array(
0 => array(
'state' => '(creation)',
'weight' => -50,
'sysid' => 1,
'status' => 1,
'name' => 'Publication',
),
1 => array(
'state' => 'Importé',
'weight' => 0,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
2 => array(
'state' => 'Édité',
'weight' => 1,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
3 => array(
'state' => 'Masqué',
'weight' => 2,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
4 => array(
'state' => 'Publié',
'weight' => 3,
'sysid' => 0,
'status' => 1,
'name' => 'Publication',
),
),
'transitions' => array(
0 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => '(creation)',
'target_state' => 'Masqué',
),
1 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => '(creation)',
'target_state' => 'Publié',
),
2 => array(
'roles' => 'root',
'state' => '(creation)',
'target_state' => 'Importé',
),
3 => array(
'roles' => 'administrator,root',
'state' => 'Importé',
'target_state' => 'Édité',
),
4 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Importé',
'target_state' => 'Masqué',
),
5 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Importé',
'target_state' => 'Publié',
),
6 => array(
'roles' => 'root',
'state' => 'Édité',
'target_state' => 'Importé',
),
7 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Édité',
'target_state' => 'Masqué',
),
8 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Édité',
'target_state' => 'Publié',
),
9 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Masqué',
'target_state' => 'Publié',
),
10 => array(
'roles' => 'root',
'state' => 'Masqué',
'target_state' => 'Importé',
),
11 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Masqué',
'target_state' => 'Édité',
),
12 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Publié',
'target_state' => 'Masqué',
),
13 => array(
'roles' => 'root',
'state' => 'Publié',
'target_state' => 'Importé',
),
14 => array(
'roles' => 'workflow_features_author_name,administrator,root',
'state' => 'Publié',
'target_state' => 'Édité',
),
),
'node_types' => array(
0 => 'breve',
1 => 'company',
2 => 'didactique',
3 => 'faq',
4 => 'looping_embed_video',
5 => 'materiau',
6 => 'page',
7 => 'publication',
8 => 'simplenews',
),
);
return $workflows;
}

View File

@@ -10,6 +10,36 @@
function materio_publications_user_default_roles() {
$roles = array();
// Exported role: Contact opérationnel.
$roles['Contact opérationnel'] = array(
'name' => 'Contact opérationnel',
'weight' => 7,
);
// Exported role: Student.
$roles['Student'] = array(
'name' => 'Student',
'weight' => 4,
);
// Exported role: Unverified.
$roles['Unverified'] = array(
'name' => 'Unverified',
'weight' => 2,
);
// Exported role: administrator.
$roles['administrator'] = array(
'name' => 'administrator',
'weight' => 8,
);
// Exported role: root.
$roles['root'] = array(
'name' => 'root',
'weight' => 9,
);
// Exported role: utilisateur anonyme.
$roles['utilisateur anonyme'] = array(
'name' => 'utilisateur anonyme',

View File

@@ -3,28 +3,61 @@ core = 7.x
package = Materio
dependencies[] = ctools
dependencies[] = features
dependencies[] = materio_subscriptions
dependencies[] = materio_content_types
dependencies[] = metatag
dependencies[] = node
dependencies[] = strongarm
dependencies[] = text
dependencies[] = workflow_access
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[field_base][] = field_couverture
features[field_instance][] = node-publication-body
features[field_instance][] = node-publication-field_couverture
features[node][] = publication
features[user_permission][] = create publication content
features[user_permission][] = delete any publication content
features[user_permission][] = delete own publication content
features[user_permission][] = edit any publication content
features[user_permission][] = edit own publication content
features[user_permission][] = show publication title
features[user_role][] = Contact opérationnel
features[user_role][] = Student
features[user_role][] = Unverified
features[user_role][] = administrator
features[user_role][] = root
features[user_role][] = utilisateur anonyme
features[user_role][] = utilisateur authentifié
features[variable][] = additional_settings__active_tab_publication
features[variable][] = ant_pattern_publication
features[variable][] = ant_php_publication
features[variable][] = ant_publication
features[variable][] = date_popup_authored_enabled_publication
features[variable][] = date_popup_authored_format_publication
features[variable][] = date_popup_authored_year_range_publication
features[variable][] = diff_enable_revisions_page_node_publication
features[variable][] = diff_show_preview_changes_node_publication
features[variable][] = diff_view_mode_preview_node_publication
features[variable][] = entity_translation_hide_translation_links_publication
features[variable][] = entity_translation_node_metadata_publication
features[variable][] = field_bundle_settings_node__publication
features[variable][] = language_content_type_publication
features[variable][] = menu_options_publication
features[variable][] = menu_parent_publication
features[variable][] = node_options_publication
features[variable][] = node_preview_publication
features[variable][] = node_submitted_publication
features[variable][] = nodeformscols_field_placements_publication_default
features[variable][] = print_html_display_comment_publication
features[variable][] = print_html_display_publication
features[variable][] = print_html_display_urllist_publication
features[variable][] = save_continue_publication
features[variable][] = simplenews_content_type_publication
features[variable][] = unique_field_comp_publication
features[variable][] = unique_field_fields_publication
features[variable][] = unique_field_scope_publication
features[variable][] = unique_field_show_matches_publication
features[variable][] = workflow_publication
features[workflow][] = Publication
features[workflow_access][] = Publication
features_exclude[dependencies][workflow_access] = workflow_access
features_exclude[workflow][Publication] = Publication
features_exclude[user_role][Unverified] = Unverified
features_exclude[user_role][Student] = Student
features_exclude[user_role][Contact opérationnel] = Contact opérationnel
features_exclude[user_role][administrator] = administrator
features_exclude[user_role][root] = root
project path = sites/all/modules/features

View File

@@ -10,6 +10,175 @@
function materio_publications_strongarm() {
$export = array();
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'additional_settings__active_tab_publication';
$strongarm->value = 'edit-submission';
$export['additional_settings__active_tab_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'ant_pattern_publication';
$strongarm->value = '';
$export['ant_pattern_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'ant_php_publication';
$strongarm->value = 0;
$export['ant_php_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'ant_publication';
$strongarm->value = '0';
$export['ant_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'date_popup_authored_enabled_publication';
$strongarm->value = 1;
$export['date_popup_authored_enabled_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'date_popup_authored_format_publication';
$strongarm->value = 'm/d/Y - H:i';
$export['date_popup_authored_format_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'date_popup_authored_year_range_publication';
$strongarm->value = '3';
$export['date_popup_authored_year_range_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'diff_enable_revisions_page_node_publication';
$strongarm->value = 1;
$export['diff_enable_revisions_page_node_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'diff_show_preview_changes_node_publication';
$strongarm->value = 1;
$export['diff_show_preview_changes_node_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'diff_view_mode_preview_node_publication';
$strongarm->value = 'full';
$export['diff_view_mode_preview_node_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'entity_translation_hide_translation_links_publication';
$strongarm->value = 0;
$export['entity_translation_hide_translation_links_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'entity_translation_node_metadata_publication';
$strongarm->value = '0';
$export['entity_translation_node_metadata_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'field_bundle_settings_node__publication';
$strongarm->value = array(
'view_modes' => array(
'teaser' => array(
'custom_settings' => TRUE,
),
'bookmark' => array(
'custom_settings' => TRUE,
),
'cardsmall' => array(
'custom_settings' => TRUE,
),
'cardmedium' => array(
'custom_settings' => TRUE,
),
'cardbig' => array(
'custom_settings' => TRUE,
),
'cardfull' => array(
'custom_settings' => TRUE,
),
'full' => array(
'custom_settings' => FALSE,
),
'rss' => array(
'custom_settings' => FALSE,
),
'diff_standard' => array(
'custom_settings' => FALSE,
),
'print' => array(
'custom_settings' => FALSE,
),
'email_plain' => array(
'custom_settings' => FALSE,
),
'email_html' => array(
'custom_settings' => FALSE,
),
'email_textalt' => array(
'custom_settings' => FALSE,
),
'token' => array(
'custom_settings' => FALSE,
),
),
'extra_fields' => array(
'form' => array(
'metatags' => array(
'weight' => '6',
),
'path' => array(
'weight' => '5',
),
'redirect' => array(
'weight' => '4',
),
'workflow' => array(
'weight' => '7',
),
'language' => array(
'weight' => '3',
),
),
'display' => array(
'workflow_current_state' => array(
'default' => array(
'weight' => '3',
'visible' => FALSE,
),
),
'workflow' => array(
'default' => array(
'weight' => '4',
'visible' => FALSE,
),
),
),
),
);
$export['field_bundle_settings_node__publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
@@ -31,6 +200,75 @@ function materio_publications_strongarm() {
$strongarm->value = 'main-menu:0';
$export['menu_parent_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'nodeformscols_field_placements_publication_default';
$strongarm->value = array(
'title' => array(
'region' => 'main',
'weight' => '0',
'has_required' => TRUE,
'title' => 'Titre',
),
'additional_settings' => array(
'region' => 'main',
'weight' => '4',
'has_required' => FALSE,
'title' => 'Vertical tabs',
'hidden' => 0,
),
'actions' => array(
'region' => 'right',
'weight' => '3',
'has_required' => FALSE,
'title' => 'Enregistrer',
'hidden' => 0,
),
'entity_translation_entity_form_language_update' => array(
'region' => 'right',
'weight' => '2',
'has_required' => FALSE,
'title' => NULL,
'hidden' => 0,
),
'language' => array(
'region' => 'right',
'weight' => '0',
'has_required' => FALSE,
'title' => 'Langue',
'hidden' => 0,
),
'body' => array(
'region' => 'main',
'weight' => '3',
'has_required' => FALSE,
'title' => 'Body',
'hidden' => 0,
),
'title_field' => array(
'region' => 'main',
'weight' => '1',
'has_required' => TRUE,
'title' => 'Titre',
),
'field_couverture' => array(
'region' => 'main',
'weight' => '2',
'has_required' => FALSE,
'title' => 'Couverture',
'hidden' => 0,
),
'workflow' => array(
'region' => 'right',
'weight' => '1',
'has_required' => FALSE,
'title' => 'Importé',
'hidden' => 0,
),
);
$export['nodeformscols_field_placements_publication_default'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
@@ -44,7 +282,7 @@ function materio_publications_strongarm() {
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'node_preview_publication';
$strongarm->value = '1';
$strongarm->value = '0';
$export['node_preview_publication'] = $strongarm;
$strongarm = new stdClass();
@@ -54,5 +292,77 @@ function materio_publications_strongarm() {
$strongarm->value = 0;
$export['node_submitted_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'print_html_display_comment_publication';
$strongarm->value = 0;
$export['print_html_display_comment_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'print_html_display_publication';
$strongarm->value = 0;
$export['print_html_display_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'print_html_display_urllist_publication';
$strongarm->value = 0;
$export['print_html_display_urllist_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'save_continue_publication';
$strongarm->value = 'Enregistrer et ajouter les champs';
$export['save_continue_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'simplenews_content_type_publication';
$strongarm->value = 0;
$export['simplenews_content_type_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'unique_field_comp_publication';
$strongarm->value = 'each';
$export['unique_field_comp_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'unique_field_fields_publication';
$strongarm->value = array();
$export['unique_field_fields_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'unique_field_scope_publication';
$strongarm->value = 'type';
$export['unique_field_scope_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'unique_field_show_matches_publication';
$strongarm->value = array();
$export['unique_field_show_matches_publication'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'workflow_publication';
$strongarm->value = array(
0 => 'node',
);
$export['workflow_publication'] = $strongarm;
return $export;
}