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
37d92d0b
Commit
37d92d0b
authored
8 years ago
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 @@
...
@@ -73,18 +73,7 @@
=
render
'shared/milestones/issues_tab'
,
unassigned:
@milestone
.
opened_issues
.
unassigned
,
assigned:
@milestone
.
opened_issues
.
assigned
,
closed:
@milestone
.
closed_issues
=
render
'shared/milestones/issues_tab'
,
unassigned:
@milestone
.
opened_issues
.
unassigned
,
assigned:
@milestone
.
opened_issues
.
assigned
,
closed:
@milestone
.
closed_issues
.tab-pane
#tab-merge-requests
.tab-pane
#tab-merge-requests
.gray-content-block.middle-block
=
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
.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
.tab-pane
#tab-participants
.tab-pane
#tab-participants
.gray-content-block.middle-block
.gray-content-block.middle-block
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/milestones/show.html.haml
View file @
37d92d0b
...
@@ -96,20 +96,7 @@
...
@@ -96,20 +96,7 @@
.tab-pane.active
#tab-issues
.tab-pane.active
#tab-issues
=
render
'shared/milestones/issues_tab'
,
unassigned:
@issues
.
opened
.
unassigned
,
assigned:
@issues
.
opened
.
assigned
,
closed:
@issues
.
closed
=
render
'shared/milestones/issues_tab'
,
unassigned:
@issues
.
opened
.
unassigned
,
assigned:
@issues
.
opened
.
assigned
,
closed:
@issues
.
closed
.tab-pane
#tab-merge-requests
.tab-pane
#tab-merge-requests
.row.prepend-top-default
=
render
'shared/milestones/merge_requests_tab'
,
unassigned:
@merge_requests
.
opened
.
unassigned
,
assigned:
@merge_requests
.
opened
.
assigned
,
closed:
@merge_requests
.
closed
,
merged:
@merge_requests
.
merged
.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
.tab-pane
#tab-participants
.tab-pane
#tab-participants
%ul
.bordered-list
%ul
.bordered-list
-
@users
.
each
do
|
user
|
-
@users
.
each
do
|
user
|
...
...
This diff is collapsed.
Click to expand it.
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
)
}
%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
%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}
%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
.pull-right.assignee-icon
-
if
merge_request
.
assignee
-
if
merge_request
.
assignee
=
image_tag
avatar_icon
(
merge_request
.
assignee
,
16
),
class:
"avatar s16"
,
alt:
''
=
image_tag
avatar_icon
(
merge_request
.
assignee
,
16
),
class:
"avatar s16"
,
alt:
''
This diff is collapsed.
Click to expand it.
app/views/
projects
/milestones/_merge_requests.html.haml
→
app/views/
shared
/milestones/_merge_requests.html.haml
View file @
37d92d0b
...
@@ -2,4 +2,4 @@
...
@@ -2,4 +2,4 @@
.panel-heading
=
title
.panel-heading
=
title
%ul
{
class:
"well-list merge_requests-sortable-list"
,
id:
"merge_requests-list-#{id}"
,
"data-state"
=>
id
}
%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
|
-
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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