diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-26 14:25:37 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-12-26 14:25:37 +0200 |
commit | f1c39763c9daf5f053f9b9ae0bcd1c50ea59133f (patch) | |
tree | 0599f3e8e0eca15a835081f1b12018ce2f019902 /app | |
parent | 038161f4e0b41a0fd6b877171a1f47d062b5c857 (diff) | |
download | gitlab-ce-f1c39763c9daf5f053f9b9ae0bcd1c50ea59133f.tar.gz |
Fix UI for no-ssh-key message
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/generic/common.scss | 20 | ||||
-rw-r--r-- | app/views/layouts/project_settings.html.haml | 3 | ||||
-rw-r--r-- | app/views/layouts/projects.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/_no_ssh.html.haml | 20 |
5 files changed, 10 insertions, 38 deletions
diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss index dfc7b0de9b7..6c37cbf072e 100644 --- a/app/assets/stylesheets/generic/common.scss +++ b/app/assets/stylesheets/generic/common.scss @@ -207,26 +207,6 @@ li.note { } } -.no-ssh-key-message { - padding: 10px 0; - background: #C67; - margin: 0; - color: #FFF; - margin-top: -1px; - text-align: center; - - a { - color: #fff; - text-decoration: underline; - } - - .links-xs { - text-align: center; - font-size: 16px; - padding: 5px; - } -} - .warning_message { border-left: 4px solid #ed9; color: #b90; diff --git a/app/views/layouts/project_settings.html.haml b/app/views/layouts/project_settings.html.haml index 810fb4e2005..0f20bf38bfd 100644 --- a/app/views/layouts/project_settings.html.haml +++ b/app/views/layouts/project_settings.html.haml @@ -5,8 +5,5 @@ = render "layouts/broadcast" = render "layouts/head_panel", title: project_title(@project) = render "layouts/init_auto_complete" - - if can?(current_user, :download_code, @project) - = render 'shared/no_ssh' - - @project_settings_nav = true = render 'layouts/page', sidebar: 'layouts/nav/project' diff --git a/app/views/layouts/projects.html.haml b/app/views/layouts/projects.html.haml index b4b1bcf241c..d4ee53db55c 100644 --- a/app/views/layouts/projects.html.haml +++ b/app/views/layouts/projects.html.haml @@ -5,6 +5,4 @@ = render "layouts/broadcast" = render "layouts/head_panel", title: project_title(@project) = render "layouts/init_auto_complete" - - if can?(current_user, :download_code, @project) - = render 'shared/no_ssh' = render 'layouts/page', sidebar: 'layouts/nav/project' diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 9b06ebe95a4..14d1ad956e3 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,3 +1,6 @@ +- if can?(current_user, :download_code, @project) + = render 'shared/no_ssh' + = render "home_panel" - readme = @repository.readme diff --git a/app/views/shared/_no_ssh.html.haml b/app/views/shared/_no_ssh.html.haml index e70eb4d01b9..e1c2a962982 100644 --- a/app/views/shared/_no_ssh.html.haml +++ b/app/views/shared/_no_ssh.html.haml @@ -1,14 +1,8 @@ - if cookies[:hide_no_ssh_message].blank? && current_user.require_ssh_key? && !current_user.hide_no_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 - .pull-right.hidden-xs - = link_to "Don't show again", profile_path(user: {hide_no_ssh_key: true}), method: :put, class: 'hide-no-ssh-message', remote: true - | - = link_to 'Remind later', '#', class: 'hide-no-ssh-message' - .links-xs.visible-xs - = link_to "Add key", new_profile_key_path - | - = link_to "Don't show again", profile_path(user: {hide_no_ssh_key: true}), method: :put, class: 'hide-no-ssh-message', remote: true - | - = link_to 'Later', '#', class: 'hide-no-ssh-message' + .no-ssh-key-message.alert.alert-warning.hidden-xs + 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 + + .pull-right + = link_to "Don't show again", profile_path(user: {hide_no_ssh_key: true}), method: :put, class: 'hide-no-ssh-message', remote: true + | + = link_to 'Remind later', '#', class: 'hide-no-ssh-message' |