app/views/spree/admin/pages/index.html.erb in spree_essential_cms-0.3.0.rc1 vs app/views/spree/admin/pages/index.html.erb in spree_essential_cms-0.4.0
- old
+ new
@@ -1,7 +1,5 @@
-<%= render :partial => 'spree/admin/shared/contents_sub_menu' %>
-
<div class='toolbar'>
<ul class='actions'>
<li>
<p><%= button_link_to t('.new_page'), new_object_url, :icon => 'add' %></p>
</li>
@@ -9,49 +7,51 @@
<br class='clear' />
</div>
<h1><%= t('.listing_pages') %></h1>
-<table class="index sortable">
+<table class="index sortable" data-sortable-link="<%= update_positions_admin_pages_url -%>">
<thead>
- <tr>
- <th><%= sort_link @search, :title, t("page.title") %></th>
- <th><%= sort_link @search, :path, t("page.path") %></th>
- <th><%= sort_link @search, :accessible, t("page.accessible") %></th>
- <th><%= sort_link @search, :visible, t("page.visible") %></th>
- <th><%= t("action") %></th>
- </tr>
+ <tr>
+ <th><%= sort_link @search, :title, t("page.title") %></th>
+ <th><%= sort_link @search, :path, t("page.path") %></th>
+ <th><%= sort_link @search, :accessible, t("page.accessible") %></th>
+ <th><%= sort_link @search, :visible, t("page.visible") %></th>
+ <th><%= t("action") %></th>
+ </tr>
</thead>
<tbody>
<%- @collection.each do |page|%>
<tr id="<%= dom_id page %>">
<td><span class="handle"> </span> <%=link_to page.title, object_url(page) %></td>
<td><%= page.path %></td>
<td><%= page.accessible %></td>
<td><%= page.visible %></td>
<td>
- <%= link_to_with_icon :accept, t('preview'), page.path, :onclick => 'window.open(this.href);return false;' %>
- <%= link_to_with_icon :pages, t('page.contents'), admin_page_contents_path(page) %>
- <%= link_to_edit page %>
- <%= link_to_delete page %>
+ <%= link_to_with_icon :accept, t('preview'), page.path, :onclick => 'window.open(this.href);return false;' %>
+ <%= link_to_with_icon :pages, t('page.contents'), admin_page_contents_path(page) %>
+ <%= link_to_edit page %>
+ <%= link_to_delete page %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @collection %>
<% content_for :sidebar do %>
-<div class="box">
- <h3><%= t(:search) %></h3>
-
- <% @page = Spree::Page.metasearch %>
- <%= form_for [:admin, @page] do |f| %>
- <p>
- <label><%= t '.title_contains' %></label><br />
- <%= f.text_field :title_contains, :size => 25 %>
- </p>
- <p><%= button t("search") %></p>
- <% end %>
-</div>
+ <div class="box">
+ <h3><%= t(:search) %></h3>
+ <%= search_form_for [:admin, @search] do |f| %>
+ <p>
+ <%= f.label :title_cont, t('page.title') %><br />
+ <%= f.text_field :title_cont, :size => 25 %>
+ </p>
+ <p>
+ <%= f.label :path_cont, t('page.path') %><br />
+ <%= f.text_field :path_cont, :size => 25 %>
+ </p>
+ <p><%= button t("search") %></p>
+ <% end %>
+ </div>
<% end %>