added file insert to pages

This commit is contained in:
Bachir Soussi Chiadmi
2015-05-12 14:10:32 +02:00
parent 2107500725
commit 35f89218fe
18 changed files with 1528 additions and 1 deletions
@@ -42,5 +42,39 @@ function page_field_default_field_bases() {
'type' => 'text_with_summary',
);
// Exported field_base: 'field_fichiers'
$field_bases['field_fichiers'] = array(
'active' => 1,
'cardinality' => -1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_fichiers',
'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' => 'file',
'settings' => array(
'display_default' => 0,
'display_field' => 0,
'uri_scheme' => 'public',
),
'translatable' => 0,
'type' => 'file',
);
return $field_bases;
}
@@ -60,9 +60,72 @@ function page_field_default_field_instances() {
),
);
// Exported field_instance: 'node-page-field_fichiers'
$field_instances['node-page-field_fichiers'] = array(
'bundle' => 'page',
'deleted' => 0,
'description' => '',
'display' => array(
'chapter' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'default' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 1,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_fichiers',
'label' => 'Fichiers',
'required' => 0,
'settings' => array(
'description_field' => 0,
'file_directory' => 'fichiers_joinds',
'file_extensions' => 'txt pdf doc docx csv epub',
'max_filesize' => '',
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'file',
'settings' => array(
'insert' => 1,
'insert_absolute' => 0,
'insert_class' => '',
'insert_default' => 'icon_link',
'insert_styles' => array(
'auto' => 0,
'icon_link' => 'icon_link',
'image' => 0,
'image_large' => 0,
'image_linkit_thumb' => 0,
'image_medium' => 0,
'image_thumbnail' => 0,
'link' => 0,
),
'insert_width' => '',
'progress_indicator' => 'throbber',
),
'type' => 'file_generic',
'weight' => 100,
),
);
// Translatables
// Included for use with string extractors like potx.
t('Body');
t('Fichiers');
return $field_instances;
}
@@ -4,13 +4,17 @@ core = 7.x
package = Gui
dependencies[] = ctools
dependencies[] = features
dependencies[] = file
dependencies[] = insert
dependencies[] = node
dependencies[] = strongarm
dependencies[] = text
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[field_base][] = body
features[field_base][] = field_fichiers
features[field_instance][] = node-page-body
features[field_instance][] = node-page-field_fichiers
features[node][] = page
features[user_permission][] = create page content
features[user_permission][] = delete any page content
@@ -33,7 +33,20 @@ function page_strongarm() {
),
),
'extra_fields' => array(
'form' => array(),
'form' => array(
'title' => array(
'weight' => '-5',
),
'path' => array(
'weight' => '30',
),
'redirect' => array(
'weight' => '30',
),
'workflow' => array(
'weight' => '99',
),
),
'display' => array(
'workflow_current_state' => array(
'default' => array(