X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fcontrollers%2Fpictures_controller.rb;h=08479172f687f768caed015aa824049106a4ca0c;hb=85d27b03ef74a6d4775fc345a9f59c9e1736e7c1;hp=9e1bae8c35acf1ba91e2afe3ecba35cb6d8d19ed;hpb=11a45b633d577752eab730818d0b116180e18a47;p=pettanr%2Fpettanr.git diff --git a/app/controllers/pictures_controller.rb b/app/controllers/pictures_controller.rb index 9e1bae8c..08479172 100644 --- a/app/controllers/pictures_controller.rb +++ b/app/controllers/pictures_controller.rb @@ -7,9 +7,23 @@ class PicturesController < ApplicationController before_filter :authenticate_resource_reader, :only => [:show, :credit, :search] before_filter :authenticate_author, :only => [] end + before_filter :authenticate_admin, :only => [:index, :by_artist, :count, :count_by_artist] + + def self.model + Picture + end + + def index + filer_list + end + + def by_artist + filer_list + end def show_html_format format format.html { + @item.boosts 'post' @picture = @item } end @@ -22,8 +36,8 @@ class PicturesController < ApplicationController format.gif { send_data(@item.restore(params[:subdir]), opt ) } format.jpeg { send_data(@item.restore(params[:subdir]), opt ) } show_html_format format - show_prof_format format show_json_format format + show_prof_format format end end @@ -45,4 +59,12 @@ class PicturesController < ApplicationController end end + def count + list_count + end + + def count_by_artist + list_count + end + end