2015-04-30 19:33:02 +00:00
|
|
|
- page_title "New Tag"
|
2015-09-17 10:16:24 +00:00
|
|
|
= render "projects/commits/header_title"
|
|
|
|
|
2014-07-27 17:56:33 +00:00
|
|
|
- if @error
|
|
|
|
.alert.alert-danger
|
|
|
|
%button{ type: "button", class: "close", "data-dismiss" => "alert"} ×
|
|
|
|
= @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
|
|
|
|
|
2015-11-19 14:37:20 +00:00
|
|
|
= form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal gfm-form tag-form" do
|
2013-12-30 23:27:02 +00:00
|
|
|
.form-group
|
2013-07-17 11:43:18 +00:00
|
|
|
= label_tag :tag_name, 'Name for new tag', class: 'control-label'
|
2013-12-30 23:27:02 +00:00
|
|
|
.col-sm-10
|
2014-07-27 17:56:33 +00:00
|
|
|
= text_field_tag :tag_name, params[:tag_name], placeholder: 'v3.0.1', required: true, tabindex: 1, 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
|
2014-07-27 17:56:33 +00:00
|
|
|
= text_field_tag :ref, params[:ref], placeholder: 'master', 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
|
|
|
|
= label_tag :message, 'Message', class: 'control-label'
|
|
|
|
.col-sm-10
|
|
|
|
= text_field_tag :message, nil, placeholder: 'Enter message.', required: false, tabindex: 3, class: 'form-control'
|
2015-11-06 14:05:19 +00:00
|
|
|
.help-block (Optional) Entering a message will create an annotated 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
|
2015-11-19 14:37:20 +00:00
|
|
|
= render 'projects/zen', attr: :release_description, classes: 'description js-quick-submit form-control'
|
2015-11-05 13:03:48 +00:00
|
|
|
= render 'projects/notes/hints'
|
2015-11-06 14:48:18 +00:00
|
|
|
.help-block (Optional) You can add release notes to your tag. It will be stored in the GitLab database and shown 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
|
2014-08-27 10:12:42 +00:00
|
|
|
disableButtonIfAnyEmptyField($("#new-tag-form"), ".form-control", ".btn-create");
|
2013-07-17 11:43:18 +00:00
|
|
|
var availableTags = #{@project.repository.ref_names.to_json};
|
|
|
|
|
|
|
|
$("#ref").autocomplete({
|
|
|
|
source: availableTags,
|
|
|
|
minLength: 1
|
|
|
|
});
|