camdub/Internships

View on GitHub
app/views/academic_focus_types/index.html.erb

Summary

Maintainability
Test Coverage
<h2>Academic Focus Types</h2>
<div class="box round_all">
    <table class="display datatable index_tables">
          <thead>
              <tr>
                <th>Name</th>
                <th colspan="3">Actions</th>
              </tr>
        </thead>
        <tbody>
            <% @academic_focus_types.each do |academic_focus_type| %>
              <tr>
                <td><%= academic_focus_type.name %></td>
                <td>
                    <%= link_to academic_focus_type do %>
                        <button class="skin_colour round_all">
                            <img src="<%= icon_path %>/Document.png" alt="View this Academic Focus Type" />
                        </button>
                    <% end %>
                </td>
                <td>
                    <%= link_to edit_academic_focus_type_path(academic_focus_type) do %>
                        <button class="skin_colour round_all">
                            <img src="<%= icon_path %>/Pencil.png" alt="Edit this Academic Focus Type" />
                        </button>
                    <% end %>
                </td>
                <td>
                    <%= link_to academic_focus_type, :confirm => 'Are you sure?', :method => :delete do%>
                        <button class="skin_colour round_all">
                            <img alt="Delete this Academic Focus Type" src="<%= icon_path %>/Trashcan.png" />
                        </button>
                    <% end %>
                </td>
            </tr>
            <% end %>
        </tbody>
    </table>

    <br />

    <%= link_to new_academic_focus_type_path do %>
        <button class="skin_colour round_all">
            <img src="<%= icon_path %>/Document.png" alt="Add an Academic Focus Type" />
            <span>New Academic Focus Type</span>
        </button>
    <% end %>
</div>