Skip to content
Snippets Groups Projects
Commit 4a8c441e authored by Arnaud Levy's avatar Arnaud Levy
Browse files

sortable blocks

parent 75f74664
No related branches found
No related tags found
No related merge requests found
......@@ -12,13 +12,15 @@
<table class="<%= table_classes %>">
<thead>
<tr>
<th width="20" class="ps-0">&nbsp;</th>
<th><%= Communication::Website::Block.human_attribute_name('name') %></th>
<th><%= Communication::Website::Block.human_attribute_name('template') %></th>
</tr>
</thead>
<tbody>
<% about.blocks.each do |block| %>
<tr>
<tbody data-sortable data-sort-url="<%= reorder_admin_communication_website_blocks_path %>">
<% about.blocks.ordered.each do |block| %>
<tr data-id="<%= block.id %>">
<td><i class="fa fa-bars handle"></i></td>
<td><%= link_to block, edit_admin_communication_website_block_path(block) %></td>
<td><%= block.template_i18n %></td>
</tr>
......
......@@ -25,7 +25,11 @@ namespace :communication do
resources :authors, controller: 'website/authors', only: [:index, :show]
resources :posts, controller: 'website/posts'
resources :curations, path: 'posts/curations', as: :post_curations, controller: 'website/posts/curations', only: [:new, :create]
resources :blocks, controller: 'website/blocks', except: [:index, :show]
resources :blocks, controller: 'website/blocks', except: [:index, :show] do
collection do
post :reorder
end
end
resources :menus, controller: 'website/menus' do
resources :items, controller: 'website/menu/items', except: :index do
collection do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment