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
Kazuhiko Shiozaki
gitlab-ce
Commits
d81f0b78
Commit
d81f0b78
authored
Jan 28, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bootstrap: Merge Request -> Show
parent
0a4222fb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
62 deletions
+64
-62
app/models/commit.rb
app/models/commit.rb
+1
-1
app/views/layouts/_project_side.html.haml
app/views/layouts/_project_side.html.haml
+2
-0
app/views/merge_requests/_form.html.haml
app/views/merge_requests/_form.html.haml
+26
-37
app/views/merge_requests/edit.html.haml
app/views/merge_requests/edit.html.haml
+3
-0
app/views/merge_requests/new.html.haml
app/views/merge_requests/new.html.haml
+2
-0
app/views/merge_requests/show.html.haml
app/views/merge_requests/show.html.haml
+30
-24
No files found.
app/models/commit.rb
View file @
d81f0b78
...
@@ -27,7 +27,7 @@ class Commit
...
@@ -27,7 +27,7 @@ class Commit
@head
=
head
@head
=
head
end
end
def
safe_message
def
safe_message
()
message
message
end
end
...
...
app/views/layouts/_project_side.html.haml
View file @
d81f0b78
...
@@ -13,5 +13,7 @@
...
@@ -13,5 +13,7 @@
Issues
Issues
=
link_to
wall_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"wall"
,
:id
=>
@project
)
?
"current"
:
nil
do
=
link_to
wall_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"wall"
,
:id
=>
@project
)
?
"current"
:
nil
do
Wall
Wall
-
if
@project
.
common_notes
.
today
.
count
>
0
%span
.label
=
@project
.
common_notes
.
today
.
count
=
link_to
project_merge_requests_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"merge_requests"
)
?
"current"
:
nil
do
=
link_to
project_merge_requests_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"merge_requests"
)
?
"current"
:
nil
do
Requests
Requests
app/views/merge_requests/_form.html.haml
View file @
d81f0b78
=
form_for
[
@project
,
@merge_request
]
do
|
f
|
=
form_for
[
@project
,
@merge_request
]
do
|
f
|
%div
%span
.entity-info
-
if
@merge_request
.
new_record?
=
link_to
project_merge_requests_path
(
@project
)
do
.entity-button
Merge Requests
%i
-
else
=
link_to
project_merge_request_path
(
@project
,
@merge_request
)
do
.entity-button
Show Merge Request
%i
%h2
=
@merge_request
.
new_record?
?
"New Merge Request"
:
"Edit Merge Request #
#{
@merge_request
.
id
}
"
%hr
%table
.no-borders
-
if
@merge_request
.
errors
.
any?
-
if
@merge_request
.
errors
.
any?
%tr
.alert-message.block-message.error
%td
{
:colspan
=>
2
}
%ul
#error_explanation
-
@merge_request
.
errors
.
full_messages
.
each
do
|
msg
|
-
@merge_request
.
errors
.
full_messages
.
each
do
|
msg
|
%span
=
msg
%li
=
msg
%br
%tr
.clearfix
%td
=
f
.
label
:source_branch
,
"From"
=
f
.
label
:source_branch
,
"From"
%td
=
f
.
select
(
:source_branch
,
@project
.
heads
.
map
(
&
:name
),
{
:include_blank
=>
"Select branch"
},
:style
=>
"width:250px"
)
.input
=
f
.
select
(
:source_branch
,
@project
.
heads
.
map
(
&
:name
),
{
:include_blank
=>
"Select branch"
},
:style
=>
"width:250px"
)
%tr
.clearfix
%td
=
f
.
label
:target_branch
,
"To"
=
f
.
label
:target_branch
,
"To"
%td
=
f
.
select
(
:target_branch
,
@project
.
heads
.
map
(
&
:name
),
{
:include_blank
=>
"Select branch"
},
:style
=>
"width:250px"
)
.input
=
f
.
select
(
:target_branch
,
@project
.
heads
.
map
(
&
:name
),
{
:include_blank
=>
"Select branch"
},
:style
=>
"width:250px"
)
%tr
.clearfix
%td
=
f
.
label
:assignee_id
,
"Assign to"
=
f
.
label
:assignee_id
,
"Assign to"
%td
=
f
.
select
(
:assignee_id
,
@project
.
users
.
all
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
:include_blank
=>
"Select user"
},
:style
=>
"width:250px"
)
.input
=
f
.
select
(
:assignee_id
,
@project
.
users
.
all
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
:include_blank
=>
"Select user"
},
:style
=>
"width:250px"
)
=
f
.
text_area
:title
,
:style
=>
"width:718px; height:100px"
,
:maxlength
=>
255
%br
.clearfix
%br
=
f
.
label
:title
.merge-tabs
.input
=
f
.
text_area
:title
,
:class
=>
"xlarge"
,
:maxlength
=>
255
,
:rows
=>
5
=
f
.
submit
'Save'
,
:class
=>
"positive-button"
.actions
=
f
.
submit
'Save'
,
:class
=>
"primary btn"
-
if
@merge_request
.
new_record?
=
link_to
project_merge_requests_path
(
@project
),
:class
=>
"btn"
do
Cancel
-
else
=
link_to
project_merge_request_path
(
@project
,
@merge_request
),
:class
=>
"btn"
do
Cancel
-
unless
@merge_request
.
new_record?
-
unless
@merge_request
.
new_record?
.right
.right
=
link_to
'Remove'
,
[
@project
,
@merge_request
],
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"
red-button
"
=
link_to
'Remove'
,
[
@project
,
@merge_request
],
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"
btn danger
"
...
...
app/views/merge_requests/edit.html.haml
View file @
d81f0b78
%h3
=
"Edit merge request
#{
@merge_request
.
id
}
"
%hr
=
render
'form'
=
render
'form'
app/views/merge_requests/new.html.haml
View file @
d81f0b78
%h3
New Merge Request
%hr
=
render
'form'
=
render
'form'
app/views/merge_requests/show.html.haml
View file @
d81f0b78
...
@@ -6,12 +6,24 @@
...
@@ -6,12 +6,24 @@
%span
.label
=
@merge_request
.
target_branch
%span
.label
=
@merge_request
.
target_branch
%span
.right
%span
.right
-
if
can?
(
current_user
,
:admin_project
,
@project
)
||
@merge_request
.
author
==
current_user
-
if
@merge_request
.
closed
=
link_to
'Reopen'
,
project_merge_request_path
(
@project
,
@merge_request
,
:merge_request
=>
{
:closed
=>
false
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"btn"
-
else
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
:merge_request
=>
{
:closed
=>
true
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"btn"
,
:title
=>
"Close merge request"
-
if
can?
(
current_user
,
:admin_project
,
@project
)
||
@merge_request
.
author
==
current_user
-
if
can?
(
current_user
,
:admin_project
,
@project
)
||
@merge_request
.
author
==
current_user
=
link_to
edit_project_merge_request_path
(
@project
,
@merge_request
),
:class
=>
"btn small"
do
=
link_to
edit_project_merge_request_path
(
@project
,
@merge_request
),
:class
=>
"btn small"
do
Edit Merge Request
Edit
%hr
%hr
-
if
@merge_request
.
closed
.alert-message.error
Closed
-
else
.alert-message.success
Open
%div
%div
.well
%div
%span
.entity-info
%span
.entity-info
=
image_tag
gravatar_icon
(
@merge_request
.
author_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
=
image_tag
gravatar_icon
(
@merge_request
.
author_email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding-right:5px;"
%span
.commit-title
%span
.commit-title
...
@@ -24,10 +36,10 @@
...
@@ -24,10 +36,10 @@
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@merge_request
.
assignee
.
id
))
do
=
link_to
project_team_member_path
(
@project
,
@project
.
team_member_by_id
(
@merge_request
.
assignee
.
id
))
do
%span
.author
=
@merge_request
.
assignee_name
%span
.author
=
@merge_request
.
assignee_name
%br
%br
=
@merge_request
.
created_at
.
stamp
(
"Aug 21, 2011 9:23pm"
)
.cgray
=
@merge_request
.
created_at
.
stamp
(
"Aug 21, 2011 9:23pm"
)
%hr
.clearfix
%div
.well
=
simple_format
@merge_request
.
title
%div
=
simple_format
@merge_request
.
title
.tabs
.tabs
...
@@ -41,12 +53,6 @@
...
@@ -41,12 +53,6 @@
=
link_to
"#diffs"
,
"data-url"
=>
diffs_project_merge_request_path
(
@project
,
@merge_request
),
:class
=>
"merge-diffs-tab tab"
do
=
link_to
"#diffs"
,
"data-url"
=>
diffs_project_merge_request_path
(
@project
,
@merge_request
),
:class
=>
"merge-diffs-tab tab"
do
Diff
Diff
-
if
can?
(
current_user
,
:admin_project
,
@project
)
||
@merge_request
.
author
==
current_user
.right
-
if
@merge_request
.
closed
=
link_to
'Reopen'
,
project_merge_request_path
(
@project
,
@merge_request
,
:merge_request
=>
{
:closed
=>
false
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"btn"
-
else
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
:merge_request
=>
{
:closed
=>
true
},
:status_only
=>
true
),
:method
=>
:put
,
:class
=>
"btn"
,
:title
=>
"Close merge request"
%img
{
:src
=>
"/assets/ajax-loader-facebook.gif"
,
:class
=>
"dashboard-loader"
}
%img
{
:src
=>
"/assets/ajax-loader-facebook.gif"
,
:class
=>
"dashboard-loader"
}
.merge-request-notes
.merge-request-notes
...
...
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