Skip to content
Snippets Groups Projects
Unverified Commit 4235df95 authored by briancanini's avatar briancanini Committed by GitHub
Browse files

Merge pull request #46 from ASCWebServices/update_admin_toolbar

Update 'admin_toolbar' module to the latest version
parents 7854c313 d304b0b4
No related branches found
No related tags found
No related merge requests found
Showing
with 369 additions and 188 deletions
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "8f8055782dc9f901b7cfe9b2a7c0ba22",
"content-hash": "44a4caf7dab80aa7a8dc0bbbbb7da3db",
"packages": [
{
"name": "alchemy/zippy",
......@@ -1381,17 +1381,17 @@
},
{
"name": "drupal/admin_toolbar",
"version": "1.23.0",
"version": "1.24.0",
"source": {
"type": "git",
"url": "https://git.drupal.org/project/admin_toolbar",
"reference": "8.x-1.23"
"reference": "8.x-1.24"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/admin_toolbar-8.x-1.23.zip",
"reference": "8.x-1.23",
"shasum": "46d7ed18a9154c35e765ae43ce43aa292c025d65"
"url": "https://ftp.drupal.org/files/projects/admin_toolbar-8.x-1.24.zip",
"reference": "8.x-1.24",
"shasum": "682ffa443a1e339583022eb6adbb00c1103ea6d4"
},
"require": {
"drupal/core": "*"
......@@ -1402,8 +1402,8 @@
"dev-1.x": "1.x-dev"
},
"drupal": {
"version": "8.x-1.23",
"datestamp": "1527522480",
"version": "8.x-1.24",
"datestamp": "1527523080",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
......@@ -1416,20 +1416,25 @@
],
"authors": [
{
"name": "Mohamed Anis Taktak",
"homepage": "https://www.drupal.org/u/matio89"
"name": "Wilfrid Roze (eme)",
"homepage": "https://www.drupal.org/u/eme",
"role": "Maintainer"
},
{
"name": "adriancid",
"homepage": "https://www.drupal.org/user/1962106"
"name": "Romain Jarraud (romainj)",
"homepage": "https://www.drupal.org/u/romainj",
"role": "Maintainer"
},
{
"name": "bolbol",
"homepage": "https://www.drupal.org/user/3400070"
"name": "Adrian Cid Almaguer (adriancid)",
"homepage": "https://www.drupal.org/u/adriancid",
"email": "adriancid@gmail.com",
"role": "Maintainer"
},
{
"name": "eme",
"homepage": "https://www.drupal.org/user/542492"
"name": "Mohamed Anis Taktak (matio89)",
"homepage": "https://www.drupal.org/u/matio89",
"role": "Maintainer"
},
{
"name": "fethi.krout",
......@@ -1444,8 +1449,12 @@
"homepage": "https://www.drupal.org/user/370706"
}
],
"description": "Admin Toolbar improve the default Drupal Toolbar, it lets the hover of sub menus.",
"description": "Provides a drop-down menu interface to the core Drupal Toolbar.",
"homepage": "http://drupal.org/project/admin_toolbar",
"keywords": [
"Drupal",
"Toolbar"
],
"support": {
"source": "http://cgit.drupalcode.org/admin_toolbar",
"issues": "https://www.drupal.org/project/issues/admin_toolbar"
......
......@@ -1426,18 +1426,18 @@
},
{
"name": "drupal/admin_toolbar",
"version": "1.23.0",
"version_normalized": "1.23.0.0",
"version": "1.24.0",
"version_normalized": "1.24.0.0",
"source": {
"type": "git",
"url": "https://git.drupal.org/project/admin_toolbar",
"reference": "8.x-1.23"
"reference": "8.x-1.24"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/admin_toolbar-8.x-1.23.zip",
"reference": "8.x-1.23",
"shasum": "46d7ed18a9154c35e765ae43ce43aa292c025d65"
"url": "https://ftp.drupal.org/files/projects/admin_toolbar-8.x-1.24.zip",
"reference": "8.x-1.24",
"shasum": "682ffa443a1e339583022eb6adbb00c1103ea6d4"
},
"require": {
"drupal/core": "*"
......@@ -1448,8 +1448,8 @@
"dev-1.x": "1.x-dev"
},
"drupal": {
"version": "8.x-1.23",
"datestamp": "1527522480",
"version": "8.x-1.24",
"datestamp": "1527523080",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
......@@ -1463,20 +1463,25 @@
],
"authors": [
{
"name": "Mohamed Anis Taktak",
"homepage": "https://www.drupal.org/u/matio89"
"name": "Wilfrid Roze (eme)",
"homepage": "https://www.drupal.org/u/eme",
"role": "Maintainer"
},
{
"name": "adriancid",
"homepage": "https://www.drupal.org/user/1962106"
"name": "Romain Jarraud (romainj)",
"homepage": "https://www.drupal.org/u/romainj",
"role": "Maintainer"
},
{
"name": "bolbol",
"homepage": "https://www.drupal.org/user/3400070"
"name": "Adrian Cid Almaguer (adriancid)",
"homepage": "https://www.drupal.org/u/adriancid",
"email": "adriancid@gmail.com",
"role": "Maintainer"
},
{
"name": "eme",
"homepage": "https://www.drupal.org/user/542492"
"name": "Mohamed Anis Taktak (matio89)",
"homepage": "https://www.drupal.org/u/matio89",
"role": "Maintainer"
},
{
"name": "fethi.krout",
......@@ -1491,8 +1496,12 @@
"homepage": "https://www.drupal.org/user/370706"
}
],
"description": "Admin Toolbar improve the default Drupal Toolbar, it lets the hover of sub menus.",
"description": "Provides a drop-down menu interface to the core Drupal Toolbar.",
"homepage": "http://drupal.org/project/admin_toolbar",
"keywords": [
"Drupal",
"Toolbar"
],
"support": {
"source": "http://cgit.drupalcode.org/admin_toolbar",
"issues": "https://www.drupal.org/project/issues/admin_toolbar"
......
Admin Toolbar 8.1.23, 2018-02-06
--------------------------------
Changes since 8.1.22:
Admin Toolbar 8.x-1.24, 2018-05-28
----------------------------------
Changes since 8.x-1.23:
- #2973131 by adriancid: Don't refer to Drupal in the help page.
- #2975170 by adriancid: Add composer.json file to submodules.
- #2975165 by Gamewalker, adriancid: datetime.time services is not found in
ToolbarController.
- #2971466 by recrit, adriancid, acbramley: Add media links incorrectly set to
"node.add.".
- #2972553 by dww, adriancid: Add static cache to speed up
admin_toolbar_links_access_filter_user_has_admin_role().
- #2971435 by adriancid: Module help page for Admin Toolbar Extra Tools module
doesn't show the links.
- #2971398 by adriancid: Add the docblock to the ToolbarController constructor.
- #2969686 by adriancid, Vidushi Mehta: Add a menu link to clean the twig cache.
- #2969325 by adriancid: Fix the module version in the CHANGELOG.txt.
- #2961450 by adriancid: Convert the AdminToolbarAlterTest test class to
PHPUnit.
- #2961445 by adriancid: Convert the AdminToolbarToolsAlterTest test class to
PHPUnit.
- #2959684 by adriancid: Remove recommended modules section from README.txt.
- #2959647 by adriancid: Use interfaces instead of classes to inject
dependencies.
- #2952643 by romainj, if-jds, adriancid: Add Item for Files under Content Menu.
- #2944463 by adriancid: Update the composer.json file.
Admin Toolbar 8.x-1.23, 2018-02-06
----------------------------------
Changes since 8.x-1.22:
- #2924266 by sunlix, romainj, adriancid, samerali: Add a menu link for the
media module.
......@@ -19,9 +46,9 @@ Changes since 8.1.22:
core/drupal library.
- #2931503 by K3vin_nl: Admin toolbar generates invalid class names.
Admin Toolbar 8.1.22, 2018-01-02
--------------------------------
Changes since 8.1.21:
Admin Toolbar 8.x-1.22, 2018-01-02
----------------------------------
Changes since 8.x-1.21:
- #2929053 by kkuhnen, eme, adriancid: admin_toolbar.js should use Drupal
behaviors.
......@@ -42,9 +69,9 @@ Changes since 8.1.21:
- #2925128 by adriancid: Create the module help page for the Admin Toolbar Links
Access Filter submodule.
Admin Toolbar 8.1.21, 2017-11-20
--------------------------------
Changes since 8.1.20:
Admin Toolbar 8.x-1.21, 2017-11-20
----------------------------------
Changes since 8.x-1.20:
- #2923580 by sylus, adriancid: Unsupported operand types in
ToolbarHandler::lazyBuilder().
......@@ -87,9 +114,9 @@ Changes since 8.1.20:
- #2909003 by eme: fix z-index for CKEditor.
- #2504449 by robin.ingelbrecht, rwam, eme: Un-hover delay.
Admin Toolbar 8.1.20, 2017-09-07
--------------------------------
Changes since 8.1.19:
Admin Toolbar 8.x-1.20, 2017-09-07
----------------------------------
Changes since 8.x-1.19:
- #2887439 by romainj: Fix test.
- #2759135 by Johnny vd Laar, miiimooo, chegor, romainj: Content type,
......@@ -106,9 +133,9 @@ Changes since 8.1.19:
- #2870404 by romainj: Add a link to the Webprofiler settings page.
- #2706643 by esod, romainj, Keenegan, DamienMcKenna: Use short array syntax.
Admin Toolbar 8.1.19, 2017-04-06
--------------------------------
Changes since 8.1.18:
Admin Toolbar 8.x-1.19, 2017-04-06
----------------------------------
Changes since 8.x-1.18:
- #2706643 by esod, romainj, Keenegan, DamienMcKenna: Use short array syntax.
- #2781745 by minakshiPh, eelkeblok, romainj, akhilavnair_zyxware: Drupal coding
......@@ -117,9 +144,9 @@ Changes since 8.1.18:
- #2841512 by Chi, romainj: User error: Redirects to external URLs are not
allowed by default.
Admin Toolbar 8.1.18, 2016-12-01
--------------------------------
Changes since 8.1.17:
Admin Toolbar 8.x-1.18, 2016-12-01
----------------------------------
Changes since 8.x-1.17:
- #2830677 by vaplas, romainj: z-index for sub menu.
- by romainj: Get rid of the Hello popup.
......@@ -130,9 +157,9 @@ Changes since 8.1.17:
- #2518202 by james.williams, chegor, eme, romainj, DuneBL: Change default link
to taxonomy.
Admin Toolbar 8.1.17, 2016-08-19
--------------------------------
Changes since 8.1.16:
Admin Toolbar 8.x-1.17, 2016-08-19
----------------------------------
Changes since 8.x-1.16:
- #2779251 by romainj, DuneBL: Wrong integration of field_collection delete
form.
......@@ -150,9 +177,9 @@ Changes since 8.1.16:
- #2707747 by Balu Ertl, nevergone, eme, esod: D8 logo not rendered with smooth
antialiasing.
Admin Toolbar 8.1.16, 2016-07-28
--------------------------------
Changes since 8.1.15:
Admin Toolbar 8.x-1.16, 2016-07-28
----------------------------------
Changes since 8.x-1.15:
- #2723209 by andrewmacpherson, colan, mattshoaf: Enabling admin_toolbar_tools
causes Devel Settings to disappear from the main configuration page.
......@@ -185,9 +212,9 @@ Changes since 8.1.15:
- by romainj: Fixes issue #2731663 by canceling the move of the Logout menu
link.
Admin Toolbar 8.1.15, 2016-05-23
--------------------------------
Changes since 8.1.14:
Admin Toolbar 8.x-1.15, 2016-05-23
----------------------------------
Changes since 8.x-1.14:
- by matio89: add RTL in admin.toolbar.css.
- by romainj: Changes Devel menu item titles.
......@@ -208,9 +235,9 @@ Changes since 8.1.14:
- by eme: fix issue #2658896 and refactor and fix chevron-right.svg.
- by eme: fix Issue #2493037.
Admin Toolbar 8.1.14, 2016-02-08
--------------------------------
Changes since 8.1.13:
Admin Toolbar 8.x-1.14, 2016-02-08
----------------------------------
Changes since 8.x-1.13:
- by matio89: Correction differents bugs(problem white page when installing a
new module).
......@@ -218,17 +245,17 @@ Changes since 8.1.13:
- by matio89: resolving the dependecies problem(dependencies of others modules).
- by matio89: Correction route of entities.
Admin Toolbar 8.1.13, 2016-02-02
--------------------------------
Changes since 8.1.12:
Admin Toolbar 8.x-1.13, 2016-02-02
----------------------------------
Changes since 8.x-1.12:
- by matio89: Admin toolbar is compatible with 8.0.2.
- by matio89: Commmit dev version compatible with drupal 8.0.2.
- by matio89: New version of admin toolbar compatible with 8.0.2.
Admin Toolbar 8.1.12, 2016-01-15
--------------------------------
Changes since 8.1.11:
Admin Toolbar 8.x-1.12, 2016-01-15
----------------------------------
Changes since 8.x-1.11:
- by matio89: Correction AdminToolbaToolsAlterTest.
- #2493037 by mimran: Empty elements in #toolbar-bar.
......@@ -236,9 +263,9 @@ Changes since 8.1.11:
- #2635154 by Lukas von Blarer: Too general CSS selectors.
- by eme: Fix chevron right in local state.
Admin Toolbar 8.1.11, 2015-12-11
--------------------------------
Changes since 8.1.10:
Admin Toolbar 8.x-1.11, 2015-12-11
----------------------------------
Changes since 8.x-1.10:
- #2620430 by Vagelis, NarendraR: Typo.
- #2632888 by JamesK: Add dependency on node module.
......@@ -255,46 +282,46 @@ Changes since 8.1.10:
login link.
- by matio89: Correction the login link on the site when in a logged-out state.
Admin Toolbar 8.1.10, 2015-08-07
--------------------------------
Changes since 8.1.9:
Admin Toolbar 8.x-1.10, 2015-08-07
----------------------------------
Changes since 8.x-1.9:
- #2546939 by jonhattan: Add dependency on toolbar module.
Admin Toolbar 8.1.9, 2015-07-22
-------------------------------
Changes since 8.1.8:
Admin Toolbar 8.x-1.9, 2015-07-22
---------------------------------
Changes since 8.x-1.8:
- #2537016 by matio89: Removing dependance for user & system.
- #2533420 by Dave Reid, twistor: Chase HEAD changes in toolbar.
- #2537016 by twistor: Rewrite admin_toolbar_tools.module
- by matio89: Correction all bugs and add new security features.
Admin Toolbar 8.1.8, 2015-06-22
-------------------------------
Changes since 8.1.7:
Admin Toolbar 8.x-1.8, 2015-06-22
---------------------------------
Changes since 8.x-1.7:
- correction not found route.
- #2493037 by bobrov1989: Empty elements in #toolbar-bar.
- by fethi: icones.
Admin Toolbar 8.1.7, 2015-06-22
-------------------------------
Changes since 8.1.6:
Admin Toolbar 8.x-1.7, 2015-06-22
---------------------------------
Changes since 8.x-1.6:
- correction not found route.
- #2493037 by bobrov1989: Empty elements in #toolbar-bar.
- by fethi: icones.
Admin Toolbar 8.1.6, 2015-06-03
-------------------------------
Changes since 8.1.5:
Admin Toolbar 8.x-1.6, 2015-06-03
---------------------------------
Changes since 8.x-1.5:
- by matio89: correction admin_toolbar.
Admin Toolbar 8.1.5, 2015-06-03
-------------------------------
Changes since 8.1.4:
Admin Toolbar 8.x-1.5, 2015-06-03
---------------------------------
Changes since 8.x-1.4:
- by matio89: test if module update exist or no to display install and update
module.
......@@ -302,36 +329,36 @@ Changes since 8.1.4:
- by matio89: compatibility with Drupal 8 béta 11.
- by fethi: Change the colors used to match the Seven styleguide.
Admin Toolbar 8.1.4, 2015-05-20
-------------------------------
Changes since 8.1.3:
Admin Toolbar 8.x-1.4, 2015-05-20
---------------------------------
Changes since 8.x-1.3:
- by matio89: correction add/node.
Admin Toolbar 8.1.3, 2015-05-19
-------------------------------
Changes since 8.1.2:
Admin Toolbar 8.x-1.3, 2015-05-19
---------------------------------
Changes since 8.x-1.2:
- by matio89: add new functionalities.
- by matio89: add administration devel link.
- by matio89: correction reload page.
- by matio89: correction redirect to the same page.
Admin Toolbar 8.1.2, 2015-05-19
-------------------------------
Changes since 8.1.1:
Admin Toolbar 8.x-1.2, 2015-05-19
---------------------------------
Changes since 8.x-1.1:
- by matio89: add new functionalities.
- by matio89: add administration devel link.
- by matio89: correction reload page.
- by matio89: correction redirect to the same page.
Admin Toolbar 8.1.1, 2015-05-19
-------------------------------
Changes since 8.1.0:
Admin Toolbar 8.x-1.1, 2015-05-19
---------------------------------
Changes since 8.x-1.0:
- by matio89: add new functionalities.
Admin Toolbar 8.1.0, 2015-05-07
-------------------------------
Admin Toolbar 8.x-1.0, 2015-05-07
---------------------------------
- Initial release.
name: Admin Toolbar
description: Provides a drop-down menu interface to the core Drupal Toolbar.
description: Provides a drop-down menu interface to the site Toolbar.
package: Administration
type: module
......@@ -8,8 +8,8 @@ type: module
dependencies:
- drupal:toolbar
# Information added by Drupal.org packaging script on 2018-02-06
version: '8.x-1.23'
# Information added by Drupal.org packaging script on 2018-05-28
version: '8.x-1.24'
core: '8.x'
project: 'admin_toolbar'
datestamp: 1517936588
datestamp: 1527522484
......@@ -27,14 +27,13 @@ function admin_toolbar_help($route_name, RouteMatchInterface $route_match) {
$variables = [
':toolbar' => Url::fromRoute('help.page', ['name' => 'toolbar'])->toString(),
':automated_cron' => (\Drupal::moduleHandler()->moduleExists('automated_cron')) ? Url::fromRoute('help.page', ['name' => 'automated_cron'])->toString() : '#',
':admin_toolbar_documentation' => 'https://www.drupal.org/node/2713693',
];
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Admin Toolbar module enhances the <a href=":toolbar">Toolbar</a> module by providing fast access to all the administrative links at the top of your site. Admin Toolbar remains a very "lightweight" module by closely integrating with all Toolbar functionality. It can be used in conjunction with all the sub or complimentary modules, listed on <a href="https://www.drupal.org/project/admin_toolbar">Admin Toolbar</a>, for quick access to system commands such as Flush all caches, <a href=":automated_cron">Run cron</a>, Run Updates, etc... For more information, see <a href=":admin_toolbar_documentation">the online documentation for the Admin Toolbar module</a>.', $variables) . '</p>';
$output .= '<p>' . t('The Admin Toolbar module enhances the <a href=":toolbar">Toolbar</a> module by providing fast access to all the administrative links at the top of your site. Admin Toolbar remains a very "lightweight" module by closely integrating with all Toolbar functionality. It can be used in conjunction with all the sub modules included on Admin Toolbar, for quick access to system commands such as Flush all caches, <a href=":automated_cron">Run cron</a>, Run Updates, etc.', $variables) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<p>' . t('The Admin Toolbar greatly improves the user experience for those who regularly interact with the Drupal Toolbar by providing fast, full access to all links in the Drupal Toolbar without having to click to get there.') . '</p>';
$output .= '<p>' . t('The Admin Toolbar greatly improves the user experience for those who regularly interact with the site Toolbar by providing fast, full access to all links in the site Toolbar without having to click to get there.') . '</p>';
return $output;
}
......
......@@ -3,7 +3,6 @@ CONTENTS OF THIS FILE
* Introduction
* Requirements
* Recommended modules
* Installation
* Configuration
* Maintainers
......@@ -32,15 +31,6 @@ This module requires the following modules:
* Admin Toolbar (https://www.drupal.org/project/admin_toolbar)
RECOMMENDED MODULES
-------------------
* Admin Toolbar (https://www.drupal.org/project/admin_toolbar):
Improve the default Drupal Toolbar (the administration menu at the top of
your site) to transform it into a drop-down menu, providing a fast access to
all administration pages.
INSTALLATION
------------
......
......@@ -8,8 +8,8 @@ type: module
dependencies:
- admin_toolbar:admin_toolbar
# Information added by Drupal.org packaging script on 2018-02-06
version: '8.x-1.23'
# Information added by Drupal.org packaging script on 2018-05-28
version: '8.x-1.24'
core: '8.x'
project: 'admin_toolbar'
datestamp: 1517936588
datestamp: 1527522484
......@@ -20,7 +20,7 @@ function admin_toolbar_links_access_filter_help($route_name, RouteMatchInterface
case 'help.page.admin_toolbar_links_access_filter':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t("The Admin Toolbar Links Access Filter module Provides a workaround for the common problem that users with <em>Use the administration pages and help</em> permission see menu links they don't have access permission for. Once the issue <a href='@url'>Hide empty admin categories</a> be solved, this module will be deprecated.", ['@url' => Url::fromUri('https://www.drupal.org/node/296693')->toString()]) . '</p>';
$output .= '<p>' . t('The Admin Toolbar Links Access Filter module provides a workaround for the common problem that users with <em>Use the administration pages and help</em> permission see menu links they done not have access permission for.') . '</p>';
return $output;
}
......@@ -184,10 +184,17 @@ function admin_toolbar_links_access_filter_is_overview_page($route_name) {
* assigned, FALSE otherwise.
*/
function admin_toolbar_links_access_filter_user_has_admin_role(AccountInterface $account) {
foreach ($account->getRoles() as $role_id) {
if (Role::load($role_id)->isAdmin()) {
return TRUE;
static $user_has_admin_role = [];
$uid = $account->id();
if (!isset($user_has_admin_role[$uid])) {
$roles = Role::loadMultiple($account->getRoles());
foreach ($roles as $role) {
if ($role->isAdmin()) {
$user_has_admin_role[$uid] = TRUE;
break;
}
$user_has_admin_role[$uid] = FALSE;
}
}
return FALSE;
return $user_has_admin_role[$uid];
}
{
"name": "drupal/admin_toolbar_links_access_filter",
"description": "Provides a workaround for the common problem that users with 'Use the administration pages and help' permission see menu links they don't have access permission for. Once the issue https://www.drupal.org/node/296693 be solved, this module will be deprecated.",
"type": "drupal-module",
"keywords": ["Drupal", "Toolbar"],
"homepage": "http://drupal.org/project/admin_toolbar",
"license": "GPL-2.0+",
"authors": [
{
"name": "Wilfrid Roze (eme)",
"homepage": "https://www.drupal.org/u/eme",
"role": "Maintainer"
},
{
"name": "Romain Jarraud (romainj)",
"homepage": "https://www.drupal.org/u/romainj",
"role": "Maintainer"
},
{
"name": "Adrian Cid Almaguer (adriancid)",
"email": "adriancid@gmail.com",
"homepage": "https://www.drupal.org/u/adriancid",
"role": "Maintainer"
},
{
"name": "Mohamed Anis Taktak (matio89)",
"homepage": "https://www.drupal.org/u/matio89",
"role": "Maintainer"
}
],
"support": {
"issues": "https://www.drupal.org/project/issues/admin_toolbar",
"source": "http://cgit.drupalcode.org/admin_toolbar"
},
"require": {
"drupal/admin_toolbar": "^1"
}
}
......@@ -33,15 +33,6 @@ This module requires the following modules:
* Admin Toolbar (https://www.drupal.org/project/admin_toolbar)
RECOMMENDED MODULES
-------------------
* Admin Toolbar (https://www.drupal.org/project/admin_toolbar):
Improve the default Drupal Toolbar (the administration menu at the top of
your site) to transform it into a drop-down menu, providing a fast access to
all administration pages.
INSTALLATION
------------
......
......@@ -7,9 +7,10 @@ type: module
dependencies:
- admin_toolbar:admin_toolbar
- drupal:system (>=8.3)
# Information added by Drupal.org packaging script on 2018-02-06
version: '8.x-1.23'
# Information added by Drupal.org packaging script on 2018-05-28
version: '8.x-1.24'
core: '8.x'
project: 'admin_toolbar'
datestamp: 1517936588
datestamp: 1527522484
......@@ -63,6 +63,12 @@ admin_toolbar_tools.flush_menu:
parent: admin_toolbar_tools.flush
menu_name: admin
admin_toolbar_tools.flush_twig:
title: 'Flush twig cache'
route_name: admin_toolbar_tools.flush_twig
parent: admin_toolbar_tools.flush
menu_name: admin
admin_toolbar_tools.flush_rendercache:
title: 'Flush render cache'
route_name: admin_toolbar_tools.flush_rendercache
......
......@@ -5,7 +5,6 @@
* Provides extra menu links for the core drupal toolbar.
*/
use Drupal\Core\Link;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
......@@ -34,21 +33,12 @@ function admin_toolbar_tools_toolbar() {
function admin_toolbar_tools_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.admin_toolbar_tools':
$url = Url::fromUri('https://www.drupal.org/project/admin_toolbar');
$external_link = Link::fromTextAndUrl(t('Admin Toolbar'), $url);
$external_link2 = Link::fromTextAndUrl(t('Toolbar'), $url);
$url = Url::fromUri('https://www.drupal.org/node/2713693');
$external_link3 = Link::fromTextAndUrl(t('online documentation for Admin Toolbar'), $url);
$output = '';
$output .= '<p>';
$output .= t('The Admin Toolbar Extra Tools module comes packaged with the :link module and adds functionality to it. The additional functionality is accessed thru extra links on the main administration :link2. Some links to Admin Toolbar Extra Tools administration pages are located at the bottom of this page. For more information, see the :link3', [
':link' => $external_link,
':link2' => $external_link2,
':link3' => $external_link3,
]);
$output .= t('The Admin Toolbar Extra Tools module comes packaged with the <a href=":admin-toolbar">Admin Toolbar</a> module and adds functionality to it. The additional functionality is accessed thru extra links on the main administration Toolbar. Some links to Admin Toolbar Extra Tools administration pages are located at the bottom of this page.</a>', [':admin-toolbar' => Url::fromRoute('help.page', ['name' => 'admin_toolbar'])->toString()]);
$output .= '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<p>' . t('To use Admin Toolbar Extra Tools just install it like any other module. There is no other configuration required. The Admin Toolbar functionality can be further extended by installing complimentary modules. See :link for a complete listing of these complimentary modules.', [':link' => $external_link]) . '</p>';
$output .= '<p>' . t('To use Admin Toolbar Extra Tools just install it like any other module. There is no other configuration required.') . '</p>';
return $output;
}
......@@ -85,6 +75,15 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
'menu_name' => 'admin',
'parent' => 'admin_toolbar_tools.flush',
];
// Adding a menu link to Files.
if ($moduleHandler->moduleExists('file') && in_array('view.files.page_1', $routes)) {
$links['admin_toolbar_tools.view.files'] = [
'title' => t('Files'),
'route_name' => 'view.files.page_1',
'menu_name' => 'admin',
'parent' => 'system.admin_content',
];
}
}
// Adds common links to entities.
......@@ -568,7 +567,7 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
];
// Add node links for each media type.
foreach (\Drupal::entityTypeManager()->getStorage('media_type')->loadMultiple() as $type) {
$links['node.add.' . $type->id()] = [
$links['media.add.' . $type->id()] = [
'title' => t($type->label()),
'route_name' => 'entity.media.add_form',
'parent' => 'admin_toolbar_tools.add_media',
......
......@@ -61,6 +61,15 @@ admin_toolbar_tools.flush_views:
_permission: 'administer site configuration'
_csrf_token: 'TRUE'
admin_toolbar_tools.flush_twig:
path: '/admin/flush/twig'
defaults:
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::flushTwig'
_title: 'Twig'
requirements:
_permission: 'administer site configuration'
_csrf_token: 'TRUE'
admin_toolbar.run.cron:
path: '/run-cron'
defaults:
......
{
"name": "drupal/admin_toolbar_tools",
"description": "Adds menu links to the Admin Toolbar.",
"type": "drupal-module",
"keywords": ["Drupal", "Toolbar"],
"homepage": "http://drupal.org/project/admin_toolbar",
"license": "GPL-2.0+",
"authors": [
{
"name": "Wilfrid Roze (eme)",
"homepage": "https://www.drupal.org/u/eme",
"role": "Maintainer"
},
{
"name": "Romain Jarraud (romainj)",
"homepage": "https://www.drupal.org/u/romainj",
"role": "Maintainer"
},
{
"name": "Adrian Cid Almaguer (adriancid)",
"email": "adriancid@gmail.com",
"homepage": "https://www.drupal.org/u/adriancid",
"role": "Maintainer"
},
{
"name": "Mohamed Anis Taktak (matio89)",
"homepage": "https://www.drupal.org/u/matio89",
"role": "Maintainer"
}
],
"support": {
"issues": "https://www.drupal.org/project/issues/admin_toolbar",
"source": "http://cgit.drupalcode.org/admin_toolbar"
},
"require": {
"drupal/admin_toolbar": "^1",
"drupal/core": "~8.3"
}
}
......@@ -2,18 +2,19 @@
namespace Drupal\admin_toolbar_tools\Controller;
use Drupal\Component\Datetime\Time;
use Drupal\Component\Datetime\TimeInterface;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\CronInterface;
use Drupal\Core\Menu\ContextualLinkManager;
use Drupal\Core\Menu\LocalActionManager;
use Drupal\Core\Menu\LocalTaskManager;
use Drupal\Core\Menu\MenuLinkManager;
use Drupal\Core\Menu\ContextualLinkManagerInterface;
use Drupal\Core\Menu\LocalActionManagerInterface;
use Drupal\Core\Menu\LocalTaskManagerInterface;
use Drupal\Core\Menu\MenuLinkManagerInterface;
use Drupal\Core\Plugin\CachedDiscoveryClearerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\RequestStack;
use Drupal\Core\PhpStorage\PhpStorageFactory;
/**
* Class ToolbarController.
......@@ -32,28 +33,28 @@ class ToolbarController extends ControllerBase {
/**
* A menu link manager instance.
*
* @var \Drupal\Core\Menu\MenuLinkManager
* @var \Drupal\Core\Menu\MenuLinkManagerInterface
*/
protected $menuLinkManager;
/**
* A context link manager instance.
*
* @var \Drupal\Core\Menu\ContextualLinkManager
* @var \Drupal\Core\Menu\ContextualLinkManagerInterface
*/
protected $contextualLinkManager;
/**
* A local task manager instance.
*
* @var \Drupal\Core\Menu\LocalTaskManager
* @var \Drupal\Core\Menu\LocalTaskManagerInterface
*/
protected $localTaskLinkManager;
/**
* A local action manager instance.
*
* @var \Drupal\Core\Menu\LocalActionManager
* @var \Drupal\Core\Menu\LocalActionManagerInterface
*/
protected $localActionLinkManager;
......@@ -67,7 +68,7 @@ class ToolbarController extends ControllerBase {
/**
* A date time instance.
*
* @var \Drupal\Component\Datetime\Time
* @var \Drupal\Component\Datetime\TimeInterface
*/
protected $time;
......@@ -86,15 +87,34 @@ class ToolbarController extends ControllerBase {
protected $pluginCacheClearer;
/**
* {@inheritdoc}
* Constructs a ToolbarController object.
*
* @param \Drupal\Core\CronInterface $cron
* A cron instance.
* @param \Drupal\Core\Menu\MenuLinkManagerInterface $menuLinkManager
* A menu link manager instance.
* @param \Drupal\Core\Menu\ContextualLinkManagerInterface $contextualLinkManager
* A context link manager instance.
* @param \Drupal\Core\Menu\LocalTaskManagerInterface $localTaskLinkManager
* A local task manager instance.
* @param \Drupal\Core\Menu\LocalActionManagerInterface $localActionLinkManager
* A local action manager instance.
* @param \Drupal\Core\Cache\CacheBackendInterface $cacheRender
* A cache backend interface instance.
* @param \Drupal\Component\Datetime\TimeInterface $time
* A date time instance.
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* A request stack symfony instance.
* @param \Drupal\Core\Plugin\CachedDiscoveryClearerInterface $plugin_cache_clearer
* A plugin cache clear instance.
*/
public function __construct(CronInterface $cron,
MenuLinkManager $menuLinkManager,
ContextualLinkManager $contextualLinkManager,
LocalTaskManager $localTaskLinkManager,
LocalActionManager $localActionLinkManager,
MenuLinkManagerInterface $menuLinkManager,
ContextualLinkManagerInterface $contextualLinkManager,
LocalTaskManagerInterface $localTaskLinkManager,
LocalActionManagerInterface $localActionLinkManager,
CacheBackendInterface $cacheRender,
Time $time,
TimeInterface $time,
RequestStack $request_stack,
CachedDiscoveryClearerInterface $plugin_cache_clearer) {
$this->cron = $cron;
......@@ -197,6 +217,17 @@ public function flushViews() {
return new RedirectResponse($this->reloadPage());
}
/**
* Clears the twig cache.
*/
public function flushTwig() {
// @todo Update once Drupal 8.6 will be released.
// @see https://www.drupal.org/node/2908461
PhpStorageFactory::get('twig')->deleteAll();
drupal_set_message($this->t('Twig cache cleared.'));
return new RedirectResponse($this->reloadPage());
}
/**
* Run the cron.
*/
......
<?php
namespace Drupal\admin_toolbar_tools\Tests;
namespace Drupal\Tests\admin_toolbar_tools\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests for the existence of Admin Toolbar tools new links.
*
* @group admin_toolbar
*/
class AdminToolbarToolsAlterTest extends WebTestBase {
class AdminToolbarToolsAlterTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = ['toolbar', 'admin_toolbar', 'admin_toolbar_tools'];
protected static $modules = [
'toolbar',
'admin_toolbar',
'admin_toolbar_tools',
];
/**
* A test user with permission to access the administrative toolbar.
......
{
"name": "drupal/admin_toolbar",
"description": "Admin Toolbar improve the default Drupal Toolbar, it lets the hover of sub menus.",
"description": "Provides a drop-down menu interface to the core Drupal Toolbar.",
"type": "drupal-module",
"keywords": ["Drupal", "Toolbar"],
"homepage": "http://drupal.org/project/admin_toolbar",
"license": "GPL-2.0+",
"authors": [
{
"name": "Mohamed Anis Taktak",
"homepage": "https://www.drupal.org/u/matio89"
}
"name": "Wilfrid Roze (eme)",
"homepage": "https://www.drupal.org/u/eme",
"role": "Maintainer"
},
{
"name": "Romain Jarraud (romainj)",
"homepage": "https://www.drupal.org/u/romainj",
"role": "Maintainer"
},
{
"name": "Adrian Cid Almaguer (adriancid)",
"email": "adriancid@gmail.com",
"homepage": "https://www.drupal.org/u/adriancid",
"role": "Maintainer"
},
{
"name": "Mohamed Anis Taktak (matio89)",
"homepage": "https://www.drupal.org/u/matio89",
"role": "Maintainer"
}
],
"support": {
"issues": "https://www.drupal.org/project/issues/admin_toolbar"
},
"license": "GPL-2.0+",
"require": { }
"issues": "https://www.drupal.org/project/issues/admin_toolbar",
"source": "http://cgit.drupalcode.org/admin_toolbar"
}
}
<?php
namespace Drupal\admin_toolbar\Tests;
namespace Drupal\Tests\admin_toolbar\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Test the existence of Admin Toolbar module.
*
* @group admin_toolbar
*/
class AdminToolbarAlterTest extends WebTestBase {
class AdminToolbarAlterTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = ['toolbar', 'breakpoint', 'admin_toolbar'];
protected static $modules = [
'toolbar',
'breakpoint',
'admin_toolbar',
];
/**
* A test user with permission to access the administrative toolbar.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment