Sha256: 8820045c6daeba88c17390a327188ddbd51d3306ded67c8c6dcb9551af286e44

Contents?: true

Size: 682 Bytes

Versions: 27

Compression:

Stored size: 682 Bytes

Contents

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

      helper "alchemy/admin/elements"

      authorize_resource class: false

      def index
        @elements = Element.trashed
        @page = Page.find(params[:page_id])
        @allowed_elements = @page.available_element_definitions
        @draggable_trash_items = {}
        @elements.each do |element|
          @draggable_trash_items["element_#{element.id}"] = element.available_page_cell_names(@page)
        end
      end

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

    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
alchemy_cms-3.0.2 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.0.1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.0.0 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.0.0.rc8 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.0.0.rc7 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.0.0.rc6 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.0.0.rc5 app/controllers/alchemy/admin/trash_controller.rb