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
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue