images/app/controllers/refinery/admin/images_controller.rb
# This renders the image insert dialog
This renders the image insert dialog
This renders the image insert dialog
def insert
        self.new if @image.nil?
        @url_override = refinery.admin_images_path(request.query_parameters.merge(:insert => true))
        if params[:conditions].present?
          extra_condition = params[:conditions].split(',')
          extra_condition[1] = true if extra_condition[1] == "true"
          extra_condition[1] = false if extra_condition[1] == "false"
          extra_condition[1] = nil if extra_condition[1] == "nil"
        end
        find_all_images(({extra_condition[0].to_sym => extra_condition[1]} if extra_condition.present?))
        search_all_images if searching?
        paginate_images
        render :action => "insert"
      end
def insert self . new if @image . nil? @url_override = refinery . admin_images_path ( request . query_parameters . merge ( :insert => true ) ) if params [ :conditions ] . present? extra_condition = params [ :conditions ] . split ( ',' ) extra_condition [ 1 ] = true if extra_condition [ 1 ] == "true" extra_condition [ 1 ] = false if extra_condition [ 1 ] == "false" extra_condition [ 1 ] = nil if extra_condition [ 1 ] == "nil" end find_all_images ( ( { extra_condition [ 0 ] . to_sym => extra_condition [ 1 ] } if extra_condition . present? ) ) search_all_images if searching? paginate_images render :action => "insert" end
This renders the image insert dialog
This renders the image insert dialog