keynote type available only to admins. Able to mark as highlight. Highlights and Keynotes scoped.
This commit is contained in:
parent
5d444143ea
commit
2f6fccb912
5 changed files with 30 additions and 18 deletions
|
|
@ -25,6 +25,19 @@
|
|||
- @event_types.each do |type|
|
||||
%li= link_to type.title, admin_conference_event_path(@conference.short_title, @event, :event_type_id => type.id) ,
|
||||
:method => :put, :event_type_id => type.id
|
||||
%tr
|
||||
%td
|
||||
%b Highlight
|
||||
%td
|
||||
= link_to "#{@event.is_highlight}".capitalize,
|
||||
admin_conference_event_path(@conference.short_title,
|
||||
@event,
|
||||
is_highlight: !@event.is_highlight),
|
||||
method: :put, is_highlight: !@event.is_highlight
|
||||
- if @event.is_highlight
|
||||
(the event is as a highlight and will appear in the splashpage)
|
||||
- else
|
||||
(mark as true to make the event a highlight that appears in the splashpage)
|
||||
%tr
|
||||
%td
|
||||
%b State
|
||||
|
|
|
|||
|
|
@ -24,14 +24,14 @@
|
|||
= link_to(conference_schedule_path(@conference.short_title), class: 'btn btn-default btn-lg') do
|
||||
Full Schedule
|
||||
|
||||
- if @conference.keynotes.any?
|
||||
- if @conference.events.keynotes.any?
|
||||
.row
|
||||
.col-md12
|
||||
%h3.text-center
|
||||
Keynote Talks!
|
||||
.row
|
||||
.col-md-12
|
||||
- @conference.keynotes.each_slice(3) do |slice|
|
||||
- @conference.events.keynotes.each_slice(3) do |slice|
|
||||
.row.row-centered
|
||||
- slice.each do |event|
|
||||
.col-md-6.col-centered
|
||||
|
|
@ -45,10 +45,10 @@
|
|||
%h3.text-center
|
||||
Don't miss out!
|
||||
%br
|
||||
- if @conference.highlights.any?
|
||||
- if @conference.events.highlights.any?
|
||||
.row
|
||||
.col-md-12
|
||||
- @conference.highlights.each_slice(2) do |slice|
|
||||
- @conference.events.highlights.each_slice(2) do |slice|
|
||||
.row.row-centered
|
||||
- slice.each do |event|
|
||||
.col-md-6.col-centered.col-top.highlights
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
%section#details
|
||||
- if can? :update, @event or can? :create, @event
|
||||
= f.input :event_type_id, as: :select,
|
||||
collection: @conference.event_types.map {|x| ["#{x.title} - #{show_time(x.length)}", x.id,
|
||||
data: { min_words: x.minimum_abstract_length, max_words: x.maximum_abstract_length }]},
|
||||
collection: @conference.event_types.reject { |type| type.title == 'Keynote'}.map {|type| ["#{type.title} - #{show_time(type.length)}", type.id,
|
||||
data: { min_words: type.minimum_abstract_length, max_words: type.maximum_abstract_length }]},
|
||||
include_blank: false, label: 'Session Type'
|
||||
- else
|
||||
Event type: #{@event.event_type.title}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue