CT static, admin view statics, editors_menus

This commit is contained in:
2021-04-20 12:42:29 +02:00
parent 6ab7457981
commit 5deb4ffd5b
24 changed files with 1337 additions and 43 deletions

View File

@@ -0,0 +1,7 @@
langcode: und
status: true
dependencies: { }
id: editors
label: Editors
description: 'An admin menu for content editors (must be customized for each new project)'
locked: false

View File

@@ -0,0 +1,5 @@
name: 'Editors Menus'
type: module
description: 'create editors admin menus through module as they will be exportable as config'
core_version_requirement: ^8.8 || ^9
package: 'Custom'

View File

@@ -0,0 +1,39 @@
editors_menus.programme_add:
route_name: node.add
route_parameters:
node_type: 'programme'
title: 'Add Programme'
appears_on:
- view.content.page_1
editors_menus.theme_add:
route_name: node.add
route_parameters:
node_type: 'theme'
title: 'Add Theme'
appears_on:
- view.content.page_2
editors_menus.projet_add:
route_name: node.add
route_parameters:
node_type: 'projet'
title: 'Add Projet'
appears_on:
- view.content.page_3
editors_menus.static_add:
route_name: node.add
route_parameters:
node_type: 'static'
title: 'Add Statique'
appears_on:
- view.content.page_4
editors_menus.ville_add:
route_name: entity.taxonomy_term.add_form
route_parameters:
taxonomy_vocabulary: 'villes'
title: 'Add Ville'
appears_on:
- view.admin_taxo.page_1

View File

@@ -0,0 +1,111 @@
# editors_menus.contents:
# title: Contents
# description: ''
# parent: editors
# route_name: view.admin_nodes.page_1
# menu_name: editors
# weight: 0
#
# editors_menus.materials:
# title: Materials
# description: ''
# parent: editors_menus.contents
# route_name: view.admin_nodes.page_1
# menu_name: editors
# weight: 0
#
# editors_menus.articles:
# title: Articles
# description: ''
# parent: editors_menus.contents
# route_name: view.admin_nodes.page_2
# menu_name: editors
# weight: 2
#
# editors_menus.thesaurus:
# title: Thesaurus
# description: ''
# parent: editors_menus.contents
# route_name: view.admin_taxo.page_3
# menu_name: editors
# weight: 3
#
# editors_menus.tags:
# title: Tags
# description: ''
# parent: editors_menus.contents
# route_name: view.admin_taxo.page_4
# menu_name: editors
# weight: 4
#
# editors_menus.assisted_research:
# title: Assisted Research
# description: ''
# parent: editors_menus.contents
# route_name: view.admin_taxo.page_5
# menu_name: editors
# weight: 5
#
# editors_menus.companies:
# title: Companies
# description: ''
# parent: editors_menus.contents
# route_name: view.admin_taxo.page_1
# menu_name: editors
# weight: 6
#
# editors_menus.showrooms:
# title: Showrooms
# description: ''
# parent: editors_menus.contents
# route_name: view.admin_taxo.page_2
# menu_name: editors
# weight: 7
#
# editors_menus.newsletters:
# title: Newsletters
# description: ''
# parent: editors_menus.contents
# route_name: view.simplenews_newsletters.page_1
# menu_name: editors
# weight: 8
#
# editors_menus.users:
# title: Users
# description: ''
# parent: editors
# route_name: view.admin_users.page_1
# menu_name: editors
# weight: 1
#
# editors_menus.subscribers:
# title: Simplenews Subscribers
# description: ''
# parent: editors_menus.users
# route_name: view.simplenews_subscribers.page_1
# menu_name: editors
# weight: 2
#
# editors_menus.commerce:
# title: Commerce
# description: ''
# parent: editors
# route_name: entity.commerce_order.collection
# menu_name: editors
# weight: 2
#
# editors_menus.commerce_orders:
# title: Orders
# description: ''
# parent: editors_menus.commerce
# route_name: entity.commerce_order.collection
# menu_name: editors
# weight: 0
#
# editors_menus.commerce_license:
# title: Licenses
# description: ''
# parent: editors_menus.commerce
# route_name: entity.commerce_license.collection
# menu_name: editors
# weight: 1

View File

@@ -0,0 +1,24 @@
<?php
/**
* @file
* Contains editors_menus.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function editors_menus_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the editors_menus module.
case 'help.page.editors_menus':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('create editors admin menus through module as they will be exportable as config') . '</p>';
return $output;
default:
}
}