debian-mirror-gitlab/app/views/projects/deploy_keys/_deploy_key.html.haml

33 lines
1.3 KiB
Text
Raw Normal View History

2014-09-02 18:07:02 +05:30
%li
.pull-right
- if @available_keys.include?(deploy_key)
2015-04-26 12:48:37 +05:30
= link_to enable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: 'btn btn-sm', method: :put do
2015-09-11 14:41:01 +05:30
= icon('plus')
2014-09-02 18:07:02 +05:30
Enable
- else
2015-04-26 12:48:37 +05:30
- if deploy_key.destroyed_when_orphaned? && deploy_key.almost_orphaned?
= link_to 'Remove', 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-remove delete-key btn-sm pull-right"
2014-09-02 18:07:02 +05:30
- else
2015-04-26 12:48:37 +05:30
= link_to disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: 'btn btn-sm', method: :put do
2015-09-11 14:41:01 +05:30
= icon('power-off')
2015-04-26 12:48:37 +05:30
Disable
2014-09-02 18:07:02 +05:30
2015-09-11 14:41:01 +05:30
= icon('key')
%strong= deploy_key.title
%br
%code.key-fingerprint= deploy_key.fingerprint
2015-04-26 12:48:37 +05:30
2014-09-02 18:07:02 +05:30
%p.light.prepend-top-10
2015-04-26 12:48:37 +05:30
- if deploy_key.public?
%span.label.label-info.deploy-project-label
Public deploy key
- deploy_key.projects.each do |project|
- if can?(current_user, :read_project, project)
%span.label.label-gray.deploy-project-label
= link_to namespace_project_path(project.namespace, project) do
= project.name_with_namespace
2014-09-02 18:07:02 +05:30
%small.pull-right
Created #{time_ago_with_tooltip(deploy_key.created_at)}