summaryrefslogtreecommitdiff
path: root/app/views/jira_connect
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /app/views/jira_connect
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/views/jira_connect')
-rw-r--r--app/views/jira_connect/subscriptions/index.html.haml85
-rw-r--r--app/views/jira_connect/users/show.html.haml12
2 files changed, 71 insertions, 26 deletions
diff --git a/app/views/jira_connect/subscriptions/index.html.haml b/app/views/jira_connect/subscriptions/index.html.haml
index f7ecfd09209..655c413f2a6 100644
--- a/app/views/jira_connect/subscriptions/index.html.haml
+++ b/app/views/jira_connect/subscriptions/index.html.haml
@@ -1,28 +1,61 @@
-%h1
- GitLab for Jira Configuration
-
-%form#add-subscription-form.subscription-form{ action: jira_connect_subscriptions_path }
- .ak-field-group
- %label
- Namespace
-
- .ak-field-group.field-group-input
- %input#namespace-input.ak-field-text{ type: 'text', required: true }
- %button.ak-button.ak-button__appearance-primary{ type: 'submit' }
- Link namespace to Jira
-
-%table.subscriptions
- %thead
- %tr
- %th Namespace
- %th Added
- %th
- %tbody
- - @subscriptions.each do |subscription|
- %tr
- %td= subscription.namespace.full_path
- %td= subscription.created_at
- %td= link_to 'Remove', jira_connect_subscription_path(subscription), class: 'remove-subscription'
+%header.jira-connect-header
+ = brand_header_logo
+
+.jira-connect-user
+ - if current_user
+ - user_link = link_to(current_user.to_reference, user_path(current_user), target: '_blank', rel: 'noopener noreferrer')
+ = _('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
+ %h1
+ GitLab for Jira Configuration
+
+ - if current_user.blank? && @subscriptions.empty?
+ %h2.heading-with-border Sign in to GitLab.com to get started.
+
+ .gl-mt-5
+ = external_link _('Sign in to GitLab'), jira_connect_users_path, class: 'ak-button ak-button__appearance-primary js-jira-connect-sign-in'
+
+ .gl-mt-5
+ %p Note: this integration only works with accounts on GitLab.com (SaaS).
+ - else
+ %form#add-subscription-form.subscription-form{ action: jira_connect_subscriptions_path }
+ .ak-field-group
+ %label
+ GitLab namespace
+
+ .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
+
+ - if @subscriptions.present?
+ %table.subscriptions
+ %thead
+ %tr
+ %th Namespace
+ %th Added
+ %th
+ %tbody
+ - @subscriptions.each do |subscription|
+ %tr
+ %td= subscription.namespace.full_path
+ %td= subscription.created_at
+ %td= link_to 'Remove', jira_connect_subscription_path(subscription), class: 'remove-subscription'
+ - else
+ %h4.empty-subscriptions
+ No linked namespaces
+
+ %p.browser-limitations-notice
+ %strong Browser limitations:
+ Adding a namespace currently works only in browsers that allow cross site cookies. Please make sure to use
+ %a{ href: 'https://www.mozilla.org/en-US/firefox/', target: '_blank', rel: 'noopener noreferrer' } Firefox
+ or
+ %a{ href: 'https://www.google.com/chrome/index.html', target: '_blank', rel: 'noopener noreferrer' } Google Chrome
+ or enable cross-site cookies in your browser when adding a namespace.
+ %a{ href: 'https://gitlab.com/gitlab-org/gitlab/-/issues/263509', target: '_blank', rel: 'noopener noreferrer' } Learn more
= page_specific_javascript_tag('jira_connect.js')
-= stylesheet_link_tag 'page_bundles/jira_connect'
+- add_page_specific_style 'page_bundles/jira_connect'
diff --git a/app/views/jira_connect/users/show.html.haml b/app/views/jira_connect/users/show.html.haml
new file mode 100644
index 00000000000..2ff92ab0dc8
--- /dev/null
+++ b/app/views/jira_connect/users/show.html.haml
@@ -0,0 +1,12 @@
+.jira-connect-users-container.gl-text-center
+ - user_link = link_to(current_user.to_reference, user_path(current_user), target: '_blank', rel: 'noopener noreferrer')
+ %h2= _('You are signed into GitLab as %{user_link}').html_safe % { user_link: user_link }
+
+ %p= s_('Integrations|You can now close this window and return to the GitLab for Jira application.')
+
+ - if @jira_app_link
+ %p= external_link s_('Integrations|Return to GitLab for Jira'), @jira_app_link, class: 'btn btn-success'
+
+ %p= link_to _('Sign out'), destroy_user_session_path, method: :post
+
+- add_page_specific_style 'page_bundles/jira_connect_users'