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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
37d92d0b
Commit
37d92d0b
authored
Feb 23, 2016
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor Merge Requests tab into a custom partial
parent
70028d36
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
29 deletions
+20
-29
app/views/groups/milestones/show.html.haml
app/views/groups/milestones/show.html.haml
+1
-12
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+1
-14
app/views/shared/milestones/_merge_request.html.haml
app/views/shared/milestones/_merge_request.html.haml
+4
-2
app/views/shared/milestones/_merge_requests.html.haml
app/views/shared/milestones/_merge_requests.html.haml
+1
-1
app/views/shared/milestones/_merge_requests_tab.haml
app/views/shared/milestones/_merge_requests_tab.haml
+13
-0
No files found.
app/views/groups/milestones/show.html.haml
View file @
37d92d0b
...
...
@@ -73,18 +73,7 @@
=
render
'shared/milestones/issues_tab'
,
unassigned:
@milestone
.
opened_issues
.
unassigned
,
assigned:
@milestone
.
opened_issues
.
assigned
,
closed:
@milestone
.
closed_issues
.tab-pane
#tab-merge-requests
.gray-content-block.middle-block
.pull-right
=
link_to
'Browse Merge Requests'
,
merge_requests_group_path
(
@group
,
milestone_title:
@milestone
.
title
),
class:
"btn btn-grouped"
.oneline
All merge requests in this milestone
.row.prepend-top-default
.col-md-6
=
render
'merge_requests'
,
title:
"Open"
,
merge_requests:
@milestone
.
opened_merge_requests
.col-md-6
=
render
'merge_requests'
,
title:
"Closed"
,
merge_requests:
@milestone
.
closed_merge_requests
=
render
'shared/milestones/merge_requests_tab'
,
unassigned:
@milestone
.
opened_merge_requests
.
unassigned
,
assigned:
@milestone
.
opened_merge_requests
.
assigned
,
closed:
@milestone
.
closed_merge_requests
,
merged:
@milestone
.
merge_requests
.
merged
.tab-pane
#tab-participants
.gray-content-block.middle-block
...
...
app/views/projects/milestones/show.html.haml
View file @
37d92d0b
...
...
@@ -96,20 +96,7 @@
.tab-pane.active
#tab-issues
=
render
'shared/milestones/issues_tab'
,
unassigned:
@issues
.
opened
.
unassigned
,
assigned:
@issues
.
opened
.
assigned
,
closed:
@issues
.
closed
.tab-pane
#tab-merge-requests
.row.prepend-top-default
.col-md-3
=
render
(
'merge_requests'
,
title:
'Work in progress (open and unassigned)'
,
merge_requests:
@merge_requests
.
opened
.
unassigned
,
id:
'unassigned'
)
.col-md-3
=
render
(
'merge_requests'
,
title:
'Waiting for merge (open and assigned)'
,
merge_requests:
@merge_requests
.
opened
.
assigned
,
id:
'ongoing'
)
.col-md-3
=
render
(
'merge_requests'
,
title:
'Rejected (closed)'
,
merge_requests:
@merge_requests
.
closed
,
id:
'closed'
)
.col-md-3
.panel.panel-primary
.panel-heading
Merged
%ul
.well-list
-
@merge_requests
.
merged
.
each
do
|
merge_request
|
=
render
'merge_request'
,
merge_request:
merge_request
=
render
'shared/milestones/merge_requests_tab'
,
unassigned:
@merge_requests
.
opened
.
unassigned
,
assigned:
@merge_requests
.
opened
.
assigned
,
closed:
@merge_requests
.
closed
,
merged:
@merge_requests
.
merged
.tab-pane
#tab-participants
%ul
.bordered-list
-
@users
.
each
do
|
user
|
...
...
app/views/
projects
/milestones/_merge_request.html.haml
→
app/views/
shared
/milestones/_merge_request.html.haml
View file @
37d92d0b
-
project
=
@project
||
merge_request
.
project
%li
{
id:
dom_id
(
merge_request
,
'sortable'
),
class:
'mr-row'
,
'data-iid'
=>
merge_request
.
iid
,
'data-url'
=>
merge_request_path
(
merge_request
)
}
%span
.str-truncated
=
link_to
[
@project
.
namespace
.
becomes
(
Namespace
),
@
project
,
merge_request
]
do
=
link_to
[
project
.
namespace
.
becomes
(
Namespace
),
project
,
merge_request
]
do
%span
.cgray
##{merge_request.iid}
=
link_to_gfm
merge_request
.
title
,
[
@project
.
namespace
.
becomes
(
Namespace
),
@
project
,
merge_request
],
title:
merge_request
.
title
=
link_to_gfm
merge_request
.
title
,
[
project
.
namespace
.
becomes
(
Namespace
),
project
,
merge_request
],
title:
merge_request
.
title
.pull-right.assignee-icon
-
if
merge_request
.
assignee
=
image_tag
avatar_icon
(
merge_request
.
assignee
,
16
),
class:
"avatar s16"
,
alt:
''
app/views/
projects
/milestones/_merge_requests.html.haml
→
app/views/
shared
/milestones/_merge_requests.html.haml
View file @
37d92d0b
...
...
@@ -2,4 +2,4 @@
.panel-heading
=
title
%ul
{
class:
"well-list merge_requests-sortable-list"
,
id:
"merge_requests-list-#{id}"
,
"data-state"
=>
id
}
-
merge_requests
.
sort_by
(
&
:position
).
each
do
|
merge_request
|
=
render
'merge_request'
,
merge_request:
merge_request
=
render
'
shared/milestones/
merge_request'
,
merge_request:
merge_request
app/views/shared/milestones/_merge_requests_tab.haml
0 → 100644
View file @
37d92d0b
.row.prepend-top-default
.col-md-3
=
render
(
'shared/milestones/merge_requests'
,
title:
'Work in progress (open and unassigned)'
,
merge_requests:
unassigned
,
id:
'unassigned'
)
.col-md-3
=
render
(
'shared/milestones/merge_requests'
,
title:
'Waiting for merge (open and assigned)'
,
merge_requests:
assigned
,
id:
'ongoing'
)
.col-md-3
=
render
(
'shared/milestones/merge_requests'
,
title:
'Rejected (closed)'
,
merge_requests:
closed
,
id:
'closed'
)
.col-md-3
.panel.panel-primary
.panel-heading
Merged
%ul
.well-list
-
merged
.
each
do
|
merge_request
|
=
render
'shared/milestones/merge_request'
,
merge_request:
merge_request
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