updated home V2 feature

This commit is contained in:
Bachir Soussi Chiadmi
2015-05-16 14:24:02 +02:00
parent 70151f23e1
commit 2ffa37fefa
10 changed files with 667 additions and 24 deletions

View File

@@ -0,0 +1,93 @@
<?php
/**
* @file
* materio_publications.features.field_instance.inc
*/
/**
* Implements hook_field_default_field_instances().
*/
function materio_publications_field_default_field_instances() {
$field_instances = array();
// Exported field_instance: 'node-publication-body'
$field_instances['node-publication-body'] = 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' => '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' => 0,
),
),
'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' => 31,
),
);
// Translatables
// Included for use with string extractors like potx.
t('Body');
return $field_instances;
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* @file
* materio_publications.features.inc
*/
/**
* Implements hook_ctools_plugin_api().
*/
function materio_publications_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}
/**
* Implements hook_node_info().
*/
function materio_publications_node_info() {
$items = array(
'publication' => array(
'name' => t('Publication'),
'base' => 'node_content',
'description' => '',
'has_title' => '1',
'title_label' => t('Titre'),
'help' => '',
),
);
drupal_alter('node_info', $items);
return $items;
}

View File

@@ -0,0 +1,26 @@
<?php
/**
* @file
* materio_publications.features.user_role.inc
*/
/**
* Implements hook_user_default_roles().
*/
function materio_publications_user_default_roles() {
$roles = array();
// Exported role: utilisateur anonyme.
$roles['utilisateur anonyme'] = array(
'name' => 'utilisateur anonyme',
'weight' => 0,
);
// Exported role: utilisateur authentifié.
$roles['utilisateur authentifié'] = array(
'name' => 'utilisateur authentifié',
'weight' => 1,
);
return $roles;
}

View File

@@ -0,0 +1,296 @@
<?php
/**
* @file
* materio_publications.features.workflow_access.inc
*/
/**
* Implements hook_workflow_access_features_default_settings().
*/
function materio_publications_workflow_access_features_default_settings() {
$workflows = array();
$workflows['Publication'] = array();
$workflows['Publication']['(creation)'] = array();
$workflows['Publication']['(creation)']['administrator'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['(creation)']['root'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['(creation)']['workflow_features_author_name'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['(creation)']['utilisateur anonyme'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['utilisateur authentifié'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Unverified'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Student'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Adhérent'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Premium'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['(creation)']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé'] = array();
$workflows['Publication']['Importé']['administrator'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Importé']['root'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Importé']['workflow_features_author_name'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Importé']['utilisateur anonyme'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['utilisateur authentifié'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Unverified'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Student'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Adhérent'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Premium'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Importé']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité'] = array();
$workflows['Publication']['Édité']['Student'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Adhérent'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Premium'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['administrator'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Édité']['root'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Édité']['workflow_features_author_name'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Édité']['utilisateur anonyme'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['utilisateur authentifié'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Unverified'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Édité']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué'] = array();
$workflows['Publication']['Masqué']['administrator'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Masqué']['root'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Masqué']['workflow_features_author_name'] = array(
'grant_view' => 1,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Masqué']['utilisateur anonyme'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['utilisateur authentifié'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Unverified'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Student'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Adhérent'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Premium'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Masqué']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié'] = array();
$workflows['Publication']['Publié']['utilisateur anonyme'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['utilisateur authentifié'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Unverified'] = array(
'grant_view' => 1,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Utilisateur'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Student'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Adhérent'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Premium'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['Contact opérationnel'] = array(
'grant_view' => 0,
'grant_update' => 0,
'grant_delete' => 0,
);
$workflows['Publication']['Publié']['administrator'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Publié']['root'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 1,
);
$workflows['Publication']['Publié']['workflow_features_author_name'] = array(
'grant_view' => 0,
'grant_update' => 1,
'grant_delete' => 1,
);
return $workflows;
}

View File

@@ -0,0 +1,30 @@
name = Materio publications
core = 7.x
package = Materio
dependencies[] = ctools
dependencies[] = features
dependencies[] = materio_subscriptions
dependencies[] = node
dependencies[] = strongarm
dependencies[] = text
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[field_instance][] = node-publication-body
features[node][] = publication
features[user_role][] = utilisateur anonyme
features[user_role][] = utilisateur authentifié
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[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

@@ -0,0 +1,7 @@
<?php
/**
* @file
* Code for the Materio publications feature.
*/
include_once 'materio_publications.features.inc';

View File

@@ -0,0 +1,58 @@
<?php
/**
* @file
* materio_publications.strongarm.inc
*/
/**
* Implements hook_strongarm().
*/
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 = 'language_content_type_publication';
$strongarm->value = '4';
$export['language_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 = 'menu_options_publication';
$strongarm->value = array();
$export['menu_options_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 = 'menu_parent_publication';
$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 = 'node_options_publication';
$strongarm->value = array(
0 => 'status',
);
$export['node_options_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 = 'node_preview_publication';
$strongarm->value = '1';
$export['node_preview_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 = 'node_submitted_publication';
$strongarm->value = 0;
$export['node_submitted_publication'] = $strongarm;
return $export;
}