diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/boards_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/breadcrumbs_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/issuables_helper.rb | 21 | ||||
-rw-r--r-- | app/helpers/page_layout_helper.rb | 2 |
4 files changed, 18 insertions, 13 deletions
diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb index 62ac208f16a..7112c6ee470 100644 --- a/app/helpers/boards_helper.rb +++ b/app/helpers/boards_helper.rb @@ -79,6 +79,6 @@ module BoardsHelper end def boards_link_text - _("Board") + s_("IssueBoards|Board") end end diff --git a/app/helpers/breadcrumbs_helper.rb b/app/helpers/breadcrumbs_helper.rb index adf39380b8e..e88fe6bcd7e 100644 --- a/app/helpers/breadcrumbs_helper.rb +++ b/app/helpers/breadcrumbs_helper.rb @@ -10,11 +10,7 @@ module BreadcrumbsHelper def breadcrumb_title_link return @breadcrumb_link if @breadcrumb_link - if controller.available_action?(:index) - url_for(action: "index") - else - request.path - end + request.path end def breadcrumb_title(title) diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index df390dd5aab..7713fb0b9f8 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -248,16 +248,25 @@ module IssuablesHelper Gitlab::IssuablesCountForState.new(finder)[state] end - def close_issuable_url(issuable) - issuable_url(issuable, close_reopen_params(issuable, :close)) + def close_issuable_path(issuable) + issuable_path(issuable, close_reopen_params(issuable, :close)) end - def reopen_issuable_url(issuable) - issuable_url(issuable, close_reopen_params(issuable, :reopen)) + def reopen_issuable_path(issuable) + issuable_path(issuable, close_reopen_params(issuable, :reopen)) end - def close_reopen_issuable_url(issuable, should_inverse = false) - issuable.closed? ^ should_inverse ? reopen_issuable_url(issuable) : close_issuable_url(issuable) + def close_reopen_issuable_path(issuable, should_inverse = false) + issuable.closed? ^ should_inverse ? reopen_issuable_path(issuable) : close_issuable_path(issuable) + end + + def issuable_path(issuable, *options) + case issuable + when Issue + issue_path(issuable, *options) + when MergeRequest + merge_request_path(issuable, *options) + end end def issuable_url(issuable, *options) diff --git a/app/helpers/page_layout_helper.rb b/app/helpers/page_layout_helper.rb index 5946c475835..18b9bf214a3 100644 --- a/app/helpers/page_layout_helper.rb +++ b/app/helpers/page_layout_helper.rb @@ -9,7 +9,7 @@ module PageLayoutHelper end # Segments are seperated by middot - @page_title.join(" \u00b7 ") + @page_title.join(" ยท ") end # Define or get a description for the current page |