diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fe7d2950..80d74f93 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -48,4 +48,5 @@ class ApplicationController < ActionController::Base Rails.logger.debug("Access denied!") redirect_to root_path, :alert => exception.message end + helper_method :organizer_or_admin? end diff --git a/app/views/proposal/_proposal_form.html.haml b/app/views/proposal/_proposal_form.html.haml index df960068..d309b55a 100644 --- a/app/views/proposal/_proposal_form.html.haml +++ b/app/views/proposal/_proposal_form.html.haml @@ -1,17 +1,19 @@ = semantic_form_for(@event, :url => @url) do |f| %section#basic = f.inputs :name => "Session Information" do - - if !@conference.call_for_papers.schedule_changes && @event.state == "confirmed" - Title - %br - = @event.title + - if !@conference.call_for_papers.schedule_changes && @event.state == "confirmed" && !organizer_or_admin? + Title: #{@event.title} %br %br - else = f.input :title, :as => :string, :required => true = f.input :subtitle, :as => :string %section#details - - unless @event.state === "unconfirmed" || @event.state === "confirmed" + - if (@event.state === "unconfirmed" || @event.state === "confirmed") && !organizer_or_admin? && !@conference.call_for_papers.schedule_changes + Event type: #{@event.event_type.title} + %br + %br + - else = f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false, :label => "Session Type" = f.input :require_registration = f.input :abstract, :input_html => {:rows => 5, :class => "span11"},