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
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/project.js.coffee5
-rw-r--r--app/assets/stylesheets/common.scss15
-rw-r--r--app/views/shared/_no_ssh.html.haml9
3 files changed, 23 insertions, 6 deletions
diff --git a/app/assets/javascripts/project.js.coffee b/app/assets/javascripts/project.js.coffee
index bdb18574b6d..b12f045e375 100644
--- a/app/assets/javascripts/project.js.coffee
+++ b/app/assets/javascripts/project.js.coffee
@@ -40,3 +40,8 @@ $ ->
# Ref switcher
$('.project-refs-select').on 'change', ->
$(@).parents('form').submit()
+
+ $('.hide-no-ssh-message').on 'click', (e) ->
+ $.cookie('hide_no_ssh_message', 'false')
+ $(@).parents('.no-ssh-key-message').hide()
+ e.preventDefault()
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index dbd50b4dcc8..8cb8e1b3276 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -220,7 +220,6 @@ li.note {
.error-message {
padding: 10px;
background: #C67;
- padding-left: 20px;
margin: 0;
color: #FFF;
@@ -228,8 +227,18 @@ li.note {
color: #fff;
text-decoration: underline;
}
- &.centered {
- text-align: center;
+}
+
+.no-ssh-key-message {
+ padding: 10px 0;
+ background: #C67;
+ margin: 0;
+ color: #FFF;
+ text-align: center;
+
+ a {
+ color: #fff;
+ text-decoration: underline;
}
}
diff --git a/app/views/shared/_no_ssh.html.haml b/app/views/shared/_no_ssh.html.haml
index 6d363807d62..2a365ce4f63 100644
--- a/app/views/shared/_no_ssh.html.haml
+++ b/app/views/shared/_no_ssh.html.haml
@@ -1,3 +1,6 @@
-- if current_user.require_ssh_key? && alert.blank? && notice.blank?
- %p.error-message.centered
- You won't be able to pull or push project code via SSH until you #{link_to 'add an SSH key', new_profile_key_path} to your profile
+- if cookies[:hide_no_ssh_message].blank? && current_user.require_ssh_key?
+ .no-ssh-key-message
+ .container
+ You won't be able to pull or push project code via SSH until you #{link_to 'add an SSH key', new_profile_key_path} to your profile
+ = link_to '#', class: 'pull-right hide-no-ssh-message' do
+ %i.icon-remove