Add the ability for Rooms to have a URL.
The URL is shown on the schedule and the event/proposal page. The URL is only when a user is logged in and registered.
This commit is contained in:
parent
636ad2cebd
commit
7d2135f851
9 changed files with 39 additions and 17 deletions
|
|
@ -11,5 +11,8 @@
|
|||
= semantic_form_for(@room, url: (@room.new_record? ? admin_conference_venue_rooms_path : admin_conference_venue_room_path(@conference.short_title, @room))) do |f|
|
||||
= f.input :name, input_html: { autofocus: true }
|
||||
= f.input :size, label: 'Capacity', input_html: {size: 5}
|
||||
= f.input :url, label: 'URL'
|
||||
%p.small
|
||||
The URL is only visible to registered attendees.
|
||||
%p.text-right
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
%thead
|
||||
%th Name
|
||||
%th Capacity
|
||||
%th URL
|
||||
%th Actions
|
||||
%tbody
|
||||
- @rooms.each_with_index do |room, index|
|
||||
|
|
@ -21,11 +22,13 @@
|
|||
%td
|
||||
= room.size
|
||||
%td
|
||||
= link_to 'Edit', edit_admin_conference_venue_room_path(@conference.short_title, room.id),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
= link_to 'Delete', admin_conference_venue_room_path(@conference.short_title, room.id),
|
||||
method: :delete, class: 'btn btn-danger',
|
||||
data: { confirm: "Do you really want to delete #{room.name}? Attention: This room will be removed from all Events that have it set"}
|
||||
= room.url
|
||||
%td
|
||||
= link_to 'Edit', edit_admin_conference_venue_room_path(@conference.short_title, room.id), class: 'btn btn-primary'
|
||||
= link_to('Delete',
|
||||
admin_conference_venue_room_path(@conference.short_title, room.id),
|
||||
method: :delete, class: 'btn btn-danger',
|
||||
data: { confirm: "Do you really want to delete #{room.name}? Attention: This room will be removed from all Events that have it set"})
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
= link_to 'Add Room', new_admin_conference_venue_room_path(@conference.short_title), class: 'btn btn-primary'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue