<commit_before><% content_for :title, 'Services' %>

<div class="page-header">
  <% if current_user %>
  <%= link_to new_service_path, class: 'btn btn-primary' do %>
    <span class="glyphicon glyphicon-plus"></span>
    New Service
  <% end %>
  <% end %>
  <h1>All services</h1>
</div>

<div class="table-responsive">
  <table class="table table-striped table-bordered table-hover">
    <thead>
      <tr>
            <th>Name</th>
            <th>Live</th>
            <th>On-demand</th>
            <th>Description</th>
      </tr>
    </thead>

    <tbody>
      <%= content_tag_for(:tr, @services) do |service| %>
            <td><%= link_to service.name, service %></td>
            <td><% if service.live %><span class="label label-success">Live</span><% end %></td>
            <td><% if service.on_demand %><span class="label label-primary">On-Demand</span><% end %></td>
            <td><%= service.description %></td>
      <% end %>
    </tbody>
  </table>
</div><commit_msg>Adding edit/delete links to services<commit_after><% content_for :title, 'Services' %>

<div class="page-header">
  <% if current_user %>
  <%= link_to new_service_path, class: 'btn btn-primary' do %>
    <span class="glyphicon glyphicon-plus"></span>
    New Service
  <% end %>
  <% end %>
  <h1>All services</h1>
</div>

<div class="table-responsive">
  <table class="table table-striped table-bordered table-hover">
    <thead>
      <tr>
            <th>Name</th>
            <th>Live</th>
            <th>On-demand</th>
            <th>Description</th>
            <% if current_user %><th>Admin</th><% end %>
      </tr>
    </thead>

    <tbody>
      <%= content_tag_for(:tr, @services) do |service| %>
            <td><%= link_to service.name, service %></td>
            <td><% if service.live %><span class="label label-success">Live</span><% end %></td>
            <td><% if service.on_demand %><span class="label label-primary">On-Demand</span><% end %></td>
            <td><%= service.description %></td>
            <% if current_user %><td>
              <%= link_to 'Edit', edit_service_path(service), class: 'btn btn-sm btn-warning' %>
              <%= link_to 'Destroy', service, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-sm btn-danger' %>
            </td><% end %>
      <% end %>
    </tbody>
  </table>
</div>
{'fraction_non_alphanumeric': 0.19736282433007232, 'fraction_numerical': 0.0017014036580178648, 'mean_word_length': 2.5, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 111, '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': '3931087', 'n_tokens_mistral': 833, 'n_tokens_neox': 776, 'n_words': 177}