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
9ad5d9a4
Commit
9ad5d9a4
authored
Sep 09, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/mr_description' of /home/git/repositories/gitlab/gitlabhq
parents
1f81c008
e0ca2ada
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
35 deletions
+46
-35
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+2
-0
app/assets/stylesheets/sections/merge_requests.scss
app/assets/stylesheets/sections/merge_requests.scss
+1
-1
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+2
-0
app/models/issue.rb
app/models/issue.rb
+0
-1
app/models/merge_request.rb
app/models/merge_request.rb
+1
-2
app/views/projects/merge_requests/_form.html.haml
app/views/projects/merge_requests/_form.html.haml
+27
-30
app/views/projects/merge_requests/show/_mr_box.html.haml
app/views/projects/merge_requests/show/_mr_box.html.haml
+6
-0
db/migrate/20130909132950_add_description_to_merge_request.rb
...igrate/20130909132950_add_description_to_merge_request.rb
+5
-0
db/schema.rb
db/schema.rb
+2
-1
No files found.
app/assets/javascripts/dispatcher.js.coffee
View file @
9ad5d9a4
...
...
@@ -18,6 +18,8 @@ class Dispatcher
switch
page
when
'projects:issues:index'
Issues
.
init
()
when
'projects:issues:new'
,
'projects:merge_requests:new'
GitLab
.
GfmAutoComplete
.
setup
()
when
'dashboard:show'
new
Dashboard
()
new
Activities
()
...
...
app/assets/stylesheets/sections/merge_requests.scss
View file @
9ad5d9a4
...
...
@@ -117,7 +117,7 @@
.merge-request-angle
{
text-align
:
center
;
margin
-top
:
45px
;
margin
:
0
;
}
.merge-request-form-info
{
...
...
app/models/concerns/issuable.rb
View file @
9ad5d9a4
...
...
@@ -37,6 +37,8 @@ module Issuable
prefix:
true
attr_accessor
:author_id_of_changes
attr_mentionable
:title
,
:description
end
module
ClassMethods
...
...
app/models/issue.rb
View file @
9ad5d9a4
...
...
@@ -32,7 +32,6 @@ class Issue < ActiveRecord::Base
attr_accessible
:title
,
:assignee_id
,
:position
,
:description
,
:milestone_id
,
:label_list
,
:author_id_of_changes
,
:state_event
attr_mentionable
:title
,
:description
acts_as_taggable_on
:labels
...
...
app/models/merge_request.rb
View file @
9ad5d9a4
...
...
@@ -30,8 +30,7 @@ class MergeRequest < ActiveRecord::Base
belongs_to
:target_project
,
foreign_key: :target_project_id
,
class_name:
"Project"
belongs_to
:source_project
,
foreign_key: :source_project_id
,
class_name:
"Project"
attr_accessible
:title
,
:assignee_id
,
:source_project_id
,
:source_branch
,
:target_project_id
,
:target_branch
,
:milestone_id
,
:author_id_of_changes
,
:state_event
attr_mentionable
:title
attr_accessible
:title
,
:assignee_id
,
:source_project_id
,
:source_branch
,
:target_project_id
,
:target_branch
,
:milestone_id
,
:author_id_of_changes
,
:state_event
,
:description
attr_accessor
:should_remove_source_branch
...
...
app/views/projects/merge_requests/_form.html.haml
View file @
9ad5d9a4
...
...
@@ -5,41 +5,32 @@
-
@merge_request
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
%h3
.page-title
Branches
.merge-request-branches
.row
.span5
.ui-box
.title
From
.ui-box-head
Project:
=
f
.
select
(
:source_project_id
,[[
@merge_request
.
source_project
.
path_with_namespace
,
@merge_request
.
source_project
.
id
]]
,
{},
{
class:
'source_project chosen span4'
})
.prepend-top-10
.row
.span5
.clearfix
.pull-left
=
f
.
select
(
:source_project_id
,[[
@merge_request
.
source_project
.
path_with_namespace
,
@merge_request
.
source_project
.
id
]]
,
{},
{
class:
'source_project chosen span3'
})
.pull-left
%i
.icon-code-fork
Branch:
=
f
.
select
(
:source_branch
,
@merge_request
.
source_project
.
repository
.
branch_names
,
{
include_blank:
"Select branch"
},
{
class:
'source_branch chosen span3'
})
.mr_source_commit.prepend-top-10
.span2
%h1
.merge-request-angle
%i
.icon-angle-right
.span5
.ui-box
.title
To
.ui-box-head
-
projects
=
@project
.
forked_from_project
.
nil?
?
[
@project
]
:
[
@project
,
@project
.
forked_from_project
]
Project:
=
f
.
select
(
:target_project_id
,
projects
.
map
{
|
proj
|
[
proj
.
path_with_namespace
,
proj
.
id
]
},
{
include_blank:
"Select Target Project"
},
{
class:
'target_project chosen span4'
})
.prepend-top-10
=
f
.
select
(
:source_branch
,
@merge_request
.
source_project
.
repository
.
branch_names
,
{
include_blank:
"Select branch"
},
{
class:
'source_branch chosen span2'
})
.mr_source_commit.prepend-top-10
.span2
%h2
.merge-request-angle.light
%i
.icon-long-arrow-right
.span5
.clearfix
.pull-left
-
projects
=
@project
.
forked_from_project
.
nil?
?
[
@project
]
:
[
@project
,
@project
.
forked_from_project
]
=
f
.
select
(
:target_project_id
,
projects
.
map
{
|
proj
|
[
proj
.
path_with_namespace
,
proj
.
id
]
},
{
include_blank:
"Select Target Project"
},
{
class:
'target_project chosen span3'
})
.pull-left
%i
.icon-code-fork
Branch:
=
f
.
select
(
:target_branch
,
@target_branches
,
{
include_blank:
"Select branch"
},
{
class:
'target_branch chosen span3'
})
.mr_target_commit.prepend-top-10
=
f
.
select
(
:target_branch
,
@target_branches
,
{
include_blank:
"Select branch"
},
{
class:
'target_branch chosen span2'
})
.mr_target_commit.prepend-top-10
%hr
%h3
.page-title
Details
.merge-request-form-info
.control-group
=
f
.
label
:title
do
...
...
@@ -56,6 +47,12 @@
%i
.icon-time
Milestone
.controls
=
f
.
select
(
:milestone_id
,
@project
.
milestones
.
active
.
all
.
map
{
|
p
|
[
p
.
title
,
p
.
id
]
},
{
include_blank:
"Select milestone"
},
{
class:
'chosen'
})
.control-group
=
f
.
label
:description
,
"Description"
.controls
=
f
.
text_area
:description
,
class:
"input-xxlarge js-gfm-input"
,
rows:
14
%p
.hint
Description is parsed with
#{
link_to
"GitLab Flavored Markdown"
,
help_markdown_path
,
target:
'_blank'
}
.
.form-actions
-
if
@merge_request
.
new_record?
...
...
app/views/projects/merge_requests/show/_mr_box.html.haml
View file @
9ad5d9a4
...
...
@@ -21,6 +21,12 @@
%strong
=
link_to_gfm
truncate
(
milestone
.
title
,
length:
20
),
project_milestone_path
(
milestone
.
project
,
milestone
)
-
if
@merge_request
.
description
.
present?
.ui-box-bottom
.wiki
=
preserve
do
=
markdown
@merge_request
.
description
-
if
@merge_request
.
closed?
.ui-box-bottom.alert-error
%span
...
...
db/migrate/20130909132950_add_description_to_merge_request.rb
0 → 100644
View file @
9ad5d9a4
class
AddDescriptionToMergeRequest
<
ActiveRecord
::
Migration
def
change
add_column
:merge_requests
,
:description
,
:text
,
null:
true
end
end
db/schema.rb
View file @
9ad5d9a4
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
20130
821090531
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
20130
909132950
)
do
create_table
"deploy_keys_projects"
,
:force
=>
true
do
|
t
|
t
.
integer
"deploy_key_id"
,
:null
=>
false
...
...
@@ -100,6 +100,7 @@ ActiveRecord::Schema.define(:version => 20130821090531) do
t
.
string
"merge_status"
t
.
integer
"target_project_id"
,
:null
=>
false
t
.
integer
"iid"
t
.
text
"description"
end
add_index
"merge_requests"
,
[
"assignee_id"
],
:name
=>
"index_merge_requests_on_assignee_id"
...
...
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