Commit 930f4366ba3030d54f994a6e454470adca74f888
1 parent
3022b9fd
Exists in
master
and in
4 other branches
Usability improvements to deploy leys
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
app/controllers/deploy_keys_controller.rb
| @@ -54,6 +54,6 @@ class DeployKeysController < ProjectResourceController | @@ -54,6 +54,6 @@ class DeployKeysController < ProjectResourceController | ||
| 54 | protected | 54 | protected |
| 55 | 55 | ||
| 56 | def available_keys | 56 | def available_keys |
| 57 | - @available_keys ||= DeployKey.in_projects(current_user.owned_projects) | 57 | + @available_keys ||= DeployKey.in_projects(current_user.owned_projects).uniq |
| 58 | end | 58 | end |
| 59 | end | 59 | end |
app/views/deploy_keys/index.html.haml
| @@ -18,9 +18,15 @@ | @@ -18,9 +18,15 @@ | ||
| 18 | %small for this project | 18 | %small for this project |
| 19 | %ul.bordered-list | 19 | %ul.bordered-list |
| 20 | = render @enabled_keys | 20 | = render @enabled_keys |
| 21 | + - if @enabled_keys.blank? | ||
| 22 | + .light-well | ||
| 23 | + %p.nothing_here_message Create #{link_to 'new deploy key', new_project_deploy_key_path(@project)} or add existing one | ||
| 21 | .span6.available-keys | 24 | .span6.available-keys |
| 22 | %h5 | 25 | %h5 |
| 23 | Available deploy keys | 26 | Available deploy keys |
| 24 | %small from projects you are able to manage | 27 | %small from projects you are able to manage |
| 25 | %ul.bordered-list | 28 | %ul.bordered-list |
| 26 | = render @available_keys | 29 | = render @available_keys |
| 30 | + - if @available_keys.blank? | ||
| 31 | + .light-well | ||
| 32 | + %p.nothing_here_message All deploy keys from projects you can manage will be displayed here |