summaryrefslogtreecommitdiff
path: root/app/views/projects/commit/_signature_badge.html.haml
blob: aac020b42c58de1609ed2601e0595de397fc7ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- signature = local_assigns.fetch(:signature)
- title = local_assigns.fetch(:title)
- label = local_assigns.fetch(:label)
- css_class = local_assigns.fetch(:css_class)
- icon = local_assigns.fetch(:icon)
- show_user = local_assigns.fetch(:show_user, false)

- css_classes = commit_signature_badge_classes(css_class)

- title = capture do
  .gpg-popover-status
    .gpg-popover-icon{ class: css_class }
      = sprite_icon(icon)
    %div
      = title

- content = capture do
  - if show_user
    .clearfix
      = render partial: 'projects/commit/signature_badge_user', locals: { signature: signature }

  GPG Key ID:
  %span.monospace= signature.gpg_key_primary_keyid

  = link_to('Learn more about signing commits', help_page_path('user/project/repository/gpg_signed_commits/index.md'), class: 'gpg-popover-help-link')

%a{ href: 'javascript:void(0)', tabindex: 0, class: css_classes, data: { toggle: 'popover', html: 'true', placement: 'auto top', title: title, content: content } }
  = label