<commit_before>  <% title "Reservation ##{@reservation.id}" %>
  <% subtitle @reservation.reserver.first_name + " " +
  (!@reservation.reserver.nickname.blank? ? "(#{@reservation.reserver.nickname}) " : "") +
  @reservation.reserver.last_name + " | " + @reservation.reserver.login %>

  <div class="row">
    <div id="bool_labels" class="span9">
      <%= "<span class=\"user_label label-success\">Returned</span>".html_safe if @reservation.status == 'returned on time' %>
      <%= "<span class=\"user_label label-important\">Overdue</span>".html_safe if @reservation.status == 'overdue' %>
      <%= "<span class=\"user_label label-warning\">Returned Overdue</span>".html_safe if @reservation.status == 'returned overdue' %>
      <%= "<span class=\"user_label label-info\">Checked Out</span>".html_safe if @reservation.status == 'checked out' %>
      <%= "<span class=\"user_label\">Missed</span>".html_safe if @reservation.status == 'missed' %>
      <%= "<span class=\"user_label label-important\">Requested</span>".html_safe if @reservation.approval_status == 'requested' %>
      <%= "<span class=\"user_label label-success\">Approved</span>".html_safe if @reservation.approval_status == 'approved' %>
      <%= "<span class=\"user_label label-warning\">Denied</span>".html_safe if @reservation.approval_status == 'denied' %>
      <% unless @reservation.status == 'reserved' %>
        <hr>
      <% end %>
    </div>
  </div>
  <div class="row">
    <%# left column  %>
    <div id="res_left_column" class="span3">
      <div class="well well-inverse">
        <%# equipment section  %>
          <h3><%= link_to @reservation.equipment_model.name, @reservation.equipment_model %></h3>
          <hr>
          <%= link_to @reservation.equipment_model do %>
            <%= image_tag @reservation.equipment_model.photo.url(:large) %>
          <% end %>
          <hr>
          <h3><%= link_to @reservation.equipment_object.nil? ? "(unassigned)" :
          @reservation.equipment_object.name, equipment_model_path(@reservation.equipment_model, anchor: 'items') %></h3>
      </div>

      <%# shows renew button if due_date is today, tomorrow, or the day after %>
      <% if @reservation.is_eligible_for_renew? %>
        <div id="renew_box">
          <p>You are currently eligible to renew the <%= @reservation.equipment_model.name.singularize %>
          reservation until <strong><%= @reservation.find_renewal_length %></strong>.</p>
          <hr>
          <%= manage_reservations_btn %>
          <%= link_to "Renew Now", renew_reservation_path, :method => :put, remote: true, class: 'btn btn-primary' %>
        </div>
      <% elsif @reservation.checked_out.nil? or !@reservation.checked_in.nil? %>
        <%# you can't renew if you haven't checked it out, or if you've already checked it in %>
        <%= manage_reservations_btn %>
      <% else %><commit_msg>remove offending nonexistent method and replace with correct name<commit_after>  <% title "Reservation ##{@reservation.id}" %>
  <% subtitle @reservation.reserver.first_name + " " +
  (!@reservation.reserver.nickname.blank? ? "(#{@reservation.reserver.nickname}) " : "") +
  @reservation.reserver.last_name + " | " + @reservation.reserver.login %>

  <div class="row">
    <div id="bool_labels" class="span9">
      <%= "<span class=\"user_label label-success\">Returned</span>".html_safe if @reservation.status == 'returned on time' %>
      <%= "<span class=\"user_label label-important\">Overdue</span>".html_safe if @reservation.status == 'overdue' %>
      <%= "<span class=\"user_label label-warning\">Returned Overdue</span>".html_safe if @reservation.status == 'returned overdue' %>
      <%= "<span class=\"user_label label-info\">Checked Out</span>".html_safe if @reservation.status == 'checked out' %>
      <%= "<span class=\"user_label\">Missed</span>".html_safe if @reservation.status == 'missed' %>
      <%= "<span class=\"user_label label-important\">Requested</span>".html_safe if @reservation.approval_status == 'requested' %>
      <%= "<span class=\"user_label label-success\">Approved</span>".html_safe if @reservation.approval_status == 'approved' %>
      <%= "<span class=\"user_label label-warning\">Denied</span>".html_safe if @reservation.approval_status == 'denied' %>
      <% unless @reservation.status == 'reserved' %>
        <hr>
      <% end %>
    </div>
  </div>
  <div class="row">
    <%# left column  %>
    <div id="res_left_column" class="span3">
      <div class="well well-inverse">
        <%# equipment section  %>
          <h3><%= link_to @reservation.equipment_model.name, @reservation.equipment_model %></h3>
          <hr>
          <%= link_to @reservation.equipment_model do %>
            <%= image_tag @reservation.equipment_model.photo.url(:large) %>
          <% end %>
          <hr>
          <h3><%= link_to @reservation.equipment_object.nil? ? "(unassigned)" :
          @reservation.equipment_object.name, equipment_model_path(@reservation.equipment_model, anchor: 'items') %></h3>
      </div>

      <%# shows renew button if due_date is today, tomorrow, or the day after %>
      <% if @reservation.is_eligible_for_renew? %>
        <div id="renew_box">
          <p>You are currently eligible to renew the <%= @reservation.equipment_model.name.singularize %>
          reservation until <strong><%= @reservation.find_renewal_date.to_date.to_s(:long) %></strong>.</p>
          <hr>
          <%= manage_reservations_btn %>
          <%= link_to "Renew Now", renew_reservation_path, :method => :put, remote: true, class: 'btn btn-primary' %>
        </div>
      <% elsif @reservation.checked_out.nil? or !@reservation.checked_in.nil? %>
        <%# you can't renew if you haven't checked it out, or if you've already checked it in %>
        <%= manage_reservations_btn %>
      <% else %>
{'fraction_non_alphanumeric': 0.17482876712328768, 'fraction_numerical': 0.002054794520547945, 'mean_word_length': 3.4350797266514808, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 139, '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': '4315283', 'n_tokens_mistral': 1968, 'n_tokens_neox': 1840, 'n_words': 358}