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
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-02-13 04:06:55 +0300
committerMarin Jankovski <maxlazio@gmail.com>2015-02-13 04:06:55 +0300
commiteccf695640680050127c830887631d241dc7c8be (patch)
treecf1e1b32c129a8930afd6bafa2ccafb1867fb04b /app
parentd899bc914f07ce47b5962563467790c25ba52c89 (diff)
Explained in the integration documentation how to enable external issue tracker
Diffstat (limited to 'app')
-rw-r--r--app/models/project_services/jira_service.rb14
-rw-r--r--app/views/admin/services/_form.html.haml4
-rw-r--r--app/views/layouts/nav/_admin.html.haml2
3 files changed, 19 insertions, 1 deletions
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb
index a159c287485..4c056605ea8 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -14,9 +14,23 @@
#
class JiraService < IssueTrackerService
+ include Rails.application.routes.url_helpers
prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url
+ def help
+ issue_tracker_link = help_page_path("integration", "external-issue-tracker")
+
+ line1 = "Setting `project_url`, `issues_url` and `new_issue_url` will "\
+ "allow a user to easily navigate to the Jira issue tracker. "\
+ "See the [integration doc](#{issue_tracker_link}) for details."
+
+ line2 = 'Support for referencing commits and automatic closing of Jira issues directly ' \
+ 'from GitLab is [available in GitLab EE.](http://doc.gitlab.com/ee/integration/jira.html)'
+
+ [line1, line2].join("\n\n")
+ end
+
def title
if self.properties && self.properties['title'].present?
self.properties['title']
diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml
index d8242e37621..5df8849317b 100644
--- a/app/views/admin/services/_form.html.haml
+++ b/app/views/admin/services/_form.html.haml
@@ -9,6 +9,10 @@
.alert.alert-danger
- @service.errors.full_messages.each do |msg|
%p= msg
+ - if @service.help.present?
+ .bs-callout
+ = preserve do
+ = markdown @service.help
- @service.fields.each do |field|
- name = field[:name]
diff --git a/app/views/layouts/nav/_admin.html.haml b/app/views/layouts/nav/_admin.html.haml
index 4f864926d08..74334b12e63 100644
--- a/app/views/layouts/nav/_admin.html.haml
+++ b/app/views/layouts/nav/_admin.html.haml
@@ -46,7 +46,7 @@
%span
Applications
- = nav_link(controller: :application_settings) do
+ = nav_link(controller: :services) do
= link_to admin_application_settings_services_path, title: 'Service Templates' do
%i.fa.fa-copy
%span