Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UNL Resource Scheduler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Digital Experience Group
UNL Resource Scheduler
Commits
d14a7abb
Commit
d14a7abb
authored
3 years ago
by
Jeff Sturek
Browse files
Options
Downloads
Patches
Plain Diff
Update homepage and add login/logout to nav
parent
30699289
Branches
Branches containing commit
No related tags found
1 merge request
!26
Update homepage and add login/logout to nav
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
views/home.erb
+16
-8
16 additions, 8 deletions
views/home.erb
views/template_partials/navigation.erb
+29
-24
29 additions, 24 deletions
views/template_partials/navigation.erb
with
45 additions
and
32 deletions
views/home.erb
+
16
−
8
View file @
d14a7abb
...
...
@@ -15,13 +15,21 @@ If you'd like your organization, building, or department in our scheduler, pleas
to set up a service space. Enjoy!
</p>
<h2
class=
"dcf-txt-h6 dcf-txt-center"
>
Your Service Spaces
</h5>
<%
unless
@user
%>
Please login to see your service spaces.
<br>
<a
class=
"dcf-btn dcf-btn-primary"
href=
"https://shib.unl.edu/idp/profile/cas/login?service=
<%=
"http://
#{
request
.
host
}#{
":"
if
request
.
port
!=
80
}#{
request
.
port
if
request
.
port
!=
80
}#{
request
.
path_info
}
"
%>
"
>
Login
</a>
<%
end
%>
<%
unless
spaces
.
empty?
%>
<h2
class=
"dcf-txt-h5"
>
Your Service Spaces
</h5>
<%
if
spaces
.
empty?
%>
<%
if
@user
%>
<p>
You are not a member of any service spaces.
</p>
<%
else
%>
<div
class=
"dcf-notice dcf-notice-warning"
hidden
>
<h2>
Log In Required
</h2>
<div>
<p
class=
"dcf-mt-2"
>
Please log in to view your service spaces.
</p>
<a
class=
"dcf-btn dcf-btn-inverse-secondary"
href=
"https://shib.unl.edu/idp/profile/cas/login?service=
<%=
"http://
#{
request
.
host
}#{
":"
if
request
.
port
!=
80
}#{
request
.
port
if
request
.
port
!=
80
}#{
request
.
path_info
}
"
%>
"
>
Log In
</a>
</div>
</div>
<p>
You must log in to view your service space resources.
</p>
<%
end
%>
<%
else
%>
<div
class=
"dcf-grid-full dcf-grid-fourths dcf-col-gap-vw"
>
<%
spaces
.
each
do
|
space
|
%>
<div
class=
"dcf-txt-center"
>
...
...
@@ -41,7 +49,7 @@ Please login to see your service spaces.<br>
<%
end
%>
<%
unless
resources
.
empty?
%>
<h2
class=
"dcf-
tx
t-
h
6 dcf-txt-
center
"
>
Available Resources
</h5>
<h2
class=
"dcf-
m
t-6 dcf-txt-
h5
"
>
Available Resources
</h5>
<p>
These resources are available to everyone at the University. You will be required to log in to reserve them.
<table>
<thead>
...
...
This diff is collapsed.
Click to expand it.
views/template_partials/navigation.erb
+
29
−
24
View file @
d14a7abb
...
...
@@ -3,29 +3,34 @@
<%
unless
@space
.
nil?
%>
<li><a
href=
"
<%=
@space
.
calendar_href
%>
"
>
Calendar
</a></li>
<li><a
href=
"
<%=
@space
.
resources_href
%>
"
>
Resources
</a></li>
<%
unless
@user
.
nil?
||
!
@user
.
is_admin?
(
@space
)
%>
<li><a
href=
"
<%=
@space
.
admin_href
%>
"
title=
"Admin"
>
Admin
</a>
<ul>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_USERS
,
@space
)
||
@user
.
has_permission?
(
Permission
::
SUPER_USER
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/users/"
title=
"Users"
>
Users
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_EVENTS
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/events/"
title=
"Events"
>
Events
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_RESOURCES
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/resources/"
title=
"Resources"
>
Resources
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_SPACE_HOURS
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/hours/"
title=
"Hours"
>
Hours
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_EMAILS
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/email/"
title=
"Email"
>
Email
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
SEE_AGENDA
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/agenda/"
title=
"Agenda"
>
Agenda
</a></li>
<%
end
%>
</ul>
</li>
<%
unless
@user
.
nil?
||
!
@user
.
is_admin?
(
@space
)
%>
<li><a
href=
"
<%=
@space
.
admin_href
%>
"
title=
"Admin"
>
Admin
</a>
<ul>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_USERS
,
@space
)
||
@user
.
has_permission?
(
Permission
::
SUPER_USER
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/users/"
title=
"Users"
>
Users
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_EVENTS
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/events/"
title=
"Events"
>
Events
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_RESOURCES
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/resources/"
title=
"Resources"
>
Resources
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_SPACE_HOURS
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/hours/"
title=
"Hours"
>
Hours
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
MANAGE_EMAILS
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/email/"
title=
"Email"
>
Email
</a></li>
<%
end
%>
<%
if
@user
.
has_permission?
(
Permission
::
SEE_AGENDA
,
@space
)
%>
<li><a
href=
"/
<%=
@space
.
url_name
%>
/admin/agenda/"
title=
"Agenda"
>
Agenda
</a></li>
<%
end
%>
</ul>
</li>
<%
end
%>
<%
end
%>
<%
if
@user
.
nil?
%>
<li><a
href=
"https://shib.unl.edu/idp/profile/cas/login?service=
<%=
"http://
#{
request
.
host
}#{
":"
if
request
.
port
!=
80
}#{
request
.
port
if
request
.
port
!=
80
}#{
request
.
path_info
}
"
%>
"
>
Log In
</a></li>
<%
else
%>
<li><a
href=
"/logout"
title=
"Logout"
>
Logout
</a></li>
<%
end
%>
<%
end
%>
</ul>
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