From 1d4615e297d5e08cf0cfda648b4e80aa2c1f74e3 Mon Sep 17 00:00:00 2001 From: Siddhant Bajaj Date: Thu, 16 Feb 2017 00:01:40 +0530 Subject: [PATCH] fixed schedule creation --- app/views/admin/schedules/index.html.haml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/app/views/admin/schedules/index.html.haml b/app/views/admin/schedules/index.html.haml index 84670cc6..acfc79a8 100644 --- a/app/views/admin/schedules/index.html.haml +++ b/app/views/admin/schedules/index.html.haml @@ -25,8 +25,21 @@ method: :get, class: 'btn btn-primary' = link_to 'Delete', admin_conference_schedule_path(@conference.short_title, schedule.id), method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete Schedule #{schedule.id}?" } - .row - .col-md-12.text-right - = link_to 'Add Schedule', admin_conference_schedules_path(@conference.short_title), - method: :post, class: 'btn btn-primary' + .col-md-12 + - if @venue.try(:rooms).present? + .text-right + = link_to 'Add Schedule', admin_conference_schedules_path(@conference.short_title), + method: :post, class: 'btn btn-primary' + - elsif @venue + .h3 + No Rooms! + %small + = link_to 'Create rooms', admin_conference_venue_rooms_path + before creating the schedule. + - else + .h3 + No Venue! + %small + = link_to 'Create a venue with rooms', new_admin_conference_venue_path + before creating the schedule.