app/controllers/known_uris_controller.rb
# search for value URIs, but only given a predicate. If the term is empty then use all visible
# specified values as a pick list. Only autocomplete within values specified for the predicate
search for value URIs, but only given a predicate. If the term is empty then use all visible
specified values as a pick list. Only autocomplete within values specified for the predicate
search for value URIs but only given a predicate . If the term is empty then use all visible specified values as a pick list . Only autocomplete within values specified for the predicate
def autocomplete_known_uri_values
    lookup_predicate
    if params[:term].blank? || params[:term].strip.blank?
      if @predicate && @predicate.has_values?
        @known_uris = @predicate.allowed_values.select{ |ku| ku.visible? }
      else
        @known_uris = []
      end
    else
      @known_uris = search_known_uris_by_name_or_uri(params[:term])
      if @predicate
        @known_uris.delete_if{ |ku| ! @predicate.allowed_values.include?(ku) }
      else
        @known_uris.delete_if{ |ku| ! ku.value? }
      end
    end
    render_autocomplete_results
  end
def autocomplete_known_uri_values lookup_predicate if params [ :term ] . blank? || params [ :term ] . strip . blank? if @predicate && @predicate . has_values? @known_uris = @predicate . allowed_values . select { | ku | ku . visible? } else @known_uris = [ ] end else @known_uris = search_known_uris_by_name_or_uri ( params [ :term ] ) if @predicate @known_uris . delete_if { | ku | ! @predicate . allowed_values . include? ( ku ) } else @known_uris . delete_if { | ku | ! ku . value? } end end render_autocomplete_results end
search for value URIs, but only given a predicate.
search for value URIs but only given a predicate .