Permalink
Browse files

Add track form to proposal edit admin.

  • Loading branch information...
1 parent 5f38838 commit 6d687aeacf78eee9d0ee30cf933478fab31e130d @marioaquino marioaquino committed Apr 16, 2012
View
1 vendor/engines/proposals/app/controllers/admin/proposals_controller.rb
@@ -22,6 +22,7 @@ class ProposalsController < Admin::BaseController
expose(:session_times) { SessionTime.current_year }
expose(:format) { params[:format] || 'talk' }
expose(:format_name) { format.capitalize.pluralize }
+ expose(:tracks) { Track.current_year }
before_filter(:only =>[:rate, :add_comment]) do
redirect_to(root_path) unless current_user.has_role? :reviewer
View
15 vendor/engines/proposals/app/views/admin/proposals/edit.html.erb
@@ -10,6 +10,21 @@
</p>
<h2><%= t('.actions') %></h2>
<ul>
+ <% if @proposal.format == 'talk' %>
+ <li>
+ <%= form_for [:admin, proposal] do |f| -%>
+ <fieldset>
+ <legend>Proposal Track</legend>
+
+ <%= f.fields_for :talk do |talk_form| %>
+ <%= talk_form.label :track_id, t('.track') -%>
+ <%= talk_form.collection_select :track_id, tracks, :id, :name, :prompt => true -%>
+ <% end %>
+ <%= submit_tag t('.update_track') %>
+ </fieldset>
+ <% end %>
+ </li>
+ <% end %>
<li>
<%= link_to t('.back_to_all_proposals'), {:action => 'index'}, :class => "back_icon" %>
</li>
View
2 vendor/engines/proposals/config/locales/en.yml
@@ -40,10 +40,12 @@ en:
status: Review Status
talk_type: Talk Type
title: Title
+ track: Track
twitter_id: Twitter Username
video_approval: Video Approval
your_rating: Your feedback
send_mail: Send Notification Email to Speaker?
+ update_track: Update
approve_talk: "Approve %{proposal_format}"
reject_talk: "Reject %{proposal_format}"
duration: Duration

0 comments on commit 6d687ae

Please sign in to comment.