class Panel::SurveyB::BackEnd::SettingsController < OrbitBackendController

  # include AdminHelper
  # include OrbitControllerLib::DivisionForDisable

  # before_filter :for_app_manager
  open_for_manager
  
  # def initialize
  #   super
  #   @app_title = 'survey_b'
  # end

  def show
    redirect_to edit_panel_survey_b_back_end_setting_path
  end

  def edit
    @setting = SurveyBSetting.first_or_create
  end

  def update
    @setting = SurveyBSetting.first_or_create

    respond_to do |format|
      if @setting.update_attributes(params[:survey_b_setting])
        format.html { redirect_to(panel_survey_b_back_end_periods_url) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @setting.errors, :status => :unprocessable_entity }
      end
    end
  end


end