Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
312cf11b
Commit
312cf11b
authored
Nov 05, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add release description to new tag form
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
850bb21b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+3
-0
app/controllers/projects/tags_controller.rb
app/controllers/projects/tags_controller.rb
+7
-0
app/views/projects/tags/new.html.haml
app/views/projects/tags/new.html.haml
+18
-1
No files found.
app/assets/javascripts/dispatcher.js.coffee
View file @
312cf11b
...
...
@@ -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'
))
...
...
app/controllers/projects/tags_controller.rb
View file @
312cf11b
...
...
@@ -23,6 +23,13 @@ class Projects::TagsController < Projects::ApplicationController
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
])
release
.
save
end
redirect_to
namespace_project_tags_path
(
@project
.
namespace
,
@project
)
else
@error
=
result
[
:message
]
...
...
app/views/projects/tags/new.html.haml
View file @
312cf11b
...
...
@@ -8,7 +8,7 @@
%h3
.page-title
%i
.fa.fa-code-fork
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
.form-group
=
label_tag
:tag_name
,
'Name for new tag'
,
class:
'control-label'
.col-sm-10
...
...
@@ -23,6 +23,23 @@
.col-sm-10
=
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.
%hr
.form-group
=
label_tag
:release_description
,
'Release description'
,
class:
'control-label'
.col-sm-10
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"md-preview"
,
referenced_users:
true
}
do
.zennable
%input
#zen-toggle-comment
.zen-toggle-comment
(
tabindex=
"-1"
type=
"checkbox"
)
.zen-backdrop
=
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
%a
.zen-leave-link
(
href=
"#"
)
=
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
.form-actions
=
button_tag
'Create tag'
,
class:
'btn btn-create'
,
tabindex:
3
=
link_to
'Cancel'
,
namespace_project_tags_path
(
@project
.
namespace
,
@project
),
class:
'btn btn-cancel'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment