engine/app/controllers/admin/asset_collections_controller.rb

26 lines
577 B
Ruby
Raw Normal View History

2010-05-12 00:16:39 +00:00
module Admin
class AssetCollectionsController < BaseController
sections 'assets'
before_filter :set_collections
2010-05-12 00:16:39 +00:00
def index
if not @asset_collections.empty?
redirect_to(edit_admin_asset_collection_url(@asset_collections.first)) and return
2010-05-12 00:16:39 +00:00
end
end
def show
@asset_collection = current_site.asset_collections.find(params[:id])
2010-05-12 00:16:39 +00:00
render :action => 'edit'
end
protected
def set_collections
@asset_collections = current_site.asset_collections.order_by([[:name, :asc]])
2010-05-12 00:16:39 +00:00
end
end
end