<commit_before><% if @library %>
    <% isRemote = params[:controller] == 'admin' ? false : true %>
    <ul class="nav navbar-nav navbar-left">
      <li class="dropdown top_drop">
        <a href="#" class="dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true"
           aria-expanded="true" id="library_option_btn">Library
          <span class="caret"></span></a>
        <ul class="dropdown-menu" id="library_option">
          <li><%= link_to 'Main Library', {library: 'main', floor: 1}, {remote: isRemote, 'data-turbolinks' => isRemote } %></li>
          <li><%= link_to 'Murray Library', {library: 'murray', floor: 1}, {remote: isRemote, 'data-turbolinks' => isRemote } %></li>
          <li><%= link_to 'New College Library', {library: 'newcollege', floor: 1}, {remote: isRemote, 'data-turbolinks' => isRemote } %></li>
        </ul>
      </li>
      <li>
        <a href="#" class="dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true"
           aria-expanded="true" id="floor_btn">Floor
          <span class="caret"></span></a>
        <ul class="dropdown-menu" id="floor_buttons">
        </ul>
      </li>
    </ul>
    <script type="text/javascript" charset="utf-8">
        // Load appropriate floors buttons into container
        $("#floor_buttons").html("");
        libraries_data["<%=@library%>"].floors.forEach(function (floor) {
            <% href = "#{root_url}#{'admin/' if params[:controller] == 'admin'}#{@library}/"%>
            $("#floor_buttons").append("<li><a data-remote='<%= isRemote %>' data-turbolinks='<%= isRemote %>' href='"+ floor.order +"'>" title='view "+ floor.name + " map'>" + floor.name + "</a></li>");
        });

        $('#floor_info').html("<%=@library.capitalize%> Library : " + libraries_data["<%=@library%>"].floors["<%= @floor%>"].name);

        $('#library_option_btn').html('<%=@library.capitalize%> Library <span class="caret"></span>');
        $('#library_option_btn').val('<%= @library %>');
        $('#library_option li a ').click(function () {
            $('#library_option_btn').html($(this).text() + ' <span class="caret"></span>');
            $('#library_option_btn').val($(this).data('value'));
        });

        $('#floor_btn').html('' + libraries_data["<%=@library%>"].floors[<%= @floor%>].name + ' <span class="caret"></span>');
        $('#floor_btn').val('<%= @floor %>');
        $('#floor_buttons li a').click(function (e) {
            <% @floor = @floor.presence || '1'%>
            $('#floor_btn').html($(this).text() + ' <span class="caret"></span>');
            $('#floor_btn').val($(this).data('value'));
        });
    </script>
<% end %><commit_msg>Fixing floors dropdown<commit_after><% if @library %>
    <% isRemote = params[:controller] == 'admin' ? false : true %>
    <ul class="nav navbar-nav navbar-left">
      <li class="dropdown top_drop">
        <a href="#" class="dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true"
           aria-expanded="true" id="library_option_btn">Library
          <span class="caret"></span></a>
        <ul class="dropdown-menu" id="library_option">
          <li><%= link_to 'Main Library', {library: 'main', floor: 1}, {remote: isRemote, 'data-turbolinks' => isRemote } %></li>
          <li><%= link_to 'Murray Library', {library: 'murray', floor: 1}, {remote: isRemote, 'data-turbolinks' => isRemote } %></li>
          <li><%= link_to 'New College Library', {library: 'newcollege', floor: 1}, {remote: isRemote, 'data-turbolinks' => isRemote } %></li>
        </ul>
      </li>
      <li>
        <a href="#" class="dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true"
           aria-expanded="true" id="floor_btn">Floor
          <span class="caret"></span></a>
        <ul class="dropdown-menu" id="floor_buttons">
        </ul>
      </li>
    </ul>
    <script type="text/javascript" charset="utf-8">
        // Load appropriate floors buttons into container
        $("#floor_buttons").html("");
        libraries_data["<%=@library%>"].floors.forEach(function (floor) {
            <% href = "#{root_url}#{'admin/' if params[:controller] == 'admin'}#{@library}/"%>
            $("#floor_buttons").append("<li><a data-remote='<%= isRemote %>' data-turbolinks='<%= isRemote %>' href='<%= root_path %><%= @library %>/"+ floor.order +"'>" + floor.name + "</a></li>");
        });

        $('#floor_info').html("<%=@library.capitalize%> Library : " + libraries_data["<%=@library%>"].floors["<%= @floor%>"].name);

        $('#library_option_btn').html('<%=@library.capitalize%> Library <span class="caret"></span>');
        $('#library_option_btn').val('<%= @library %>');
        $('#library_option li a ').click(function () {
            $('#library_option_btn').html($(this).text() + ' <span class="caret"></span>');
            $('#library_option_btn').val($(this).data('value'));
        });

        $('#floor_btn').html('' + libraries_data["<%=@library%>"].floors[<%= @floor%>].name + ' <span class="caret"></span>');
        $('#floor_btn').val('<%= @floor %>');
        $('#floor_buttons li a').click(function (e) {
            <% @floor = @floor.presence || '1'%>
            $('#floor_btn').html($(this).text() + ' <span class="caret"></span>');
            $('#floor_btn').val($(this).data('value'));
        });
    </script>
<% end %>
{'fraction_non_alphanumeric': 0.24489037532515792, 'fraction_numerical': 0.0018580453363062058, 'mean_word_length': 3.2824184566428003, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 126, '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': '6879141', 'n_tokens_mistral': 1758, 'n_tokens_neox': 1725, 'n_words': 309}