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
|
|
|
|
%i.fa.fa-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
|
|
|
|
%i.fa.fa-power-off
|
|
|
|
Disable
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
- if project = project_for_deploy_key(deploy_key)
|
|
|
|
= link_to namespace_project_deploy_key_path(project.namespace, project, deploy_key) do
|
|
|
|
%i.fa.fa-key
|
|
|
|
%strong= deploy_key.title
|
|
|
|
- else
|
|
|
|
%i.fa.fa-key
|
2014-09-02 18:07:02 +05:30
|
|
|
%strong= deploy_key.title
|
|
|
|
|
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)}
|