Add ability to hide no ssh key message
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
986697a99b
commit
b983e9ef0a
3 changed files with 23 additions and 6 deletions
|
@ -40,3 +40,8 @@ $ ->
|
||||||
# Ref switcher
|
# Ref switcher
|
||||||
$('.project-refs-select').on 'change', ->
|
$('.project-refs-select').on 'change', ->
|
||||||
$(@).parents('form').submit()
|
$(@).parents('form').submit()
|
||||||
|
|
||||||
|
$('.hide-no-ssh-message').on 'click', (e) ->
|
||||||
|
$.cookie('hide_no_ssh_message', 'false')
|
||||||
|
$(@).parents('.no-ssh-key-message').hide()
|
||||||
|
e.preventDefault()
|
||||||
|
|
|
@ -220,7 +220,6 @@ li.note {
|
||||||
.error-message {
|
.error-message {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #C67;
|
background: #C67;
|
||||||
padding-left: 20px;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
|
|
||||||
|
@ -228,8 +227,18 @@ li.note {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-decoration: underline;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
- if current_user.require_ssh_key? && alert.blank? && notice.blank?
|
- if cookies[:hide_no_ssh_message].blank? && current_user.require_ssh_key?
|
||||||
%p.error-message.centered
|
.no-ssh-key-message
|
||||||
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
|
.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
|
||||||
|
|
Loading…
Reference in a new issue