Sha256: 175a853550356a29a4802f4d77522370aa578b68a0cbde3c2deb0d8252ee1ec0

Contents?: true

Size: 634 Bytes

Versions: 37

Compression:

Stored size: 634 Bytes

Contents

module Alchemy
  module Admin
    class TrashController < Alchemy::Admin::BaseController

      helper "alchemy/admin/elements"

      def index
        @elements = Element.trashed
        @page = Page.find_by_id(params[:page_id])
        @allowed_elements = Element.all_for_page(@page)
        @draggable_trash_items = {}
        @elements.each { |e| @draggable_trash_items["element_#{e.id}"] = e.belonging_cellnames(@page) }
        render :layout => false
      end

      def clear
        @page = Page.find_by_id(params[:page_id])
        @elements = Element.trashed
        @elements.map(&:destroy)
      end

    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
alchemy_cms-2.5.3.1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.3 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.2.2 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.2.1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.2 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.0 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.0.rc3 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.0.b9 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.3.2 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.2.4 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.4.1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.0.b5 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.5.0.b2 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.4.0 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.4.rc4 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.4.rc2 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.4.rc1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.3.1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-2.4.beta2 app/controllers/alchemy/admin/trash_controller.rb