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
29
30
31
32
33
34
35
36
37
38
39
|
- add_to_breadcrumbs s_('TagsPage|Tags'), project_tags_path(@project)
- page_title s_('TagsPage|New')
- default_ref = params[:ref] || @project.default_branch
- if @error
= render Pajamas::AlertComponent.new(variant: :danger, dismissible: true) do |c|
- c.with_body do
= @error
%h1.page-title.gl-font-size-h-display
= s_('TagsPage|New Tag')
%p.gl-text-secondary
- link = link_to('', new_namespace_project_release_path)
= safe_format(s_('TagsPage|Do you want to create a release with the new tag? You can do that in the %{link_start}New release page%{link_end}.'), tag_pair(link, :link_start, :link_end))
= form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "common-note-form tag-form js-quick-submit js-requires-input" do
.form-group.row
.col-sm-12
= label_tag :tag_name, _('Tag name')
= text_field_tag :tag_name, params[:tag_name], required: true, autofocus: true, class: 'form-control', data: { testid: 'tag-name-field' }
.form-group.row
.col-sm-auto.create-from
= label_tag :ref, _('Create from')
.js-new-tag-ref-selector{ data: { project_id: @project.id, default_branch_name: default_ref, hidden_input_name: 'ref' } }
.form-text.text-muted
= s_('TagsPage|Existing branch name, tag, or commit SHA')
.form-group.row
.col-sm-12
= label_tag :message, _('Message')
= text_area_tag :message, @message, required: false, class: 'form-control', rows: 5, data: { testid: 'tag-message-field' }
.form-text.text-muted
= tag_description_help_text
.gl-display-flex
= render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'gl-mr-3', data: { testid: 'create-tag-button' }, type: 'submit' }) do
= s_('TagsPage|Create tag')
= render Pajamas::ButtonComponent.new(href: project_tags_path(@project)) do
= s_('TagsPage|Cancel')
|