Refactoring of proposal workflow. Fixes #215
This commit is contained in:
parent
333c5e39bf
commit
e6bb168c5e
35 changed files with 491 additions and 192 deletions
23
app/views/proposal/_encouragement_text.html.haml
Normal file
23
app/views/proposal/_encouragement_text.html.haml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
%p.lead
|
||||
- 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)}."
|
||||
- if @conference.call_for_paper
|
||||
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.title
|
||||
will only be as good as the content you present. Submit early, submit often!
|
||||
|
|
@ -12,10 +12,10 @@
|
|||
= render 'proposal/proposal_form'
|
||||
#commercials-content.tab-pane
|
||||
%p.text-muted
|
||||
You can add commercials for your event. These commercials will be displayed on the event detail site.
|
||||
You can add commercials for your proposal. These commercials will be displayed on the
|
||||
= link_to 'public proposal page.', conference_proposal_path(@conference.short_title, @event)
|
||||
If you don't add a commercial, the conference commercial will be displayed!
|
||||
We currently support the following commercial types: YouTube, Vimeo, Instagram, Flickr, Speakerdeck and SlideShare.
|
||||
|
||||
|
||||
- @event.commercials.each_slice(3) do |slice|
|
||||
.row
|
||||
- slice.each do |commercial|
|
||||
|
|
|
|||
|
|
@ -1,55 +1,53 @@
|
|||
= semantic_form_for(@event, :url => @url) do |f|
|
||||
%section#basic
|
||||
= f.inputs :name => "Session Information" do
|
||||
- if can? :update, @event or can? :create, @event
|
||||
= f.input :title, :as => :string, :required => true
|
||||
- else
|
||||
Title: #{@event.title}
|
||||
%br
|
||||
%br
|
||||
= f.input :subtitle, :as => :string
|
||||
%section#details
|
||||
- if can? :update, @event or can? :create, @event
|
||||
= f.input :event_type_id, as: :select,
|
||||
= semantic_form_for(@event, url: @url) do |f|
|
||||
= f.inputs name: 'Proposal Information' do
|
||||
= f.input :title, as: :string, required: true
|
||||
|
||||
= f.input :subtitle, as: :string
|
||||
|
||||
= 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: 'Session Type'
|
||||
- else
|
||||
Event type: #{@event.event_type.title}
|
||||
include_blank: false, label: 'Type', input_html: { class: 'select-help-toggle' }
|
||||
|
||||
- @conference.event_types.each do |event_type|
|
||||
%span{ class: 'help-block select-help-text event_event_type_id collapse', id: "#{event_type.id}-help" }
|
||||
= event_type.description
|
||||
|
||||
:javascript
|
||||
$("##{@conference.event_types.first.id}-help").collapse('show');
|
||||
|
||||
= f.input :difficulty_level, as: :select, collection: @conference.difficulty_levels, input_html: { class: 'select-help-toggle' },
|
||||
include_blank: '(Please select)' if @conference.difficulty_levels.any?
|
||||
|
||||
- @conference.difficulty_levels.each do |difficulty_level|
|
||||
%span{ class: 'help-block select-help-text collapse event_difficulty_level_id', id: "#{difficulty_level.id}-help" }
|
||||
= difficulty_level.description
|
||||
|
||||
= 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'
|
||||
|
||||
- if current_user.has_any_role? :admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference }
|
||||
= f.label :is_highlight
|
||||
%br
|
||||
= f.check_box :is_highlight, class: 'switch-checkbox', data: { size: "small" }
|
||||
= f.input :is_highlight
|
||||
|
||||
%p.text-right
|
||||
= link_to '#description', "data-toggle"=>"collapse" 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.'
|
||||
|
||||
%br
|
||||
= f.input :difficulty_level, :as => :select, :collection => @conference.difficulty_levels, :include_blank => "(Please select)" if @conference.difficulty_levels.any?
|
||||
= f.input :require_registration
|
||||
= 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."
|
||||
|
||||
%section#information
|
||||
- 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
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-success"}
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-success"}, label: 'Update Proposal'
|
||||
|
|
|
|||
36
app/views/proposal/_tooltip.html.haml
Normal file
36
app/views/proposal/_tooltip.html.haml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
- progress_status = event.progress_status
|
||||
%ul.list-unstyled
|
||||
%li{'class'=>class_for_todo(progress_status['registered'])}
|
||||
%span{'class'=>icon_for_todo(progress_status['registered'])}
|
||||
- if progress_status['registered']
|
||||
= link_to 'Edit your registration', edit_conference_conference_registrations_path(event.conference.short_title)
|
||||
- else
|
||||
= link_to 'Register to the conference', new_conference_conference_registrations_path(event.conference.short_title)
|
||||
|
||||
%li{'class'=>class_for_todo(progress_status['biography'])}
|
||||
%span{'class'=>icon_for_todo(progress_status['biography'])}
|
||||
- if progress_status['biography']
|
||||
= link_to 'Edit your biography', edit_user_path(event.submitter)
|
||||
- else
|
||||
= link_to 'Fill out your biography', edit_user_path(event.submitter)
|
||||
|
||||
%li{'class'=>class_for_todo(progress_status['subtitle'])}
|
||||
%span{'class'=>icon_for_todo(progress_status['subtitle'])}
|
||||
- if progress_status['subtitle']
|
||||
= link_to 'Edit the subtitle', edit_conference_proposal_path(event.conference.short_title, event)
|
||||
- else
|
||||
= link_to 'Add a subtitle', edit_conference_proposal_path(event.conference.short_title, event)
|
||||
|
||||
%li{'class'=>class_for_todo(progress_status['commercials'])}
|
||||
%span{'class'=>icon_for_todo(progress_status['commercials'])}
|
||||
- if progress_status['commercials']
|
||||
= link_to 'Edit the commercials', edit_conference_proposal_path(event.conference.short_title, event, anchor: 'commercials-content')
|
||||
- else
|
||||
= link_to 'Add a commercial', new_conference_proposal_commercial_path(event.conference.short_title, event)
|
||||
|
||||
%li{'class'=>class_for_todo(progress_status['difficulty_level'])}
|
||||
%span{'class'=>icon_for_todo(progress_status['difficulty_level'])}
|
||||
- if progress_status['difficulty_level']
|
||||
= link_to 'Change the difficulty level', edit_conference_proposal_path(event.conference.short_title, event)
|
||||
- else
|
||||
= link_to 'Add a difficulty level', edit_conference_proposal_path(event.conference.short_title, event)
|
||||
|
|
@ -3,45 +3,99 @@
|
|||
.col-md-12.page-header
|
||||
%h1
|
||||
= "My Proposals for #{@conference.title}"
|
||||
- if @conference.cfp_open? || (current_user.has_role? :organizer, @conference)
|
||||
= link_to "New Proposal", new_conference_proposal_path(@conference.short_title), :class => "btn btn-success pull-right"
|
||||
- if current_user.proposal_count(@conference) > 0
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
= render partial: 'encouragement_text'
|
||||
- if @events.any?
|
||||
- if @events.highlighted.any?
|
||||
.row
|
||||
.col-md-12
|
||||
|
||||
%p.lead
|
||||
%strong
|
||||
Congratulations!
|
||||
Some of your proposals have been selected as a highlight of #{@conference.title}!
|
||||
%ul
|
||||
- @events.highlighted.each do |event|
|
||||
%li= link_to event.title, conference_proposal_path(@conference.short_title, event)
|
||||
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-bordered.table-striped
|
||||
%thead
|
||||
%th
|
||||
%b Title
|
||||
%th
|
||||
%b Status
|
||||
%th
|
||||
%p.text-right
|
||||
= link_to '#status-help', class: 'btn btn-default', "data-toggle"=>"collapse" do
|
||||
Help?
|
||||
.collapse#status-help
|
||||
%p
|
||||
%strong
|
||||
What happens next with my proposal?
|
||||
%p
|
||||
If you submit a proposal, the conference organizers will review it and either accept or reject it.
|
||||
%br
|
||||
If your proposal is accepted, the conference organizers expect you to confirm that you will be able to hold it.
|
||||
%br
|
||||
If your proposal is rejected, you can either live with that or adapt it and resubmit it for review again.
|
||||
%br
|
||||
If something changes and you can't hold the presentation any more, you should withdraw it.
|
||||
|
||||
%p
|
||||
%strong
|
||||
Why do I need to add more information?
|
||||
%p
|
||||
The more information you add to your proposal, the more likely it is that the conference organizers accept your proposal.
|
||||
%br
|
||||
It will also be more likely that visitors find your proposal interesting enough to attend.
|
||||
|
||||
%p
|
||||
%strong
|
||||
Why do I need to register to the conference?
|
||||
%p
|
||||
Knowing the number of visitors for the conference helps the organizers plan better.
|
||||
|
||||
%table.table.table-striped
|
||||
- @events.each do |event|
|
||||
%tr
|
||||
%td
|
||||
%td{style: "padding:20px 8px 20px 8px;"}
|
||||
%span{ title: event.state.humanize, class: "fa #{event_status_icon(event)}" }
|
||||
|
||||
%td.col-md-7{style: "padding:20px 8px 20px 8px;"}
|
||||
= link_to event.title, conference_proposal_path(@conference.short_title, event.id)
|
||||
%td
|
||||
- if event.state == 'new'
|
||||
Review pending
|
||||
- else
|
||||
= event.state.humanize
|
||||
- if event.state == 'confirmed' && event.require_registration == true
|
||||
(Pre-registered: #{pre_registered(event).count})
|
||||
- if event.confirmed? && !@conference.user_registered?(current_user)
|
||||
%br
|
||||
= link_to "Register to attend", new_conference_conference_registrations_path(@conference.short_title), :style => "font-size:10px;"
|
||||
%td
|
||||
%br
|
||||
%small.text-muted
|
||||
= event.event_type.title
|
||||
= "(#{event.event_type.length} min)"
|
||||
- if event.state == 'confirmed' && event.require_registration == true
|
||||
,
|
||||
Pre-registered: #{pre_registered(event).count}
|
||||
|
||||
%td.col-md-2{style: "padding:20px 8px 20px 8px;"}
|
||||
= link_to 'Complete your todo list', 'javascript: void(0)', "type"=>"button", "data-trigger"=>"focus", "data-toggle"=>"popover", "title"=>"Your todo list", "data-content"=>"#{render partial: 'tooltip', locals: { event: event} }"
|
||||
|
||||
- progress_percentage = event.calculate_progress
|
||||
.progress
|
||||
%div{class: "progress-bar #{event_progress_color(progress_percentage)}", style: "width:#{progress_percentage}%;"}
|
||||
= event.progress_status.reject{ |_key, value| value }.length
|
||||
left
|
||||
|
||||
%td.col-md-3{style: "padding:20px 0px 20px 0px;"}
|
||||
.pull-right
|
||||
- if event.transition_possible? :confirm
|
||||
= link_to 'Confirm',
|
||||
confirm_conference_proposal_path(@conference.short_title, event),
|
||||
method: :patch, class: 'btn btn-mini btn-success', id: "confirm_proposal_#{event.id}"
|
||||
= link_to 'Edit', edit_conference_proposal_path(@conference.short_title, event.id),
|
||||
class: 'btn btn-mini btn-primary', id: "edit_proposal_#{event.id}"
|
||||
|
||||
- if event.transition_possible? :withdraw
|
||||
= link_to 'Withdraw', conference_proposal_path(@conference.short_title, event.id), method: :delete,
|
||||
confirm: 'Are you sure you want to withdraw this proposal?', class: 'btn btn-mini btn-warning',
|
||||
data: { confirm: 'Are you sure you want to withdraw this proposal?' }, class: 'btn btn-mini btn-warning',
|
||||
id: "delete_proposal_#{event.id}"
|
||||
- if event.state == 'withdrawn' || event.state == 'rejected'
|
||||
= link_to 'Re-Submit',
|
||||
restart_conference_proposal_path(@conference.short_title, event.id),
|
||||
method: :patch, class: 'btn btn-mini btn-success', id: "review_event_#{event.id}"
|
||||
= link_to 'Edit', edit_conference_proposal_path(@conference.short_title, event.id),
|
||||
class: 'btn btn-default', id: "edit_proposal_#{event.id}"
|
||||
.row
|
||||
.col-md-12
|
||||
- if @conference.cfp_open? || (current_user.has_role? :organizer, @conference)
|
||||
= link_to "New Proposal", new_conference_proposal_path(@conference.short_title), :class => "btn btn-success pull-right"
|
||||
|
|
|
|||
|
|
@ -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