<commit_before>class FoldersController < CatalogController

  ##
  # Give Bookmarks access to the CatalogController configuration
  include Blacklight::Configurable
  include Blacklight::SearchHelper
  include Blacklight::TokenBasedUser

  copy_blacklight_config_from(CatalogController)

  # Blacklight uses #search_action_url to figure out the right URL for
  # the global search box
  def search_action_url options = {}
    catalog_index_url(options.except(:controller, :action))
  end
  helper_method :search_action_url

  before_filter :verify_user, :except => [:index, :show, :public_list]
  before_filter :check_visibility, :only => [:show]
  before_filter :correct_user_for_folder, :only => [:update, :destroy]

  def index
    flash[:notice] = flash[:notice].html_safe if flash[:notice].present? and flash[:notice] == %Q[You are viewing your saved Digital Stacks items in a temporary session. To persist these inside of a full account, please click the <a href="#{new_user_session_path}" title="Sign Up Link">Sign Up / Log In</a> link.]
    if current_or_guest_user
      @folders = current_or_guest_user.folders
    end
  end

  def show
    # @folder is set by correct_user_for_folder
    @folder_items = @folder.folder_items
    folder_items_ids = @folder_items.collect { |f_item| f_item.document_id.to_s }
    params[:sort] ||= 'title_info_primary_ssort asc, date_start_dtsi asc'
    @response, @document_list = fetch(folder_items_ids)

    # have to declare this so view uses catalog/index partials
    # uh, maybe not? default templates won't get invoked if below is set
    #@partial_path_templates = ["catalog/%{action_name}_%{index_view_type}_%{format}"]
  end

  def new
    @folder = current_user.folders.new
  end<commit_msg>Show the html sign up link in the folder show view if there is a notice<commit_after>class FoldersController < CatalogController

  ##
  # Give Bookmarks access to the CatalogController configuration
  include Blacklight::Configurable
  include Blacklight::SearchHelper
  include Blacklight::TokenBasedUser

  copy_blacklight_config_from(CatalogController)

  # Blacklight uses #search_action_url to figure out the right URL for
  # the global search box
  def search_action_url options = {}
    catalog_index_url(options.except(:controller, :action))
  end
  helper_method :search_action_url

  before_filter :verify_user, :except => [:index, :show, :public_list]
  before_filter :check_visibility, :only => [:show]
  before_filter :correct_user_for_folder, :only => [:update, :destroy]

  def index
    flash[:notice] = flash[:notice].html_safe if flash[:notice].present? and flash[:notice] == %Q[You are viewing your saved Digital Stacks items in a temporary session. To persist these inside of a full account, please click the <a href="#{new_user_session_path}" title="Sign Up Link">Sign Up / Log In</a> link.]
    if current_or_guest_user
      @folders = current_or_guest_user.folders
    end
  end

  def show
    flash[:notice] = flash[:notice].html_safe if flash[:notice].present? and flash[:notice] == %Q[You are viewing your saved Digital Stacks items in a temporary session. To persist these inside of a full account, please click the <a href="#{new_user_session_path}" title="Sign Up Link">Sign Up / Log In</a> link.]

    # @folder is set by correct_user_for_folder
    @folder_items = @folder.folder_items
    folder_items_ids = @folder_items.collect { |f_item| f_item.document_id.to_s }
    params[:sort] ||= 'title_info_primary_ssort asc, date_start_dtsi asc'
    @response, @document_list = fetch(folder_items_ids)

    # have to declare this so view uses catalog/index partials
    # uh, maybe not? default templates won't get invoked if below is set
    #@partial_path_templates = ["catalog/%{action_name}_%{index_view_type}_%{format}"]
  end

  def new
    @folder = current_user.folders.new
  end
{'fraction_non_alphanumeric': 0.09241522133057209, 'fraction_numerical': 0.0, 'mean_word_length': 4.8545454545454545, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6422495', 'n_tokens_mistral': 1179, 'n_tokens_neox': 1148, 'n_words': 352}