diff --git a/sites/all/modules/features/materio_home_v2/materio_home_v2.features.inc b/sites/all/modules/features/materio_home_v2/materio_home_v2.features.inc new file mode 100644 index 00000000..b0cafbdd --- /dev/null +++ b/sites/all/modules/features/materio_home_v2/materio_home_v2.features.inc @@ -0,0 +1,24 @@ + "1"); + } + if ($module == "panels_mini" && $api == "panels_default") { + return array("version" => "1"); + } +} + +/** + * Implements hook_views_api(). + */ +function materio_home_v2_views_api($module = NULL, $api = NULL) { + return array("api" => "3.0"); +} diff --git a/sites/all/modules/features/materio_home_v2/materio_home_v2.features.menu_custom.inc b/sites/all/modules/features/materio_home_v2/materio_home_v2.features.menu_custom.inc new file mode 100644 index 00000000..5ae893c2 --- /dev/null +++ b/sites/all/modules/features/materio_home_v2/materio_home_v2.features.menu_custom.inc @@ -0,0 +1,27 @@ + 'menu-home-v2', + 'title' => 'Menu home v2', + 'description' => '', + 'language' => 'und', + 'i18n_mode' => 5, + ); + // Translatables + // Included for use with string extractors like potx. + t('Menu home v2'); + + + return $menus; +} diff --git a/sites/all/modules/features/materio_home_v2/materio_home_v2.info b/sites/all/modules/features/materio_home_v2/materio_home_v2.info new file mode 100644 index 00000000..2cf873fe --- /dev/null +++ b/sites/all/modules/features/materio_home_v2/materio_home_v2.info @@ -0,0 +1,22 @@ +name = Materio home v2 +core = 7.x +package = Materio +dependencies[] = ctools +dependencies[] = entity +dependencies[] = features +dependencies[] = menu +dependencies[] = page_manager +dependencies[] = panels +dependencies[] = panels_mini +dependencies[] = panels_node +dependencies[] = views +dependencies[] = views_content +features[ctools][] = page_manager:pages_default:1 +features[ctools][] = panels_mini:panels_default:1 +features[ctools][] = views:views_default:3.0 +features[features_api][] = api:2 +features[menu_custom][] = menu-home-v2 +features[page_manager_pages][] = home_v2 +features[panels_mini][] = news_home_v2 +features[views_view][] = news_home_v2 +project path = sites/all/modules/features diff --git a/sites/all/modules/features/materio_home_v2/materio_home_v2.module b/sites/all/modules/features/materio_home_v2/materio_home_v2.module new file mode 100644 index 00000000..744e43b7 --- /dev/null +++ b/sites/all/modules/features/materio_home_v2/materio_home_v2.module @@ -0,0 +1,7 @@ +disabled = FALSE; /* Edit this to true to make a default page disabled initially */ + $page->api_version = 1; + $page->name = 'home_v2'; + $page->task = 'page'; + $page->admin_title = 'Home V2'; + $page->admin_description = ''; + $page->path = 'home'; + $page->access = array( + 'plugins' => array( + 0 => array( + 'name' => 'role', + 'settings' => array( + 'rids' => array( + 0 => 3, + 1 => 4, + ), + ), + 'context' => 'logged-in-user', + 'not' => FALSE, + ), + ), + 'logic' => 'and', + ); + $page->menu = array(); + $page->arguments = array(); + $page->conf = array( + 'admin_paths' => FALSE, + ); + $page->default_handlers = array(); + $handler = new stdClass(); + $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */ + $handler->api_version = 1; + $handler->name = 'page_home_v2__panel_context_2bd92edc-8b2b-42d3-9857-f44f03574847'; + $handler->task = 'page'; + $handler->subtask = 'home_v2'; + $handler->handler = 'panel_context'; + $handler->weight = 0; + $handler->conf = array( + 'title' => 'Panneau', + 'no_blocks' => 0, + 'pipeline' => 'standard', + 'body_classes_to_remove' => '', + 'body_classes_to_add' => '', + 'css_id' => 'homev2', + 'css' => '', + 'contexts' => array(), + 'relationships' => array(), + ); + $display = new panels_display(); + $display->layout = 'onecol'; + $display->layout_settings = array(); + $display->panel_settings = array( + 'style_settings' => array( + 'default' => NULL, + 'middle' => NULL, + ), + ); + $display->cache = array(); + $display->title = ''; + $display->uuid = 'eca54323-0377-4ab0-b40c-69b96c16707a'; + $display->content = array(); + $display->panels = array(); + $pane = new stdClass(); + $pane->pid = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35'; + $pane->panel = 'middle'; + $pane->type = 'block'; + $pane->subtype = 'menu-menu-home-v2'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'override_title' => 1, + 'override_title_text' => '', + 'override_title_heading' => 'h3', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = '78b5df28-c9fd-4904-8910-aa1b96c60e35'; + $display->content['new-78b5df28-c9fd-4904-8910-aa1b96c60e35'] = $pane; + $display->panels['middle'][0] = 'new-78b5df28-c9fd-4904-8910-aa1b96c60e35'; + $pane = new stdClass(); + $pane->pid = 'new-bb3c68ac-685c-4b2b-9725-a3bceb1bca0e'; + $pane->panel = 'middle'; + $pane->type = 'node'; + $pane->subtype = 'node'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'nid' => '12993', + 'links' => 1, + 'leave_node_title' => 0, + 'identifier' => 'showroom', + 'build_mode' => 'teaser', + 'link_node_title' => 1, + 'override_title' => 0, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 1; + $pane->locks = array(); + $pane->uuid = 'bb3c68ac-685c-4b2b-9725-a3bceb1bca0e'; + $display->content['new-bb3c68ac-685c-4b2b-9725-a3bceb1bca0e'] = $pane; + $display->panels['middle'][1] = 'new-bb3c68ac-685c-4b2b-9725-a3bceb1bca0e'; + $pane = new stdClass(); + $pane->pid = 'new-ce815ec9-1417-496b-8bb3-20ba21a41885'; + $pane->panel = 'middle'; + $pane->type = 'node'; + $pane->subtype = 'node'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'nid' => '12994', + 'links' => 1, + 'leave_node_title' => 0, + 'identifier' => 'bdd', + 'build_mode' => 'teaser', + 'link_node_title' => 1, + 'override_title' => 0, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 2; + $pane->locks = array(); + $pane->uuid = 'ce815ec9-1417-496b-8bb3-20ba21a41885'; + $display->content['new-ce815ec9-1417-496b-8bb3-20ba21a41885'] = $pane; + $display->panels['middle'][2] = 'new-ce815ec9-1417-496b-8bb3-20ba21a41885'; + $pane = new stdClass(); + $pane->pid = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234'; + $pane->panel = 'middle'; + $pane->type = 'panels_mini'; + $pane->subtype = 'news_home_v2'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'override_title' => 0, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 3; + $pane->locks = array(); + $pane->uuid = '3b6cc0fd-a06a-403a-841e-404ea57fe234'; + $display->content['new-3b6cc0fd-a06a-403a-841e-404ea57fe234'] = $pane; + $display->panels['middle'][3] = 'new-3b6cc0fd-a06a-403a-841e-404ea57fe234'; + $pane = new stdClass(); + $pane->pid = 'new-aadd5c97-469b-4d53-9419-98e28abdacec'; + $pane->panel = 'middle'; + $pane->type = 'node'; + $pane->subtype = 'node'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'nid' => '12995', + 'links' => 1, + 'leave_node_title' => 0, + 'identifier' => 'formations', + 'build_mode' => 'teaser', + 'link_node_title' => 1, + 'override_title' => 0, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 4; + $pane->locks = array(); + $pane->uuid = 'aadd5c97-469b-4d53-9419-98e28abdacec'; + $display->content['new-aadd5c97-469b-4d53-9419-98e28abdacec'] = $pane; + $display->panels['middle'][4] = 'new-aadd5c97-469b-4d53-9419-98e28abdacec'; + $pane = new stdClass(); + $pane->pid = 'new-93261157-ef9d-4480-b6b7-3e504d24cdba'; + $pane->panel = 'middle'; + $pane->type = 'node'; + $pane->subtype = 'node'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'nid' => '12996', + 'links' => 1, + 'leave_node_title' => 0, + 'identifier' => 'services', + 'build_mode' => 'teaser', + 'link_node_title' => 1, + 'override_title' => 0, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 5; + $pane->locks = array(); + $pane->uuid = '93261157-ef9d-4480-b6b7-3e504d24cdba'; + $display->content['new-93261157-ef9d-4480-b6b7-3e504d24cdba'] = $pane; + $display->panels['middle'][5] = 'new-93261157-ef9d-4480-b6b7-3e504d24cdba'; + $display->hide_title = PANELS_TITLE_NONE; + $display->title_pane = '0'; + $handler->conf['display'] = $display; + $page->default_handlers[$handler->name] = $handler; + $pages['home_v2'] = $page; + + return $pages; + +} diff --git a/sites/all/modules/features/materio_home_v2/materio_home_v2.panels_default.inc b/sites/all/modules/features/materio_home_v2/materio_home_v2.panels_default.inc new file mode 100644 index 00000000..6d6f0460 --- /dev/null +++ b/sites/all/modules/features/materio_home_v2/materio_home_v2.panels_default.inc @@ -0,0 +1,107 @@ +disabled = FALSE; /* Edit this to true to make a default mini disabled initially */ + $mini->api_version = 1; + $mini->name = 'news_home_v2'; + $mini->category = 'home v2'; + $mini->admin_title = 'News home v2'; + $mini->admin_description = ''; + $mini->requiredcontexts = array(); + $mini->contexts = array(); + $mini->relationships = array(); + $display = new panels_display(); + $display->layout = 'twocol_stacked'; + $display->layout_settings = array(); + $display->panel_settings = array( + 'style_settings' => array( + 'default' => NULL, + 'top' => NULL, + 'left' => NULL, + 'right' => NULL, + 'bottom' => NULL, + ), + ); + $display->cache = array(); + $display->title = ''; + $display->uuid = '4907c432-fcb2-4512-aa6a-5d96ec209978'; + $display->content = array(); + $display->panels = array(); + $pane = new stdClass(); + $pane->pid = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281'; + $pane->panel = 'bottom'; + $pane->type = 'block'; + $pane->subtype = 'simplenews-6274'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array( + 'override_title' => 0, + 'override_title_text' => '', + 'override_title_heading' => 'h2', + ); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = '9cd76d41-bb30-42d9-9209-cdf495d97281'; + $display->content['new-9cd76d41-bb30-42d9-9209-cdf495d97281'] = $pane; + $display->panels['bottom'][0] = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281'; + $pane = new stdClass(); + $pane->pid = 'new-04d42fc5-b2de-441b-aaff-3becac366c74'; + $pane->panel = 'left'; + $pane->type = 'views_panes'; + $pane->subtype = 'news_home_v2-panel_pane_1'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array(); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = '04d42fc5-b2de-441b-aaff-3becac366c74'; + $display->content['new-04d42fc5-b2de-441b-aaff-3becac366c74'] = $pane; + $display->panels['left'][0] = 'new-04d42fc5-b2de-441b-aaff-3becac366c74'; + $pane = new stdClass(); + $pane->pid = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2'; + $pane->panel = 'right'; + $pane->type = 'views_panes'; + $pane->subtype = 'news_home_v2-panel_pane_2'; + $pane->shown = TRUE; + $pane->access = array(); + $pane->configuration = array(); + $pane->cache = array(); + $pane->style = array( + 'settings' => NULL, + ); + $pane->css = array(); + $pane->extras = array(); + $pane->position = 0; + $pane->locks = array(); + $pane->uuid = '04d7e982-b05e-4bcd-a24a-8d80b8a4bee2'; + $display->content['new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2'] = $pane; + $display->panels['right'][0] = 'new-04d7e982-b05e-4bcd-a24a-8d80b8a4bee2'; + $display->hide_title = PANELS_TITLE_FIXED; + $display->title_pane = 'new-9cd76d41-bb30-42d9-9209-cdf495d97281'; + $mini->display = $display; + $export['news_home_v2'] = $mini; + + return $export; +} 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 new file mode 100644 index 00000000..5a112c02 --- /dev/null +++ b/sites/all/modules/features/materio_home_v2/materio_home_v2.views_default.inc @@ -0,0 +1,147 @@ +name = 'news_home_v2'; + $view->description = ''; + $view->tag = 'default'; + $view->base_table = 'node'; + $view->human_name = 'news home v2'; + $view->core = 7; + $view->api_version = '3.0'; + $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ + + /* Display: Master */ + $handler = $view->new_display('default', 'Master', 'default'); + $handler->display->display_options['title'] = 'News'; + $handler->display->display_options['use_more_always'] = FALSE; + $handler->display->display_options['use_more_text'] = 'plus'; + $handler->display->display_options['access']['type'] = 'perm'; + $handler->display->display_options['cache']['type'] = 'none'; + $handler->display->display_options['query']['type'] = 'views_query'; + $handler->display->display_options['exposed_form']['type'] = 'basic'; + $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Appliquer'; + $handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Réinitialiser'; + $handler->display->display_options['exposed_form']['options']['exposed_sorts_label'] = 'Trier par'; + $handler->display->display_options['pager']['type'] = 'some'; + $handler->display->display_options['pager']['options']['items_per_page'] = '6'; + $handler->display->display_options['pager']['options']['offset'] = '0'; + $handler->display->display_options['style_plugin'] = 'default'; + $handler->display->display_options['row_plugin'] = 'entity'; + $handler->display->display_options['row_options']['view_mode'] = 'cardmedium'; + /* Champ: Contenu : Titre */ + $handler->display->display_options['fields']['title']['id'] = 'title'; + $handler->display->display_options['fields']['title']['table'] = 'node'; + $handler->display->display_options['fields']['title']['field'] = 'title'; + $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 : Date de publication */ + $handler->display->display_options['sorts']['created']['id'] = 'created'; + $handler->display->display_options['sorts']['created']['table'] = 'node'; + $handler->display->display_options['sorts']['created']['field'] = 'created'; + $handler->display->display_options['sorts']['created']['order'] = 'DESC'; + /* Critère de filtrage: Contenu : Publié */ + $handler->display->display_options['filters']['status']['id'] = 'status'; + $handler->display->display_options['filters']['status']['table'] = 'node'; + $handler->display->display_options['filters']['status']['field'] = 'status'; + $handler->display->display_options['filters']['status']['value'] = 1; + $handler->display->display_options['filters']['status']['group'] = 1; + $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE; + /* Critère de filtrage: Contenu : Type */ + $handler->display->display_options['filters']['type']['id'] = 'type'; + $handler->display->display_options['filters']['type']['table'] = 'node'; + $handler->display->display_options['filters']['type']['field'] = 'type'; + $handler->display->display_options['filters']['type']['value'] = array( + 'breve' => 'breve', + ); + /* Critère de filtrage: Processus : État actuel */ + $handler->display->display_options['filters']['sid']['id'] = 'sid'; + $handler->display->display_options['filters']['sid']['table'] = 'workflow_node'; + $handler->display->display_options['filters']['sid']['field'] = 'sid'; + $handler->display->display_options['filters']['sid']['value'] = array( + 3 => '3', + ); + + /* Display: News */ + $handler = $view->new_display('panel_pane', 'News', 'panel_pane_1'); + $handler->display->display_options['pane_category']['name'] = 'Volets de vue'; + + /* Display: daily */ + $handler = $view->new_display('panel_pane', 'daily', 'panel_pane_2'); + $handler->display->display_options['defaults']['pager'] = FALSE; + $handler->display->display_options['pager']['type'] = 'some'; + $handler->display->display_options['pager']['options']['items_per_page'] = '1'; + $handler->display->display_options['pager']['options']['offset'] = '0'; + $handler->display->display_options['defaults']['style_plugin'] = FALSE; + $handler->display->display_options['style_plugin'] = 'default'; + $handler->display->display_options['defaults']['style_options'] = FALSE; + $handler->display->display_options['defaults']['row_plugin'] = FALSE; + $handler->display->display_options['row_plugin'] = 'entity'; + $handler->display->display_options['row_options']['view_mode'] = 'teaser'; + $handler->display->display_options['defaults']['row_options'] = FALSE; + $handler->display->display_options['defaults']['filter_groups'] = FALSE; + $handler->display->display_options['defaults']['filters'] = FALSE; + /* Critère de filtrage: Contenu : Publié */ + $handler->display->display_options['filters']['status']['id'] = 'status'; + $handler->display->display_options['filters']['status']['table'] = 'node'; + $handler->display->display_options['filters']['status']['field'] = 'status'; + $handler->display->display_options['filters']['status']['value'] = 1; + $handler->display->display_options['filters']['status']['group'] = 1; + $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE; + /* Critère de filtrage: Contenu : Type */ + $handler->display->display_options['filters']['type']['id'] = 'type'; + $handler->display->display_options['filters']['type']['table'] = 'node'; + $handler->display->display_options['filters']['type']['field'] = 'type'; + $handler->display->display_options['filters']['type']['value'] = array( + 'simplenews' => 'simplenews', + ); + /* Critère de filtrage: Processus : État actuel */ + $handler->display->display_options['filters']['sid']['id'] = 'sid'; + $handler->display->display_options['filters']['sid']['table'] = 'workflow_node'; + $handler->display->display_options['filters']['sid']['field'] = 'sid'; + $handler->display->display_options['filters']['sid']['value'] = array( + 3 => '3', + ); + /* Critère de filtrage: Contenu : Newsletter category (field_simplenews_term) */ + $handler->display->display_options['filters']['field_simplenews_term_tid']['id'] = 'field_simplenews_term_tid'; + $handler->display->display_options['filters']['field_simplenews_term_tid']['table'] = 'field_data_field_simplenews_term'; + $handler->display->display_options['filters']['field_simplenews_term_tid']['field'] = 'field_simplenews_term_tid'; + $handler->display->display_options['filters']['field_simplenews_term_tid']['value'] = array( + 6374 => '6374', + ); + $handler->display->display_options['filters']['field_simplenews_term_tid']['type'] = 'select'; + $handler->display->display_options['filters']['field_simplenews_term_tid']['vocabulary'] = 'newsletter'; + /* Critère de filtrage: Parution de lettre d'information : État des envois */ + $handler->display->display_options['filters']['status_1']['id'] = 'status_1'; + $handler->display->display_options['filters']['status_1']['table'] = 'simplenews_newsletter'; + $handler->display->display_options['filters']['status_1']['field'] = 'status'; + $handler->display->display_options['filters']['status_1']['value'] = array( + 2 => '2', + ); + $handler->display->display_options['pane_category']['name'] = 'Volets de vue'; + $translatables['news_home_v2'] = array( + t('Master'), + t('News'), + t('plus'), + t('Appliquer'), + t('Réinitialiser'), + t('Trier par'), + t('Asc'), + t('Desc'), + t('Volets de vue'), + t('daily'), + ); + $export['news_home_v2'] = $view; + + return $export; +}