Admin toolbar and config sync
This commit is contained in:
parent
0e15467384
commit
53d6173a5f
|
@ -1,4 +1,6 @@
|
|||
module:
|
||||
admin_toolbar: 0
|
||||
admin_toolbar_tools: 0
|
||||
automated_cron: 0
|
||||
block: 0
|
||||
block_content: 0
|
||||
|
@ -39,6 +41,7 @@ module:
|
|||
user: 0
|
||||
views_ui: 0
|
||||
webform: 0
|
||||
webform_ui: 0
|
||||
menu_link_content: 1
|
||||
views: 10
|
||||
standard: 1000
|
||||
|
|
121
config/webform.webform.submit_a_session.yml
Normal file
121
config/webform.webform.submit_a_session.yml
Normal file
|
@ -0,0 +1,121 @@
|
|||
uuid: 74b9919b-80ce-421d-9dda-b95e58ed6af0
|
||||
langcode: en
|
||||
status: open
|
||||
dependencies: { }
|
||||
open: null
|
||||
close: null
|
||||
uid: 3
|
||||
template: false
|
||||
id: submit_a_session
|
||||
title: 'Submit a session'
|
||||
description: ''
|
||||
elements: "speaker_email_address:\n '#type': email\n '#title': 'Your email address'\n '#required': true\nsession_title:\n '#type': textfield\n '#title': 'Session title'\n '#required': true\nsession_overview:\n '#type': textarea\n '#title': 'Session overview'\n '#description': 'A short overview of the proposed session.'\n '#required': true\nsession_skill_level:\n '#type': select\n '#title': 'Session skill level'\n '#description': 'A rough guide of the skill level of the session.'\n '#options':\n Beginner: Beginner\n Intermediate: Intermediate\n Advanced: Advanced\n '#required': true\nspeaker_name:\n '#type': textfield\n '#title': 'Your name'\n '#required': true\nspeaker_picture:\n '#type': webform_image_file\n '#title': 'Your picture'\n '#description': 'This image will be displayed along with your session on the website. Feel free to upload an avatar if you are not comfortable with us showing your face.'\n '#required': true\nspeaker_twitter_handle:\n '#type': textfield\n '#title': 'Your Twitter handle'\n '#description': 'If you have a Twitter account, please provide it here.'\nspeaker_drupal_org_handle:\n '#type': textfield\n '#title': 'Your Drupal.org handle'\n '#description': 'If you have an account on Drupal.org, please provide your handle here.'\n"
|
||||
css: ''
|
||||
javascript: ''
|
||||
settings:
|
||||
page: true
|
||||
page_submit_path: ''
|
||||
page_confirm_path: ''
|
||||
form_submit_label: ''
|
||||
form_submit_once: false
|
||||
form_submit_attributes: { }
|
||||
form_exception_message: ''
|
||||
form_closed_message: ''
|
||||
form_previous_submissions: false
|
||||
form_confidential: false
|
||||
form_confidential_message: ''
|
||||
form_prepopulate: false
|
||||
form_prepopulate_source_entity: false
|
||||
form_disable_autocomplete: false
|
||||
form_novalidate: false
|
||||
form_unsaved: false
|
||||
form_disable_back: false
|
||||
form_autofocus: false
|
||||
form_details_toggle: false
|
||||
wizard_progress_bar: true
|
||||
wizard_progress_pages: false
|
||||
wizard_progress_percentage: false
|
||||
wizard_next_button_label: ''
|
||||
wizard_next_button_attributes: { }
|
||||
wizard_prev_button_label: ''
|
||||
wizard_prev_button_attributes: { }
|
||||
wizard_start_label: ''
|
||||
wizard_complete: true
|
||||
wizard_complete_label: ''
|
||||
preview: 0
|
||||
preview_next_button_label: ''
|
||||
preview_next_button_attributes: { }
|
||||
preview_prev_button_label: ''
|
||||
preview_prev_button_attributes: { }
|
||||
preview_message: ''
|
||||
draft: false
|
||||
draft_auto_save: false
|
||||
draft_button_label: ''
|
||||
draft_button_attributes: { }
|
||||
draft_saved_message: ''
|
||||
draft_loaded_message: ''
|
||||
confirmation_type: inline
|
||||
confirmation_title: ''
|
||||
confirmation_message: 'Thanks for submitting a session. We will be in touch once we have selected the sessions for the camp.'
|
||||
confirmation_url: ''
|
||||
confirmation_attributes: { }
|
||||
confirmation_back: true
|
||||
confirmation_back_label: ''
|
||||
confirmation_back_attributes: { }
|
||||
limit_total: null
|
||||
limit_total_message: ''
|
||||
limit_user: null
|
||||
limit_user_message: ''
|
||||
purge: none
|
||||
purge_days: null
|
||||
entity_limit_total: null
|
||||
entity_limit_user: null
|
||||
results_disabled: false
|
||||
results_disabled_ignore: false
|
||||
token_update: false
|
||||
access:
|
||||
create:
|
||||
roles:
|
||||
- anonymous
|
||||
- authenticated
|
||||
users: { }
|
||||
view_any:
|
||||
roles: { }
|
||||
users: { }
|
||||
update_any:
|
||||
roles: { }
|
||||
users: { }
|
||||
delete_any:
|
||||
roles: { }
|
||||
users: { }
|
||||
purge_any:
|
||||
roles: { }
|
||||
users: { }
|
||||
view_own:
|
||||
roles: { }
|
||||
users: { }
|
||||
update_own:
|
||||
roles: { }
|
||||
users: { }
|
||||
delete_own:
|
||||
roles: { }
|
||||
users: { }
|
||||
handlers:
|
||||
session_submitted:
|
||||
id: email
|
||||
label: 'Session submitted'
|
||||
handler_id: session_submitted
|
||||
status: true
|
||||
weight: 0
|
||||
settings:
|
||||
to_mail: oliver@drupalcampbristol.co.uk
|
||||
cc_mail: emily@drupalcampbristol.co.uk
|
||||
bcc_mail: ''
|
||||
from_mail: default
|
||||
from_name: default
|
||||
subject: default
|
||||
body: default
|
||||
excluded_elements: { }
|
||||
html: true
|
||||
attachments: false
|
||||
debug: false
|
339
web/modules/contrib/admin_toolbar/LICENSE.txt
Normal file
339
web/modules/contrib/admin_toolbar/LICENSE.txt
Normal file
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
45
web/modules/contrib/admin_toolbar/README.txt
Normal file
45
web/modules/contrib/admin_toolbar/README.txt
Normal file
|
@ -0,0 +1,45 @@
|
|||
---SUMMARY---
|
||||
|
||||
Admin Toolbar intends to improve the default Drupal Toolbar to transformit into
|
||||
a drop-down menu, providing a fast and full access to all administration links.
|
||||
|
||||
For a full description visit project page:
|
||||
https://www.drupal.org/project/admin_toolbar
|
||||
|
||||
Bug reports, feature suggestions and latest developments:
|
||||
http://drupal.org/project/issues/admin_toolbar
|
||||
|
||||
|
||||
---REQUIREMENTS---
|
||||
|
||||
|
||||
*None. (Other than a clean Drupal 8 installation)
|
||||
|
||||
|
||||
---INSTALLATION---
|
||||
|
||||
|
||||
Install as usual.
|
||||
|
||||
Place the entirety of this directory in the /modules folder of your Drupal
|
||||
installation. Navigate to Administer > Extend. Check the 'Enabled' box next
|
||||
to the 'Admin toolbar' and/or 'Admin toolbar Extra Tools' and then click
|
||||
the 'Save Configuration' button at the bottom.
|
||||
|
||||
For help regarding installation, visit:
|
||||
https://www.drupal.org/documentation/install/modules-themes/modules-8
|
||||
|
||||
|
||||
---CONTACT---
|
||||
|
||||
|
||||
Current Maintainers:
|
||||
*Wilfrid Roze (eme) - https://www.drupal.org/u/eme
|
||||
*Mohamed Anis Taktak (matio89) - https://www.drupal.org/u/matio89
|
||||
|
||||
|
||||
This project has been sponsored by:
|
||||
*emerya
|
||||
Founded in 2009, emerya is a human-sized company, dedicated to the design
|
||||
and implementation of web interfaces.
|
||||
Visit: http://http://emerya.fr/ for more information.
|
13
web/modules/contrib/admin_toolbar/admin_toolbar.info.yml
Normal file
13
web/modules/contrib/admin_toolbar/admin_toolbar.info.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
name: Admin Toolbar
|
||||
# core: 8.x
|
||||
description: Provides a drop-down menu interface to the core Drupal Toolbar.
|
||||
package: Administration
|
||||
type: module
|
||||
dependencies:
|
||||
- toolbar
|
||||
|
||||
# Information added by Drupal.org packaging script on 2016-12-01
|
||||
version: '8.x-1.18'
|
||||
core: '8.x'
|
||||
project: 'admin_toolbar'
|
||||
datestamp: 1480614186
|
|
@ -0,0 +1,8 @@
|
|||
toolbar.tree:
|
||||
css:
|
||||
theme:
|
||||
css/admin.toolbar.css: {}
|
||||
js:
|
||||
js/admin_toolbar.js: {}
|
||||
dependencies:
|
||||
- core/jquery
|
89
web/modules/contrib/admin_toolbar/admin_toolbar.module
Normal file
89
web/modules/contrib/admin_toolbar/admin_toolbar.module
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* This is the module to create a drop-down menu for the core toolbar.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Menu\MenuTreeParameters;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\Core\Url;
|
||||
|
||||
/**
|
||||
* Implements hook_toolbar_alter().
|
||||
*/
|
||||
function admin_toolbar_toolbar_alter(&$items) {
|
||||
$items['administration']['tray']['toolbar_administration']['#pre_render'] = array('admin_toolbar_prerender_toolbar_administration_tray');
|
||||
$items['administration']['#attached']['library'][] = 'admin_toolbar/toolbar.tree';
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function admin_toolbar_help($route_name, RouteMatchInterface $route_match) {
|
||||
switch ($route_name) {
|
||||
case 'help.page.admin_toolbar':
|
||||
$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>.', array(':toolbar' => Url::fromRoute('help.page', array('name' => 'toolbar'))->toString(), ':automated_cron' => (\Drupal::moduleHandler()->moduleExists('automated_cron')) ? Url::fromRoute('help.page', array('name' => 'automated_cron'))->toString() : '#', ':admin_toolbar_documentation' => 'https://www.drupal.org/node/2713693')) . '</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>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the toolbar's administration tray.
|
||||
* This is a clone of core's toolbar_prerender_toolbar_administration_tray()
|
||||
* function, which uses setMaxDepth(4) instead of setTopLevelOnly()
|
||||
* @param array $element
|
||||
* A renderable array.
|
||||
*
|
||||
* @return array
|
||||
* The updated renderable array.
|
||||
*
|
||||
* @see toolbar_prerender_toolbar_administration_tray()
|
||||
*/
|
||||
function admin_toolbar_prerender_toolbar_administration_tray(array $element) {
|
||||
$menu_tree = \Drupal::service('toolbar.menu_tree');
|
||||
$parameters = new MenuTreeParameters();
|
||||
$parameters->setRoot('system.admin')->excludeRoot()->setMaxDepth(4)->onlyEnabledLinks();
|
||||
$tree = $menu_tree->load(NULL, $parameters);
|
||||
$manipulators = array(
|
||||
array('callable' => 'menu.default_tree_manipulators:checkAccess'),
|
||||
array('callable' => 'menu.default_tree_manipulators:generateIndexAndSort'),
|
||||
array('callable' => 'toolbar_tools_menu_navigation_links'),
|
||||
);
|
||||
$tree = $menu_tree->transform($tree, $manipulators);
|
||||
$element['administration_menu'] = $menu_tree->build($tree);
|
||||
|
||||
return $element;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds toolbar-specific attributes to the menu link tree.
|
||||
*
|
||||
* @param \Drupal\Core\Menu\MenuLinkTreeElement[] $tree
|
||||
* The menu link tree to manipulate.
|
||||
*
|
||||
* @return \Drupal\Core\Menu\MenuLinkTreeElement[]
|
||||
* The manipulated menu link tree.
|
||||
*/
|
||||
function toolbar_tools_menu_navigation_links(array $tree) {
|
||||
foreach ($tree as $element) {
|
||||
if ($element->subtree) {
|
||||
toolbar_tools_menu_navigation_links($element->subtree);
|
||||
}
|
||||
$link = $element->link;
|
||||
|
||||
// Get the non-localized title to make the icon class.
|
||||
$definition = $link->getPluginDefinition();
|
||||
|
||||
$element->options['attributes']['class'][] = 'toolbar-icon';
|
||||
$element->options['attributes']['class'][] = 'toolbar-icon-' . strtolower(str_replace(array('.', ' ', '_'), array('-', '-', '-'), $definition['id']));
|
||||
$element->options['attributes']['title'] = $link->getDescription();
|
||||
}
|
||||
return $tree;
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
---SUMMARY---
|
||||
|
||||
Admin Toolbar Extra Tools provides menu links to administration pages or actions
|
||||
(eg. Flushing caches) that are not generated by Drupal core. It adds menu items
|
||||
that are not generated by Drupal core. For example there are no menu items for
|
||||
each content type by default or menu links to Manage fields on each entity types.
|
||||
That's the purpose of Admin Toolbar Extra Tools to add them.
|
||||
|
||||
For a full description visit project page:
|
||||
https://www.drupal.org/project/admin_toolbar
|
||||
|
||||
Bug reports, feature suggestions and latest developments:
|
||||
http://drupal.org/project/issues/admin_toolbar
|
||||
|
||||
|
||||
---REQUIREMENTS---
|
||||
|
||||
*Admin Toolbar.
|
||||
|
||||
|
||||
---INSTALLATION---
|
||||
|
||||
Install as usual.
|
||||
|
||||
Place the entirety of this directory in the /modules folder of your Drupal
|
||||
installation. Navigate to Administer > Extend. Check the 'Enabled' box next
|
||||
'Admin toolbar Extra Tools' and then click the 'Save Configuration' button at
|
||||
the bottom.
|
||||
|
||||
For help regarding installation, visit:
|
||||
https://www.drupal.org/documentation/install/modules-themes/modules-8
|
||||
|
||||
|
||||
---CONTACT---
|
||||
|
||||
Current Maintainers:
|
||||
*Wilfrid Roze (eme) - https://www.drupal.org/u/eme
|
||||
*Mohamed Anis Taktak (matio89) - https://www.drupal.org/u/matio89
|
||||
|
||||
|
||||
This project has been sponsored by:
|
||||
*emerya
|
||||
Founded in 2009, emerya is a human-sized company, dedicated to the design and
|
||||
implementation of web interfaces.
|
||||
Visit: http://http://emerya.fr/ for more information.
|
|
@ -0,0 +1,13 @@
|
|||
name: Admin Toolbar Extra Tools
|
||||
# core: 8.x
|
||||
description: Adds menu links to the Admin Toolbar.
|
||||
package: Administration
|
||||
type: module
|
||||
dependencies:
|
||||
- admin_toolbar
|
||||
|
||||
# Information added by Drupal.org packaging script on 2016-12-01
|
||||
version: '8.x-1.18'
|
||||
core: '8.x'
|
||||
project: 'admin_toolbar'
|
||||
datestamp: 1480614186
|
|
@ -0,0 +1,4 @@
|
|||
toolbar.icon:
|
||||
css:
|
||||
theme:
|
||||
css/tools.css: {}
|
|
@ -0,0 +1,91 @@
|
|||
admin_toolbar_tools.help:
|
||||
title: 'Tools'
|
||||
route_name: <front>
|
||||
menu_name: admin
|
||||
parent: system.admin
|
||||
weight: -100
|
||||
|
||||
system.admin_index:
|
||||
title: 'Index'
|
||||
route_name: system.admin_index
|
||||
menu_name: admin
|
||||
parent: admin_toolbar_tools.help
|
||||
weight: -100
|
||||
|
||||
system.run_cron:
|
||||
title: 'Run cron'
|
||||
route_name: admin_toolbar.run.cron
|
||||
menu_name: admin
|
||||
parent: admin_toolbar_tools.help
|
||||
weight: -8
|
||||
|
||||
system.db_update:
|
||||
title: 'Run updates'
|
||||
route_name: system.db_update
|
||||
menu_name: admin
|
||||
parent: admin_toolbar_tools.help
|
||||
weight: -6
|
||||
|
||||
system.modules_uninstall:
|
||||
title: 'Uninstall module'
|
||||
route_name: system.modules_uninstall
|
||||
menu_name: admin
|
||||
parent: system.modules_list
|
||||
|
||||
admin_toolbar_tools.flush:
|
||||
title: 'Flush all caches'
|
||||
route_name: admin_toolbar_tools.flush
|
||||
weight: -9
|
||||
parent: admin_toolbar_tools.help
|
||||
menu_name: admin
|
||||
|
||||
admin_toolbar_tools.cssjs:
|
||||
title: 'Flush CSS and Javascript'
|
||||
route_name: admin_toolbar_tools.cssjs
|
||||
parent: admin_toolbar_tools.flush
|
||||
menu_name: admin
|
||||
|
||||
admin_toolbar_tools.plugin:
|
||||
title: 'Flush plugins cache'
|
||||
route_name: admin_toolbar_tools.plugin
|
||||
parent: admin_toolbar_tools.flush
|
||||
menu_name: admin
|
||||
|
||||
admin_toolbar_tools.flush_static:
|
||||
title: 'Flush static cache'
|
||||
route_name: admin_toolbar_tools.flush_static
|
||||
parent: admin_toolbar_tools.flush
|
||||
menu_name: admin
|
||||
|
||||
admin_toolbar_tools.flush_menu:
|
||||
title: 'Flush routing and links cache'
|
||||
route_name: admin_toolbar_tools.flush_menu
|
||||
parent: admin_toolbar_tools.flush
|
||||
menu_name: admin
|
||||
|
||||
admin_toolbar_tools.flush_rendercache:
|
||||
title: 'Flush render cache'
|
||||
route_name: admin_toolbar_tools.flush_rendercache
|
||||
parent: admin_toolbar_tools.flush
|
||||
menu_name: admin
|
||||
|
||||
admin_toolbar_tools.drupalorg:
|
||||
title: 'Drupal.org'
|
||||
weight: -5
|
||||
route_name: admin_toolbar_tools.drupalorg
|
||||
parent: admin_toolbar_tools.help
|
||||
menu_name: admin
|
||||
|
||||
admin_toolbar_tools.listchanges:
|
||||
title: 'Change records for Drupal core'
|
||||
weight: -6
|
||||
route_name: admin_toolbar_tools.listchanges
|
||||
parent: admin_toolbar_tools.drupalorg
|
||||
menu_name: admin
|
||||
|
||||
admin_toolbar_tools.doc:
|
||||
title: 'D8 API documentation'
|
||||
weight: -5
|
||||
route_name: admin_toolbar_tools.doc
|
||||
parent: admin_toolbar_tools.drupalorg
|
||||
menu_name: admin
|
|
@ -0,0 +1,521 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Provides extra menu links for the core drupal toolbar.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
|
||||
/**
|
||||
* Implements hook_toolbar().
|
||||
*/
|
||||
function admin_toolbar_tools_toolbar() {
|
||||
$items = array();
|
||||
$items['admin_toolbar_tools'] = array(
|
||||
'#type' => 'toolbar_item',
|
||||
'tab' => array(
|
||||
'#type' => 'link',
|
||||
'#attributes' => array(
|
||||
'class' => array('toolbar-icon', 'toolbar-icon-admin-toolbar-tools-help'),
|
||||
),
|
||||
),
|
||||
'#attached' => array('library' => array('admin_toolbar_tools/toolbar.icon'),
|
||||
),
|
||||
);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function admin_toolbar_tools_help($route_name, RouteMatchInterface $route_match) {
|
||||
switch ($route_name) {
|
||||
case 'help.page.admin_toolbar_tools':
|
||||
$output = '';
|
||||
$output .= '<p>' . t('The Admin Toolbar Extra Tools module comes packaged with the <a href="https://www.drupal.org/project/admin_toolbar"> Admin Toolbar</a> module and adds functionality to it. The additional functionality is accessed thru extra links on the main administration <a href="https://www.drupal.org/project/toolbar">Toolbar</a>. Some links to Admin Toolbar Extra Tools administration pages are located at the bottom of this page. For more information, see the <a href="https://www.drupal.org/node/2713693">online documentation for Admin Toolbar</a>') . '</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 <a href="https://www.drupal.org/project/admin_toolbar">Admin Toolbar</a> for a complete listing of these complimentary modules.') . '</p>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_menu_links_discovered_alter().
|
||||
*/
|
||||
function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
|
||||
$moduleHandler = \Drupal::moduleHandler();
|
||||
$entityTypeManager = \Drupal::entityTypeManager();
|
||||
$routeProvider = \Drupal::service('router.route_provider');
|
||||
$routes = array();
|
||||
foreach ($routeProvider->getAllRoutes() as $route_name => $route) {
|
||||
$routes[] = $route_name;
|
||||
}
|
||||
|
||||
$entityTypes = $entityTypeManager->getDefinitions();
|
||||
$content_entities = array();
|
||||
foreach ($entityTypes as $key => $entityType) {
|
||||
if ($entityType->getBundleEntityType() && ($entityType->get('field_ui_base_route') != '')) {
|
||||
$content_entities[$key] = array(
|
||||
'content_entity' => $key,
|
||||
'content_entity_bundle' => $entityType->getBundleEntityType(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Adds common links to entities.
|
||||
foreach ($content_entities as $module_name => $entities) {
|
||||
$content_entity_bundle = $entities['content_entity_bundle'];
|
||||
$content_entity = $entities['content_entity'];
|
||||
foreach ($entityTypeManager->getStorage($content_entity_bundle)->loadMultiple() as $machine_name => $bundle) {
|
||||
// Normally, the edit form for the bundle would be its root link.
|
||||
$content_entity_bundle_root = NULL;
|
||||
if (in_array('entity.' . $content_entity_bundle . '.overview_form', $routes)) {
|
||||
// Some bundles have an overview/list form that make a better root link.
|
||||
$content_entity_bundle_root = 'entity.' . $content_entity_bundle . '.overview_form.' . $machine_name;
|
||||
$links[$content_entity_bundle_root] = array(
|
||||
'title' => $bundle->label(),
|
||||
'route_name' => 'entity.' . $content_entity_bundle . '.overview_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.' . $content_entity_bundle . '.collection',
|
||||
'route_parameters' => array($content_entity_bundle => $machine_name),
|
||||
);
|
||||
}
|
||||
if (in_array('entity.' . $content_entity_bundle . '.edit_form', $routes)) {
|
||||
$key = 'entity.' . $content_entity_bundle . '.edit_form.' . $machine_name;
|
||||
$links[$key] = array(
|
||||
'title' => $bundle->label(),
|
||||
'route_name' => 'entity.' . $content_entity_bundle . '.edit_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.' . $content_entity_bundle . '.collection',
|
||||
'route_parameters' => array($content_entity_bundle => $machine_name),
|
||||
);
|
||||
if (empty($content_entity_bundle_root)) {
|
||||
$content_entity_bundle_root = $key;
|
||||
}
|
||||
else {
|
||||
$links[$key]['parent'] = $content_entity_bundle_root;
|
||||
$links[$key]['title'] = t('Edit');
|
||||
}
|
||||
}
|
||||
if ($moduleHandler->moduleExists('field_ui')) {
|
||||
if (in_array('entity.' . $content_entity . '.field_ui_fields', $routes)) {
|
||||
$links['entity.' . $content_entity . '.field_ui_fields' . $machine_name] = array(
|
||||
'title' => t('Manage fields'),
|
||||
'route_name' => 'entity.' . $content_entity . '.field_ui_fields',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => $content_entity_bundle_root,
|
||||
'route_parameters' => array($content_entity_bundle => $machine_name),
|
||||
'weight' => 1,
|
||||
);
|
||||
}
|
||||
if (in_array('entity.entity_form_display.' . $content_entity . '.default', $routes)) {
|
||||
$links['entity.entity_form_display.' . $content_entity . '.default' . $machine_name] = array(
|
||||
'title' => t('Manage form display'),
|
||||
'route_name' => 'entity.entity_form_display.' . $content_entity . '.default',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => $content_entity_bundle_root,
|
||||
'route_parameters' => array($content_entity_bundle => $machine_name),
|
||||
'weight' => 2,
|
||||
);
|
||||
}
|
||||
if (in_array('entity.entity_view_display.' . $content_entity . '.default', $routes)) {
|
||||
$links['entity.entity_view_display.' . $content_entity . '.default.' . $machine_name] = array(
|
||||
'title' => t('Manage display'),
|
||||
'route_name' => 'entity.entity_view_display.' . $content_entity . '.default',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => $content_entity_bundle_root,
|
||||
'route_parameters' => array($content_entity_bundle => $machine_name),
|
||||
'weight' => 3,
|
||||
);
|
||||
}
|
||||
}
|
||||
if ($moduleHandler->moduleExists('devel') && in_array('entity.' . $content_entity_bundle . '.devel_load', $routes)) {
|
||||
$links['entity.' . $content_entity_bundle . '.devel_load.' . $machine_name] = array(
|
||||
'title' => t('Devel'),
|
||||
'route_name' => 'entity.' . $content_entity_bundle . '.devel_load',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => $content_entity_bundle_root,
|
||||
'route_parameters' => array($content_entity_bundle => $machine_name),
|
||||
'weight' => 4,
|
||||
);
|
||||
}
|
||||
if (in_array('entity.' . $content_entity_bundle . '.delete_form', $routes)) {
|
||||
$links['entity.' . $content_entity_bundle . '.delete_form.' . $machine_name] = array(
|
||||
'title' => t('Delete'),
|
||||
'route_name' => 'entity.' . $content_entity_bundle . '.delete_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => $content_entity_bundle_root,
|
||||
'route_parameters' => array($content_entity_bundle => $machine_name),
|
||||
'weight' => 5,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add user links.
|
||||
$links['user.admin_create'] = array(
|
||||
'title' => t('Add a new user'),
|
||||
'route_name' => 'user.admin_create',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user.collection',
|
||||
);
|
||||
$links['user.admin_permissions'] = array(
|
||||
'title' => t('Permissions'),
|
||||
'route_name' => 'user.admin_permissions',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user.collection',
|
||||
);
|
||||
$links['entity.user_role.collection'] = array(
|
||||
'title' => t('Roles'),
|
||||
'route_name' => 'entity.user_role.collection',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user.collection',
|
||||
);
|
||||
$links['user.role_add'] = array(
|
||||
'title' => t('Add a new role'),
|
||||
'route_name' => 'user.role_add',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user_role.collection',
|
||||
'weight' => -5,
|
||||
);
|
||||
if ($moduleHandler->moduleExists('field_ui')) {
|
||||
$links['entity.user.field_ui_fields_'] = array(
|
||||
'title' => t('Manage fields'),
|
||||
'route_name' => 'entity.user.field_ui_fields',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user.admin_form',
|
||||
);
|
||||
$links['entity.entity_form_display.user.default_'] = array(
|
||||
'title' => t('Manage form display'),
|
||||
'route_name' => 'entity.entity_form_display.user.default',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user.admin_form',
|
||||
);
|
||||
$links['entity.entity_view_display.user.default_'] = array(
|
||||
'title' => t('Manage display'),
|
||||
'route_name' => 'entity.entity_view_display.user.default',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user.admin_form',
|
||||
);
|
||||
}
|
||||
foreach (user_roles() as $role) {
|
||||
$links['entity.user_role.edit_form.' . $role->id()] = array(
|
||||
'title' => $role->label(),
|
||||
'route_name' => 'entity.user_role.edit_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user_role.collection',
|
||||
'route_parameters' => array('user_role' => $role->id()),
|
||||
);
|
||||
$links['entity.user_role.edit_permissions_form.' . $role->id()] = array(
|
||||
'title' => t('Edit permissions'),
|
||||
'route_name' => 'entity.user_role.edit_permissions_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user_role.edit_form.' . $role->id(),
|
||||
'route_parameters' => array('user_role' => $role->id()),
|
||||
);
|
||||
$links['entity.user_role.delete_form.' . $role->id()] = array(
|
||||
'title' => t('Delete'),
|
||||
'route_name' => 'entity.user_role.delete_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user_role.edit_form.' . $role->id(),
|
||||
'route_parameters' => array('user_role' => $role->id()),
|
||||
);
|
||||
if ($moduleHandler->moduleExists('devel')) {
|
||||
$links['entity.user_role.devel_load.' . $role->id()] = array(
|
||||
'title' => t('Devel'),
|
||||
'route_name' => 'entity.user_role.devel_load',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.user_role.edit_form.' . $role->id(),
|
||||
'route_parameters' => array('user_role' => $role->id()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($moduleHandler->moduleExists('node')) {
|
||||
$links['node.add_page']['parent'] = 'system.admin_content';
|
||||
$links['node.type_add'] = array(
|
||||
'title' => t('Add content type'),
|
||||
'route_name' => 'node.type_add',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.node_type.collection',
|
||||
'weight' => -5
|
||||
);
|
||||
// Add node links for each content type.
|
||||
foreach (node_type_get_names() as $machine_name => $label) {
|
||||
$links['node.add.' . $machine_name] = array(
|
||||
'title' => $label,
|
||||
'route_name' => 'node.add',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'node.add_page',
|
||||
'route_parameters' => array('node_type' => $machine_name),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($moduleHandler->moduleExists('field_ui')) {
|
||||
$links['field_ui.entity_form_mode_add'] = array(
|
||||
'title' => t('Add new form mode'),
|
||||
'route_name' => 'field_ui.entity_form_mode_add',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.entity_form_mode.collection',
|
||||
);
|
||||
$links['field_ui.entity_view_mode_add'] = array(
|
||||
'title' => t('Add new view mode'),
|
||||
'route_name' => 'field_ui.entity_view_mode_add',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.entity_view_mode.collection',
|
||||
);
|
||||
}
|
||||
|
||||
if ($moduleHandler->moduleExists('taxonomy')) {
|
||||
$links['entity.taxonomy_vocabulary.add_form'] = array(
|
||||
'title' => t('Add vocabulary'),
|
||||
'route_name' => 'entity.taxonomy_vocabulary.add_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.taxonomy_vocabulary.collection',
|
||||
'weight' => -5,
|
||||
);
|
||||
}
|
||||
|
||||
if ($moduleHandler->moduleExists('menu_ui')) {
|
||||
$links['entity.menu.add_form'] = array(
|
||||
'title' => t('Add menu'),
|
||||
'route_name' => 'entity.menu.add_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.menu.collection',
|
||||
'weight' => -50
|
||||
);
|
||||
// Adds links to /admin/structure/menu.
|
||||
foreach (menu_ui_get_menus() as $machine_name => $label) {
|
||||
$links['entity.menu.edit_form.' . $machine_name] = array(
|
||||
'title' => $label,
|
||||
'route_name' => 'entity.menu.edit_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.menu.collection',
|
||||
'route_parameters' => array('menu' => $machine_name),
|
||||
);
|
||||
$links['entity.menu.delete_form.' . $machine_name] = array(
|
||||
'title' => t('Delete'),
|
||||
'route_name' => 'entity.menu.delete_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.menu.edit_form.' . $machine_name,
|
||||
'route_parameters' => array('menu' => $machine_name),
|
||||
);
|
||||
if ($moduleHandler->moduleExists('devel')) {
|
||||
$links['entity.menu.devel_load.' . $machine_name] = array(
|
||||
'title' => t('Devel'),
|
||||
'route_name' => 'entity.menu.devel_load',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.menu.edit_form.' . $machine_name,
|
||||
'route_parameters' => array('menu' => $machine_name),
|
||||
);
|
||||
}
|
||||
$links['entity.menu.add_link_form.' . $machine_name] = array(
|
||||
'title' => t('Add link'),
|
||||
'route_name' => 'entity.menu.add_link_form',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.menu.edit_form.' . $machine_name,
|
||||
'route_parameters' => array('menu' => $machine_name),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// If module block_content is enabled.
|
||||
if ($moduleHandler->moduleExists('block_content')) {
|
||||
$links['block_content.add_page'] = array(
|
||||
'title' => t('Add custom block'),
|
||||
'route_name' => 'block_content.add_page',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'block.admin_display',
|
||||
'weight' => -100
|
||||
);
|
||||
$links['entity.block_content.collection'] = array(
|
||||
'title' => t('Custom block library'),
|
||||
'route_name' => 'entity.block_content.collection',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'block.admin_display',
|
||||
);
|
||||
$links['entity.block_content_type.collection'] = array(
|
||||
'title' => t('Types'),
|
||||
'route_name' => 'entity.block_content_type.collection',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'block.admin_display',
|
||||
);
|
||||
}
|
||||
|
||||
// If module Contact is enabled.
|
||||
if ($moduleHandler->moduleExists('contact')) {
|
||||
$links['contact.form_add'] = array(
|
||||
'title' => t('Add contact form'),
|
||||
'route_name' => 'contact.form_add',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.contact_form.collection',
|
||||
'weight' => -5
|
||||
);
|
||||
}
|
||||
|
||||
// If module Update Manager is enabled.
|
||||
if ($moduleHandler->moduleExists('update')) {
|
||||
$links['update.module_update'] = array(
|
||||
'title' => t('Update'),
|
||||
'route_name' => 'update.module_update',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'system.modules_list',
|
||||
);
|
||||
$links['update.module_install'] = array(
|
||||
'title' => t('Install new module'),
|
||||
'route_name' => 'update.module_install',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'system.modules_list',
|
||||
);
|
||||
}
|
||||
|
||||
// If module Devel is enabled.
|
||||
if ($moduleHandler->moduleExists('devel')) {
|
||||
$links['admin_development'] = array(
|
||||
'title' => t('Development'),
|
||||
'route_name' => 'system.admin_config_development',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_toolbar_tools.help',
|
||||
'weight' => '-8',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.admin_settings'] = array(
|
||||
'title' => t('Devel settings'),
|
||||
'route_name' => 'devel.admin_settings',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_development',
|
||||
'weight' => '-1',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.configs_list'] = array(
|
||||
'title' => t('Config editor'),
|
||||
'route_name' => 'devel.configs_list',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_development',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.reinstall'] = array(
|
||||
'title' => t('Reinstall modules'),
|
||||
'route_name' => 'devel.reinstall',
|
||||
'parent' => 'admin_development',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.menu_rebuild'] = array(
|
||||
'title' => t('Rebuild menu'),
|
||||
'route_name' => 'devel.menu_rebuild',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_development',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.state_system_page'] = array(
|
||||
'title' => t('State editor'),
|
||||
'route_name' => 'devel.state_system_page',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_development',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.theme_registry'] = array(
|
||||
'title' => t('Theme registry'),
|
||||
'route_name' => 'devel.theme_registry',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_development',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.entity_info_page'] = array(
|
||||
'title' => t('Entity Info'),
|
||||
'route_name' => 'devel.entity_info_page',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_development',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.execute_php'] = array(
|
||||
'title' => t('Execute PHP Code'),
|
||||
'route_name' => 'devel.execute_php',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_development',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.session'] = array(
|
||||
'title' => t('Session viewer'),
|
||||
'route_name' => 'devel.session',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_development',
|
||||
);
|
||||
$links['admin_toolbar_tools.devel.elements_page'] = array(
|
||||
'title' => t('Form API field types'),
|
||||
'route_name' => 'devel.elements_page',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'admin_development',
|
||||
);
|
||||
}
|
||||
|
||||
// If module Views Ui enabled.
|
||||
if ($moduleHandler->moduleExists('views_ui')) {
|
||||
$links['views_ui.add'] = array(
|
||||
'title' => t('Add new view'),
|
||||
'route_name' => 'views_ui.add',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'entity.view.collection',
|
||||
'weight' => -5,
|
||||
);
|
||||
}
|
||||
|
||||
$links['system.theme_settings_'] = array(
|
||||
'title' => t('Settings'),
|
||||
'route_name' => 'system.theme_settings',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'system.themes_page',
|
||||
);
|
||||
|
||||
if ($moduleHandler->moduleExists('update')) {
|
||||
$links['update.theme_install_'] = array(
|
||||
'title' => t('Install new theme'),
|
||||
'route_name' => 'update.theme_install',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'system.themes_page',
|
||||
);
|
||||
$links['update.theme_update_'] = array(
|
||||
'title' => t('Update'),
|
||||
'route_name' => 'update.theme_update',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'system.themes_page',
|
||||
);
|
||||
// Lists installed themes.
|
||||
$installed_themes = installedThemes();
|
||||
foreach ($installed_themes as $key_theme => $label_theme) {
|
||||
$links['system.theme_settings_theme' . '.' . $key_theme] = array(
|
||||
'title' => t($label_theme),
|
||||
'route_name' => 'system.theme_settings_theme',
|
||||
'menu_name' => 'admin',
|
||||
'parent' => 'system.theme_settings_',
|
||||
'route_parameters' => array(
|
||||
'theme' => $key_theme,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return installed themes.
|
||||
* @return array
|
||||
*/
|
||||
function installedThemes() {
|
||||
$all_themes = \Drupal::service('theme_handler')->listInfo();
|
||||
$themes_installed = array();
|
||||
foreach ($all_themes as $key_theme => $theme) {
|
||||
if (\Drupal::service('theme_handler')->hasUi($key_theme)) {
|
||||
$themes_installed[$key_theme] = $theme->getName();
|
||||
}
|
||||
}
|
||||
|
||||
return $themes_installed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all links related to entity
|
||||
* @param $entity_type_id
|
||||
* @return array
|
||||
*/
|
||||
function getLinks($entity_type_id) {
|
||||
$entity = \Drupal::entityTypeManager()->getDefinition($entity_type_id);
|
||||
// Get all links related to entity.
|
||||
$links = $entity->getLinkTemplates();
|
||||
|
||||
return $links;
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
admin_toolbar_tools.flush:
|
||||
path: '/admin/flush'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::flushAll'
|
||||
_title: 'Flush all caches'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_toolbar_tools.cssjs:
|
||||
path: '/admin/flush/cssjs'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::flush_js_css'
|
||||
_title: 'Flush Css and Javascript'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_toolbar_tools.plugin:
|
||||
path: '/admin/flush/plugin'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::flush_plugins'
|
||||
_title: 'Plugin'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_toolbar_tools.flush_static:
|
||||
path: '/admin/flush/static-caches'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::flush_static'
|
||||
_title: 'Static caches'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_toolbar_tools.flush_menu:
|
||||
path: '/admin/flush/menu'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::flush_menu'
|
||||
_title: 'Menu'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_toolbar_tools.flush_rendercache:
|
||||
path: '/admin/flush/rendercache'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::cacheRender'
|
||||
_title: 'Render cache'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_toolbar_tools.drupalorg:
|
||||
path: '/admin/drupal8'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::drupal_org'
|
||||
_title: 'Drupal'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_toolbar_tools.listchanges:
|
||||
path: '/admin/drupal/list-changes'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::list_changes'
|
||||
_title: 'List changes'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_toolbar_tools.doc:
|
||||
path: '/admin/drupal/documentation'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::documentation'
|
||||
_title: 'Documentation D8'
|
||||
requirements:
|
||||
_permission: 'access administration pages'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_development:
|
||||
path: '/admin/development'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::development'
|
||||
_title: 'Development'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
_csrf_token: 'TRUE'
|
||||
admin_toolbar.run.cron:
|
||||
path: '/run-cron'
|
||||
defaults:
|
||||
_controller: '\Drupal\admin_toolbar_tools\Controller\ToolbarController::runCron'
|
||||
_title: 'Run cron'
|
||||
requirements:
|
||||
_permission: 'administer site configuration'
|
||||
_csrf_token: 'TRUE'
|
|
@ -0,0 +1,16 @@
|
|||
.toolbar-icon-admin-toolbar-tools-help {
|
||||
text-indent: -9999px;
|
||||
}
|
||||
|
||||
.toolbar-icon-admin-toolbar-tools-help:before {
|
||||
background-image: url(../misc/icons/ffffff/d8-item.svg);
|
||||
padding-bottom: 0;
|
||||
padding-left: 4px;
|
||||
padding-right: 8px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.toolbar-icon-admin-toolbar-tools-help:active:before,
|
||||
.toolbar-icon-admin-toolbar-tools-help.active:before {
|
||||
background-image: url(../misc/icons/ffffff/d8-item.svg);
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" preserveAspectRatio="xMinYMin" viewBox="0 0 611 646"><path fill="#2ba9e0" d="M 161.14248,607.07981 C 135.931,577.51327 120.7662,539.33875 120.7662,497.60876 c 0,-87.01545 66.15644,-158.68624 151.648,-168.60413 -14.59612,-20.95856 -23.31588,-46.40824 -23.31588,-73.72922 0,-71.85792 58.95316,-129.86822 131.7442,-129.86822 6.06592,0 11.94228,0.37426 17.62908,1.12278 C 355.44148,89.85249 312.41136,52.61362 278.48012,12.00641 295.73008,190.15417 114.1316,125.40719 46.8378,289.70733 1.91208,399.73977 42.47792,535.78328 161.14248,607.07981 Z m 143.1178,-351.8044 c 0,41.72999 34.31036,75.41339 76.39268,75.41339 42.08232,0 76.58224,-33.87053 76.58224,-75.41339 0,-41.72999 -34.31036,-75.41339 -76.39268,-75.41339 -42.08232,0 -76.58224,33.6834 -76.58224,75.41339 z m 112.97776,124.81571 c 29.57136,30.50219 47.76912,71.85792 47.76912,117.51764 0,57.82317 -29.19224,108.72253 -73.73884,139.41185 82.4586,-25.07542 150.7002,-86.26693 181.21936,-160.37041 42.27188,-102.54724 2.8434,-179.6448 -63.12348,-249.63142 2.08516,8.98224 3.22252,18.52587 3.22252,28.0695 -0.18956,59.50734 -40.37628,109.47105 -95.34868,125.00284 z m -124.35136,18.90013 c -55.16196,0 -99.89812,44.16268 -99.89812,98.61751 0,54.45483 44.73616,98.61751 99.89812,98.61751 55.16196,0 99.89812,-44.16268 99.89812,-98.61751 0,-54.45483 -44.73616,-98.61751 -99.89812,-98.61751 z" /></svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1,156 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\admin_toolbar_tools\Controller;
|
||||
|
||||
use Drupal\Core\Cache\CacheBackendInterface;
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
use Drupal\Core\CronInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Drupal\Core\Menu\ContextualLinkManager;
|
||||
use Drupal\Core\Menu\LocalActionManager;
|
||||
use Drupal\Core\Menu\LocalTaskManager;
|
||||
use Drupal\Core\Menu\MenuLinkManager;
|
||||
|
||||
/**
|
||||
* Class ToolbarController
|
||||
* @package Drupal\admin_toolbar_tools\Controller
|
||||
*/
|
||||
class ToolbarController extends ControllerBase {
|
||||
|
||||
/**
|
||||
* The cron service.
|
||||
*
|
||||
* @var $cron \Drupal\Core\CronInterface
|
||||
*/
|
||||
protected $cron;
|
||||
protected $menuLinkManager;
|
||||
protected $contextualLinkManager;
|
||||
protected $localTaskLinkManager;
|
||||
protected $localActionLinkManager;
|
||||
protected $cacheRender;
|
||||
|
||||
/**
|
||||
* Constructs a CronController object.
|
||||
*
|
||||
* @param \Drupal\Core\CronInterface $cron
|
||||
* The cron service.
|
||||
*/
|
||||
public function __construct(CronInterface $cron,
|
||||
MenuLinkManager $menuLinkManager,
|
||||
ContextualLinkManager $contextualLinkManager,
|
||||
LocalTaskManager $localTaskLinkManager,
|
||||
LocalActionManager $localActionLinkManager,
|
||||
CacheBackendInterface $cacheRender) {
|
||||
$this->cron = $cron;
|
||||
$this->menuLinkManager = $menuLinkManager;
|
||||
$this->contextualLinkManager = $contextualLinkManager;
|
||||
$this->localTaskLinkManager = $localTaskLinkManager;
|
||||
$this->localActionLinkManager = $localActionLinkManager;
|
||||
$this->cacheRender = $cacheRender;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function create(ContainerInterface $container) {
|
||||
return new static(
|
||||
$container->get('cron'),
|
||||
$container->get('plugin.manager.menu.link'),
|
||||
$container->get('plugin.manager.menu.contextual_link'),
|
||||
$container->get('plugin.manager.menu.local_task'),
|
||||
$container->get('plugin.manager.menu.local_action'),
|
||||
$container->get('cache.render')
|
||||
);
|
||||
}
|
||||
|
||||
// Reload the previous page.
|
||||
public function reload_page() {
|
||||
$request = \Drupal::request();
|
||||
if($request->server->get('HTTP_REFERER')) {
|
||||
return $request->server->get('HTTP_REFERER');
|
||||
}
|
||||
else{
|
||||
return '/';
|
||||
}
|
||||
}
|
||||
|
||||
// Flushes all caches.
|
||||
public function flushAll() {
|
||||
drupal_flush_all_caches();
|
||||
drupal_set_message($this->t('All caches cleared.'));
|
||||
return new RedirectResponse($this->reload_page());
|
||||
}
|
||||
|
||||
// Flushes css and javascript caches.
|
||||
public function flush_js_css() {
|
||||
\Drupal::state()
|
||||
->set('system.css_js_query_string', base_convert(REQUEST_TIME, 10, 36));
|
||||
drupal_set_message($this->t('CSS and JavaScript cache cleared.'));
|
||||
return new RedirectResponse($this->reload_page());
|
||||
}
|
||||
|
||||
// Flushes plugins caches.
|
||||
public function flush_plugins() {
|
||||
\Drupal::service('plugin.cache_clearer')->clearCachedDefinitions();
|
||||
drupal_set_message($this->t('Plugins cache cleared.'));
|
||||
return new RedirectResponse($this->reload_page());
|
||||
}
|
||||
|
||||
// Resets all static caches.
|
||||
public function flush_static() {
|
||||
drupal_static_reset();
|
||||
drupal_set_message($this->t('Static cache cleared.'));
|
||||
return new RedirectResponse($this->reload_page());
|
||||
}
|
||||
|
||||
// Clears all cached menu data.
|
||||
public function flush_menu() {
|
||||
menu_cache_clear_all();
|
||||
$this->menuLinkManager->rebuild();
|
||||
$this->contextualLinkManager->clearCachedDefinitions();
|
||||
$this->localTaskLinkManager->clearCachedDefinitions();
|
||||
$this->localActionLinkManager->clearCachedDefinitions();
|
||||
drupal_set_message($this->t('Routing and links cache cleared.'));
|
||||
return new RedirectResponse($this->reload_page());
|
||||
}
|
||||
|
||||
// Links to drupal.org home page.
|
||||
public function drupal_org() {
|
||||
$response = new RedirectResponse("https://www.drupal.org");
|
||||
$response->send();
|
||||
return $response;
|
||||
}
|
||||
|
||||
// Displays the administration link Development.
|
||||
public function development() {
|
||||
return new RedirectResponse('/admin/structure/menu/');
|
||||
}
|
||||
|
||||
// Access to Drupal 8 changes (list changes of the different versions of drupal core).
|
||||
public function list_changes() {
|
||||
$response = new RedirectResponse("https://www.drupal.org/list-changes");
|
||||
$response->send();
|
||||
return $response;
|
||||
}
|
||||
|
||||
// Adds a link to the Drupal 8 documentation.
|
||||
public function documentation() {
|
||||
$response = new RedirectResponse("https://api.drupal.org/api/drupal/8");
|
||||
$response->send();
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function runCron() {
|
||||
$this->cron->run();
|
||||
drupal_set_message($this->t('Cron ran successfully.'));
|
||||
return new RedirectResponse($this->reload_page());
|
||||
}
|
||||
|
||||
public function cacheRender() {
|
||||
$this->cacheRender->invalidateAll();
|
||||
drupal_set_message($this->t('Render cache cleared.'));
|
||||
return new RedirectResponse($this->reload_page());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\admin_toolbar_tools\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
|
||||
/**
|
||||
* Tests for the existence of Admin Toolbar tools new links.
|
||||
*
|
||||
* @group admin_toolbar
|
||||
*/
|
||||
class AdminToolbarToolsAlterTest extends WebTestBase {
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = ['toolbar', 'admin_toolbar', 'admin_toolbar_tools'];
|
||||
|
||||
/**
|
||||
* A test user with permission to access the administrative toolbar.
|
||||
*
|
||||
* @var \Drupal\user\UserInterface
|
||||
*/
|
||||
protected $adminUser;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
// Create and log in an administrative user.
|
||||
$this->adminUser = $this->drupalCreateUser([
|
||||
'access toolbar',
|
||||
'access administration pages',
|
||||
]);
|
||||
$this->drupalLogin($this->adminUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests for a the hover of sub menus.
|
||||
*/
|
||||
function testAdminToolbarTools() {
|
||||
// Assert that special menu items are present in the HTML.
|
||||
$this->assertRaw('class="toolbar-icon toolbar-icon-admin-toolbar-tools-flush"');
|
||||
}
|
||||
}
|
17
web/modules/contrib/admin_toolbar/composer.json
Normal file
17
web/modules/contrib/admin_toolbar/composer.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "drupal/admin_toolbar",
|
||||
"description": "Admin Toolbar improve the default Drupal Toolbar, it lets the hover of sub menus.",
|
||||
"type": "drupal-module",
|
||||
"homepage": "http://drupal.org/project/admin_toolbar",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Mohamed Anis Taktak",
|
||||
"homepage": "https://www.drupal.org/u/matio89"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://www.drupal.org/project/issues/admin_toolbar"
|
||||
},
|
||||
"license": "GPL-2.0+",
|
||||
"require": { }
|
||||
}
|
122
web/modules/contrib/admin_toolbar/css/admin.toolbar.css
Normal file
122
web/modules/contrib/admin_toolbar/css/admin.toolbar.css
Normal file
|
@ -0,0 +1,122 @@
|
|||
/*---------------------- menu horizontal hover---- Krout Fethi FrontEnd Developer-----*/
|
||||
.toolbar-tray-horizontal .menu-item:hover {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal .menu-item:focus {
|
||||
background: #abeae4;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal .menu-item--expanded .menu {
|
||||
background: #fff;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal .menu-item--expanded {
|
||||
background-color: #f5f5f2;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal ul li.menu-item {
|
||||
border-top: none transparent;
|
||||
border-right: 1px solid #dddddd;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
border-left: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.toolbar .toolbar-tray-horizontal .menu-item:last-child {
|
||||
border-left: 1px solid #dddddd;
|
||||
border-right: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.toolbar .toolbar-tray-horizontal ul ul li.menu-item:first-child {
|
||||
border-top: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal li.menu-item--expanded:hover ul ul,
|
||||
.toolbar-tray-horizontal li.menu-item--expanded:hover ul ul ul,
|
||||
.toolbar-tray-horizontal li.menu-item--expanded:hover ul ul ul ul,
|
||||
.toolbar-tray-horizontal li.menu-item--expanded:hover ul ul ul ul ul {
|
||||
display: none;
|
||||
left: -999em; /* LTR */
|
||||
}
|
||||
|
||||
/* Lists nested under hovered list items */
|
||||
.toolbar-tray-horizontal li.menu-item--expanded:hover ul,
|
||||
.toolbar-tray-horizontal li li.menu-item--expanded:hover ul,
|
||||
.toolbar-tray-horizontal li li li.menu-item--expanded:hover ul,
|
||||
.toolbar-tray-horizontal li li li li.menu-item--expanded:hover ul,
|
||||
.toolbar-tray-horizontal li li li li li.menu-item--expanded:hover ul {
|
||||
display: block;
|
||||
left: auto; /* LTR */
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal .menu ul li a,
|
||||
.toolbar-tray-horizontal .menu ul .toolbar-icon {
|
||||
padding: 12px 15px 12px 12px;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal ul li.menu-item--expanded:hover ul {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
box-shadow: 2px 2px 3px hsla(0, 0%, 0%, 0.4);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal ul li.menu-item--expanded .menu-item > ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal ul li.menu-item--expanded ul li.menu-item--expanded {
|
||||
background-position: center right;
|
||||
background-image: url('../misc/icons/0074bd/chevron-right.svg');
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal ul li.menu-item--expanded .menu-item:hover ul {
|
||||
display: block;
|
||||
margin: -40px 0 0 197px;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal li:hover ul li {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.toolbar-tray-horizontal .toolbar .level-2 > ul {
|
||||
position: absolute;
|
||||
padding-top: 0;
|
||||
top: 0;
|
||||
left: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.toolbar .toolbar-tray-vertical li.open > ul.toolbar-menu.clearfix {
|
||||
display: block;
|
||||
}
|
||||
|
||||
[dir="rtl"] .toolbar-tray-horizontal .toolbar .level-2 > ul {
|
||||
position: absolute;
|
||||
padding-top: 0;
|
||||
top: 0;
|
||||
right: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .toolbar-tray-horizontal li:hover ul li {
|
||||
float: none !important;
|
||||
}
|
||||
|
||||
[dir="rtl"] .toolbar .toolbar-menu ul .toolbar-icon {
|
||||
padding-left: 1.3333em;
|
||||
}
|
||||
|
||||
[dir="rtl"] .toolbar-tray-horizontal ul li.menu-item--expanded .menu-item:hover ul {
|
||||
margin: -40px 197px 0 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] .toolbar-tray-horizontal ul li.menu-item--expanded ul li.menu-item--expanded {
|
||||
background-position: center left;
|
||||
background-image: url('../misc/icons/0074bd/chevron-left.svg');
|
||||
background-repeat: no-repeat;
|
||||
}
|
5
web/modules/contrib/admin_toolbar/js/admin_toolbar.js
Normal file
5
web/modules/contrib/admin_toolbar/js/admin_toolbar.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
(function($) {
|
||||
$(document).ready(function() {
|
||||
$('a.toolbar-icon').removeAttr('title');
|
||||
});
|
||||
})(jQuery);
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#0074bd" d="M7.951 7.645c-.193.196-.193.516 0 .71l3.258 3.29c.193.193.191.519-.002.709l-1.371 1.371c-.193.192-.512.191-.707 0l-5.335-5.371c-.194-.194-.194-.514 0-.708l5.335-5.369c.195-.195.514-.195.707-.001l1.371 1.371c.193.194.195.513.002.709l-3.258 3.289z"/></svg>
|
After Width: | Height: | Size: 342 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#0074bd" d="M8.053 8.355c.193-.195.193-.517 0-.711l-3.26-3.289c-.193-.195-.192-.514.002-.709l1.371-1.371c.194-.194.512-.193.706.001l5.335 5.369c.195.195.195.515 0 .708l-5.335 5.37c-.194.192-.512.193-.706.002l-1.371-1.371c-.194-.195-.195-.514-.002-.709l3.26-3.29z"/></svg>
|
After Width: | Height: | Size: 347 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#0074bd" d="M8.053 8.355c.193-.195.193-.517 0-.711l-3.26-3.289c-.193-.195-.192-.514.002-.709l1.371-1.371c.194-.194.512-.193.706.001l5.335 5.369c.195.195.195.515 0 .708l-5.335 5.37c-.194.192-.512.193-.706.002l-1.371-1.371c-.194-.195-.195-.514-.002-.709l3.26-3.29z"/></svg>
|
After Width: | Height: | Size: 347 B |
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\admin_toolbar\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
|
||||
/**
|
||||
* Test the existence of Admin Toolbar module.
|
||||
*
|
||||
* @group admin_toolbar
|
||||
*/
|
||||
class AdminToolbarAlterTest extends WebTestBase {
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = ['toolbar', 'breakpoint', 'admin_toolbar'];
|
||||
|
||||
/**
|
||||
* A test user with permission to access the administrative toolbar.
|
||||
*
|
||||
* @var \Drupal\user\UserInterface
|
||||
*/
|
||||
protected $adminUser;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
// Create and log in an administrative user.
|
||||
$this->adminUser = $this->drupalCreateUser([
|
||||
'access toolbar',
|
||||
'access administration pages',
|
||||
]);
|
||||
$this->drupalLogin($this->adminUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests for a the hover of sub menus.
|
||||
*/
|
||||
function testAdminToolbar() {
|
||||
// Assert that expanded links are present in the HTML.
|
||||
$this->assertRaw('class="toolbar-icon toolbar-icon-user-admin-index"');
|
||||
}
|
||||
}
|
|
@ -14,7 +14,9 @@ $settings['container_yamls'][] = __DIR__ . '/services.yml';
|
|||
* a local development environment, to insure that
|
||||
* the site settings remain consistent.
|
||||
*/
|
||||
include __DIR__ . "/settings.pantheon.php";
|
||||
if (file_exists(__DIR__ . '/settings.pantheon.php')) {
|
||||
include __DIR__ . "/settings.pantheon.php";
|
||||
}
|
||||
|
||||
$settings['install_profile'] = 'standard';
|
||||
|
||||
|
|
Reference in a new issue