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
iv
gitlab-ce
Commits
c6c24431
Commit
c6c24431
authored
Dec 10, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement new sidebar for merge request page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
aa5bf409
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
82 additions
and
92 deletions
+82
-92
app/assets/stylesheets/framework/common.scss
app/assets/stylesheets/framework/common.scss
+6
-0
app/assets/stylesheets/framework/selects.scss
app/assets/stylesheets/framework/selects.scss
+1
-1
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+0
-4
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+0
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-2
app/views/projects/merge_requests/_discussion.html.haml
app/views/projects/merge_requests/_discussion.html.haml
+1
-21
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+68
-59
app/views/projects/merge_requests/show/_mr_box.html.haml
app/views/projects/merge_requests/show/_mr_box.html.haml
+2
-0
app/views/projects/merge_requests/show/_mr_title.html.haml
app/views/projects/merge_requests/show/_mr_title.html.haml
+2
-2
app/views/projects/merge_requests/update.js.haml
app/views/projects/merge_requests/update.js.haml
+2
-2
No files found.
app/assets/stylesheets/framework/common.scss
View file @
c6c24431
...
@@ -461,3 +461,9 @@ table {
...
@@ -461,3 +461,9 @@ table {
visibility
:
hidden
;
visibility
:
hidden
;
}
}
}
}
.content-separator
{
margin-left
:
-
$gl-padding
;
margin-right
:
-
$gl-padding
;
border-top
:
1px
solid
$border-color
;
}
app/assets/stylesheets/framework/selects.scss
View file @
c6c24431
...
@@ -181,4 +181,4 @@
...
@@ -181,4 +181,4 @@
.ajax-users-dropdown
{
.ajax-users-dropdown
{
min-width
:
250px
!
important
;
min-width
:
250px
!
important
;
}
}
\ No newline at end of file
app/assets/stylesheets/pages/merge_requests.scss
View file @
c6c24431
...
@@ -121,10 +121,6 @@
...
@@ -121,10 +121,6 @@
}
}
}
}
.merge-request-details
{
margin-bottom
:
$gl-padding
;
}
.mr_source_commit
,
.mr_source_commit
,
.mr_target_commit
{
.mr_target_commit
{
.commit
{
.commit
{
...
...
app/controllers/projects/issues_controller.rb
View file @
c6c24431
...
@@ -58,7 +58,6 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -58,7 +58,6 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
def
show
def
show
@participants
=
@issue
.
participants
(
current_user
)
@note
=
@project
.
notes
.
new
(
noteable:
@issue
)
@note
=
@project
.
notes
.
new
(
noteable:
@issue
)
@notes
=
@issue
.
notes
.
nonawards
.
with_associations
.
fresh
@notes
=
@issue
.
notes
.
nonawards
.
with_associations
.
fresh
@noteable
=
@issue
@noteable
=
@issue
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
c6c24431
...
@@ -279,8 +279,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -279,8 +279,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
end
def
define_show_vars
def
define_show_vars
@participants
=
@merge_request
.
participants
(
current_user
)
# Build a note object for comment form
# Build a note object for comment form
@note
=
@project
.
notes
.
new
(
noteable:
@merge_request
)
@note
=
@project
.
notes
.
new
(
noteable:
@merge_request
)
@notes
=
@merge_request
.
mr_and_commit_notes
.
nonawards
.
inc_author
.
fresh
@notes
=
@merge_request
.
mr_and_commit_notes
.
nonawards
.
inc_author
.
fresh
...
...
app/views/projects/merge_requests/_discussion.html.haml
View file @
c6c24431
...
@@ -5,24 +5,4 @@
...
@@ -5,24 +5,4 @@
-
if
@merge_request
.
closed?
-
if
@merge_request
.
closed?
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"btn btn-grouped btn-reopen reopen-mr-link js-note-target-reopen"
,
title:
"Reopen merge request"
=
link_to
'Reopen'
,
merge_request_path
(
@merge_request
,
merge_request:
{
state_event: :reopen
}),
method: :put
,
class:
"btn btn-grouped btn-reopen reopen-mr-link js-note-target-reopen"
,
title:
"Reopen merge request"
=
render
'shared/show_aside'
#notes
=
render
"projects/notes/notes_with_form"
.gray-content-block.middle-block.oneline-block
.row
.col-md-9
.votes-holder.pull-right
#votes
=
render
'votes/votes_block'
,
votable:
@merge_request
=
render
"shared/issuable/participants"
.col-md-3
.input-group.cross-project-reference
%span
#cross-project-reference
.slead.has_tooltip
{
title:
'Cross-project reference'
}
=
cross_project_reference
(
@project
,
@merge_request
)
=
clipboard_button
(
clipboard_target:
'span#cross-project-reference'
)
.row
%section
.col-md-9
.voting_notes
#notes
=
render
"projects/notes/notes_with_form"
%aside
.col-md-3
.issuable-affix
.context
=
render
'shared/issuable/context'
,
issuable:
@merge_request
app/views/projects/merge_requests/_show.html.haml
View file @
c6c24431
...
@@ -7,71 +7,80 @@
...
@@ -7,71 +7,80 @@
.merge-request
{
'data-url'
=>
merge_request_path
(
@merge_request
)}
.merge-request
{
'data-url'
=>
merge_request_path
(
@merge_request
)}
.merge-request-details.issuable-details
.merge-request-details.issuable-details
=
render
"projects/merge_requests/show/mr_title"
=
render
"projects/merge_requests/show/mr_title"
=
render
"projects/merge_requests/show/mr_box"
.row
.append-bottom-default.mr-source-target.prepend-top-default
%section
.col-md-9
-
if
@merge_request
.
open?
=
render
"projects/merge_requests/show/mr_box"
.pull-right
.append-bottom-default.mr-source-target.prepend-top-default
-
if
@merge_request
.
source_branch_exists?
-
if
@merge_request
.
open?
=
link_to
"#modal_merge_info"
,
class:
"btn btn-sm"
,
"data-toggle"
=>
"modal"
do
.pull-right
=
icon
(
'cloud-download fw'
)
-
if
@merge_request
.
source_branch_exists?
Check out branch
=
link_to
"#modal_merge_info"
,
class:
"btn btn-sm"
,
"data-toggle"
=>
"modal"
do
=
icon
(
'cloud-download fw'
)
Check out branch
%span
.dropdown
%span
.dropdown
%a
.btn.btn-sm.dropdown-toggle
{
data:
{
toggle: :dropdown
}
}
%a
.btn.btn-sm.dropdown-toggle
{
data:
{
toggle: :dropdown
}
}
=
icon
(
'download'
)
=
icon
(
'download'
)
Download as
Download as
%span
.caret
%span
.caret
%ul
.dropdown-menu
%ul
.dropdown-menu
%li
=
link_to
"Email Patches"
,
merge_request_path
(
@merge_request
,
format: :patch
)
%li
=
link_to
"Email Patches"
,
merge_request_path
(
@merge_request
,
format: :patch
)
%li
=
link_to
"Plain Diff"
,
merge_request_path
(
@merge_request
,
format: :diff
)
%li
=
link_to
"Plain Diff"
,
merge_request_path
(
@merge_request
,
format: :diff
)
.normal
.normal
%span
Request to merge
%span
Request to merge
%span
.label-branch
=
source_branch_with_namespace
(
@merge_request
)
%span
.label-branch
=
source_branch_with_namespace
(
@merge_request
)
%span
into
%span
into
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@merge_request
.
target_branch
),
class:
"label-branch"
do
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@merge_request
.
target_branch
),
class:
"label-branch"
do
=
@merge_request
.
target_branch
=
@merge_request
.
target_branch
=
render
"projects/merge_requests/show/how_to_merge"
=
render
"projects/merge_requests/show/how_to_merge"
=
render
"projects/merge_requests/widget/show.html.haml"
=
render
"projects/merge_requests/widget/show.html.haml"
-
if
@merge_request
.
open?
&&
@merge_request
.
source_branch_exists?
&&
@merge_request
.
can_be_merged?
&&
@merge_request
.
can_be_merged_by?
(
current_user
)
-
if
@merge_request
.
open?
&&
@merge_request
.
source_branch_exists?
&&
@merge_request
.
can_be_merged?
&&
@merge_request
.
can_be_merged_by?
(
current_user
)
.light.prepend-top-default
.light.prepend-top-default
You can also accept this merge request manually using the
You can also accept this merge request manually using the
=
succeed
'.'
do
=
succeed
'.'
do
=
link_to
"command line"
,
"#modal_merge_info"
,
class:
"how_to_merge_link vlink"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
=
link_to
"command line"
,
"#modal_merge_info"
,
class:
"how_to_merge_link vlink"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
-
if
@commits
.
present?
-
if
@commits
.
present?
%ul
.merge-request-tabs.center-top-menu.no-top.no-bottom
%ul
.merge-request-tabs.center-top-menu.no-top.no-bottom
%li
.notes-tab
%li
.notes-tab
=
link_to
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#notes'
,
action:
'notes'
,
toggle:
'tab'
}
do
=
link_to
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#notes'
,
action:
'notes'
,
toggle:
'tab'
}
do
Discussion
Discussion
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
user
.
count
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
user
.
count
%li
.commits-tab
%li
.commits-tab
=
link_to
commits_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#commits'
,
action:
'commits'
,
toggle:
'tab'
}
do
=
link_to
commits_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#commits'
,
action:
'commits'
,
toggle:
'tab'
}
do
Commits
Commits
%span
.badge
=
@commits
.
size
%span
.badge
=
@commits
.
size
%li
.diffs-tab
%li
.diffs-tab
=
link_to
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#diffs'
,
action:
'diffs'
,
toggle:
'tab'
}
do
=
link_to
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#diffs'
,
action:
'diffs'
,
toggle:
'tab'
}
do
Changes
Changes
%span
.badge
=
@merge_request
.
diffs
.
size
%span
.badge
=
@merge_request
.
diffs
.
size
-
if
@ci_commit
-
if
@ci_commit
%li
.builds-tab
%li
.builds-tab
=
link_to
builds_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'#builds'
,
action:
'builds'
,
toggle:
'tab'
}
do
=
link_to
builds_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'#builds'
,
action:
'builds'
,
toggle:
'tab'
}
do
Builds
Builds
%span
.badge
=
@statuses
.
size
%span
.badge
=
@statuses
.
size
.tab-content
.tab-content
#notes
.notes.tab-pane.voting_notes
#notes
.notes.tab-pane.voting_notes
=
render
"projects/merge_requests/discussion"
.content-separator
#commits
.commits.tab-pane
=
render
"projects/merge_requests/discussion"
-
# This tab is always loaded via AJAX
#commits
.commits.tab-pane
#diffs
.diffs.tab-pane
-
# This tab is always loaded via AJAX
-
# This tab is always loaded via AJAX
#diffs
.diffs.tab-pane
#builds
.builds.tab-pane
-
# This tab is always loaded via AJAX
-
# This tab is always loaded via AJAX
#builds
.builds.tab-pane
-
# This tab is always loaded via AJAX
.mr-loading-status
=
spinner
%aside
.col-md-3
=
render
'shared/issuable/sidebar'
,
issuable:
@merge_request
=
render
'shared/show_aside'
.mr-loading-status
=
spinner
:javascript
:javascript
var
merge_request
;
var
merge_request
;
...
...
app/views/projects/merge_requests/show/_mr_box.html.haml
View file @
c6c24431
...
@@ -10,3 +10,5 @@
...
@@ -10,3 +10,5 @@
=
markdown
(
@merge_request
.
description
,
cache_key:
[
@merge_request
,
"description"
])
=
markdown
(
@merge_request
.
description
,
cache_key:
[
@merge_request
,
"description"
])
%textarea
.hidden.js-task-list-field
%textarea
.hidden.js-task-list-field
=
@merge_request
.
description
=
@merge_request
.
description
=
render
'votes/votes_block'
,
votable:
@merge_request
app/views/projects/merge_requests/show/_mr_title.html.haml
View file @
c6c24431
.
pag
e-title
.
issuabl
e-title
.issue-box
{
class:
issue_box_class
(
@merge_request
)
}
.issue-box
{
class:
issue_box_class
(
@merge_request
)
}
=
@merge_request
.
state_human_name
=
@merge_request
.
state_human_name
%span
.issue-id
Merge Request ##{@merge_request.iid}
%span
.issu
abl
e-id
Merge Request ##{@merge_request.iid}
%span
.creator
%span
.creator
·
·
opened by
#{
link_to_member
(
@project
,
@merge_request
.
author
,
size:
24
)
}
opened by
#{
link_to_member
(
@project
,
@merge_request
.
author
,
size:
24
)
}
...
...
app/views/projects/merge_requests/update.js.haml
View file @
c6c24431
$('.
context').html("
#{
escape_javascript
(
render
'shared/issuable/context
'
,
issuable:
@merge_request
)
}
");
$('.
issuable-sidebar').html("
#{
escape_javascript
(
render
'shared/issuable/sidebar
'
,
issuable:
@merge_request
)
}
");
$('.
context'
).effect('highlight')
$('.
issuable-sidebar').parent(
).effect('highlight')
merge_request = new MergeRequest();
merge_request = new MergeRequest();
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