Improve sorting of wiki pages

Sorting is completely broken. Also align the sorting UI with other pages.
This commit is contained in:
Patrick Gansterer 2016-03-06 18:32:46 +01:00
parent f5b6fbcf18
commit bd2c961e23
5 changed files with 16 additions and 24 deletions

View file

@ -1,8 +0,0 @@
%table.table.table-striped
%thead
%tr
%th= t 'pages.title'
%th= t 'pages.last_updated'
%tbody
- for page in @pages
= render :partial => "page_list_item", :locals => {:page => page, :level => 0, :siteMap => 0}

View file

@ -8,5 +8,5 @@
= render :partial => 'page_list_item', :locals => {:page => homepage, :level => 0, :siteMap => 1}
%tbody
- for page in @pages
- if page.id != homepage.try(:id)
- if page.id != homepage.try(:id) && !page.parent_id?
= render :partial => 'page_list_item', :locals => {:page => page, :level => 0, :siteMap => 1}

View file

@ -1,8 +1,8 @@
%table.table.table-striped
%thead
%tr
%th= t 'pages.title'
%th= t 'pages.last_updated'
%th= sort_link_helper t('pages.title'), "title", :remote => false
%th= sort_link_helper t('pages.last_updated'), "last_updated", :remote => false
%tbody
- for page in @pages
= render :partial => "page_list_item", :locals => {:page => page, :level => 0, :siteMap => 0}

View file

@ -6,7 +6,6 @@
.navbar
.navbar-inner
%ul.nav
%li= link_to t('.recent_changes'), all_pages_path(:view => 'recent_changes')
%li= link_to t('.title_list'), all_pages_path(:view => 'title_list')
%li= link_to t('.site_map'), all_pages_path(:view => 'site_map')
%li= link_to image_tag('icons/feed-icon-14x14.png', :alt => 'RSS Feed'), all_pages_rss_url