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

28 lines
1.4 KiB
Text
Raw Normal View History

2014-09-02 18:07:02 +05:30
%li
2016-06-02 11:05:42 +05:30
.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
2014-09-02 18:07:02 +05:30
- if @available_keys.include?(deploy_key)
2016-06-02 11:05:42 +05:30
= link_to enable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: "btn btn-sm prepend-left-10", method: :put do
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?
2016-06-02 11:05:42 +05:30
= 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
2014-09-02 18:07:02 +05:30
- else
2016-06-02 11:05:42 +05:30
= 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
2015-04-26 12:48:37 +05:30
Disable