summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-28 20:59:13 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-28 20:59:13 +0000
commit55df9a70bf3fb7fffa7491d53d3cf643d61de1c8 (patch)
treee05fc8ee8d030e208abaa26272fceb1b06a87b94 /app/helpers
parent3385696bcecd5bf9a68cd4130b8a79a0b3557c34 (diff)
parent5449296fd60b0d620eef64a875a0796712c7ac79 (diff)
downloadgitlab-ce-55df9a70bf3fb7fffa7491d53d3cf643d61de1c8.tar.gz
Merge branch 'functional-sidebar' into 'master'
Updates sidebar to use new dropdowns for issues and merge requests Fixes #12935, #13164 See merge request !3175
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/dropdowns_helper.rb2
-rw-r--r--app/helpers/issuables_helper.rb10
2 files changed, 11 insertions, 1 deletions
diff --git a/app/helpers/dropdowns_helper.rb b/app/helpers/dropdowns_helper.rb
index 316a10b7da3..14697f774cc 100644
--- a/app/helpers/dropdowns_helper.rb
+++ b/app/helpers/dropdowns_helper.rb
@@ -60,7 +60,7 @@ module DropdownsHelper
title_output << content_tag(:span, title)
title_output << content_tag(:button, class: "dropdown-title-button dropdown-menu-close", aria: { label: "Close" }, type: "button") do
- icon('times')
+ icon('times', class: 'dropdown-menu-close-icon')
end
title_output.html_safe
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 81df2094392..62050691a39 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -16,6 +16,16 @@ module IssuablesHelper
base_issuable_scope(issuable).where('iid > ?', issuable.iid).last
end
+ def issuable_json_path(issuable)
+ project = issuable.project
+
+ if issuable.kind_of?(MergeRequest)
+ namespace_project_merge_request_path(project.namespace, project, issuable.iid, :json)
+ else
+ namespace_project_issue_path(project.namespace, project, issuable.iid, :json)
+ end
+ end
+
def prev_issuable_for(issuable)
base_issuable_scope(issuable).where('iid < ?', issuable.iid).first
end