<commit_before><% cache ['categories_selector', @site], expires_in: ((Time.now + 1.day).beginning_of_day - Time.now).ceil do %>
  <section class="categories-selector">
    <div class="long-row">
      <div class="grid-14">
        <div class="mod-categories-selector" id="filtersView">
          <nav>
            <ul>
              <% if false #@site.cluster %>
                <li class="menu-item sector">
                  <span class="father">
                    <a href="<%= cluster_path(@site.cluster) %>"><%= @site.word_for_cluster_sector.upcase.singularize %></a>
                  </span>
                </li>
              <% elsif false #@site.sector %>
                <li class="menu-item sector">
                  <span class="father">
                    <a href="<% sector_path(@site.sector) %>"><% @site.word_for_cluster_sector.upcase.singularize %>Sectors</a>
                  </span>
                </li>
              <% else %>
                <li class="menu-item sector" id="sector_option">
                  <button class="father">SECTOR</button>
                  <div class="mod-go-up-menu menu">
                    <ul class="mod-categories-child sector-child submenu">
                      <% @sectors.each do |category| %>
                        <li>
                          <a class="<%= category.name.underscore.parameterize %>" href="<%= sector_path(category.id) %>">
                              <%= category.name %>
                          </a>
                          <span><%= category.projects_count %> projects</span>
                        </li>
                      <% end %>
                    </ul>
                  </div>
                </li>
              <% end %>

              <li class="organizations">
                <button class="father">Organizations</button>
                <div class="mod-go-up-menu menu">
                  <ul class="mod-categories-child organizations-child">
                    <% @organizations.each do |organization| %>
                      <li><a href="<%= organization_path(organization[0]) %>"><%= organization[1] %></a></li>
                    <% end %>
                  </ul>
                  <input type="text" class="mod-categories-search" placeholder="Search Organization">
                </div>
              </li>

              <li class="donors">
                <button class="father">Donors</button>
                <div class="mod-go-up-menu menu">
                  <ul class="mod-categories-child donors-child">
                    <% @donors.each do |donor| %>
                      <li><a href="<%= donor_path(donor[0]) %>"><%= donor[1].html_safe %></a></li>
                    <% end %>
                  </ul>
                  <input type="text" class="mod-categories-search" placeholder="Search Donor">
                </div>
              </li>

            <% if @site.navigate_by_country %>
              <li class="countries">
                <button class="father">Countries</button>
                <div class="mod-go-up-menu menu">
                  <ul class="mod-categories-child countries-child">
                    <% @countries.each do |country| %>
                      <li><%= link_to(country[1], location_path(:ids => country[0],level: 1)) %></li>
                    <% end %>
                  </ul>
                  <input type="text" class="mod-categories-search" placeholder="Search Country">
                </div>
              </li>
            <% else %>
              <li class="regions">
                <button class="father">Regions</button>
                <div class="mod-go-up-menu menu">
                  <ul class="mod-categories-child regions-child">
                    <% @site.regions_select.each do |region| %>
                      <li><%= link_to(region.name, location_path(region.uid, level: region.adm_level + 1, site: @site.id)) %></li>
                    <% end %>
                  </ul>
                  <input type="text" class="mod-categories-search" placeholder="Search Region">
                </div>
              </li>
            <% end %>

            <li class="mod-form search">
              <%= form_tag(search_path, :method => :get) do %>
                <%= text_field_tag :q, params[:q], :placeholder=>'SEARCH PROJECTS'%>
                <input type="submit" value="">
              <% end %>
            </li>

            <li class="run-reports">
              <%= link_to "Run Reports", report_index_path, :class => 'button father reports-button' %>
            </li>

            </ul>
          </nav>
        </div>
      </div>

      <div class="grid-3">
        <div class="mod-logos-slider chachi-slider">
          <a href="http://www.fedex.com/" target="_blank" class="chachi-slide-item"><%= image_tag "fedex-logo.png", :alt  => "Fedex", :width => "130", :height => "40" %></a>
          <a href="http://www.ifad.org/" target="_blank" class="chachi-slide-item"><%= image_tag "ifad.png", :alt  => "IFAD", :width => "130", :height => "40" %></a>
        </div>
      </div>

    </div>
  </section>

  <script type="text/javascript">
    var buttons = document.querySelectorAll('.categories-selector button.father');
    for (var i=0, len=buttons.length; i<len; i++) {
      var button = buttons[i];

      button.addEventListener('click', function(e) {
        var target   = e.currentTarget;
        var menu     = target.parentElement.querySelector('.menu');
        var hasClass = menu.classList.contains('-show');
        if (hasClass) {
          menu.classList.remove('-show');
        } else {
          menu.classList.add('-show');
        }
      });
    }
  </script>
<% end %>
<commit_msg>make Sectors plural in the main navigation<commit_after><% cache ['categories_selector', @site], expires_in: ((Time.now + 1.day).beginning_of_day - Time.now).ceil do %>
  <section class="categories-selector">
    <div class="long-row">
      <div class="grid-14">
        <div class="mod-categories-selector" id="filtersView">
          <nav>
            <ul>
              <% if false #@site.cluster %>
                <li class="menu-item sector">
                  <span class="father">
                    <a href="<%= cluster_path(@site.cluster) %>"><%= @site.word_for_cluster_sector.upcase.singularize %></a>
                  </span>
                </li>
              <% elsif false #@site.sector %>
                <li class="menu-item sector">
                  <span class="father">
                    <a href="<% sector_path(@site.sector) %>"><% @site.word_for_cluster_sector.upcase.singularize %>Sectors</a>
                  </span>
                </li>
              <% else %>
                <li class="menu-item sector" id="sector_option">
                  <button class="father">SECTORS</button>
                  <div class="mod-go-up-menu menu">
                    <ul class="mod-categories-child sector-child submenu">
                      <% @sectors.each do |category| %>
                        <li>
                          <a class="<%= category.name.underscore.parameterize %>" href="<%= sector_path(category.id) %>">
                              <%= category.name %>
                          </a>
                          <span><%= category.projects_count %> projects</span>
                        </li>
                      <% end %>
                    </ul>
                  </div>
                </li>
              <% end %>

              <li class="organizations">
                <button class="father">Organizations</button>
                <div class="mod-go-up-menu menu">
                  <ul class="mod-categories-child organizations-child">
                    <% @organizations.each do |organization| %>
                      <li><a href="<%= organization_path(organization[0]) %>"><%= organization[1] %></a></li>
                    <% end %>
                  </ul>
                  <input type="text" class="mod-categories-search" placeholder="Search Organization">
                </div>
              </li>

              <li class="donors">
                <button class="father">Donors</button>
                <div class="mod-go-up-menu menu">
                  <ul class="mod-categories-child donors-child">
                    <% @donors.each do |donor| %>
                      <li><a href="<%= donor_path(donor[0]) %>"><%= donor[1].html_safe %></a></li>
                    <% end %>
                  </ul>
                  <input type="text" class="mod-categories-search" placeholder="Search Donor">
                </div>
              </li>

            <% if @site.navigate_by_country %>
              <li class="countries">
                <button class="father">Countries</button>
                <div class="mod-go-up-menu menu">
                  <ul class="mod-categories-child countries-child">
                    <% @countries.each do |country| %>
                      <li><%= link_to(country[1], location_path(:ids => country[0],level: 1)) %></li>
                    <% end %>
                  </ul>
                  <input type="text" class="mod-categories-search" placeholder="Search Country">
                </div>
              </li>
            <% else %>
              <li class="regions">
                <button class="father">Regions</button>
                <div class="mod-go-up-menu menu">
                  <ul class="mod-categories-child regions-child">
                    <% @site.regions_select.each do |region| %>
                      <li><%= link_to(region.name, location_path(region.uid, level: region.adm_level + 1, site: @site.id)) %></li>
                    <% end %>
                  </ul>
                  <input type="text" class="mod-categories-search" placeholder="Search Region">
                </div>
              </li>
            <% end %>

            <li class="mod-form search">
              <%= form_tag(search_path, :method => :get) do %>
                <%= text_field_tag :q, params[:q], :placeholder=>'SEARCH PROJECTS'%>
                <input type="submit" value="">
              <% end %>
            </li>

            <li class="run-reports">
              <%= link_to "Run Reports", report_index_path, :class => 'button father reports-button' %>
            </li>

            </ul>
          </nav>
        </div>
      </div>

      <div class="grid-3">
        <div class="mod-logos-slider chachi-slider">
          <a href="http://www.fedex.com/" target="_blank" class="chachi-slide-item"><%= image_tag "fedex-logo.png", :alt  => "Fedex", :width => "130", :height => "40" %></a>
          <a href="http://www.ifad.org/" target="_blank" class="chachi-slide-item"><%= image_tag "ifad.png", :alt  => "IFAD", :width => "130", :height => "40" %></a>
        </div>
      </div>

    </div>
  </section>

  <script type="text/javascript">
    var buttons = document.querySelectorAll('.categories-selector button.father');
    for (var i=0, len=buttons.length; i<len; i++) {
      var button = buttons[i];

      button.addEventListener('click', function(e) {
        var target   = e.currentTarget;
        var menu     = target.parentElement.querySelector('.menu');
        var hasClass = menu.classList.contains('-show');
        if (hasClass) {
          menu.classList.remove('-show');
        } else {
          menu.classList.add('-show');
        }
      });
    }
  </script>
<% end %>

{'fraction_non_alphanumeric': 0.16497728067109402, 'fraction_numerical': 0.004019573575672841, 'mean_word_length': 1.4983628028814668, 'pattern_counts': {'":': 0, '<': 285, '<?xml version=': 0, '>': 303, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '971254', 'n_tokens_mistral': 3380, 'n_tokens_neox': 3056, 'n_words': 608}