Unverified Commit 312cf11b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Add release description to new tag form

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent e0cec95230f9
......@@ -39,6 +39,9 @@ class Dispatcher
shortcut_handler = new ShortcutsNavigation()
new DropzoneInput($('.merge-request-form'))
new IssuableForm($('.merge-request-form'))
when 'projects:tags:new'
new ZenMode()
new DropzoneInput($('.tag-form'))
when 'projects:releases:edit'
new ZenMode()
new DropzoneInput($('.release-form'))
......@@ -23,6 +23,13 @@ def create
if result[:status] == :success
@tag = result[:tag]
if params[:release_description]
release = @project.releases.find_or_initialize_by(tag: @tag.name)
release.update_attributes(description: params[:release_description])
redirect_to namespace_project_tags_path(@project.namespace, @project)
@error = result[:message]
......@@ -8,7 +8,7 @@
New tag
= form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal" do
= form_tag namespace_project_tags_path, method: :post, id: "new-tag-form", class: "form-horizontal tag-form" do
= label_tag :tag_name, 'Name for new tag', class: 'control-label'
......@@ -23,6 +23,23 @@
= text_field_tag :message, nil, placeholder: 'Enter message.', required: false, tabindex: 3, class: 'form-control'
.light (Optional) Entering a message will create an annotated tag.
= label_tag :release_description, 'Release description', class: 'control-label'
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
%input#zen-toggle-comment.zen-toggle-comment(tabindex="-1" type="checkbox")
= text_area_tag :release_description, nil, class: 'js-gfm-input markdown-area description js-quick-submit form-control', placeholder: ''
%a.zen-enter-link(tabindex="-1" href="#")
= icon('expand')
Edit in fullscreen
= icon('compress')
= render 'projects/notes/hints'
.help-block You can add release description to your tag. It will be stored in GitLab database and displayed on tags page
= button_tag 'Create tag', class: 'btn btn-create', tabindex: 3
= link_to 'Cancel', namespace_project_tags_path(@project.namespace, @project), class: 'btn btn-cancel'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment