Sha256: 621ea10ae7afd5e76071acba2e970b30368172d23e1fb8e745704d1551807512

Contents?: true

Size: 794 Bytes

Versions: 4

Compression:

Stored size: 794 Bytes

Contents

class Admin::MaterialsController < ApplicationController
  include AdminLayoutHelper
  
  include Admin::ActivityTypeControllerHelper
  include Admin::ActivityTaxControllerHelper
  
  include ExtensibleObjectHelper

  active_scaffold "Activity::Material" do |config|
    add_activity_type_config config
    
    config.label = "Materials"
    
    %w(update create).each do |crud_action|
      config.send(crud_action).columns.add_subgroup('Materials') { |g| g.add [:label, :comments] }
    end
    
    config.columns << [:label, :comments, :created_at, :updated_at]
    config.list.columns = [:occurred_on, :client, :label, :cost, :tax]
    config.show.columns = [ :occurred_on,:is_published, :client, :label, :cost, :tax, :comments, :updated_at, :created_at ]
  end

  handle_extensions
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
brisk-bills-0.8.2 app/controllers/admin/materials_controller.rb
brisk-bills-0.8.1 app/controllers/admin/materials_controller.rb
brisk-bills-0.7.0 app/controllers/admin/materials_controller.rb
brisk-bills-0.6.0 app/controllers/admin/materials_controller.rb