<%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%> <%- if can? :update, agent -%> <%= render 'page/add' %> <%- end -%> <%= submit_tag t('page.search') -%>
<%- end -%><%= t('activerecord.attributes.agent.full_name') -%> | <%= t('activerecord.attributes.user.username') -%> | <%= t('activerecord.models.agent_type') -%> | <%= t('activerecord.attributes.agent.date_of_birth') -%> | ||
---|---|---|---|---|---|
<%= link_to agent.full_name, agent -%> <%= agent.full_name_transcription -%> |
<%= link_to agent.user.username, edit_user_path(agent.user) if agent.user -%> | <%= agent.agent_type.display_name.localize -%> | <%=l agent.date_of_birth if agent.date_of_birth -%> | <%- if can? :delete, agent -%> <%= link_to t('page.edit'), edit_agent_path(agent) -%> <% end %> | <%- if can? :delete, agent -%> <%- if params[:mode] == "add" -%> <%= link_to t('page.add'), new_agent_agent_relationship_path(agent, :child_id => agent.id) unless agent.derived_agents.include?(agent) or agent == agent -%> <%- else -%> <%- agent_relationship = agent.to_agents.where(:child_id => agent.id).first -%> <%= link_to t('page.destroy'), agent_relationship, :data => {:confirm => t('page.are_you_sure')}, :method => :delete if agent_relationship -%> <%- end -%> <%- end -%> |