Sha256: 13f62bfbb3ca51e8fa33e3c01e4e6cbc179f391503b18761b8b0bada88e11754

Contents?: true

Size: 1.02 KB

Versions: 6

Compression:

Stored size: 1.02 KB

Contents

<%# Overriding hydra-editor so that we can replace the call to 'render_edit_field_partial'
  # With render_edit_field_partial_with_action because there is also a 
  # 'render_edit_field_partial' in sufia that uses 'generic_file' as the action. %>
<% render_req ||= true # render_req is true for single file edit, false for batch edit%>
<div class="form-group">
  <% vals = record[key] %>
  <% if render_req && record.required?(key) %>
    <% tmp = '<span class="required-field">*</span>' + get_label(key) %>
    <%= f.label key, tmp.html_safe  %>
  <% else %>
    <%= f.label key, get_label(key) %>
  <% end %>

  <% if key == :resource_type %>
    <%# resource_type is a multiselect box, so don't render one row for each %>
    <%= render_edit_field_partial(key, record: record, f: f, render_req: render_req) %>
  <% else %>
    <% vals.to_ary.each_with_index do |v, index| %>
      <%= render_edit_field_partial(key, record: record, f: f,  v: v, index: index, render_req: render_req) %>
    <% end %>
  <% end %>
</div><!-- /.form-group -->

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sufia-4.3.1 app/views/records/_edit_field.html.erb
sufia-4.2.0 app/views/records/_edit_field.html.erb
sufia-4.1.0 app/views/records/_edit_field.html.erb
sufia-4.0.1 app/views/records/_edit_field.html.erb
sufia-4.0.0 app/views/records/_edit_field.html.erb
sufia-4.0.0.rc2 app/views/records/_edit_field.html.erb