Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_dashboard
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor 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
WCMS
uw_dashboard
Commits
69655891
Commit
69655891
authored
2 months ago
by
Kevin Paxman
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-7250: add role details (preliminary, waiting on final text)
parent
dc6536b0
No related branches found
No related tags found
1 merge request
!45
Feature/istwcms 7250 kpaxman info bar update
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
css/uw_dashboard.css
+37
-0
37 additions, 0 deletions
css/uw_dashboard.css
js/uw_dashboard.js
+8
-0
8 additions, 0 deletions
js/uw_dashboard.js
uw_dashboard.libraries.yml
+2
-0
2 additions, 0 deletions
uw_dashboard.libraries.yml
uw_dashboard.module
+16
-2
16 additions, 2 deletions
uw_dashboard.module
with
63 additions
and
2 deletions
css/uw_dashboard.css
+
37
−
0
View file @
69655891
...
...
@@ -15,3 +15,40 @@
float
:
right
;
margin-bottom
:
0.2rem
;
}
.dashboard__site-info
details
{
display
:
inline-block
;
position
:
relative
;
margin
:
0
;
padding
:
0
;
}
.dashboard__site-info
summary
{
cursor
:
help
;
list-style
:
none
;
border-bottom
:
1px
black
dashed
;
text-transform
:
none
;
padding
:
0
;
font-weight
:
normal
;
}
.dashboard__site-info
.info
{
position
:
absolute
;
right
:
-1rem
;
background
:
#f5f5f2
;
margin-top
:
3px
;
padding
:
10px
;
width
:
20ch
;
z-index
:
1
;
}
.dashboard__site-info
.info
p
{
margin
:
0
;
}
.dashboard__site-info
.more
{
text-align
:
right
;
padding-top
:
10px
;
font-size
:
90%
;
text-wrap
:
balance
;
}
This diff is collapsed.
Click to expand it.
js/uw_dashboard.js
0 → 100644
+
8
−
0
View file @
69655891
document
.
addEventListener
(
'
click
'
,
function
(
event
)
{
const
detailsElements
=
document
.
querySelectorAll
(
'
details[name="uw-roles"]
'
);
detailsElements
.
forEach
(
details
=>
{
if
(
!
details
.
contains
(
event
.
target
))
{
details
.
removeAttribute
(
'
open
'
);
}
});
});
This diff is collapsed.
Click to expand it.
uw_dashboard.libraries.yml
+
2
−
0
View file @
69655891
...
...
@@ -5,3 +5,5 @@ uw-styles:
css
:
theme
:
css/uw_dashboard.css
:
{}
js
:
js/uw_dashboard.js
:
{}
This diff is collapsed.
Click to expand it.
uw_dashboard.module
+
16
−
2
View file @
69655891
...
...
@@ -137,10 +137,17 @@ function uw_dashboard_preprocess_page(&$variables) {
if
(
!
$user_list
)
{
$user_list
[]
=
'not set'
;
}
$string
.
=
' • Website lead'
;
$string
.
=
' • <details name="uw-roles"><summary>'
;
$string
.
=
'Website lead'
;
if
(
count
(
$user_list
)
>
1
)
{
$string
.
=
's'
;
}
$string
.
=
'</summary>'
;
$string
.
=
'<div class="info">
<p>Responsible for the holistic approach to the management and maintenance of a website.</p>
<p class="more"><a href="https://uwaterloo.ca/web-resources/website-lead/the-website-lead">more details on the website lead role</a></p>
</div>'
;
$string
.
=
'</details>'
;
$string
.
=
': '
.
implode
(
', '
,
$user_list
);
// Get the site owner(s).
...
...
@@ -158,10 +165,17 @@ function uw_dashboard_preprocess_page(&$variables) {
if
(
!
$user_list
)
{
$user_list
[]
=
'not set'
;
}
$string
.
=
' • Site owner'
;
$string
.
=
' • <details name="uw-roles"><summary>'
;
$string
.
=
'Site owner'
;
if
(
count
(
$user_list
)
>
1
)
{
$string
.
=
's'
;
}
$string
.
=
'</summary>'
;
$string
.
=
' <div class="info">
<p>Manages site user access and configures certain site settings.</p>
<p class="more"><a href="https://uwaterloo.ca/web-resources/website-lead/site-owner-role">more details on the site owner role</a></p>
</div>'
;
$string
.
=
'</details>'
;
$string
.
=
': '
.
implode
(
', '
,
$user_list
);
// Get the site owner(s).
...
...
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