lib/lentil/admin/images.rb in lentil-0.4.2 vs lib/lentil/admin/images.rb in lentil-0.5.0

- old
+ new

@@ -4,10 +4,11 @@ config.batch_actions = false config.per_page = 10 filter :state, :as => :select, :collection => proc { Lentil::Image::States } + filter :suppressed filter :media_type, :as => :select filter :user_user_name, :as => :string, :label => "Username" filter :user_full_name, :as => :string, :label => "Full Name" filter :staff_like, :as => :select filter :do_not_request_donation, :as => :select @@ -58,10 +59,11 @@ else "No Battles Fought" end end column "Score", :popular_score + column :suppressed column :state do |image| image.state_name end end @@ -90,10 +92,11 @@ end row :staff_like row :do_not_request_donation row :donor_agreement_submitted_date row :file_harvested_date + row :suppressed row :state do image.state_name end row :image do unless image.media_type == "video" @@ -132,10 +135,11 @@ taggings_to_keep = image.taggings.where(:tag_id => tag_ids_to_keep) taggings = new_taggings + taggings_to_keep image.update_attributes!(:state => image_params['state'], :taggings => taggings, :staff_like => image_params['staff_like'], - :moderator => current_admin_user, :moderated_at => DateTime.now, :second_moderation => second_moderation, :do_not_request_donation => image_params['do_not_request_donation']) + :moderator => current_admin_user, :moderated_at => DateTime.now, :second_moderation => second_moderation, + :do_not_request_donation => image_params['do_not_request_donation'], :suppressed => image_params['suppressed']) end end end member_action :update_image do