camdub/Internships

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

Summary

Maintainability
Test Coverage
<h2>Financial Assistance Options</h2>
<div class="box round_all">
    <table class="display datatable index_tables">
          <thead>
              <tr>
                <th>Name</th>
                <th>Type</th>
                <th>How much</th>
                <th>Source</th>
                <th>Website</th>
                <th colspan="3">Actions</th>
            </tr>
        </thead>
        <tbody>
            <% @financial_assistance_options.each do |financial_assistance_option| %>
              <tr>
                <td><%= financial_assistance_option.name %></td>
                <td><%= financial_assistance_option.financial_assistance_option_type.name %></td>
                <td><%= financial_assistance_option.how_much %></td>
                <td><%= financial_assistance_option.source %></td>
                <td><%= financial_assistance_option.website %></td>
                <td>
                    <%= link_to financial_assistance_option do %>
                        <button class="skin_colour round_all">
                            <img src="<%= icon_path %>/Document.png" alt="View this financial_assistance_option" />
                        </button>
                    <% end %>
                </td>
                <td>
                    <%= link_to edit_financial_assistance_option_path(financial_assistance_option) do %>
                        <button class="skin_colour round_all">
                            <img src="<%= icon_path %>/Pencil.png" alt="Edit this financial_assistance_option" />
                        </button>
                    <% end %>
                </td>
                <td>
                    <%= link_to financial_assistance_option, :confirm => 'Are you sure?', :method => :delete do%>
                        <button class="skin_colour round_all">
                            <img alt="Delete this financial_assistance_option" src="<%= icon_path %>/Trashcan.png" />
                        </button>
                    <% end %>
                </td>
            </tr>
            <% end %>
        </tbody>
    </table>

    <br />

    <%= link_to new_financial_assistance_option_path do %>
        <button class="skin_colour round_all">
            <img src="<%= icon_path %>/Document.png" alt="New Financial Assistance Option" />
            <span>New Financial Assistance Option</span>
        </button>
    <% end %>
</div>