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
e78c1b22
Commit
e78c1b22
authored
5 years ago
by
Jeff Sturek
Browse files
Options
Downloads
Patches
Plain Diff
Move repeated constants to one spot
parent
0557140a
No related branches found
Branches containing commit
No related tags found
1 merge request
!16
Upgrade ruby to 2.6.5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app.rb
+4
-0
4 additions, 0 deletions
app.rb
views/calendar.erb
+1
-5
1 addition, 5 deletions
views/calendar.erb
views/reserve.erb
+1
-5
1 addition, 5 deletions
views/reserve.erb
views/resource_calendar.erb
+1
-5
1 addition, 5 deletions
views/resource_calendar.erb
with
7 additions
and
15 deletions
app.rb
+
4
−
0
View file @
e78c1b22
...
...
@@ -29,6 +29,10 @@ DIRECTORY_URL = 'https://directory.unl.edu/'
NIS_SS_ID
=
ServiceSpace
.
where
(
:name
=>
'Innovation Studio'
).
first
.
id
NIS_TOOL_RESOURCE_CLASS_ID
=
1
HALF_HOUR_HEIGHT
=
28
# pixel height of half-hour sections in calendar. DO NOT CHANGE RESPONSIVELY
SIX_AM_MINUTES
=
360
# start time of calendar
EIGHT_PM_MINUTES
=
1200
# end time of calendar
# this gives the user messages
def
flash
(
type
,
header
,
message
)
session
[
"notice"
]
||=
[]
...
...
This diff is collapsed.
Click to expand it.
views/calendar.erb
+
1
−
5
View file @
e78c1b22
<%
events_groups
=
events
.
group_by
do
|
event
|
event
.
start_time
.
in_time_zone
.
strftime
(
"%Y/%m/%d"
)
end
HALF_HOUR_HEIGHT
=
28
# pixel height of half-hour sections in calendar. DO NOT CHANGE RESPONSIVELY
SIX_AM_MINUTES
=
360
# start time of calendar
EIGHT_PM_MINUTES
=
1200
# end time of calendar
end
%>
<div
id=
"pagetitle"
>
...
...
This diff is collapsed.
Click to expand it.
views/reserve.erb
+
1
−
5
View file @
e78c1b22
...
...
@@ -12,11 +12,7 @@ unless reservation.nil?
end
start_hour
+=
12
if
start_hour
==
0
start_minute
=
reservation
.
start_time
.
in_time_zone
.
min
end
HALF_HOUR_HEIGHT
=
28
# pixel height of half-hour sections in calendar. DO NOT CHANGE RESPONSIVELY
SIX_AM_MINUTES
=
360
# start time of calendar
EIGHT_PM_MINUTES
=
1200
# end time of calendar
end
%>
<h3
class=
"dcf-txt-h4"
>
<%=
reservation
.
nil?
?
'Reserve Time for '
:
'Edit Reservation for '
%><%=
resource
.
name
%>
</h3>
...
...
This diff is collapsed.
Click to expand it.
views/resource_calendar.erb
+
1
−
5
View file @
e78c1b22
<%
reservation_groups
=
reservations
.
group_by
do
|
reservation
|
reservation
.
start_time
.
in_time_zone
.
strftime
(
"%Y/%m/%d"
)
end
HALF_HOUR_HEIGHT
=
28
# pixel height of half-hour sections in calendar. DO NOT CHANGE RESPONSIVELY
SIX_AM_MINUTES
=
360
# start time of calendar
EIGHT_PM_MINUTES
=
1200
# end time of calendar
end
%>
<%
if
kiosk_mode
%>
...
...
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