before_filter :authenticate_artist, :only => [:new, :create, :update, :destroy]
else
before_filter :authenticate_resource_reader, :only => [
- :index, :show, :credit, :by_license, :by_artist, :count, :count_by_license, :count_by_artist
+ :index, :show, :credit, :by_original_picture, :by_license, :by_artist, :count, :count_by_license, :count_by_artist
]
before_filter :authenticate_user, :only => [:new, :create, :update, :destroy]
before_filter :authenticate_artist, :only => [:new, :create, :update, :destroy]
filer_list
end
+ def by_original_picture
+ filer_list
+ end
+
def by_license
filer_list
end
filer_list
end
+ def show_html_format format
+ format.html {
+ @resource_picture = @item
+ }
+ end
+
def show
- @item = ResourcePicture.show(params[:id], @operators)
-
+ set_show
respond_to do |format|
opt = {:type => @item.mime_type, :disposition=>"inline"}
format.png { send_data(@item.restore(params[:subdir]), opt ) }
format.gif { send_data(@item.restore(params[:subdir]), opt ) }
format.jpeg { send_data(@item.restore(params[:subdir]), opt ) }
- format.html {
- @resource_picture = @item
- }
- format_prof format
- format.json { render :json => @item.to_json(ResourcePicture.show_json_opt)}
+ show_html_format format
+ show_prof_format format
+ show_json_format format
end
end