Refactoring of proposal workflow. Fixes #215
This commit is contained in:
parent
333c5e39bf
commit
e6bb168c5e
35 changed files with 491 additions and 192 deletions
|
|
@ -1,28 +1,93 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-12
|
||||
%p
|
||||
- if @conference.event_types.any?
|
||||
You can submit proposals for
|
||||
= "#{event_types(@conference)}."
|
||||
- if @conference.tracks.any?
|
||||
Proposals should fit in one of the
|
||||
= "#{pluralize(@conference.tracks.count, 'track')}:"
|
||||
= "#{tracks(@conference)}."
|
||||
The submission period has begun
|
||||
%em
|
||||
= @conference.call_for_paper.start_date.strftime('%A, %B %-d. %Y')
|
||||
and closes
|
||||
%em
|
||||
= @conference.call_for_paper.end_date.strftime('%A, %B %-d. %Y.')
|
||||
That means you have only
|
||||
- days = (@conference.call_for_paper.end_date - Date.today).to_i
|
||||
%b
|
||||
= pluralize(days, 'days')
|
||||
left!
|
||||
Remember
|
||||
= @conference.short_title
|
||||
will only be as good as the sessions you present. Submit early, submit often!
|
||||
.page-header
|
||||
%h1 New Proposal
|
||||
.row
|
||||
.col-md-12
|
||||
= render 'proposal_form'
|
||||
= render partial: 'encouragement_text'
|
||||
.row
|
||||
.col-md-8
|
||||
- if !current_user
|
||||
%legend
|
||||
%span
|
||||
=link_to('#signup', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
|
||||
= CONFIG['name']
|
||||
Account
|
||||
%span.pull-right#account-already
|
||||
=link_to('#signin', role: 'tab', "aria-controls" => "home", "data-toggle" => "tab") do
|
||||
Already have an account?
|
||||
.tab-content
|
||||
.tab-pane.active{role: 'tabpanel', id: 'signup'}
|
||||
|
||||
= semantic_form_for(@event, url: @url) do |f|
|
||||
|
||||
- unless current_user
|
||||
= semantic_fields_for @user do |u|
|
||||
= render partial: 'devise/shared/sign_up_fields', locals: { u: u }
|
||||
= f.inputs name: 'Proposal Information' do
|
||||
= f.input :title, as: :string, required: true
|
||||
= f.input :event_type_id, as: :select,
|
||||
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 }]},
|
||||
include_blank: false, label: 'Type', input_html: { class: 'select-help-toggle' }
|
||||
|
||||
- @conference.event_types.each do |event_type|
|
||||
%span{ class: 'help-block event_event_type_id collapse', id: "#{event_type.id}-help" }
|
||||
= event_type.description
|
||||
|
||||
:javascript
|
||||
$("##{@conference.event_types.first.id}-help").collapse('show');
|
||||
|
||||
= f.input :abstract, input_html: { rows: 5 },
|
||||
required: true, hint: link_to('Tips to improve your presentations', 'http://blog.hubspot.com/blog/tabid/6307/bid/5975/10-Rules-to-Instantly-Improve-Your-Presentations.aspx')
|
||||
|
||||
%p
|
||||
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.
|
||||
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
|
||||
%p.text-right
|
||||
= link_to '#description', "data-toggle"=>"collapse", id: 'description_link' do
|
||||
Do you require something special?
|
||||
.collapse#description
|
||||
= f.input :description, input_html: { rows: 5 }, label: 'Requirements', placeholder: 'Eg. Whiteboard, printer, or something like that.'
|
||||
|
||||
%p.text-right
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-success"}, label: 'Create Proposal'
|
||||
.tab-pane{role: 'tabpanel', id: 'signin'}
|
||||
- if !CONFIG['authentication']['ichain']['enabled']
|
||||
= form_tag(new_user_session_path, class: 'form-horizontal') do
|
||||
%legend
|
||||
%span
|
||||
Sign In
|
||||
.form-group
|
||||
%label{for: "user[login]", class: 'col-sm-2 control-label'}
|
||||
Username
|
||||
.col-sm-10
|
||||
= text_field_tag 'user[login]', nil, placeholder: 'Username', class: 'form-control', required: 'required'
|
||||
.form-group
|
||||
%label{for: "user[password]", class: 'col-sm-2 control-label'}
|
||||
Password
|
||||
.col-sm-10
|
||||
= password_field_tag 'user[password]', nil, placeholder: 'Password', class: 'form-control', required: 'required'
|
||||
.form-group
|
||||
.col-sm-12
|
||||
%button.btn.btn-success.pull-right
|
||||
Sign in
|
||||
- unless omniauth_configured.empty?
|
||||
.form-group
|
||||
%hr
|
||||
%p.text-center
|
||||
or sign in using
|
||||
.text-center
|
||||
= render 'devise/shared/openid'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue