Skip to content

Commit

Permalink
Add gpg key and ssl certificate modal
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidKang committed Dec 17, 2018
1 parent ee4292a commit 1456a3f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
@@ -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')
Expand Up @@ -6,4 +6,5 @@
- else
= render partial: 'webui2/webui/project/bottom_actions/patchinfo', locals: { project: project, has_patchinfo: has_patchinfo }
= render partial: 'webui2/webui/project/bottom_actions/submit_as_update', locals: { release_targets: release_targets, project: project }
= render partial: 'webui2/webui/project/bottom_actions/gpg_key_ssl_certificate', locals: { project: project }
- if project.key_info.present?
= render partial: 'webui2/webui/project/bottom_actions/gpg_key_ssl_certificate', locals: { project: project }

0 comments on commit 1456a3f

Please sign in to comment.