2013-06-26 18:05:24 +02:00
|
|
|
= semantic_form_for(@event, :url => @url) do |f|
|
|
|
|
|
%section#basic
|
|
|
|
|
= f.inputs :name => "Session Information" do
|
2014-08-12 11:51:59 +03:00
|
|
|
- if can? :update, @event or can? :create, @event
|
|
|
|
|
= f.input :title, :as => :string, :required => true
|
|
|
|
|
- else
|
2013-07-28 13:03:22 +03:00
|
|
|
Title: #{@event.title}
|
2013-07-28 11:49:47 +03:00
|
|
|
%br
|
|
|
|
|
%br
|
2013-06-26 18:05:24 +02:00
|
|
|
= f.input :subtitle, :as => :string
|
|
|
|
|
%section#details
|
2014-08-12 11:51:59 +03:00
|
|
|
- if can? :update, @event or can? :create, @event
|
2014-10-05 18:58:47 +02:00
|
|
|
= f.input :event_type_id, as: :select,
|
2014-12-08 18:08:21 +02:00
|
|
|
collection: @conference.event_types.map {|type| ["#{type.title} - #{show_time(type.length)}", type.id,
|
|
|
|
|
data: { min_words: type.minimum_abstract_length, max_words: type.maximum_abstract_length }]},
|
2014-10-05 18:58:47 +02:00
|
|
|
include_blank: false, label: 'Session Type'
|
2014-08-12 11:51:59 +03:00
|
|
|
- else
|
2013-07-28 13:03:22 +03:00
|
|
|
Event type: #{@event.event_type.title}
|
|
|
|
|
%br
|
|
|
|
|
%br
|
2014-11-25 10:47:18 +01:00
|
|
|
= f.input :difficulty_level, :as => :select, :collection => @conference.difficulty_levels, :include_blank => "(Please select)" if @conference.difficulty_levels.any?
|
2013-07-11 07:43:52 +03:00
|
|
|
= f.input :require_registration
|
2013-06-26 18:05:24 +02:00
|
|
|
= f.input :abstract, :input_html => {:rows => 5, :class => "span11"},
|
|
|
|
|
:required => true, :label => "Session Abstract"
|
|
|
|
|
You have used
|
|
|
|
|
%span#abstract-count #{@event.abstract_word_count}
|
|
|
|
|
words. Abstracts must be between
|
|
|
|
|
%span#abstract-minimum-word-count
|
|
|
|
|
0
|
|
|
|
|
and
|
|
|
|
|
%span#abstract-maximum-word-count
|
|
|
|
|
250
|
|
|
|
|
words.
|
|
|
|
|
%br
|
|
|
|
|
%br
|
|
|
|
|
= f.input :description, :input_html => {:rows => 5, :class=> "span11"}, :hint => "This will only be shown to organizers, not to attendees."
|
2014-03-19 17:22:48 +01:00
|
|
|
|
2013-06-26 18:05:24 +02:00
|
|
|
%section#information
|
2014-07-23 16:24:05 +02:00
|
|
|
- if current_user.name.blank? || current_user.biography.blank?
|
|
|
|
|
= f.inputs :name => "Your Information" do
|
|
|
|
|
= semantic_fields_for current_user do |u|
|
|
|
|
|
- if current_user.name.blank?
|
|
|
|
|
= u.input :name, :as => :string, :required => true
|
|
|
|
|
- if current_user.biography.blank?
|
|
|
|
|
= u.input :biography, :required => true, :input_html => {:rows => 5, :class => 'span11', "onkeyup" => "word_count(this, 'biography-count', 150)"}
|
|
|
|
|
You have used
|
|
|
|
|
%span#biography-count #{current_user.biography_word_count}
|
|
|
|
|
words. Biographies are limited to 150 words.
|
|
|
|
|
%p.text-right
|
2014-11-25 10:47:18 +01:00
|
|
|
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-success"}
|