Skip to content
代码片段 群组 项目
提交 57fea91f 编辑于 作者: Dmitry Gruzd's avatar Dmitry Gruzd
浏览文件

Merge branch 'feature/zentao/add_config_help_tips' into 'master'

Feature: Add help information for ZenTao integration

See merge request gitlab-org/gitlab!73055
No related branches found
No related tags found
无相关合并请求
......@@ -2,6 +2,8 @@
module Integrations
class Zentao < Integration
include Gitlab::Routing
data_field :url, :api_url, :api_token, :zentao_product_xid
validates :url, public_url: true, presence: true, if: :activated?
......@@ -26,6 +28,14 @@ def description
s_("ZentaoIntegration|Use ZenTao as this project's issue tracker.")
end
def help
s_("ZentaoIntegration|Before you enable this integration, you must configure ZenTao. For more details, read the %{link_start}ZenTao integration documentation%{link_end}.") % {
link_start: '<a href="%{url}" target="_blank" rel="noopener noreferrer">'
.html_safe % { url: help_page_url('user/project/integrations/zentao') },
link_end: '</a>'.html_safe
}
end
def self.to_param
name.demodulize.downcase
end
......@@ -82,3 +92,5 @@ def client
end
end
end
::Integrations::Zentao.prepend_mod
......@@ -39935,6 +39935,9 @@ msgstr ""
msgid "ZentaoIntegration|Base URL of the ZenTao instance."
msgstr ""
 
msgid "ZentaoIntegration|Before you enable this integration, you must configure ZenTao. For more details, read the %{link_start}ZenTao integration documentation%{link_end}."
msgstr ""
msgid "ZentaoIntegration|Enter new ZenTao API token"
msgstr ""
 
......
......@@ -50,4 +50,10 @@
expect(zentao_integration.test).to eq(test_response)
end
end
describe '#help' do
it 'renders prompt information' do
expect(zentao_integration.help).not_to be_empty
end
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册