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
Tatuya Kamada
gitlab-ce
Commits
a4d75e3a
Commit
a4d75e3a
authored
Nov 05, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to edit and show release notes
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
ba67af79
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
9 deletions
+60
-9
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+3
-0
app/assets/stylesheets/framework/common.scss
app/assets/stylesheets/framework/common.scss
+1
-0
app/controllers/projects/releases_controller.rb
app/controllers/projects/releases_controller.rb
+1
-0
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+1
-1
app/views/projects/commits/_head.html.haml
app/views/projects/commits/_head.html.haml
+1
-1
app/views/projects/releases/edit.html.haml
app/views/projects/releases/edit.html.haml
+18
-6
app/views/projects/releases/show.html.haml
app/views/projects/releases/show.html.haml
+35
-1
No files found.
app/assets/javascripts/dispatcher.js.coffee
View file @
a4d75e3a
...
@@ -39,6 +39,9 @@ class Dispatcher
...
@@ -39,6 +39,9 @@ class Dispatcher
shortcut_handler
=
new
ShortcutsNavigation
()
shortcut_handler
=
new
ShortcutsNavigation
()
new
DropzoneInput
(
$
(
'.merge-request-form'
))
new
DropzoneInput
(
$
(
'.merge-request-form'
))
new
IssuableForm
(
$
(
'.merge-request-form'
))
new
IssuableForm
(
$
(
'.merge-request-form'
))
when
'projects:releases:edit'
new
ZenMode
()
new
DropzoneInput
(
$
(
'.release-form'
))
when
'projects:merge_requests:show'
when
'projects:merge_requests:show'
new
Diff
()
new
Diff
()
shortcut_handler
=
new
ShortcutsIssuable
()
shortcut_handler
=
new
ShortcutsIssuable
()
...
...
app/assets/stylesheets/framework/common.scss
View file @
a4d75e3a
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
.append-bottom-10
{
margin-bottom
:
10px
}
.append-bottom-10
{
margin-bottom
:
10px
}
.append-bottom-15
{
margin-bottom
:
15px
}
.append-bottom-15
{
margin-bottom
:
15px
}
.append-bottom-20
{
margin-bottom
:
20px
}
.append-bottom-20
{
margin-bottom
:
20px
}
.append-bottom-default
{
margin-bottom
:
$gl-padding
;
}
.inline
{
display
:
inline-block
}
.inline
{
display
:
inline-block
}
.center
{
text-align
:
center
}
.center
{
text-align
:
center
}
...
...
app/controllers/projects/releases_controller.rb
View file @
a4d75e3a
...
@@ -7,6 +7,7 @@ class Projects::ReleasesController < Projects::ApplicationController
...
@@ -7,6 +7,7 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action
:release
before_action
:release
def
show
def
show
@commit
=
@repository
.
commit
(
@tag
.
target
)
end
end
def
edit
def
edit
...
...
app/views/layouts/nav/_project.html.haml
View file @
a4d75e3a
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
Files
Files
-
if
project_nav_tab?
:commits
-
if
project_nav_tab?
:commits
=
nav_link
(
controller:
%w(commit commits compare repositories tags branches)
)
do
=
nav_link
(
controller:
%w(commit commits compare repositories tags branches
releases
)
)
do
=
link_to
project_commits_path
(
@project
),
title:
'Commits'
,
class:
'shortcuts-commits'
,
data:
{
placement:
'right'
}
do
=
link_to
project_commits_path
(
@project
),
title:
'Commits'
,
class:
'shortcuts-commits'
,
data:
{
placement:
'right'
}
do
=
icon
(
'history fw'
)
=
icon
(
'history fw'
)
%span
%span
...
...
app/views/projects/commits/_head.html.haml
View file @
a4d75e3a
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
Branches
Branches
%span
.badge.js-totalbranch-count
=
@repository
.
branches
.
size
%span
.badge.js-totalbranch-count
=
@repository
.
branches
.
size
=
nav_link
(
controller:
:tags
)
do
=
nav_link
(
controller:
[
:tags
,
:releases
]
)
do
=
link_to
namespace_project_tags_path
(
@project
.
namespace
,
@project
)
do
=
link_to
namespace_project_tags_path
(
@project
.
namespace
,
@project
)
do
Tags
Tags
%span
.badge.js-totaltags-count
=
@repository
.
tags
.
length
%span
.badge.js-totaltags-count
=
@repository
.
tags
.
length
app/views/projects/releases/edit.html.haml
View file @
a4d75e3a
=
form_for
(
@release
,
method: :put
,
url:
namespace_project_tag_release_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
html:
{
class:
'form-horizontal gfm-form'
})
do
|
f
|
=
render
"projects/commits/header_title"
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"md-preview"
,
referenced_users:
true
}
do
=
render
"projects/commits/head"
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'js-quick-submit'
=
render
'projects/notes/hints'
.gray-content-block
.error-alert
.oneline
=
f
.
submit
'Save changes'
,
class:
'btn btn-save'
Release notes for
#{
@tag
.
name
}
.prepend-top-default
=
form_for
(
@release
,
method: :put
,
url:
namespace_project_tag_release_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
html:
{
class:
'form-horizontal gfm-form release-form'
})
do
|
f
|
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
"md-preview"
,
referenced_users:
true
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :description
,
classes:
'description js-quick-submit'
=
render
'projects/notes/hints'
.error-alert
.prepend-top-default
=
f
.
submit
'Save changes'
,
class:
'btn btn-save'
-
if
@release
.
persisted?
=
link_to
"Cancel"
,
namespace_project_tag_release_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
class:
"btn btn-default btn-cancel"
app/views/projects/releases/show.html.haml
View file @
a4d75e3a
=
debug
@release
-
page_title
@release
.
tag
,
"Releases"
=
render
"projects/commits/header_title"
=
render
"projects/commits/head"
.gray-content-block
.pull-right
=
link_to
edit_namespace_project_tag_release_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
class:
'btn-grouped btn'
do
=
icon
(
"pencil"
)
.oneline
Release notes for
#{
@tag
.
name
}
.append-bottom-default.prepend-top-default
-
if
@release
.
description
.
present?
.description
.wiki
=
preserve
do
=
markdown
@release
.
description
-
else
This tag has no release notes yet. Press edit button to add one
.gray-content-block.middle-block.clearfix
=
link_to
namespace_project_tree_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
class:
'btn btn-grouped'
do
Browse code
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@tag
.
name
),
class:
'btn btn-grouped'
do
Commits
-
if
can?
current_user
,
:download_code
,
@project
=
render
'projects/repositories/download_archive'
,
ref:
@tag
.
name
,
btn_class:
'btn-grouped'
-#- if can?(current_user, :admin_project, @project)
= link_to namespace_project_tag_path(@project.namespace, @project, @tag.name), class: 'btn btn-remove remove-row grouped', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do
%i.fa.fa-trash-o
.gray-content-block.second-block
-
if
@commit
=
render
'projects/commits/commit'
,
commit:
@commit
,
project:
@project
-
else
Cant find HEAD commit for this tag
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