Sha256: 9a9775ee6fb9f2febe186be089a13243d47522b17f6b7047008d9e55ca8952b0

Contents?: true

Size: 1.75 KB

Versions: 23

Compression:

Stored size: 1.75 KB

Contents

<% content_for :body do %>
  <%= render partial: 'naf/shared/information_container', locals: { record_name: naf_table_title } %>
  </br>
  </br>

  <div id="flash_message">
      <% unless notice.blank? %>
        <script type='text/javascript'>
          jQuery("<p id='notice'><%= notice %></p>")
              .appendTo('#flash_message')
              .slideDown().delay(5000).slideUp();
        </script>
      <% end %>
  </div>

  <div id="record">
    <table id='datatable'>
      <thead>
        <tr>
          <th>Id</th>
          <th>Affinity Classification Name</th>
          <th>Affinity Name</th>
          <th>Affinity Short Name</th>
          <th>Affinity Note</th>
        </tr>
      </thead>
      <tbody>
        <% @affinities.each do |affinity| -%>
        <tr>
          <td><%= link_to affinity.id, affinity_path(affinity) %></td>
          <td><%= affinity.affinity_classification.affinity_classification_name %></td>
          <td>
            <% if affinity.affinity_classification.affinity_classification_name == 'machine' -%>
              <% affinity_name = ::Naf::Machine.find_by_id(affinity.affinity_name) %>
              <%= link_to affinity.affinity_name, machine_path(affinity_name) if affinity_name %>
            <% else -%>
              <%= affinity.affinity_name %>
            <% end -%>
          </td>
          <td><%= affinity.affinity_short_name %></td>
          <td><%= affinity.affinity_note %></td>
        </tr>
        <% end -%>
      </tbody>
    </table>

    <% content_for :javascripts do %>
      <script type='text/javascript'>
        jQuery(document).ready(function() {
          jQuery('#datatable').addDataTable({});
        });
      </script>
    <% end %>
  </div>
<% end %>

<%= render partial: 'naf/shared/application' %>

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
naf-2.1.13 app/views/naf/affinities/index.html.erb
naf-2.1.12 app/views/naf/affinities/index.html.erb
naf-2.1.11 app/views/naf/affinities/index.html.erb
naf-2.1.10 app/views/naf/affinities/index.html.erb
naf-2.1.9 app/views/naf/affinities/index.html.erb
naf-2.1.8 app/views/naf/affinities/index.html.erb
naf-2.1.6 app/views/naf/affinities/index.html.erb
naf-2.1.5 app/views/naf/affinities/index.html.erb
naf-2.1.4 app/views/naf/affinities/index.html.erb
naf-2.1.3 app/views/naf/affinities/index.html.erb
naf-2.1.2 app/views/naf/affinities/index.html.erb
naf-2.1.1 app/views/naf/affinities/index.html.erb
naf-2.1.0 app/views/naf/affinities/index.html.erb
naf-2.0.4 app/views/naf/affinities/index.html.erb
naf-2.0.3 app/views/naf/affinities/index.html.erb
naf-2.0.2 app/views/naf/affinities/index.html.erb
naf-2.0.1 app/views/naf/affinities/index.html.erb
naf-2.0.0 app/views/naf/affinities/index.html.erb
naf-1.1.4 app/views/naf/affinities/index.html.erb
naf-1.1.3 app/views/naf/affinities/index.html.erb