Sha256: 3244439e37bd32fc93bfc15c6b161d28758da424b16667f7bfb3aabe0e55742c

Contents?: true

Size: 1007 Bytes

Versions: 13

Compression:

Stored size: 1007 Bytes

Contents

<%# See code comments on ContributorsController.new to understand what this view does %>
<%- if params.has_key?(:contributor_type) %>
  <%- ct = params[:contributor_type] %>
  <%# Calculating the new index so all field values (ie first name & last name) will be added to one contributor with that index %>
  <%- new_contributor_index = @document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(ct.to_sym).length %>
  
  <%= form_tag url_for(:action=>"update", :controller=>"hydra/assets", :content_type=>"mods_asset", :id=>params[:asset_id]), :id=>"add_contributor", "data-resourceType"=>"mods_asset", "accept-charset"=>"utf-8" do %>
      <input name="_method" type="hidden" value="put" />  
      <%= render :partial=>"contributors/edit_#{ct}", :locals=>{"edit_#{ct}".to_sym =>{}, "edit_#{ct}_counter".to_sym =>new_contributor_index}  %>
      <%= submit_tag "Add #{ct.capitalize}", {:id => "addContributor"} %> 
  <% end %>
<%- else %>
  <%= render :partial=>"contributors/new"  %>
<%- end %>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hydra-head-4.1.3 app/views/contributors/new.html.erb
hydra-head-4.1.2 app/views/contributors/new.html.erb
hydra-head-4.1.1 app/views/contributors/new.html.erb
hydra-head-4.1.0 app/views/contributors/new.html.erb
hydra-head-4.0.3 app/views/contributors/new.html.erb
hydra-head-4.0.2 app/views/contributors/new.html.erb
hydra-head-4.0.1 app/views/contributors/new.html.erb
hydra-head-4.0.0 app/views/contributors/new.html.erb
hydra-head-4.0.0.rc6 app/views/contributors/new.html.erb
hydra-head-4.0.0.rc5 app/views/contributors/new.html.erb
hydra-head-4.0.0.rc4 app/views/contributors/new.html.erb
hydra-head-4.0.0.rc3 app/views/contributors/new.html.erb
hydra-head-4.0.0.rc2 app/views/contributors/new.html.erb