Skip to content
Snippets Groups Projects
Commit e78c1b22 authored by Jeff Sturek's avatar Jeff Sturek
Browse files

Move repeated constants to one spot

parent 0557140a
No related branches found
No related tags found
1 merge request!16Upgrade ruby to 2.6.5
......@@ -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"] ||= []
......
<% 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">
......
......@@ -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>
......
<% 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 %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment