MiraitSystems/enju_trunk

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

Summary

Maintainability
Test Coverage
<div id="content_detail" class="ui-corner-all">
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.agent_relationship')) -%></h1>
<div id="content_list">

<table class="index">
  <tr>
    <th><%= t('activerecord.attributes.agent_relationship.parent') -%>:</th>
    <th><%= t('activerecord.attributes.agent_relationship.child') -%>:</th>
    <th></th>
  </tr>

<% @agent_relationships.each do |agent_relationship| %>
  <tr class="line<%= cycle('0', '1')%>">
    <td><%= link_to agent_relationship.parent.full_name, agent_relationship.parent %></td>
    <td><%= link_to agent_relationship.child.full_name, agent_relationship.child %></td>
    <td>
      <%= link_to t('page.show'), agent_relationship %>
      <%= link_to t('page.edit'), edit_agent_relationship_path(agent_relationship) %>
      <%= link_to t('page.destroy'), agent_relationship, :confirm => t('page.are_you_sure'), :method => :delete %>
    </td>
  </tr>
<% end %>
</table>

<br />

</div>
</div>

<div id="submenu" class="ui-corner-all">
  <ul>
    <li><%= link_to t('page.new', :model => t('activerecord.models.agent_relationship')), new_agent_relationship_path -%></li>
  </ul>
</div>