Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dashboards-3295719
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
dashboards-3295719
Commits
87f01081
Commit
87f01081
authored
5 years ago
by
Erik Seifert
Browse files
Options
Downloads
Patches
Plain Diff
Fix: add dashboard icon
parent
b16e0c84
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
css/dashboard.css
+2
-6
2 additions, 6 deletions
css/dashboard.css
dashboards.module
+13
-5
13 additions, 5 deletions
dashboards.module
with
15 additions
and
11 deletions
css/dashboard.css
+
2
−
6
View file @
87f01081
.toolbar-icon-dashboard
:before
{
background-image
:
url(../images/dashboard.svg)
;
}
.toolbar
.toolbar-menu-administration-dashboard.item-list
ul
li
{
margin
:
0
;
.toolbar-bar
.toolbar-item.toolbar-menu-administration-dashboard
:before
{
background-image
:
url("../images/dashboard.svg")
;
}
@keyframes
pulse-throbber
{
...
...
This diff is collapsed.
Click to expand it.
dashboards.module
+
13
−
5
View file @
87f01081
...
...
@@ -57,10 +57,21 @@ function dashboards_toolbar() {
'tags'
=>
[
'config:dashboard_list'
,
],
'contexts'
=>
[
'user.permissions'
,
],
],
];
$boards
=
\Drupal
::
entityManager
()
->
getStorage
(
'dashboard'
)
->
loadMultiple
();
$entityTypeManager
=
\Drupal
::
entityTypeManager
();
$boards
=
$entityTypeManager
->
getStorage
(
'dashboard'
)
->
loadMultiple
();
foreach
(
$boards
as
$key
=>
$board
)
{
if
(
!
$board
->
access
(
'view'
,
\Drupal
::
currentUser
()))
{
unset
(
$boards
[
$key
]);
}
}
$boards
=
array_values
(
$boards
);
$links
=
[];
foreach
(
$boards
as
$board
)
{
$link
=
$board
->
toLink
(
$board
->
label
())
->
toRenderable
();
...
...
@@ -74,7 +85,7 @@ function dashboards_toolbar() {
'#title'
=>
t
(
'Dashboards'
),
'#url'
=>
Url
::
fromRoute
(
'<current>'
),
'#attributes'
=>
[
'class'
=>
[
'toolbar-icon-dashboard'
],
'class'
=>
[
'toolbar-icon
'
,
'toolbar-menu-administration
-dashboard'
],
],
],
'tray'
=>
[
...
...
@@ -86,9 +97,6 @@ function dashboards_toolbar() {
'class'
=>
[
'toolbar-menu'
],
],
'#items'
=>
$links
,
'#wrapper_attributes'
=>
[
'class'
=>
[
'toolbar-menu-administration-dashboard'
],
],
],
],
'#weight'
=>
150
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment