Use more descriptive name for config check.
This commit is contained in:
parent
ff046c7200
commit
78e591c737
1 changed files with 4 additions and 4 deletions
|
@ -16,7 +16,7 @@ module IssuesHelper
|
||||||
def url_for_project_issues
|
def url_for_project_issues
|
||||||
return "" if @project.nil?
|
return "" if @project.nil?
|
||||||
|
|
||||||
if @project.used_default_issues_tracker? || config_disabled?
|
if @project.used_default_issues_tracker? || config_issues_tracker?
|
||||||
project_issues_path(@project)
|
project_issues_path(@project)
|
||||||
else
|
else
|
||||||
url = Gitlab.config.issues_tracker[@project.issues_tracker]["project_url"]
|
url = Gitlab.config.issues_tracker[@project.issues_tracker]["project_url"]
|
||||||
|
@ -28,7 +28,7 @@ module IssuesHelper
|
||||||
def url_for_new_issue
|
def url_for_new_issue
|
||||||
return "" if @project.nil?
|
return "" if @project.nil?
|
||||||
|
|
||||||
if @project.used_default_issues_tracker? || config_disabled?
|
if @project.used_default_issues_tracker? || config_issues_tracker?
|
||||||
url = new_project_issue_path project_id: @project
|
url = new_project_issue_path project_id: @project
|
||||||
else
|
else
|
||||||
url = Gitlab.config.issues_tracker[@project.issues_tracker]["new_issue_url"]
|
url = Gitlab.config.issues_tracker[@project.issues_tracker]["new_issue_url"]
|
||||||
|
@ -40,7 +40,7 @@ module IssuesHelper
|
||||||
def url_for_issue(issue_iid)
|
def url_for_issue(issue_iid)
|
||||||
return "" if @project.nil?
|
return "" if @project.nil?
|
||||||
|
|
||||||
if @project.used_default_issues_tracker? || config_disabled?
|
if @project.used_default_issues_tracker? || config_issues_tracker?
|
||||||
url = project_issue_url project_id: @project, id: issue_iid
|
url = project_issue_url project_id: @project, id: issue_iid
|
||||||
else
|
else
|
||||||
url = Gitlab.config.issues_tracker[@project.issues_tracker]["issues_url"]
|
url = Gitlab.config.issues_tracker[@project.issues_tracker]["issues_url"]
|
||||||
|
@ -60,7 +60,7 @@ module IssuesHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def config_disabled?
|
def config_issues_tracker?
|
||||||
return false if Gitlab.config.issues_tracker && Gitlab.config.issues_tracker.values.any?
|
return false if Gitlab.config.issues_tracker && Gitlab.config.issues_tracker.values.any?
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue