Merge 03a0074c73 into a557f3750e
This commit is contained in:
commit
6c639b8aaf
14 changed files with 292 additions and 143 deletions
|
|
@ -134,13 +134,13 @@ class ProposalController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
|
||||
@event = Event.find(params[:id])
|
||||
end
|
||||
|
||||
def confirm
|
||||
if @event.transition_possible? :confirm
|
||||
begin
|
||||
@event.confirm!
|
||||
@event.confirm!(:send_mail => params[:send_mail])
|
||||
rescue Exception => e
|
||||
redirect_to(conference_proposal_index_path(:conference_id => @conference.short_title), :alert => "Event was NOT confirmed: #{e.message}")
|
||||
return
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class Event < ActiveRecord::Base
|
|||
state :rejected
|
||||
|
||||
event :start_review do
|
||||
transitions :to => :review, :from => [:new, :rejected]
|
||||
transitions :to => :review, :from => [:new, :rejected, :canceled]
|
||||
end
|
||||
event :withdraw do
|
||||
transitions :to => :withdrawn, :from => [:new, :review, :unconfirmed]
|
||||
|
|
@ -98,7 +98,7 @@ class Event < ActiveRecord::Base
|
|||
self.class.state_machine.events_for(self.current_state).include?(transition)
|
||||
end
|
||||
|
||||
def process_confirmation
|
||||
def process_confirmation(options)
|
||||
if self.conference.email_settings.send_on_confirmed_without_registration?
|
||||
if self.conference.registrations.where(:person_id => self.submitter.id).first.nil?
|
||||
Mailbot.confirm_reminder_mail(self).deliver
|
||||
|
|
|
|||
|
|
@ -5,14 +5,17 @@
|
|||
%i= @event.subtitle
|
||||
|
||||
.span2
|
||||
-#= link_to "Edit Submission", edit_admin_conference_event_path(@conference.short_title, @event),
|
||||
-# :class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;", :onclick => "javascript:alert('Not ready yet');"
|
||||
= link_to "Edit Submission", "#",
|
||||
:class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;", :onclick => "javascript:alert('Not ready yet');"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
%table.table
|
||||
%tr
|
||||
%td
|
||||
%b Type
|
||||
%td
|
||||
= @event.event_type.title
|
||||
%tr
|
||||
%td
|
||||
%b State
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
.row-fluid
|
||||
.span12
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%h2
|
||||
Events
|
||||
- if @events
|
||||
= "(#{@events.length})"
|
||||
.well
|
||||
%table.table.table-striped.table-bordered.table-hover#events
|
||||
%thead
|
||||
%th
|
||||
%b Title
|
||||
|
|
@ -51,3 +56,10 @@
|
|||
- if event.transition_possible? :cancel
|
||||
%li= link_to "Cancel event", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :cancel),
|
||||
:method => :put, :hint => "Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance."
|
||||
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
$('#events').dataTable( {
|
||||
"bPaginate": false
|
||||
} );
|
||||
} );
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
%table.table.table-striped.table-bordered.table-hover
|
||||
%h2
|
||||
People
|
||||
- if @people
|
||||
= "(#{@people.length})"
|
||||
.well
|
||||
%table.table.table-striped.table-bordered.table-hover#people
|
||||
%thead
|
||||
%th
|
||||
%b Email
|
||||
%th
|
||||
%b Last Name
|
||||
%th
|
||||
|
|
@ -11,8 +18,18 @@
|
|||
%th
|
||||
- @people.each do |person|
|
||||
%tr
|
||||
%td= person.email
|
||||
%td= person.last_name
|
||||
%td= person.first_name
|
||||
%td= person.public_name
|
||||
%td= person.registrations.count
|
||||
%td= link_to "View", admin_person_path(person)
|
||||
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
$('#people').dataTable( {
|
||||
"bScrollInfinite": true,
|
||||
"bScrollCollapse": true,
|
||||
"sScrollY": "200px"
|
||||
} );
|
||||
} );
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
= link_to "Export PDF", admin_conference_registrations_path(@conference.short_title, :format => :pdf), :class => "btn btn-success"
|
||||
.row-fluid
|
||||
.span12
|
||||
%h2
|
||||
Registrations
|
||||
- if @registrations
|
||||
= "(#{@registrations.length})"
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%th
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf|
|
|||
else
|
||||
row << " "
|
||||
end
|
||||
row << registration.arrival
|
||||
row << registration.departure
|
||||
row << registration.arrival.to_s
|
||||
row << registration.departure.to_s
|
||||
table_array << row
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
= link_to "New Supporter", "#", :id => "new-supporter-button", :class => "btn btn-success"
|
||||
.row-fluid
|
||||
.span12
|
||||
%h2 Supporters
|
||||
.well
|
||||
%table.table.table-striped#supporters
|
||||
%thead
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span12
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%h2
|
||||
Users
|
||||
- if @users
|
||||
= "(#{@users.length})"
|
||||
.well
|
||||
%table.table.table-striped.table-bordered.table-hover#users
|
||||
%thead
|
||||
%th
|
||||
%b Email
|
||||
|
|
@ -55,3 +60,11 @@
|
|||
"data-content" => user.popup_details,
|
||||
"data-original-title" => ""
|
||||
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
$('#users').dataTable( {
|
||||
"bScrollInfinite": true,
|
||||
"bScrollCollapse": true,
|
||||
"sScrollY": "200px"
|
||||
} );
|
||||
} );
|
||||
|
|
|
|||
|
|
@ -30,20 +30,22 @@
|
|||
%li
|
||||
= link_to "Schedule ", admin_conference_schedule_path(@conference.short_title)
|
||||
%ul.nav.secondary-nav.pull-right
|
||||
%li
|
||||
= link_to "User Area", root_url
|
||||
- if !@conference.nil?
|
||||
%li.dropdown
|
||||
= link_to "#", :class => "dropdown-toggle" do
|
||||
= link_to "#", :class => "dropdown-toggle", :id =>'drop1', "data-toggle" => 'dropdown' do
|
||||
Export
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
%ul.dropdown-menu{:role => 'menu', "aria-labelledby" => "drop1"}
|
||||
%li= link_to "JSON", "#"
|
||||
%li= link_to "HTML", "#"
|
||||
%li.dropdown
|
||||
- unless Conference.count == 1 && !has_role?(current_user, "admin")
|
||||
= link_to "#", :class => "dropdown-toggle" do
|
||||
= link_to "#", :class => "dropdown-toggle", :id => 'drop2', "data-toggle" => 'dropdown' do
|
||||
Conferences
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
%ul.dropdown-menu{:role => 'menu', "aria-labelledby" => "drop2"}
|
||||
- conferences = Conference.order("created_at DESC")
|
||||
- unless conferences.nil?
|
||||
- conferences.each do |c|
|
||||
|
|
|
|||
|
|
@ -30,3 +30,16 @@
|
|||
- if user_signed_in?
|
||||
%li
|
||||
= link_to('Edit account', edit_user_registration_path)
|
||||
%li.dropdown
|
||||
- unless Conference.count == 1 && !has_role?(current_user, "admin")
|
||||
= link_to "#", :class => "dropdown-toggle" do
|
||||
Conferences
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- conferences = Conference.order("created_at DESC")
|
||||
- unless conferences.nil?
|
||||
- conferences.each do |c|
|
||||
- unless @conference == c
|
||||
%li= link_to c.short_title, admin_conference_path(c.short_title)
|
||||
- if has_role?(current_user, "admin")
|
||||
%li= link_to "New Conference", new_admin_conference_path
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
= f.input :subtitle, :as => :string
|
||||
%section#details
|
||||
= f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false, :label => "Session Type"
|
||||
= f.input :abstract, :input_html => {:rows => 5},
|
||||
= f.input :abstract, :input_html => {:rows => 5, :class => "span11"},
|
||||
:required => true, :label => "Session Abstract"
|
||||
You have used
|
||||
%span#abstract-count #{@event.abstract_word_count}
|
||||
|
|
@ -19,13 +19,13 @@
|
|||
words.
|
||||
%br
|
||||
%br
|
||||
= f.input :description, :input_html => {:rows => 5}, :hint => "This will only be shown to organizers, not to attendees."
|
||||
= f.input :description, :input_html => {:rows => 5, :class=> "span11"}, :hint => "This will only be shown to organizers, not to attendees."
|
||||
%section#information
|
||||
= f.inputs :name => "Your Information" do
|
||||
= semantic_fields_for @person do |p|
|
||||
= p.input :public_name, :as => :string, :required => true
|
||||
= p.input :company, :as => :string, :label => "Affiliation", :hint => "This could be a company, a user group, or nothing at all."
|
||||
= p.input :biography, :required => true, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count', 150)"}
|
||||
= p.input :biography, :required => true, :input_html => {:rows => 5, :class => 'span11', "onkeyup" => "word_count(this, 'biography-count', 150)"}
|
||||
You have used
|
||||
%span#biography-count #{@person.biography_word_count}
|
||||
words. Biographies are limited to 150 words.
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
= f.inputs :name => "Additional Speakers" do
|
||||
Will there be any additional speakers? If so, please enter their full names, email address, and a short
|
||||
biography for each.
|
||||
= f.input :proposal_additional_speakers, :input_html => {:rows => 5}, :label => false
|
||||
= f.input :proposal_additional_speakers, :input_html => {:rows => 5, :class => "span11"}, :label => false
|
||||
= f.action :submit, :as => :button, :label => "Submit Session", :button_html => {:class => "btn btn-primary"}
|
||||
|
||||
:javascript
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
- @events.each do |event|
|
||||
%tr
|
||||
%td
|
||||
= event.title
|
||||
= link_to event.title, conference_proposal_path(@conference.short_title, event.id)
|
||||
%td
|
||||
= event.public_state
|
||||
- if event.confirmed? && !@conference.user_registered?(current_user)
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
%td
|
||||
.pull-right
|
||||
- if event.transition_possible? :confirm
|
||||
= link_to "Confirm", conference_proposal_confirm_path(@conference.short_title, event), :method => :put, :class => "btn btn-mini btn-success"
|
||||
= link_to "Confirm", conference_proposal_confirm_path(@conference.short_title, event, :send_mail=>false), :method => :put, :class => "btn btn-mini btn-success"
|
||||
- if @conference.cfp_open?
|
||||
- if !event.unconfirmed? && !event.confirmed?
|
||||
= link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary"
|
||||
|
|
|
|||
84
app/views/proposal/show.html.haml
Normal file
84
app/views/proposal/show.html.haml
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
.row-fluid
|
||||
.span10
|
||||
%h3
|
||||
= @event.title
|
||||
%i= @event.subtitle
|
||||
|
||||
.span2
|
||||
- if @event.transition_possible? :confirm
|
||||
= link_to "Confirm", conference_proposal_confirm_path(@conference.short_title, @event), :method => :put, :class => "btn btn-mini btn-success"
|
||||
= 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-danger"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
%table.table
|
||||
%tr
|
||||
%td
|
||||
%b Type
|
||||
%td
|
||||
- if @event.event_type
|
||||
= @event.event_type.title
|
||||
- if !@event.track.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Track
|
||||
%td
|
||||
= @event.track.name
|
||||
- if !@event.room.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Room
|
||||
%td
|
||||
= @event.room.name
|
||||
- if !@event.start_time.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Scheduled time
|
||||
%td
|
||||
= @event.start_time
|
||||
%tr
|
||||
%td
|
||||
%b Submitted on
|
||||
%td= @event.created_at
|
||||
%tr
|
||||
%td
|
||||
%b Last updated on
|
||||
%td= @event.updated_at
|
||||
%tr
|
||||
%td
|
||||
%b Abstract
|
||||
%td= simple_format(@event.abstract)
|
||||
%tr
|
||||
%td
|
||||
%b Description
|
||||
%td= simple_format(@event.description)
|
||||
- if @event.event_attachments.size > 0
|
||||
%table.table
|
||||
%thead
|
||||
%th
|
||||
%b Filename
|
||||
%th
|
||||
%b Title
|
||||
%th
|
||||
%b Size
|
||||
%th
|
||||
%b Public?
|
||||
%th
|
||||
%tbody
|
||||
- @event.event_attachments.each do |a|
|
||||
%tr
|
||||
%td
|
||||
= link_to a.attachment_file_name, conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id)
|
||||
%td
|
||||
= a.title
|
||||
%td
|
||||
= number_to_human_size a.attachment_file_size
|
||||
%td
|
||||
- if a.public?
|
||||
Public
|
||||
- else
|
||||
Not Public
|
||||
%td
|
||||
= link_to "Delete", conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id),
|
||||
:method => :delete, :confirm => "Are you sure you want to delete this attachment? It's permanant!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue