Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gpg key and ssl certificate modal
- Loading branch information
Showing
2 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
48 changes: 47 additions & 1 deletion
48
src/api/app/views/webui2/webui/project/bottom_actions/_gpg_key_ssl_certificate.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,50 @@ | ||
%li.list-inline-item | ||
= link_to(key_dialog_project_public_key_path(project_name: project.name), remote: true, class: 'nav-link') do | ||
= link_to('#', class: 'nav-link', data: { toggle: 'modal', target: '#gpg-key-modal' }) do | ||
%i.fas.fa-key | ||
GPG Key / SSL Certificate | ||
|
||
.modal.fade#gpg-key-modal{ tabindex: -1, role: 'dialog', aria: { labelledby: 'gpg-key-modal-label', hidden: true } } | ||
.modal-dialog.modal-dialog-centered{ role: 'document' } | ||
.modal-content | ||
.modal-header | ||
%h5.modal-title#gpgp-key-modal-label #{project} keys | ||
.modal-body | ||
.table-responsive | ||
%table.table.table-sm.table-striped.table-bordered | ||
%thead | ||
%tr | ||
%th Size | ||
%th Algorithm | ||
%th ID | ||
- if project.key_info.expires | ||
%th Expires | ||
- if project.key_info.origin.present? | ||
%th Origin | ||
%tbody | ||
%tr | ||
%td | ||
= project.key_info.keysize | ||
%td | ||
= project.key_info.algorithm | ||
%td | ||
= project.key_info.keyid | ||
- if project.key_info.expires | ||
%td | ||
= DateTime.strptime(project.key_info.expires, '%s').strftime('%F') | ||
- if project.key_info.origin.present? | ||
%td= project.key_info.origin | ||
|
||
.table-responsive | ||
%table.table.table-sm.table-striped.table-bordered | ||
%thead | ||
%tr | ||
%th Fingerprint | ||
%tbody | ||
%tr | ||
%td= project.key_info.fingerprint | ||
.modal-footer | ||
%a.btn.btn-sm.btn-outline-danger.px-4{ data: { dismiss: 'modal' } } | ||
Cancel | ||
= link_to('GPG Key', project_public_key_path(project_name: project.name), class: 'btn btn-sm btn-primary px-4') | ||
- if project.key_info.ssl_certificate.present? | ||
= link_to('SSL Cert.', project_ssl_certificate_path(project_name: project.name), class: 'btn btn-sm btn-primary px-4') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters