#369: Updated pagination for commits

This commit is contained in:
Vokhmin Alexey V 2015-02-04 23:18:30 +03:00
parent 424927dd89
commit 871bb40fd7
2 changed files with 17 additions and 13 deletions

View File

@ -1,13 +0,0 @@
- prev_text, next_text = t('will_paginate.previous_label'), t('will_paginate.next_label')
%ul.pager
- if @page == 1
%li.disabled
%a= prev_text
- else
%li
%a{ href: commits_path(@project, treeish: @treeish, page: (@page - 1))}= prev_text
%li
- if @last_page
%a= next_text
- else
%a{ href: commits_path(@project, treeish: @treeish, page: (@page + 1))}= next_text

View File

@ -0,0 +1,17 @@
- unless @page == 1 && @last_page
- prev_text, next_text = t('will_paginate.previous_label'), t('will_paginate.next_label')
ul.pager
- if @page == 1
li.disabled
a= prev_text
- else
li
a href=commits_path(@project, treeish: @treeish, page: (@page - 1))
= prev_text
- if @last_page
li.disabled
a= next_text
- else
li
a href=commits_path(@project, treeish: @treeish, page: (@page + 1))
= next_text