parent
df369cc985
commit
260b1dd2c3
@ -1,2 +1,21 @@
|
||||
module SchedulesHelper
|
||||
|
||||
def options_for_frequency_hours
|
||||
[
|
||||
['Once A Week', 24 * 7],
|
||||
['Every Other Week', 2 * 24 * 7],
|
||||
['Once A Month', 4 * 24 * 7]
|
||||
]
|
||||
end
|
||||
|
||||
def frequency_description(hours)
|
||||
case hours
|
||||
when (24 * 7)
|
||||
'Once A Week'
|
||||
when (2 * 24 * 7)
|
||||
'Every Other Week'
|
||||
when (4 * 24 * 7)
|
||||
'Once A Month'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
%h1 New schedule
|
||||
= render 'form'
|
||||
= link_to 'Back', school_schedules_path(@schedule.school)
|
||||
.row
|
||||
.offset-2.col-8
|
||||
%h3 Create A New Schedule For This School
|
||||
= render 'form', schedule: @schedule
|
||||
%br
|
||||
%p= link_to 'Back', @school
|
||||
|
||||
Loading…
Reference in new issue