Sha256: 2906d62136c992d4f59b15bb61ab1f67a4fef471929f49f41a2a118b74df8144

Contents?: true

Size: 1011 Bytes

Versions: 3

Compression:

Stored size: 1011 Bytes

Contents

<%= form_for(@agent_relationship) do |f| %>
  <%= f.error_messages -%>

  <div class="field">
    <% if @agent_relationship.try(:parent) %>
      <%= f.label :parent %><br />
      <%= link_to @agent_relationship.parent.full_name, @agent_relationship.parent %>
      <%= f.hidden_field :parent_id %>
    <% else %>
      <%= f.label :parent %><br />
      <%= f.text_field :parent_id %>
    <% end %>
  </div>
  <div class="field">
    <% if @agent_relationship.child.try(:full_name) %>
      <%= f.label :child %><br />
      <%= link_to @agent_relationship.child.full_name, @agent_relationship.child %>
      <%= f.hidden_field :child_id %>
    <% else %>
      <%= f.label :child %><br />
      <%= f.text_field :child_id %>
    <% end %>
  </div>
  <div class="field">
    <%= f.label :agent_relationship_type_id %><br />
    <%= f.select(:agent_relationship_type_id, @agent_relationship_types.collect{|r| [r.display_name, r.id]}) -%>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_biblio-0.4.0.rc.1 app/views/agent_relationships/_form.html.erb
enju_biblio-0.4.0.beta.2 app/views/agent_relationships/_form.html.erb
enju_biblio-0.4.0.beta.1 app/views/agent_relationships/_form.html.erb