<commit_before>module ResourceListItemHelper

  def get_list_item_content_partial resource
    get_original_model_name(resource).pluralize.underscore + "/resource_list_item"
  end

  def get_list_item_actions_partial resource
    if resource.authorization_supported? && resource.is_downloadable_asset?
      actions_partial = "assets/resource_actions_td"
    else
      actions_partial = nil
    end
    actions_partial
  end

  def get_list_item_avatar_partial resource
    avatar_partial = "layouts/avatars"
    if resource.respond_to?(:contributor) || resource.respond_to?(:creators)
      avatar_partial = "assets/asset_avatars"
    end
    avatar_partial
  end

  def list_item_title resource, title=nil, url=nil
    if title.nil?
      title = get_object_title(resource)
    end

    html = "<div class=\"list_item_title\">"


    if resource.class.name.split("::")[0] == "Person"
      html << "<p>#{link_to title, (url.nil? ? show_resource_path(resource) : url)} #{admin_icon(resource) + " " + pal_icon(resource)}</p>"
    else<commit_msg>just removed a blank line<commit_after>module ResourceListItemHelper

  def get_list_item_content_partial resource
    get_original_model_name(resource).pluralize.underscore + "/resource_list_item"
  end

  def get_list_item_actions_partial resource
    if resource.authorization_supported? && resource.is_downloadable_asset?
      actions_partial = "assets/resource_actions_td"
    else
      actions_partial = nil
    end
    actions_partial
  end

  def get_list_item_avatar_partial resource
    avatar_partial = "layouts/avatars"
    if resource.respond_to?(:contributor) || resource.respond_to?(:creators)
      avatar_partial = "assets/asset_avatars"
    end
    avatar_partial
  end

  def list_item_title resource, title=nil, url=nil
    if title.nil?
      title = get_object_title(resource)
    end

    html = "<div class=\"list_item_title\">"

    if resource.class.name.split("::")[0] == "Person"
      html << "<p>#{link_to title, (url.nil? ? show_resource_path(resource) : url)} #{admin_icon(resource) + " " + pal_icon(resource)}</p>"
    else
{'fraction_non_alphanumeric': 0.10261282660332542, 'fraction_numerical': 0.0009501187648456057, 'mean_word_length': 4.187192118226601, 'pattern_counts': {'":': 2, '<': 13, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4759659', 'n_tokens_mistral': 686, 'n_tokens_neox': 666, 'n_words': 123}