Sha256: a3594eb9ac9749ba682ab8749a0523b75b2fe5d43994cb8cff934cbeb4673e10

Contents?: true

Size: 1.22 KB

Versions: 24

Compression:

Stored size: 1.22 KB

Contents

<% if @cells.any? %>
  <div id="cells">
    <ul>
      <li><a href="#cell_for_other_elements"><%= Alchemy.t(:main_content) %></a></li>
      <% @elements.each do |cell, elements| %>
        <li>
          <a href="#cell_<%= cell.name %>">
            <%= Alchemy.t(cell.name, scope: :cell_names) %>
          </a>
        </li>
      <% end %>
    </ul>
    <div id="cell_for_other_elements" class="sortable_cell for_other_elements_cell">
      <%= render partial: 'alchemy/admin/elements/element',
        collection: @page.elements.not_trashed.not_in_cell %>
    </div>
    <% @elements.each do |cell, elements| -%>
      <%= content_tag :div,
        id: "cell_#{cell.name}",
        class: ["sortable_cell", "#{cell.name}_cell"].join(' '),
        data: {'cell-id' => cell.id, 'data-droppable-elements' => cell.element_definitions.join(' ')} do %>
        <%= render partial: 'alchemy/admin/elements/element', collection: elements %>
      <% end %>
    <% end %>
  </div>
<% else %>
  <div class="sortable_cell for_other_elements_cell" id="cell_for_other_elements" data-droppable-elements="<%= @page.element_names_from_definition.join(' ') %>">
    <%= render partial: 'alchemy/admin/elements/element', collection: @elements %>
  </div>
<% end %>

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
alchemy_cms-4.1.0.beta app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-4.0.1 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.6.4 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-4.0.0 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.6.3 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.6.2 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-4.0.0.rc2 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-4.0.0.rc1 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.6.1 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-4.0.0.beta app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.6.0 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.5.0 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.4.2 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.5.0.rc2 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.5.0.rc1 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.4.1 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.3.3 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.3.2 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.4.0 app/views/alchemy/admin/elements/index.html.erb
alchemy_cms-3.4.0.rc1 app/views/alchemy/admin/elements/index.html.erb