debian-mirror-gitlab/app/views/jira_connect/subscriptions/index.html.haml

65 lines
2.9 KiB
Text
Raw Normal View History

2021-01-03 14:25:43 +05:30
%header.jira-connect-header
= brand_header_logo
.jira-connect-user
- if current_user
2021-03-11 19:13:27 +05:30
- user_link = link_to(current_user.to_reference, jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in')
2021-01-03 14:25:43 +05:30
= _('Signed in to GitLab as %{user_link}').html_safe % { user_link: user_link }
- elsif @subscriptions.present?
= link_to _('Sign in to GitLab'), jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in'
.jira-connect-app
- if current_user.blank? && @subscriptions.empty?
2021-03-11 19:13:27 +05:30
%h2= s_('JiraService|GitLab for Jira Configuration')
%p= s_('JiraService|Sign in to GitLab.com to get started.')
2021-01-03 14:25:43 +05:30
2021-03-11 19:13:27 +05:30
.gl-mt-7
- sign_in_button_class = new_jira_connect_ui? ? 'btn gl-button btn-confirm' : 'ak-button ak-button__appearance-primary'
= external_link _('Sign in to GitLab'), jira_connect_users_path, class: "#{sign_in_button_class} js-jira-connect-sign-in"
2021-01-03 14:25:43 +05:30
2021-03-11 19:13:27 +05:30
.gl-mt-7
2021-01-03 14:25:43 +05:30
%p Note: this integration only works with accounts on GitLab.com (SaaS).
- else
2021-03-11 19:13:27 +05:30
.js-jira-connect-app{ data: jira_connect_app_data(@subscriptions) }
2021-01-29 00:20:46 +05:30
2021-03-08 18:12:59 +05:30
- unless new_jira_connect_ui?
%form#add-subscription-form.subscription-form{ action: jira_connect_subscriptions_path }
.ak-field-group
%label
GitLab namespace
2021-01-03 14:25:43 +05:30
2021-03-08 18:12:59 +05:30
.ak-field-group.field-group-input
%input#namespace-input.ak-field-text{ type: 'text', required: true, placeholder: 'e.g. "MyCompany" or "MyCompany/GroupName"' }
%button.ak-button.ak-button__appearance-primary{ type: 'submit' }
Link namespace to Jira
2021-01-03 14:25:43 +05:30
- if @subscriptions.present?
2021-03-11 19:13:27 +05:30
%table.subscriptions.gl-w-full
2021-01-03 14:25:43 +05:30
%thead
%tr
%th Namespace
%th Added
%th
%tbody
- @subscriptions.each do |subscription|
%tr
%td= subscription.namespace.full_path
%td= subscription.created_at
2021-03-11 19:13:27 +05:30
%td= link_to 'Remove', jira_connect_subscription_path(subscription), class: 'js-jira-connect-remove-subscription'
2021-01-03 14:25:43 +05:30
- else
%h4.empty-subscriptions
No linked namespaces
2021-03-08 18:12:59 +05:30
%p= s_('Integrations|Namespaces are your GitLab groups and subgroups that will be linked to this Jira instance.')
2021-01-03 14:25:43 +05:30
%p.browser-limitations-notice
%strong Browser limitations:
2021-01-29 00:20:46 +05:30
Adding a namespace currently works only in browsers that allow crosssite cookies. Please make sure to use
2021-01-03 14:25:43 +05:30
%a{ href: 'https://www.mozilla.org/en-US/firefox/', target: '_blank', rel: 'noopener noreferrer' } Firefox
2021-01-29 00:20:46 +05:30
or enable crosssite cookies in your browser when adding a namespace.
2021-03-11 19:13:27 +05:30
= link_to _('Learn more'), 'https://gitlab.com/gitlab-org/gitlab/-/issues/284211', target: '_blank', rel: 'noopener noreferrer'
2020-11-24 15:15:51 +05:30
2021-01-29 00:20:46 +05:30
= webpack_bundle_tag 'performance_bar' if performance_bar_enabled?
= webpack_bundle_tag 'jira_connect_app'
2021-02-22 17:27:13 +05:30
- add_page_specific_style 'page_bundles/jira_connect', defer: false