Sha256: 42d91c0b645115f30242edfb2318a09371f2c1d50ae7dfe67c2e03470961950f

Contents?: true

Size: 1.77 KB

Versions: 6

Compression:

Stored size: 1.77 KB

Contents

<%- @page_title = "GBL♦Admin - Form Elements" %>

<h1 style="width:100%;">
  Form Elements
  <%= link_to '+ New Form Element', new_admin_form_element_path, { class: 'btn btn-primary float-right' } %>
</h1>

<p class="alert alert-warning"><strong>Notice</strong> - This table defines the headings and fields on the <%= link_to 'Document', new_admin_document_path %> form. To add a new field to your metadata schema, define an <%= link_to 'Element', admin_elements_path %>.</p>

<table class="table table-striped table-bordered sortable">
  <thead class="thead-dark">
    <tr>
      <th class="header">Type</th>
      <th class="header">Label</th>
      <th class="header">Element</th>
      <th class="header">Reorder</th>
      <th class="header" colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @form_elements.order(:position => :asc).each do |form_element| %>
      <tr data-id="<%=form_element.id%>">
        <td><%= form_element.type %></td>
        <td><%= form_element.label %></td>
        <td>
          <%- if form_element.element_solr_field.present? %>
            <%= Element.find_by(solr_field: form_element.element_solr_field)&.label %>
          <%- end %>
        </td>
        <td class="handle" style="text-align:center">&varr;</td>
        <td><%= link_to 'Show', admin_form_element_path(form_element) %></td>
        <td><%= link_to 'Edit', edit_admin_form_element_path(form_element) %></td>
        <td><%= link_to 'Destroy', admin_form_element_path(form_element), method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to '+ New Form Element', new_admin_form_element_path, { class: 'btn btn-primary' } %>

<script>
  GBLADMIN.SortElements(
    $("tbody"),
    "<%= sort_admin_form_elements_path %>"
  );
</script>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geoblacklight_admin-0.4.1 app/views/admin/form_elements/index.html.erb
geoblacklight_admin-0.4.0 app/views/admin/form_elements/index.html.erb
geoblacklight_admin-0.3.2 app/views/admin/form_elements/index.html.erb
geoblacklight_admin-0.3.1 app/views/admin/form_elements/index.html.erb
geoblacklight_admin-0.3.0 app/views/admin/form_elements/index.html.erb
geoblacklight_admin-0.2.1 app/views/admin/form_elements/index.html.erb