<commit_before>
        <div class="header-bar">
          <button type="button" class="cf-toggler" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="cf-icon-bar"></span>
            <span class="cf-icon-bar"></span>
            <span class="cf-icon-bar"></span>
          </button>

          <a class="cf-brand" href="https://github.com/ckruse/cforum/">Classic Forum</a>
        </div>

        <div class="navbar-collapse cf-collapse">
          <ul class="cf-nav">
            <li<% if controller_path == 'cf_forums' %> class="active"<% end %>><%= link_to t('layout.home'), root_url %></li>

            <% if current_user %>
            <li<% if controller_path == 'mails' %> class="active"<% end %>><%= link_to t('layout.mail'), mails_path %></li>
            <% end %>

            <% if current_user and current_user.admin %>
            <li<% if controller_path =~ /^admin/ %> class="active"<% end %>><%= link_to t('layout.administration'), admin_users_path %></li>
            <% end %>

            <% if current_forum %>
              <li<% if controller_path == 'cf_threads' or controller_path == 'cf_messages' %> class="active"<% end %>><%= link_to current_forum.name, current_forum %></li>
              <li><%= link_to t("threads.new_thread"), new_cf_thread_path(current_forum.slug) %></li><% end %>

              <% if current_user and ((!current_forum and current_user.admin?) or (current_forum and current_user.moderate?(current_forum))) %>
              <% if not view_all %><li><%= link_to t("forums.admin_view"), cf_forum_path(current_forum ? current_forum.slug : 'all', view_all: 'yes') %></li>
              <% else %><li><%= link_to t("forums.normal_view"), cf_forum_path(current_forum ? current_forum.slug : 'all', view_all: false) %></li><% end %>
            <% end %>
          </ul>

          <ul class="cf-right-nav">
            <% if user_signed_in? %>
              <li><%= link_to notifications_path do %><span class="badge<% if @new_notifications.length > 0 %> badge-info<% end %>"><%= @new_notifications.length %></span></a><% end %></li>
              <li><%= link_to user_path(current_user) do %><span class="badge <% if @score < 0 %>badge-important<% elsif @score > 0 %>badge-success<% end %>"><%= @score %></span><% end %></li>
              <li<% if controller_path == 'users' %> class="active"<% end %>><%= link_to(current_user.username, edit_user_path(current_user), class: 'username') %></li>
              <li><%= link_to(t('layout.logout'), destroy_user_session_path, :method => :delete) %></li>
            <% else %>
              <li><%= link_to(t('layout.login'), new_user_session_path) %></li>
              <li><%= link_to t("layout.register"), new_user_registration_path %></li><commit_msg>hide admin link when there is no forum context<commit_after>
        <div class="header-bar">
          <button type="button" class="cf-toggler" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="cf-icon-bar"></span>
            <span class="cf-icon-bar"></span>
            <span class="cf-icon-bar"></span>
          </button>

          <a class="cf-brand" href="https://github.com/ckruse/cforum/">Classic Forum</a>
        </div>

        <div class="navbar-collapse cf-collapse">
          <ul class="cf-nav">
            <li<% if controller_path == 'cf_forums' %> class="active"<% end %>><%= link_to t('layout.home'), root_url %></li>

            <% if current_user %>
            <li<% if controller_path == 'mails' %> class="active"<% end %>><%= link_to t('layout.mail'), mails_path %></li>
            <% end %>

            <% if current_user and current_user.admin %>
            <li<% if controller_path =~ /^admin/ %> class="active"<% end %>><%= link_to t('layout.administration'), admin_users_path %></li>
            <% end %>

            <% if current_forum %>
              <li<% if controller_path == 'cf_threads' or controller_path == 'cf_messages' %> class="active"<% end %>><%= link_to current_forum.name, current_forum %></li>
              <li><%= link_to t("threads.new_thread"), new_cf_thread_path(current_forum.slug) %></li><% end %>

              <% if current_user and ((!current_forum and current_user.admin? and (@messages or @thread)) or (current_forum and current_user.moderate?(current_forum))) %>
              <% if not view_all %><li><%= link_to t("forums.admin_view"), cf_forum_path(current_forum ? current_forum.slug : 'all', view_all: 'yes') %></li>
              <% else %><li><%= link_to t("forums.normal_view"), cf_forum_path(current_forum ? current_forum.slug : 'all', view_all: false) %></li><% end %>
            <% end %>
          </ul>

          <ul class="cf-right-nav">
            <% if user_signed_in? %>
              <li><%= link_to notifications_path do %><span class="badge<% if @new_notifications.length > 0 %> badge-info<% end %>"><%= @new_notifications.length %></span></a><% end %></li>
              <li><%= link_to user_path(current_user) do %><span class="badge <% if @score < 0 %>badge-important<% elsif @score > 0 %>badge-success<% end %>"><%= @score %></span><% end %></li>
              <li<% if controller_path == 'users' %> class="active"<% end %>><%= link_to(current_user.username, edit_user_path(current_user), class: 'username') %></li>
              <li><%= link_to(t('layout.logout'), destroy_user_session_path, :method => :delete) %></li>
            <% else %>
              <li><%= link_to(t('layout.login'), new_user_session_path) %></li>
              <li><%= link_to t("layout.register"), new_user_registration_path %></li>
{'fraction_non_alphanumeric': 0.1977904490377762, 'fraction_numerical': 0.0010691375623663579, 'mean_word_length': 2.8790601243953007, 'pattern_counts': {'":': 0, '<': 189, '<?xml version=': 0, '>': 193, 'https://': 2, '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': '807004', 'n_tokens_mistral': 1931, 'n_tokens_neox': 1738, 'n_words': 379}