<commit_before><%#
  # $HeadURL$
  # $Id$
  #
  # Copyright (c) 2009-2012 by Public Library of Science, a non-profit corporation
  # http://www.plos.org/
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
-%>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>
    <% unless Rails.env.production? %>
        <%= "(#{Rails.env})"  %>
    <% end %>
    <%= APP_CONFIG['useragent'] %>
  </title>
  
  <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
  <![endif]-->

  <%= favicon_link_tag %>
  <%= stylesheet_link_tag "plos" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>

<body>
  <div class="container">
    <header>
      <%= link_to (image_tag "plos/plos.png", :class => "hidden-phone"), root_path %>
    </header>
    <div class="navbar">
  	  <div class="navbar-inner">
        <div class="nav-collapse collapse">
          <% if can? :read, ErrorMessage %>
            <ul class="nav">
              <%= controller.controller_name == "index" ? '<li class="visible-desktop active">'.html_safe : '<li class="visible-desktop">'.html_safe %><%= link_to 'Home', admin_root_path %></li>
            </ul>
          <% end %>
        </div>
  				<ul class="nav">
            <% if can? :read, ErrorMessage %>
              <%= controller.controller_name == "index" ? '<li class="hidden-desktop active">'.html_safe : '<li class="hidden-desktop">'.html_safe %><%= link_to "Home", admin_root_path %></li>
            <% end %>
  					<%= controller.controller_name == "articles" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to "Articles", articles_path %></li>
            <% if can? :read, ErrorMessage %>
              <%= controller.controller_name == "sources" ? '<li class="hidden-desktop active">'.html_safe : '<li class="hidden-desktop">'.html_safe %><%= link_to "Sources", admin_sources_path %></li>
  						<%= controller.controller_name == "sources" ? '<li class="dropdown visible-desktop active">'.html_safe : '<li class="dropdown visible-desktop">'.html_safe %>
  					    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Sources <b class="caret"></b></a>
  				      <ul class="dropdown-menu">
                  <li><%= link_to "All Sources", admin_sources_path %></li>
                  <li class="divider"></li>
                  <% sources.active.each do |source| %>
                    <li><%= link_to h(source.display_name), admin_source_path(source) %></li>
                  <% end %>
                  <% unless Source.inactive.empty? %>
                    <li class="divider"></li>
                    <% sources.inactive.each do |source| %>
                      <li><%= link_to h(source.display_name), admin_source_path(source) %></li>
                    <% end %>
                  <% end %>
  		          </ul>
  		        </li>
            <% else %>
              <%= controller.controller_name == "sources" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to "Sources", sources_path %></li>
            <% end %>
          </ul>
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <div class="nav-collapse collapse">
            <% if can? :read, ErrorMessage %>
              <ul class="nav">
                <%= controller.controller_name == "delayed_jobs" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to 'Jobs', admin_delayed_jobs_path %></li>
                <%= controller.controller_name == "responses" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to 'Responses', admin_responses_path %></li>
                <%= controller.controller_name == "events" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to 'Events', admin_events_path %></li>
                <%= controller.controller_name == "api_requests" ? '<li class="dropdown active">'.html_safe : '<li class="dropdown">'.html_safe %>
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Users <b class="caret"></b></a>
                  <ul class="dropdown-menu">
                    <li><%= link_to "All Users", admin_users_path %></li>
                    <li class="divider"></li>
                    <li><%= link_to "API Requests", admin_api_requests_path %></li>
                  </ul>
                </li>
                <%= controller.controller_name == "error_messages" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to 'Errors', admin_error_messages_path %></li>
              </ul>
            <% end %>
            <% unless ["sessions","registrations"].include?(controller.controller_name) %>
              <ul class="nav pull-right">
                <% if user_signed_in? %> 
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= current_user.name %> <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                      <li><%= link_to '<i class="icon-user"></i> Your Account'.html_safe, user_path("me") %></li>
                      <li class="divider"></li>
                      <li><%= link_to '<i class="icon-off"></i> Sign Out'.html_safe, destroy_user_session_path, :method => :delete %></li>
                    </ul>
                  </li>    
                <% else %>
                  <li><%= link_to_setup_or_login %></li>
                <% end %>
              </ul>
            <% end %>
          </div>
  			</div>
  		</div>

    <% flash.each do |name, msg| %>
      <div class="alert alert-<%= name == :notice ? "success" : "error" %>">
        <a class="close" data-dismiss="alert">&#215;</a>
        <%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
      </div><commit_msg>ALM-280 added CSS id for sign_out link<commit_after><%#
  # $HeadURL$
  # $Id$
  #
  # Copyright (c) 2009-2012 by Public Library of Science, a non-profit corporation
  # http://www.plos.org/
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
-%>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>
    <% unless Rails.env.production? %>
        <%= "(#{Rails.env})"  %>
    <% end %>
    <%= APP_CONFIG['useragent'] %>
  </title>
  
  <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
  <![endif]-->

  <%= favicon_link_tag %>
  <%= stylesheet_link_tag "plos" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>

<body>
  <div class="container">
    <header>
      <%= link_to (image_tag "plos/plos.png", :class => "hidden-phone"), root_path %>
    </header>
    <div class="navbar">
  	  <div class="navbar-inner">
        <div class="nav-collapse collapse">
          <% if can? :read, ErrorMessage %>
            <ul class="nav">
              <%= controller.controller_name == "index" ? '<li class="visible-desktop active">'.html_safe : '<li class="visible-desktop">'.html_safe %><%= link_to 'Home', admin_root_path %></li>
            </ul>
          <% end %>
        </div>
  				<ul class="nav">
            <% if can? :read, ErrorMessage %>
              <%= controller.controller_name == "index" ? '<li class="hidden-desktop active">'.html_safe : '<li class="hidden-desktop">'.html_safe %><%= link_to "Home", admin_root_path %></li>
            <% end %>
  					<%= controller.controller_name == "articles" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to "Articles", articles_path %></li>
            <% if can? :read, ErrorMessage %>
              <%= controller.controller_name == "sources" ? '<li class="hidden-desktop active">'.html_safe : '<li class="hidden-desktop">'.html_safe %><%= link_to "Sources", admin_sources_path %></li>
  						<%= controller.controller_name == "sources" ? '<li class="dropdown visible-desktop active">'.html_safe : '<li class="dropdown visible-desktop">'.html_safe %>
  					    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Sources <b class="caret"></b></a>
  				      <ul class="dropdown-menu">
                  <li><%= link_to "All Sources", admin_sources_path %></li>
                  <li class="divider"></li>
                  <% sources.active.each do |source| %>
                    <li><%= link_to h(source.display_name), admin_source_path(source) %></li>
                  <% end %>
                  <% unless Source.inactive.empty? %>
                    <li class="divider"></li>
                    <% sources.inactive.each do |source| %>
                      <li><%= link_to h(source.display_name), admin_source_path(source) %></li>
                    <% end %>
                  <% end %>
  		          </ul>
  		        </li>
            <% else %>
              <%= controller.controller_name == "sources" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to "Sources", sources_path %></li>
            <% end %>
          </ul>
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <div class="nav-collapse collapse">
            <% if can? :read, ErrorMessage %>
              <ul class="nav">
                <%= controller.controller_name == "delayed_jobs" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to 'Jobs', admin_delayed_jobs_path %></li>
                <%= controller.controller_name == "responses" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to 'Responses', admin_responses_path %></li>
                <%= controller.controller_name == "events" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to 'Events', admin_events_path %></li>
                <%= controller.controller_name == "api_requests" ? '<li class="dropdown active">'.html_safe : '<li class="dropdown">'.html_safe %>
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Users <b class="caret"></b></a>
                  <ul class="dropdown-menu">
                    <li><%= link_to "All Users", admin_users_path %></li>
                    <li class="divider"></li>
                    <li><%= link_to "API Requests", admin_api_requests_path %></li>
                  </ul>
                </li>
                <%= controller.controller_name == "error_messages" ? '<li class="active">'.html_safe : '<li>'.html_safe %><%= link_to 'Errors', admin_error_messages_path %></li>
              </ul>
            <% end %>
            <% unless ["sessions","registrations"].include?(controller.controller_name) %>
              <ul class="nav pull-right">
                <% if user_signed_in? %> 
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= current_user.name %> <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                      <li><%= link_to '<i class="icon-user"></i> Your Account'.html_safe, user_path("me") %></li>
                      <li class="divider"></li>
                      <li><%= link_to '<i class="icon-off"></i> Sign Out'.html_safe, destroy_user_session_path, :method => :delete, :id => "sign_out" %></li>
                    </ul>
                  </li>    
                <% else %>
                  <li><%= link_to_setup_or_login %></li>
                <% end %>
              </ul>
            <% end %>
          </div>
  			</div>
  		</div>

    <% flash.each do |name, msg| %>
      <div class="alert alert-<%= name == :notice ? "success" : "error" %>">
        <a class="close" data-dismiss="alert">&#215;</a>
        <%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
      </div>
{'fraction_non_alphanumeric': 0.1839318600368324, 'fraction_numerical': 0.0031461019030079806, 'mean_word_length': 2.2738005526249685, 'pattern_counts': {'":': 0, '<': 375, '<?xml version=': 0, '>': 382, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3373642', 'n_tokens_mistral': 4246, 'n_tokens_neox': 3873, 'n_words': 859}