Sha256: 75cb767c122d26f45082cc7dae8c5a26c307af6120d9bedd62ae51e8a74d0425

Contents?: true

Size: 1006 Bytes

Versions: 31

Compression:

Stored size: 1006 Bytes

Contents

<div class="dd">
  <ol class="dd-list">
    <% if @ancestry_field.present? %>
    <% else %>
      <% @model_class.all.order("#{@position_field} ASC").each do |m| %>
        <li class="dd-item" data-id="<%= m.id %>">
          <div class="dd-handle"><%= show_object(m) %></div>
        </li>
      <% end %>
    <% end %>
  </ol>
</div>

<br />

<%= form_tag(nil, method: 'post') do %>
  <%= hidden_field(:nestable, :data) %>

  <%= button_tag(type: 'submit', class: 'btn btn btn-success', name: 'submit_redirect') do %>
    <i class="fa fa-save"></i> <i class="icon-action-undo"></i> <%= t('slash_admin.view.save_and_return_html') %>
  <% end %>
  <button type="submit" class="btn btn-primary float-right">
    <i class="fa fa-save"></i> <%= t('slash_admin.view.save') %>
  </button>
<% end %>

<script type="text/javascript">
  $('.dd').nestable({
    maxDepth: <%= @max_depth %>
  }).on('change', function() {
    $('#nestable_data').val(JSON.stringify($('.dd').nestable('serialize')));
  });
</script>

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
slash_admin-1.5.11 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.10 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.9 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.8 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.7 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.6 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.5 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.4 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.3 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.2 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5.1 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.5 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.4.1 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.4 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.3.5 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.3.4 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.3.3 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.3.2 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.3.1 app/views/slash_admin/base/_data_nestable.html.erb
slash_admin-1.3.0 app/views/slash_admin/base/_data_nestable.html.erb