Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-02-16 16:02:33 +0300
committerDouwe Maan <douwe@gitlab.com>2016-02-16 16:02:33 +0300
commit4ae21313764bb5c446b9b21866c98b04c286abf8 (patch)
treea10c984418cd17ff1290da03855551fa6f046a04 /app/views
parentb6c5d52ab548a6fb38c9538281a776b80e5da81d (diff)
parentd28fa2ce233e057dc47de17bb6c1f2dff141059a (diff)
Merge branch 'fix/13356-issuable-index-of-total-in-sidebar' into 'master'
Fix the "x of y" displayed at the top of Issuables' sidebar 1. We now display the index of the current issuable among all its project's issuables, of the same type and with the same state. 1. Also, refactored a bit the Issuable helpers into a new `IssuablesHelper` module. 1. Added acceptance specs for the sidebar counter. Note: I didn't add a CHANGELOG item since it's a bug fix for an unreleased version. Fixes #13356. See merge request !2818
Diffstat (limited to 'app/views')
-rw-r--r--app/views/shared/issuable/_sidebar.html.haml15
1 files changed, 6 insertions, 9 deletions
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index ae96a45453f..e1aecdd9436 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -4,21 +4,18 @@
%span.issuable-count.pull-left
= issuable.iid
of
- = issuable_count(:all, @project)
+ = issuables_count(issuable)
%span.pull-right
%a.gutter-toggle{href: '#'}
- - if sidebar_gutter_collapsed?
- = icon('angle-double-left')
- - else
- = icon('angle-double-right')
+ = sidebar_gutter_toggle_icon
.issuable-nav.pull-right.btn-group{role: 'group', "aria-label" => '...'}
- - if has_prev_issuable?(@project, issuable.id)
- = link_to 'Prev', issuable_link_prev(@project, issuable), class: 'btn btn-default prev-btn'
+ - if prev_issuable = prev_issuable_for(issuable)
+ = link_to 'Prev', [@project.namespace.becomes(Namespace), @project, prev_issuable], class: 'btn btn-default prev-btn'
- else
%a.btn.btn-default.disabled{href: '#'}
Prev
- - if has_next_issuable?(@project, issuable.id)
- = link_to 'Next', issuable_link_next(@project, issuable), class: 'btn btn-default next-btn'
+ - if next_issuable = next_issuable_for(issuable)
+ = link_to 'Next', [@project.namespace.becomes(Namespace), @project, next_issuable], class: 'btn btn-default next-btn'
- else
%a.btn.btn-default.disabled{href: '#'}
Next