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.2.1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.3 app/controllers/alchemy/admin/trash_controller.rb
lc_alchemy_cms-3.2.1 app/controllers/alchemy/admin/trash_controller.rb
lc_alchemy_cms-3.2.0 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.2.0 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.2.0.rc1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.2.0.beta app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.0.4 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0.rc3 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0.rc2 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0.rc1 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0.beta6 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0.beta5 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0.beta4 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.0.3 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0.beta3 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0.beta2 app/controllers/alchemy/admin/trash_controller.rb
alchemy_cms-3.1.0.beta1 app/controllers/alchemy/admin/trash_controller.rb