<commit_before><%= render :partial => 'admin/shared/configuration_menu' %>

<h1>
  <%= t("suppliers") %>
</h1>

<% if current_user.has_role?("admin") %>
<div class='toolbar'>
  <ul class='actions'>
    <li id="new_product_link">
      <%= button_link_to t("new_supplier"), new_object_url, { :icon => 'add', :id => 'admin_new_product'} %>
    </li>
  </ul>
  <br class='clear' />
</div>

<table class="index" width="545">
  <thead>
    <tr>
      <th>
        <%= t("supplier_name") %>
      </th>
      <th>
        <%= t("notes") %>
      </th>
      <th>
        Actions
      </th>
      <th>
        Featured
      </th>
    </tr>
  </thead>
  <tbody>
    <% @suppliers.each do |supplier| %>
      <tr class="<%= cycle('even', 'odd') %>">
        <td>
          <%= link_to supplier.title, edit_admin_supplier_path(supplier) %>
        </td>
        <td>
          <%= truncate(supplier.notes, :length => 50) %>
        </td>
        <td class='actions'>
          <%= link_to_edit supplier, :class => 'edit' %>
          &nbsp;
          <%= link_to_delete supplier %>
        </td>
        <td>
          <% if supplier.featured %>
            <%= link_to "Yes", admin_supplier_feature_path(supplier) %>
          <% else %>
            <%= link_to "No", admin_supplier_feature_path(supplier) %>
          <% end %>
        </td>
    </tr><% end %>
  </tbody>
</table>

<% else %>
<table class="index" width="545">
  <thead>
    <tr>
      <th>
        <%= t("supplier_name") %>
      </th>
      <th>
        <%= t("notes") %>
      </th>
      <th>
        Actions
      </th>
      <th>
        Featured
      </th>
    </tr>
  </thead>
  <tbody>
      <tr>
        <td>
          <%= link_to @supplier.title, edit_admin_supplier_path(@supplier) %>
        </td>
        <td>
          <%= truncate(@supplier.notes, :length => 50) %>
        </td>
        <td class='actions'>
          <%= link_to_edit @supplier, :class => 'edit' %>
        </td>
        <td>
          <% if @supplier.featured %>
            Yes
          <% else %>
            No
          <% end %>
        </td>
    </tr>
  </tbody>
</table>
<% end %>

<%= link_to t("new_supplier"), new_object_url %><commit_msg>[SUPPLIERS] removed new vendor links from vendor index when a vendor is logged in, only admin sees these links<commit_after><%= render :partial => 'admin/shared/configuration_menu' %>

<h1>
  <%= t("suppliers") %>
</h1>

<% if current_user.has_role?("admin") %>
<div class='toolbar'>
  <ul class='actions'>
    <li id="new_product_link">
      <%= button_link_to t("new_supplier"), new_object_url, { :icon => 'add', :id => 'admin_new_product'} %>
    </li>
  </ul>
  <br class='clear' />
</div>

<table class="index" width="545">
  <thead>
    <tr>
      <th>
        <%= t("supplier_name") %>
      </th>
      <th>
        <%= t("notes") %>
      </th>
      <th>
        Actions
      </th>
      <th>
        Featured
      </th>
    </tr>
  </thead>
  <tbody>
    <% @suppliers.each do |supplier| %>
      <tr class="<%= cycle('even', 'odd') %>">
        <td>
          <%= link_to supplier.title, edit_admin_supplier_path(supplier) %>
        </td>
        <td>
          <%= truncate(supplier.notes, :length => 50) %>
        </td>
        <td class='actions'>
          <%= link_to_edit supplier, :class => 'edit' %>
          &nbsp;
          <%= link_to_delete supplier %>
        </td>
        <td>
          <% if supplier.featured %>
            <%= link_to "Yes", admin_supplier_feature_path(supplier) %>
          <% else %>
            <%= link_to "No", admin_supplier_feature_path(supplier) %>
          <% end %>
        </td>
    </tr><% end %>
  </tbody>
</table>

<% else %>
<table class="index" width="545">
  <thead>
    <tr>
      <th>
        <%= t("supplier_name") %>
      </th>
      <th>
        <%= t("notes") %>
      </th>
      <th>
        Actions
      </th>
      <th>
        Featured
      </th>
    </tr>
  </thead>
  <tbody>
      <tr>
        <td>
          <%= link_to @supplier.title, edit_admin_supplier_path(@supplier) %>
        </td>
        <td>
          <%= truncate(@supplier.notes, :length => 50) %>
        </td>
        <td class='actions'>
          <%= link_to_edit @supplier, :class => 'edit' %>
        </td>
        <td>
          <% if @supplier.featured %>
            Yes
          <% else %>
            No
          <% end %>
        </td>
    </tr>
  </tbody>
</table>
<% end %>

<% if current_user.has_role?("admin") %>
  <%= link_to t("new_supplier"), new_object_url %>
<% end %>
{'fraction_non_alphanumeric': 0.1992514310876266, 'fraction_numerical': 0.005284015852047556, 'mean_word_length': 1.7650639074863055, 'pattern_counts': {'":': 0, '<': 185, '<?xml version=': 0, '>': 199, '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': '2220606', 'n_tokens_mistral': 1736, 'n_tokens_neox': 1590, 'n_words': 309}