diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-06 20:41:08 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-06 20:41:08 +0300 |
commit | 930f4366ba3030d54f994a6e454470adca74f888 (patch) | |
tree | 59bf4f690dd7961ab47bec239e6f93cf1b46af2a | |
parent | 3022b9fdbfce5c407d745d713ba73d729bc9cb1a (diff) | |
download | gitlab-ce-930f4366ba3030d54f994a6e454470adca74f888.tar.gz |
Usability improvements to deploy leys
-rw-r--r-- | app/controllers/deploy_keys_controller.rb | 2 | ||||
-rw-r--r-- | app/views/deploy_keys/index.html.haml | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/deploy_keys_controller.rb b/app/controllers/deploy_keys_controller.rb index ca5c605aa7a..c413c2fd1d9 100644 --- a/app/controllers/deploy_keys_controller.rb +++ b/app/controllers/deploy_keys_controller.rb @@ -54,6 +54,6 @@ class DeployKeysController < ProjectResourceController protected def available_keys - @available_keys ||= DeployKey.in_projects(current_user.owned_projects) + @available_keys ||= DeployKey.in_projects(current_user.owned_projects).uniq end end diff --git a/app/views/deploy_keys/index.html.haml b/app/views/deploy_keys/index.html.haml index 3e8a8730a7a..9e136a6b6ba 100644 --- a/app/views/deploy_keys/index.html.haml +++ b/app/views/deploy_keys/index.html.haml @@ -18,9 +18,15 @@ %small for this project %ul.bordered-list = render @enabled_keys + - if @enabled_keys.blank? + .light-well + %p.nothing_here_message Create #{link_to 'new deploy key', new_project_deploy_key_path(@project)} or add existing one .span6.available-keys %h5 Available deploy keys %small from projects you are able to manage %ul.bordered-list = render @available_keys + - if @available_keys.blank? + .light-well + %p.nothing_here_message All deploy keys from projects you can manage will be displayed here |