Sha256: cc4a66a57861cc1771fe13e1c2b1009327df77bef130bd9524be3a5f8caa6624

Contents?: true

Size: 847 Bytes

Versions: 13

Compression:

Stored size: 847 Bytes

Contents

class Admin::AssetsController < Admin::ResourcesController

  layout :set_layout

  def index
    if params[:layout]
      add_resources_action("Add new", {:action => "new"}, {})
    end

    super
  end

  def new
    if params[:layout]
      add_resources_action("Back to list", {:action => "index", :id => nil}, {})
    end

    super
  end

  def create
    if params[:layout]
      add_resources_action("Back to list", {:action => "index", :id => nil}, {})
    end

    super
  end

  def edit
    if params[:layout]
      add_resources_action("Back to list", {:action => "index", :id => nil}, {})
    end

    super
  end

  def update
    if params[:layout]
      add_resources_action("Back to list", {:action => "index", :id => nil}, {})
    end

    super
  end

  private

  def set_layout
    params[:layout] || "admin/base"
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
typus-3.0.11.rc5 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.0.11.rc4 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.0.11.rc3 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.1.0.rc4 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.1.0.rc3 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.1.0.rc2 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.0.11.rc2 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.0.11.rc1 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.1.0.rc1 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.0.10 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.0.9 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.0.8 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb
typus-3.0.7 test/fixtures/rails_app/app/controllers/admin/assets_controller.rb