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

_remove_tag.html.haml « buttons « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dfa643a87bb1aa1405724d26fe2b7721c4abcd6b (plain)
1
2
3
4
5
6
7
8
9
10
11
- project = local_assigns.fetch(:project, nil)
- tag = local_assigns.fetch(:tag, nil)
- return unless project && tag
- title = s_('TagsPage|Delete tag')
- if protected_tag?(project, tag)
  - title = s_('TagsPage|Delete protected tag')
  - if !can?(current_user, :maintainer_access, project)
    - title = s_('TagsPage|Only a project maintainer or owner can delete a protected tag')
    - disabled = true

= render Pajamas::ButtonComponent.new(variant: :default, icon: 'remove', button_options: { class: "js-delete-tag-button", 'aria-label': s_('TagsPage|Delete tag'), title: title, disabled: disabled, data: { toggle: 'tooltip', container: 'body', path: project_tag_path(@project, tag.name), tag_name: tag.name, is_protected: protected_tag?(project, tag).to_s } })