#369: Updated pagination for commits
This commit is contained in:
parent
424927dd89
commit
871bb40fd7
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue