Module: ClippedAdminUI

Defined in:
lib/clipped_admin_ui.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/clipped_admin_ui.rb', line 3

def self.included(base)
 base.class_eval do

    attr_accessor :asset
    alias_method :assets, :asset
    
    protected

      def load_default_asset_regions
        OpenStruct.new.tap do |asset|
          asset.edit = Radiant::AdminUI::RegionSet.new do |edit|
            edit.main.concat %w{edit_header edit_form edit_regenerate}
            edit.form.concat %w{edit_title edit_metadata}
          end
          asset.new = asset.edit
          asset.index = Radiant::AdminUI::RegionSet.new do |index|
            index.top.concat %w{filters}
            index.bottom.concat %w{}
            index.thead.concat %w{thumbnail_header content_type_header actions_header}
            index.tbody.concat %w{thumbnail_cell title_cell content_type_cell actions_cell}
            index.paginate
          end
          asset.remove = asset.index
        end
      end
  end
  
end