Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Castopod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ad Aures
Castopod
Commits
f7f9bafc
Commit
f7f9bafc
authored
1 year ago
by
Yassine Doghri
Browse files
Options
Downloads
Patches
Plain Diff
feat(admin): add tooltip for not authorized routes
parent
0bd7ddea
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
modules/Admin/Language/en/Navigation.php
+1
-0
1 addition, 0 deletions
modules/Admin/Language/en/Navigation.php
themes/cp_admin/_partials/_nav_menu.php
+8
-4
8 additions, 4 deletions
themes/cp_admin/_partials/_nav_menu.php
with
9 additions
and
4 deletions
modules/Admin/Language/en/Navigation.php
+
1
−
0
View file @
f7f9bafc
...
...
@@ -12,6 +12,7 @@ return [
'toggle_sidebar'
=>
'Toggle sidebar'
,
'go_to_website'
=>
'Go to website'
,
'go_to_admin'
=>
'Go to admin'
,
'not-authorized'
=>
'Not authorized'
,
'dashboard'
=>
'Dashboard'
,
'admin'
=>
'Home'
,
'podcasts'
=>
'Podcasts'
,
...
...
This diff is collapsed.
Click to expand it.
themes/cp_admin/_partials/_nav_menu.php
+
8
−
4
View file @
f7f9bafc
...
...
@@ -38,13 +38,17 @@
}
?>
<li
class=
"inline-flex"
>
<a
class=
"relative w-full py-3 pl-14 pr-2 text-sm hover:opacity-100 before:absolute before:opacity-0 before:w-5 before:h-5 hover:bg-navigation-active focus:ring-inset focus:ring-accent
<?=
$isActive
<?php
if
(
$isAllowed
)
:
?>
<a
class=
"relative w-full py-3 pl-14 pr-2 text-sm hover:opacity-100 before:content-chevronRightIcon before:absolute before:-ml-5 before:opacity-0 before:w-5 before:h-5 hover:bg-navigation-active focus:ring-inset focus:ring-accent
<?=
$isActive
?
' before:opacity-100 font-semibold inline-flex items-center'
:
' hover:before:opacity-60 focus:before:opacity-60'
?><?=
$isAllowed
?
' before:content-chevronRightIcon before:-ml-5'
:
' before:content-prohibitedIcon before:-ml-6 before:opacity-60 pointer-events-none'
?>
"
href=
"
<?=
route_to
(
$item
,
$podcastId
??
null
,
$episodeId
??
null
)
?>
"
>
<?=
lang
(
:
' hover:before:opacity-60 focus:before:opacity-60'
?>
"
href=
"
<?=
route_to
(
$item
,
$podcastId
??
null
,
$episodeId
??
null
)
?>
"
>
<?=
lang
(
$langKey
.
'.'
.
$item
,
)
?>
</a>
<?php
else
:
?>
<span
data-tooltip=
"right"
title=
"
<?=
lang
(
'Navigation.not-authorized'
)
?>
"
class=
"relative w-full py-3 pr-2 text-sm cursor-not-allowed before:inset-y-0 before:my-auto pl-14 hover:opacity-100 before:absolute before:content-prohibitedIcon before:-ml-5 before:opacity-60 before:w-4 before:h-4 hover:bg-navigation-active focus:ring-inset focus:ring-accent"
>
<?=
lang
(
$langKey
.
'.'
.
$item
,
)
?>
</span>
<?php
endif
;
?>
</li>
<?php
endforeach
;
?>
</ul>
...
...
This diff is collapsed.
Click to expand it.
Yassine Doghri
@yassinedoghri
mentioned in commit
9899870e
·
1 year ago
mentioned in commit
9899870e
mentioned in commit 9899870e28e7c5b74746d0ee095d4eb331d049fe
Toggle commit list
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