Added paper_trail, also starting work on the scheduler
This commit is contained in:
parent
90b30db9e8
commit
f86232bedf
35 changed files with 523 additions and 32137 deletions
|
|
@ -11,7 +11,7 @@
|
|||
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
|
||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :html_export_path, :hint => "The path for static HTML exports"
|
||||
= f.input :cfp_open, :label => false, :hint => "Allow people to submit papers?"
|
||||
= f.input :registration_open, :label => false, :hint => "Allow people to register as attendees?"
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
112
app/views/admin/events/_proposal.html.haml
Normal file
112
app/views/admin/events/_proposal.html.haml
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
.row-fluid
|
||||
.span10
|
||||
%h3
|
||||
= @event.title
|
||||
%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;"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
%table.table
|
||||
%tr
|
||||
%td
|
||||
%b State
|
||||
%td
|
||||
.dropdown
|
||||
= link_to "#", :class => "dropdown-toggle" do
|
||||
= @event.state.humanize
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- if @event.transition_possible? :accept
|
||||
%li= link_to "Accept event (no email)", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :accept, :send_mail => false),
|
||||
:method => :put, :hint => "Accept this event without sending an automated email."
|
||||
- if @event.transition_possible? :reject
|
||||
%li= link_to "Reject event (no email)", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :reject, :send_mail => false),
|
||||
:method => :put, :confirm => "Are you sure?",
|
||||
:hint => "Reject this event without sending an automated email."
|
||||
- if @event.transition_possible? :start_review
|
||||
%li= link_to "Start review", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :start_review),
|
||||
:method => :put
|
||||
- if @event.transition_possible? :confirm
|
||||
%li= link_to "Confirm event", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :confirm),
|
||||
:method => :put, :hint => "Confirm that the speaker(s) will be present and that the event will actually take place."
|
||||
- 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."
|
||||
|
||||
%tr
|
||||
%td
|
||||
%b Submitter
|
||||
%td
|
||||
= link_to @event.submitter.public_name, admin_person_path(@conference.short_title, @event.submitter)
|
||||
(
|
||||
= link_to @event.submitter.email, "mailto: #{@event.submitter.email}"
|
||||
)
|
||||
%tr
|
||||
%td
|
||||
%b Biography
|
||||
%td
|
||||
= simple_format(@event.submitter.biography)
|
||||
%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!"
|
||||
|
||||
.row-fluid
|
||||
= link_to "Comments (#{@comment_count})", "#", :id => "event-comment-link"
|
||||
#comments-div
|
||||
%hr
|
||||
%ul.media
|
||||
%div
|
||||
.row-fluid
|
||||
= form_tag(comment_admin_conference_event_path(@conference.short_title, @event.id), :method => :post) do
|
||||
= text_area_tag(:comment, "")
|
||||
= submit_tag "Add Comment", :class => "btn btn-primary pull-right"
|
||||
%br
|
||||
- @comments.each do |comment|
|
||||
%div
|
||||
= raw format_comments(comment)
|
||||
|
|
@ -1,112 +1,38 @@
|
|||
.row-fluid
|
||||
.span10
|
||||
%h3
|
||||
= @event.title
|
||||
%i= @event.subtitle
|
||||
.tabbable
|
||||
%ul.nav.nav-tabs
|
||||
%li.active
|
||||
= link_to "Proposal", "#proposal-content", "data-toggle"=>"tab"
|
||||
%li
|
||||
= link_to "History", "#history-content", "data-toggle"=>"tab"
|
||||
.tab-content
|
||||
#proposal-content.tab-pane.active
|
||||
= render 'proposal'
|
||||
#history-content.tab-pane
|
||||
.span12
|
||||
%table.table
|
||||
%thead
|
||||
%th
|
||||
%b Who
|
||||
%th
|
||||
%b Timestamp
|
||||
%th
|
||||
%b Modification Type
|
||||
%th
|
||||
%b Changes
|
||||
%tbody
|
||||
- @event.versions.each do |version|
|
||||
%tr
|
||||
%td
|
||||
- if !version.whodunnit.nil?
|
||||
= Person.find_person_by_user_id(version.whodunnit).public_name
|
||||
- else
|
||||
No user (probably via the console)
|
||||
%td
|
||||
= version.created_at
|
||||
%td
|
||||
= version.event
|
||||
%td
|
||||
- version.changeset.each_key do |key|
|
||||
= "#{key}: #{version.changeset[key][0]} -> #{version.changeset[key][1]}"
|
||||
%br
|
||||
|
||||
.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;"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
%table.table
|
||||
%tr
|
||||
%td
|
||||
%b State
|
||||
%td
|
||||
.dropdown
|
||||
= link_to "#", :class => "dropdown-toggle" do
|
||||
= @event.state.humanize
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- if @event.transition_possible? :accept
|
||||
%li= link_to "Accept event (no email)", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :accept, :send_mail => false),
|
||||
:method => :put, :hint => "Accept this event without sending an automated email."
|
||||
- if @event.transition_possible? :reject
|
||||
%li= link_to "Reject event (no email)", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :reject, :send_mail => false),
|
||||
:method => :put, :confirm => "Are you sure?",
|
||||
:hint => "Reject this event without sending an automated email."
|
||||
- if @event.transition_possible? :start_review
|
||||
%li= link_to "Start review", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :start_review),
|
||||
:method => :put
|
||||
- if @event.transition_possible? :confirm
|
||||
%li= link_to "Confirm event", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :confirm),
|
||||
:method => :put, :hint => "Confirm that the speaker(s) will be present and that the event will actually take place."
|
||||
- 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."
|
||||
|
||||
%tr
|
||||
%td
|
||||
%b Submitter
|
||||
%td
|
||||
= link_to @event.submitter.public_name, admin_person_path(@conference.short_title, @event.submitter)
|
||||
(
|
||||
= link_to @event.submitter.email, "mailto: #{@event.submitter.email}"
|
||||
)
|
||||
%tr
|
||||
%td
|
||||
%b Biography
|
||||
%td
|
||||
= simple_format(@event.submitter.biography)
|
||||
%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!"
|
||||
|
||||
.row-fluid
|
||||
= link_to "Comments (#{@comment_count})", "#", :id => "event-comment-link"
|
||||
#comments-div
|
||||
%hr
|
||||
%ul.media
|
||||
%div
|
||||
.row-fluid
|
||||
= form_tag(comment_admin_conference_event_path(@conference.short_title, @event.id), :method => :post) do
|
||||
= text_area_tag(:comment, "")
|
||||
= submit_tag "Add Comment", :class => "btn btn-primary pull-right"
|
||||
%br
|
||||
- @comments.each do |comment|
|
||||
%div
|
||||
= raw format_comments(comment)
|
||||
4
app/views/admin/schedule/_day_tab.html.haml
Normal file
4
app/views/admin/schedule/_day_tab.html.haml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
- @tracks.each do |track|
|
||||
.schedule-track-column-header
|
||||
= track.name
|
||||
.schedule-track-column
|
||||
43
app/views/admin/schedule/show.html.haml
Normal file
43
app/views/admin/schedule/show.html.haml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
.schedule-content
|
||||
.unscheduled
|
||||
Unscheduled Events
|
||||
#test1.schedule-event
|
||||
Test
|
||||
#test2.schedule-event
|
||||
Test2
|
||||
.schedule
|
||||
.tabbable
|
||||
%ul.nav.nav-tabs
|
||||
- @dates.each do |date|
|
||||
-if date == @dates.first
|
||||
%li.active
|
||||
= link_to "#{date}", "##{date}-content", "data-toggle"=>"tab"
|
||||
- else
|
||||
%li
|
||||
= link_to "#{date}", "##{date}-content", "data-toggle"=>"tab"
|
||||
.tab-content
|
||||
- @dates.each do |date|
|
||||
- if date == @dates.first
|
||||
.tab-pane.active{:id => "#{date}-content"}
|
||||
= render 'day_tab'
|
||||
- else
|
||||
.tab-pane{:id => "#{date}-content"}
|
||||
= render 'day_tab'
|
||||
|
||||
:javascript
|
||||
$(document).ready( function() {
|
||||
$('.schedule-track-column').droppable({
|
||||
accept: '.schedule-event',
|
||||
drop: function(event, ui) {
|
||||
var evtName = ui.draggable.text();
|
||||
var evtDay = $(this).attr('title');
|
||||
alert('Moved \'' + evtName + '\' to ' + evtDay);
|
||||
}
|
||||
});
|
||||
$('.schedule-event').draggable({
|
||||
grid: [150,20],
|
||||
containment: '.schedule-content',
|
||||
opacity: 0.7,
|
||||
zIndex: 2
|
||||
});
|
||||
});
|
||||
|
|
@ -15,16 +15,19 @@
|
|||
= conference.venue.address
|
||||
.row-fluid{:style => "padding-top: 30px;"}
|
||||
.span4
|
||||
- if conference.user_registered?(current_user)
|
||||
= link_to "Modify Registration", register_conference_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
%i.icon-thumbs-up You're attending!
|
||||
- if conference.registration_open?
|
||||
- if conference.user_registered?(current_user)
|
||||
= link_to "Modify Registration", register_conference_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
%i.icon-thumbs-up You're attending!
|
||||
- else
|
||||
= link_to "Register", register_conference_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
- if !current_user.nil?
|
||||
%i.icon-thumbs-down
|
||||
You haven't registered yet!
|
||||
- else
|
||||
= link_to "Register", register_conference_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
- if !current_user.nil?
|
||||
%i.icon-thumbs-down
|
||||
You haven't registered yet!
|
||||
%b Registration is closed.
|
||||
.span4.offset4.pull-right
|
||||
- if !current_user.nil? && current_user.person.proposal_count(conference) > 0
|
||||
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class => "mainbutton center-text"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@
|
|||
- else
|
||||
%li
|
||||
= link_to "Events", admin_conference_events_path(@conference.short_title)
|
||||
- if current_page?(admin_conference_schedule_path(@conference.short_title))
|
||||
%li.active
|
||||
= link_to "Schedule", "#"
|
||||
-else
|
||||
%li
|
||||
= link_to "Schedule ", admin_conference_schedule_path(@conference.short_title)
|
||||
%ul.nav.secondary-nav.pull-right
|
||||
- if !@conference.nil?
|
||||
%li.dropdown
|
||||
|
|
|
|||
22
app/views/layouts/schedule.html.haml
Normal file
22
app/views/layouts/schedule.html.haml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{:charset => "utf-8"}
|
||||
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1, maximum-scale=1"}
|
||||
%title= content_for?(:title) ? yield(:title) : "OSEM"
|
||||
%meta{:content => "", :name => "description"}
|
||||
%meta{:content => "", :name => "author"}
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
%body
|
||||
.navbar.navbar-fixed-top
|
||||
.navbar-inner
|
||||
.container-fluid
|
||||
= render 'layouts/admin_navigation'
|
||||
= render 'layouts/messages'
|
||||
.content
|
||||
#wrap
|
||||
#inner-content
|
||||
= yield
|
||||
|
|
@ -6,40 +6,7 @@
|
|||
= link_to "Attachments", "#attachment-content", "data-toggle"=>"tab"
|
||||
.tab-content
|
||||
#proposal-content.tab-pane.active
|
||||
.span12
|
||||
= semantic_form_for(@event, :url => @url) do |f|
|
||||
%section#basic
|
||||
= f.inputs :name => "Basic Information" do
|
||||
= f.input :title, :required => true
|
||||
= f.input :subtitle
|
||||
= f.input :abstract, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'abstract-count')"}, :required => true
|
||||
You have used
|
||||
%span#abstract-count #{@event.abstract_word_count}
|
||||
words. Abstracts are limited to 250 words.
|
||||
%br
|
||||
%br
|
||||
= f.input :description, :input_html => {:rows => 5}, :hint => "This will only be shown to organizers, not to attendees."
|
||||
%section#details
|
||||
= f.inputs :name => "Event Details" do
|
||||
= f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false
|
||||
%section#information
|
||||
= f.inputs :name => "Your Information" do
|
||||
= semantic_fields_for @person do |p|
|
||||
= p.input :public_name, :required => true
|
||||
= p.input :company, :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')"}
|
||||
You have used
|
||||
%span#biography-count #{@person.biography_word_count}
|
||||
words. Biographies are limited to 150 words.
|
||||
%br
|
||||
%br
|
||||
|
||||
%section#speakers
|
||||
= 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.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
= render 'proposal_form'
|
||||
#attachment-content.tab-pane
|
||||
.span12
|
||||
= form_for EventAttachment.new, :url => conference_proposal_event_attachment_index_path(@conference.short_title, @event),
|
||||
|
|
|
|||
34
app/views/proposal/_proposal_form.html.haml
Normal file
34
app/views/proposal/_proposal_form.html.haml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
.span12
|
||||
= semantic_form_for(@event, :url => @url) do |f|
|
||||
%section#basic
|
||||
= f.inputs :name => "Basic Information" do
|
||||
= f.input :title, :required => true
|
||||
= f.input :subtitle
|
||||
= f.input :abstract, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'abstract-count')"}, :required => true
|
||||
You have used
|
||||
%span#abstract-count #{@event.abstract_word_count}
|
||||
words. Abstracts are limited to 250 words.
|
||||
%br
|
||||
%br
|
||||
= f.input :description, :input_html => {:rows => 5}, :hint => "This will only be shown to organizers, not to attendees."
|
||||
%section#details
|
||||
= f.inputs :name => "Event Details" do
|
||||
= f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false
|
||||
%section#information
|
||||
= f.inputs :name => "Your Information" do
|
||||
= semantic_fields_for @person do |p|
|
||||
= p.input :public_name, :required => true
|
||||
= p.input :company, :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')"}
|
||||
You have used
|
||||
%span#biography-count #{@person.biography_word_count}
|
||||
words. Biographies are limited to 150 words.
|
||||
%br
|
||||
%br
|
||||
|
||||
%section#speakers
|
||||
= 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.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
.span10
|
||||
= event.title
|
||||
.pull-right
|
||||
= link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary"
|
||||
= 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"
|
||||
- if @conference.cfp_open?
|
||||
= link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary"
|
||||
= 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"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
.container
|
||||
= render 'form'
|
||||
= render 'proposal_form'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue