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
c54053a1
Commit
c54053a1
authored
5 months ago
by
Kevin Paxman
Browse files
Options
Downloads
Patches
Plain Diff
EXPHR: add support for newly-created (in uw_cfg_common) website lead role
parent
7d93918b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
Feature/exptime kpaxman site info
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
css/uw_dashboard.css
+1
-0
1 addition, 0 deletions
css/uw_dashboard.css
uw_dashboard.module
+19
-2
19 additions, 2 deletions
uw_dashboard.module
with
20 additions
and
2 deletions
css/uw_dashboard.css
+
1
−
0
View file @
c54053a1
...
...
@@ -13,4 +13,5 @@
.dashboard__site-info
{
float
:
right
;
margin-bottom
:
0.2rem
;
}
This diff is collapsed.
Click to expand it.
uw_dashboard.module
+
19
−
2
View file @
c54053a1
...
...
@@ -168,8 +168,25 @@ function uw_dashboard_preprocess_page(&$variables) {
$string
.
=
\Drupal
::
service
(
'extension.list.profile'
)
->
getList
()[
'uw_base_profile'
]
->
info
[
'version'
];
// Get the website lead(s).
$string
.
=
' • Website lead: '
;
$string
.
=
'not set'
;
$query
=
\Drupal
::
entityQuery
(
'user'
)
->
condition
(
'status'
,
1
)
->
condition
(
'roles'
,
'uw_role_website_lead'
)
->
sort
(
'field_uw_last_name'
,
'ASC'
)
->
sort
(
'field_uw_first_name'
,
'ASC'
);
$uids
=
$query
->
execute
();
$users
=
User
::
loadMultiple
(
$uids
);
$user_list
=
[];
foreach
(
$users
as
$user
)
{
$user_list
[]
=
Link
::
fromTextAndUrl
(
$user
->
getDisplayName
(),
Url
::
fromUri
(
'mailto:'
.
$user
->
getEmail
()))
->
toString
();
}
if
(
!
$user_list
)
{
$user_list
[]
=
'not set'
;
}
$string
.
=
' • Website lead'
;
if
(
count
(
$user_list
)
>
1
)
{
$string
.
=
's'
;
}
$string
.
=
': '
.
implode
(
', '
,
$user_list
);
// Get the site owner(s).
$query
=
\Drupal
::
entityQuery
(
'user'
)
...
...
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