<% person = edit_person %> <% person_counter = edit_person_counter %> <% person_name = "#{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :first_name])} #{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :last_name])}" %> <% base_id = "person_#{person_counter}" %> <% if @document_fedora.class.respond_to?(:person_relator_terms) %> <% choices = @document_fedora.class.person_relator_terms %> <% else %> <% choices = Hydra::Datastream::ModsArticle.person_relator_terms %> <% end %>
<%- if @document_fedora.datastreams["descMetadata"].class.terminology.has_term?(:person, :computing_id) %>

<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :computing_id], "Computing ID") %> <%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :computing_id], :multiple=>false, :required=>false ) %>

<%- end %>

<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :first_name], "First Namerequired".html_safe) %> <%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name], :multiple=>false, :required=>true ) %>

<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :last_name], "Last Namerequired".html_safe) %> <%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name], :multiple=>false, :required=>true ) %>

<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :description], "Department") %> <%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :description], :multiple=>false, :required=>false ) %>

<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :institution], "Institution") %> <%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :institution], :multiple=>false, :required=>false ) %>

<% if ( (person_counter > 0) && (params[:action] == "edit" || params[:action] == "create")) %>

<%#= field_selectors_for("descMetadata", [{:person=>person_counter}]) %> <%= link_to("Delete", hydra_asset_connect_path(:asset_id=>@document_fedora.pid, :contributor_type=>"person", :index=>person_counter, :content_type=>af_model), :title=>"Delete #{person_name}", :class=>"destructive destroy_contributor") %>

<% end %>