gitlab-org--gitlab-foss/app/views/projects/deploy_keys/_deploy_key.html.haml

25 lines
1.1 KiB
Text
Raw Normal View History

2013-05-06 08:10:55 -04:00
%li
.pull-right
- if @available_keys.include?(deploy_key)
= link_to enable_project_deploy_key_path(@project, deploy_key), class: 'btn btn-small', method: :put do
2014-10-01 18:21:29 -04:00
%i.fa.fa-plus
2013-05-06 08:10:55 -04:00
Enable
- else
- if deploy_key.projects.count > 1
= link_to disable_project_deploy_key_path(@project, deploy_key), class: 'btn btn-small', method: :put do
2014-10-01 18:21:29 -04:00
%i.fa.fa-power-off
2013-05-06 08:10:55 -04:00
Disable
- else
= link_to 'Remove', project_deploy_key_path(@project, deploy_key), data: { confirm: 'You are going to remove deploy key. Are you sure?'}, method: :delete, class: "btn btn-remove delete-key btn-small pull-right"
2013-05-06 08:10:55 -04:00
2013-05-20 08:00:05 -04:00
= link_to project_deploy_key_path(deploy_key.projects.include?(@project) ? @project : deploy_key.projects.first, deploy_key) do
2014-10-01 18:21:29 -04:00
%i.fa.fa-key
2013-05-06 08:10:55 -04:00
%strong= deploy_key.title
%p.light.prepend-top-10
- deploy_key.projects.map(&:name_with_namespace).each do |project_name|
%span.label.label-gray.deploy-project-label= project_name
2013-05-06 08:10:55 -04:00
%small.pull-right
Created #{time_ago_with_tooltip(deploy_key.created_at)}