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
c104cf51
Commit
c104cf51
authored
7 years ago
by
Tyler R Lemburg
Browse files
Options
Downloads
Patches
Plain Diff
Make a login button there on home page always
parent
f7c73871
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.rb
+2
-0
2 additions, 0 deletions
app.rb
views/home.erb
+8
-2
8 additions, 2 deletions
views/home.erb
with
10 additions
and
2 deletions
app.rb
+
2
−
0
View file @
c104cf51
...
@@ -89,6 +89,8 @@ helpers do
...
@@ -89,6 +89,8 @@ helpers do
def
check_login
def
check_login
if
!
session
[
'cas'
].
nil?
&&
!
session
[
'cas'
][
'user'
].
nil?
if
!
session
[
'cas'
].
nil?
&&
!
session
[
'cas'
][
'user'
].
nil?
@user
=
User
.
find_by
(
:username
=>
session
[
'cas'
][
'user'
],
:creation_method
=>
'CAS'
)
@user
=
User
.
find_by
(
:username
=>
session
[
'cas'
][
'user'
],
:creation_method
=>
'CAS'
)
else
@user
=
nil
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
views/home.erb
+
8
−
2
View file @
c104cf51
...
@@ -8,8 +8,13 @@ If you'd like your organization, building, or department in our scheduler, pleas
...
@@ -8,8 +8,13 @@ If you'd like your organization, building, or department in our scheduler, pleas
to set up a service space. Enjoy!
to set up a service space. Enjoy!
</p>
</p>
<h5
class=
"wdn-center wdn-brand"
>
Your Service Spaces
</h5>
<%
unless
@user
%>
Please login to see your service spaces.
<br>
<a
class=
"wdn-button wdn-button-brand"
href=
"https://login.unl.edu/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?
%>
<%
unless
spaces
.
empty?
%>
<h5
class=
"wdn-center wdn-brand"
>
Your Service Spaces
</h5>
<div
class=
"wdn-grid-set-fourths"
>
<div
class=
"wdn-grid-set-fourths"
>
<%
spaces
.
each
do
|
space
|
%>
<%
spaces
.
each
do
|
space
|
%>
<div
class=
"wdn-col wdn-center"
>
<div
class=
"wdn-col wdn-center"
>
...
@@ -29,7 +34,8 @@ to set up a service space. Enjoy!
...
@@ -29,7 +34,8 @@ to set up a service space. Enjoy!
<%
end
%>
<%
end
%>
<%
unless
resources
.
empty?
%>
<%
unless
resources
.
empty?
%>
<h5
class=
"wdn-brand"
>
Available Resources
</h5>
<h5
class=
"wdn-brand wdn-center"
>
Available Resources
</h5>
<p>
These resources are available to everyone at the University. You will be required to log in to reserve them.
<table>
<table>
<thead>
<thead>
<tr>
<tr>
...
...
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