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 gl-ml-3\!", '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 } })
|