2015-04-30 19:33:02 +00:00
|
|
|
- page_title "New Tag"
|
2015-09-17 10:16:24 +00:00
|
|
|
|
2014-07-27 17:56:33 +00:00
|
|
|
- if @error
|
|
|
|
.alert.alert-danger
|
2016-12-26 10:47:16 +00:00
|
|
|
%button.close{ type: "button", "data-dismiss" => "alert" } ×
|
2014-07-27 17:56:33 +00:00
|
|
|
= @error
|
2015-11-06 14:05:19 +00:00
|
|
|
|
2013-07-17 11:43:18 +00:00
|
|
|
%h3.page-title
|
2015-12-02 13:27:29 +00:00
|
|
|
New Tag
|
2015-11-06 14:05:19 +00:00
|
|
|
%hr
|
|
|
|
|
2016-04-05 11:33:30 +00:00
|
|
|
= form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal common-note-form tag-form js-quick-submit js-requires-input" do
|
2013-12-30 23:27:02 +00:00
|
|
|
.form-group
|
2015-12-02 13:30:12 +00:00
|
|
|
= label_tag :tag_name, nil, class: 'control-label'
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2015-12-02 13:36:44 +00:00
|
|
|
= text_field_tag :tag_name, params[:tag_name], required: true, tabindex: 1, autofocus: true, class: 'form-control'
|
2013-12-30 23:27:02 +00:00
|
|
|
.form-group
|
2013-07-17 11:43:18 +00:00
|
|
|
= label_tag :ref, 'Create from', class: 'control-label'
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2015-12-02 13:36:44 +00:00
|
|
|
= text_field_tag :ref, params[:ref] || @project.default_branch, required: true, tabindex: 2, class: 'form-control'
|
2015-11-06 14:05:19 +00:00
|
|
|
.help-block Branch name or commit SHA
|
2014-06-24 01:35:36 +00:00
|
|
|
.form-group
|
2015-12-02 13:30:12 +00:00
|
|
|
= label_tag :message, nil, class: 'control-label'
|
2014-06-24 01:35:36 +00:00
|
|
|
.col-sm-10
|
2016-02-16 11:13:47 +00:00
|
|
|
= text_area_tag :message, nil, required: false, tabindex: 3, class: 'form-control', rows: 5
|
2016-11-18 07:17:59 +00:00
|
|
|
.help-block Optionally, add a message to the tag.
|
2015-11-05 13:03:48 +00:00
|
|
|
%hr
|
|
|
|
.form-group
|
2015-11-06 14:05:19 +00:00
|
|
|
= label_tag :release_description, 'Release notes', class: 'control-label'
|
2015-11-05 13:03:48 +00:00
|
|
|
.col-sm-10
|
|
|
|
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
|
2016-04-05 11:33:30 +00:00
|
|
|
= render 'projects/zen', attr: :release_description, classes: 'note-textarea', placeholder: "Write your release notes or drag files here..."
|
2015-11-05 13:03:48 +00:00
|
|
|
= render 'projects/notes/hints'
|
2016-04-05 11:33:30 +00:00
|
|
|
.help-block Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page.
|
2013-07-17 11:43:18 +00:00
|
|
|
.form-actions
|
2014-09-26 14:57:36 +00:00
|
|
|
= button_tag 'Create tag', class: 'btn btn-create', tabindex: 3
|
2015-01-24 18:02:58 +00:00
|
|
|
= link_to 'Cancel', namespace_project_tags_path(@project.namespace, @project), class: 'btn btn-cancel'
|
2013-07-17 11:43:18 +00:00
|
|
|
|
|
|
|
:javascript
|
2015-12-02 13:41:02 +00:00
|
|
|
var availableRefs = #{@project.repository.ref_names.to_json};
|
2013-07-17 11:43:18 +00:00
|
|
|
|
|
|
|
$("#ref").autocomplete({
|
2015-12-02 13:41:02 +00:00
|
|
|
source: availableRefs,
|
2013-07-17 11:43:18 +00:00
|
|
|
minLength: 1
|
|
|
|
});
|