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

28 lines
1.4 KiB
Text
Raw Normal View History

2013-05-06 08:10:55 -04:00
%li
.pull-left.append-right-10.hidden-xs
= icon "key", class: "key-icon"
.deploy-key-content.key-list-item-info
%strong.title
= deploy_key.title
.description
= deploy_key.fingerprint
.deploy-key-content.prepend-left-default.deploy-key-projects
- deploy_key.projects.each do |project|
- if can?(current_user, :read_project, project)
= link_to namespace_project_path(project.namespace, project), class: "label deploy-project-label" do
= project.name_with_namespace
.deploy-key-content
%span.key-created-at
created #{time_ago_with_tooltip(deploy_key.created_at)}
.visible-xs-block.visible-sm-block
2013-05-06 08:10:55 -04:00
- if @available_keys.include?(deploy_key)
= link_to enable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: "btn btn-sm prepend-left-10", method: :put do
2013-05-06 08:10:55 -04:00
Enable
- else
2015-04-03 06:22:44 -04:00
- if deploy_key.destroyed_when_orphaned? && deploy_key.almost_orphaned?
= link_to disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), data: { confirm: "You are going to remove deploy key. Are you sure?" }, method: :put, class: "btn btn-warning btn-sm prepend-left-10" do
Remove
2015-04-03 06:22:44 -04:00
- else
= link_to disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: "btn btn-warning btn-sm prepend-left-10", method: :put do
2013-05-06 08:10:55 -04:00
Disable