Speaker can be changed in admin/conference/x/events
This commit is contained in:
parent
cb76a9b7cc
commit
c6956482f0
6 changed files with 52 additions and 1 deletions
|
|
@ -101,12 +101,15 @@
|
|||
%b Title
|
||||
%th
|
||||
%b Submitter
|
||||
%th
|
||||
%b Speaker
|
||||
%th
|
||||
%b Type
|
||||
%th
|
||||
%b Track
|
||||
%th
|
||||
%b State
|
||||
%th
|
||||
- @events.each do |event|
|
||||
%tr
|
||||
%td
|
||||
|
|
@ -124,6 +127,13 @@
|
|||
(Unregistered!)
|
||||
- else
|
||||
Unknown submitter
|
||||
%td
|
||||
- if speaker = event.speakers.first
|
||||
= link_to speaker.public_name, admin_person_path(speaker)
|
||||
- else
|
||||
Unknown speaker
|
||||
- l = link_to "Change", edit_admin_conference_event_speaker_path(@conference.short_title, event), :remote => true
|
||||
= "(#{l})".html_safe
|
||||
%td
|
||||
= event.event_type.title
|
||||
%td
|
||||
|
|
@ -180,4 +190,4 @@
|
|||
$("#events-stats1-link").click(function() {
|
||||
$("#events-stats1").toggle();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
11
app/views/admin/speakers/_form.html.haml
Normal file
11
app/views/admin/speakers/_form.html.haml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.modal-header
|
||||
%button.close{:type => "button", :data => {:dismiss => "modal"}} ×
|
||||
%h3
|
||||
Assign speaker
|
||||
= semantic_form_for @speaker, :as => :speaker, :url => admin_conference_event_speaker_path(@conference.short_title, @event), :method => :put do |f|
|
||||
.form-inputs.form-horizontal.modal-body
|
||||
= f.collection_select(:person_id, Person.order(:public_name), :id, :public_name)
|
||||
|
||||
.modal-footer
|
||||
= link_to "Close", "#", :data => {:dismiss => "modal"}, :class => 'btn'
|
||||
= f.button "Assign", :class => 'btn btn-primary'
|
||||
2
app/views/admin/speakers/edit.js.erb
Normal file
2
app/views/admin/speakers/edit.js.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
build_dialog('edit_speaker', '<%= j render :partial => 'form' %>');
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue