class ModsController < ApplicationController record_select :per_page => 10, :search_on => "name", :order_by => "name ASC", :full_text_search => true active_scaffold :mods do |config| config = self # Ruby19 compatibility config.columns = [ :name, :version, :version_local, :path, :priority, :sixconfigs, :networks, :queryservers, # :created_at, :updated_at, :skip, :disabled, :remote] config.create.columns.exclude :remote, :queryservers config.update.columns.exclude :remote, :queryservers, :servers config.action_links.add 'copy', :label => 'Clone', :type => :record, :position => false, :confirm => "Do you really want to *clone* this item?" config.list.columns.exclude :sixconfigs, :servers, :path config.list.sorting = { :name => :asc } config.columns[:servers].form_ui = :record_select config.columns[:sixconfigs].form_ui = :record_select config.columns[:sixconfigs].label = "Presets" config.columns[:disabled].label = "Dis" config.columns[:remote].label = "NFO" config.columns[:priority].label = "Prio" config.columns[:version_local].label = "Local" config.columns[:version].label = "Ver" # config.columns[:changelog_link].label = "Changelog" config.columns[:queryservers].label = "Gamespy servers" [:networks, :servers, :queryservers, :sixconfigs].each do |c| config.columns[c].form_ui = :record_select end [:skip, :disabled, :path, :priority].each do |column| config.columns[column].inplace_edit = true end end end