<commit_before><!-- Request Tags -->

<div class="req req_id_<%= @req.id %>">
  
  <a name="req_<%= @req.id %>"></a>

  <!-- Categories on top of the title -->
  <%== horizontal_formatted_offer_categories @req.long_categories %>
  
  <h2>
    <%= h @req.name %><%= waiting_image %>
  </h2>
  <p>
    <strong><%= t('reqs.partial.due') %></strong>: <%= relative_time_ago_in_words(@req.due_date) %>
  </p>

  <!-- Fluid container - for two rows -->
  <div class="row-fluid">

    <div class="span6">
      
      <p>
        <%= markdown( @req.description.to_s ) %>
      </p>

      <hr/>

      <div class="row-fluid">
        <div class="span2">
          <!-- Container for image -->
          <div class="profile-image">
            <%= image_link @req.person, :image => :thumbnail %>
            <% image_tag "icons/new.gif", :class => "icon", :alt => "Request" %>
          </div>
        </div>

        <div class="span10">
          <!-- Container for post meta -->
          <p class="meta">
            
            <%= t('reqs.partial.createdby') %> <%= person_link @req.person %>
            <%= t 'ago_time', :date => time_ago_in_words(@req.created_at) %>
            
            <!-- list of controls -->
            <ul class="inline">
              
              <% if can?(:update, @req) %>
                <li>
                  <%= link_to t('button_edit'), edit_req_path(@req), :class => 'show-follow' %>
                </li>
              <% end %>
              
              <% if @req.biddable? %>
                
                <% if can?(:destroy, @req) %>
                  <li>
                    <%= link_to t('button_delete'), @req, :class => 'delete_req' %>
                  </li>
                <% end %>

                <% if can?(:deactivate, @req) && @req.considered_active? -%>
                  <li>
                    <%= link_to t('button_deactivate'), deactivate_req_path(@req), :class => 'deactivate_req' %>
                  </li>
                <% end %>
              
              <% end %>

            </ul>
            
            <% if !current_person.address.nil? && !@req.person.address.nil? && !current_person?(@req.person) -%>
              <% distance = number_with_precision(@req.person.address.distance_to(current_person.address), :precision => 1) %>
              <% if distance < 300 %>
                <%= distance.to_s %> <%= t('miles_away') %>
              <% end %>
            <% end -%>
            
          </p>

          <p>
            <%= link_to h(@req.name), @req, :class => "show-follow" %> (<%= h @req.estimated_hours %> <%= h @req.unit %>)
          </p>
        </div>
      </div>

      <div>
        <%= render :partial => "shared/bid_message", :collection => approved_messages(@req)   %>
        <%= render :partial => "shared/bid_message", :collection => completed_messages(@req)  %>
        <%= render :partial => "shared/bid_message", :collection => commitment_messages(@req) %>
        <%= render :partial => "shared/bid_message", :collection => accepted_messages(@req)   %>
      </div>

      <!-- list of current bids -->

      <% if @req.active? %>
        <hr/>
        <%= render :partial => '/reqs/bids' %>
      <% end %>
    </div>

    <div class="span6">

      <!-- Request - bids -->
      <% if @req.active? %>
        <%= render :partial => '/reqs/bids_form' %>
      <%- end -%>
    
    </div>

  </div>
    
  <ul class="list full">
    <%# render :partial => 'req/req_large', :locals => {:full => true, :req => @req } %>
    <% render :partial => @req, :locals => {:full => true} %>
  </ul>

  <div class="list full">

  </div>  

  

</div><commit_msg>Conversion of Distance to integer prior to comparison<commit_after><!-- Request Tags -->

<div class="req req_id_<%= @req.id %>">
  
  <a name="req_<%= @req.id %>"></a>

  <!-- Categories on top of the title -->
  <%== horizontal_formatted_offer_categories @req.long_categories %>
  
  <h2>
    <%= h @req.name %><%= waiting_image %>
  </h2>
  <p>
    <strong><%= t('reqs.partial.due') %></strong>: <%= relative_time_ago_in_words(@req.due_date) %>
  </p>

  <!-- Fluid container - for two rows -->
  <div class="row-fluid">

    <div class="span6">
      
      <p>
        <%= markdown( @req.description.to_s ) %>
      </p>

      <hr/>

      <div class="row-fluid">
        <div class="span2">
          <!-- Container for image -->
          <div class="profile-image">
            <%= image_link @req.person, :image => :thumbnail %>
            <% image_tag "icons/new.gif", :class => "icon", :alt => "Request" %>
          </div>
        </div>

        <div class="span10">
          <!-- Container for post meta -->
          <p class="meta">
            
            <%= t('reqs.partial.createdby') %> <%= person_link @req.person %>
            <%= t 'ago_time', :date => time_ago_in_words(@req.created_at) %>
            
            <!-- list of controls -->
            <ul class="inline">
              
              <% if can?(:update, @req) %>
                <li>
                  <%= link_to t('button_edit'), edit_req_path(@req), :class => 'show-follow' %>
                </li>
              <% end %>
              
              <% if @req.biddable? %>
                
                <% if can?(:destroy, @req) %>
                  <li>
                    <%= link_to t('button_delete'), @req, :class => 'delete_req' %>
                  </li>
                <% end %>

                <% if can?(:deactivate, @req) && @req.considered_active? -%>
                  <li>
                    <%= link_to t('button_deactivate'), deactivate_req_path(@req), :class => 'deactivate_req' %>
                  </li>
                <% end %>
              
              <% end %>

            </ul>
            
            <% if !current_person.address.nil? && !@req.person.address.nil? && !current_person?(@req.person) -%>
              <% distance = number_with_precision(@req.person.address.distance_to(current_person.address), :precision => 1) %>
              <% if distance.to_i < 300 %>
                <%= distance.to_s %> <%= t('miles_away') %>
              <% end %>
            <% end -%>

          </p>

          <p>
            <%= link_to h(@req.name), @req, :class => "show-follow" %> (<%= h @req.estimated_hours %> <%= h @req.unit %>)
          </p>
        </div>
      </div>

      <div>
        <%= render :partial => "shared/bid_message", :collection => approved_messages(@req)   %>
        <%= render :partial => "shared/bid_message", :collection => completed_messages(@req)  %>
        <%= render :partial => "shared/bid_message", :collection => commitment_messages(@req) %>
        <%= render :partial => "shared/bid_message", :collection => accepted_messages(@req)   %>
      </div>

      <!-- list of current bids -->

      <% if @req.active? %>
        <hr/>
        <%= render :partial => '/reqs/bids' %>
      <% end %>
    </div>

    <div class="span6">

      <!-- Request - bids -->
      <% if @req.active? %>
        <%= render :partial => '/reqs/bids_form' %>
      <%- end -%>
    
    </div>

  </div>
    
  <ul class="list full">
    <%# render :partial => 'req/req_large', :locals => {:full => true, :req => @req } %>
    <% render :partial => @req, :locals => {:full => true} %>
  </ul>

  <div class="list full">

  </div>  

  

</div>
{'fraction_non_alphanumeric': 0.19859021282364106, 'fraction_numerical': 0.0029822421038362477, 'mean_word_length': 1.6228226093138998, 'pattern_counts': {'":': 0, '<': 205, '<?xml version=': 0, '>': 255, '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': '1535755', 'n_tokens_mistral': 2532, 'n_tokens_neox': 2257, 'n_words': 448}