ActiveAdmin.register JamRuby::ArtifactUpdate do
  menu :label => 'Artifacts'

  config.sort_order = 'product,environment'

   form :html => { :multipart => true }  do |f|
     f.inputs "Details" do
       f.input :version, :hint => "Should match Jenkins build number of artifact"
       f.input :environment, :hint => "Typically just 'public'"
       f.input :product, :as => :select,  :collection => JamRuby::ArtifactUpdate::PRODUCTS
     end
      f.inputs "Artifact Upload" do
        f.input :uri, :as => :file, :hint => "Upload the artifact from Jenkins"
      end

     f.buttons

   end

  #collection_action :upload_artifact, :method => :post do
  #    # Do some CSV importing work here...
  #    redirect_to :action => :index, :notice => "CSV imported successfully!"
  #end
end
