Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_protected_tag.html.haml « shared « protected_tags « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 11e8d3a81c24ef9e35d11665b2d62cde10c988e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
%tr.js-protected-tag-edit-form{ data: { url: project_protected_tag_path(@project, protected_tag) } }
  %td{ data: { label: s_('ProtectedBranch|Tag') }, class: 'gl-vertical-align-middle!' }
    %span.ref-name= protected_tag.name

    - if @project.root_ref?(protected_tag.name)
      = gl_badge_tag s_('ProtectedTags|default'), variant: :info, class: 'gl-ml-2'
  %td{ data: { label: s_('ProtectedBranch|Last commit') }, class: 'gl-vertical-align-middle!' }
    - if protected_tag.wildcard?
      - matching_tags = protected_tag.matching(repository.tag_names)
      = link_to pluralize(matching_tags.count, "matching tag"), project_protected_tag_path(@project, protected_tag)
    - else
      - if commit = protected_tag.commit
        = link_to(commit.short_id, project_commit_path(@project, commit.id), class: 'commit-sha')
        = time_ago_with_tooltip(commit.committed_date)
      - else
        (tag was removed from repository)

  = yield

  - if can? current_user, :admin_project, @project
    %td{ data: { label: _('Actions') }, class: 'gl-vertical-align-middle!' }
      = link_button_to 'Unprotect', [@project, protected_tag, { update_section: 'js-protected-tags-settings' }], aria: { label: s_('ProtectedTags|Unprotect tag') }, data: { confirm: 'Tag will be writable for developers. Are you sure?', confirm_btn_variant: 'danger' }, method: :delete, variant: :danger, category: :secondary, size: :small