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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f66454be
Commit
f66454be
authored
Dec 08, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add indication to merge request list item that MR cannot be merged automatically
parent
792f2bbe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
27 deletions
+61
-27
app/assets/stylesheets/framework/lists.scss
app/assets/stylesheets/framework/lists.scss
+18
-0
app/models/merge_request.rb
app/models/merge_request.rb
+4
-0
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+14
-11
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+25
-16
No files found.
app/assets/stylesheets/framework/lists.scss
View file @
f66454be
...
...
@@ -124,6 +124,24 @@ ul.content-list {
padding
:
10px
14px
;
}
}
ul
.controls
{
list-style
:
none
;
li
{
float
:
left
;
padding-right
:
10px
;
.author_link
{
display
:
inline-block
;
.avatar-inline
{
margin-left
:
0
;
margin-right
:
0
;
}
}
}
}
}
}
...
...
app/models/merge_request.rb
View file @
f66454be
...
...
@@ -484,4 +484,8 @@ class MergeRequest < ActiveRecord::Base
source_project
.
ci_commit
(
last_commit
.
id
)
end
end
def
broken?
self
.
commits
.
blank?
||
branch_missing?
||
cannot_be_merged?
end
end
app/views/projects/issues/_issue.html.haml
View file @
f66454be
...
...
@@ -6,23 +6,26 @@
.issue-title
%span
.issue-title-text
=
link_to_gfm
issue
.
title
,
issue_path
(
issue
),
class:
"row_title"
.pull-right
.light
%ul
.controls
.light
-
if
issue
.
closed?
%
span
%
li
CLOSED
-
if
issue
.
assignee
=
link_to_member
(
@project
,
issue
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
%li
=
link_to_member
(
@project
,
issue
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
-
note_count
=
issue
.
notes
.
user
.
count
-
if
note_count
>
0
=
link_to
issue_path
(
issue
)
+
"#notes"
do
=
icon
(
'comments'
)
=
note_count
%li
=
link_to
issue_path
(
issue
)
+
"#notes"
do
=
icon
(
'comments'
)
=
note_count
-
else
=
link_to
issue_path
(
issue
)
+
"#notes"
,
class:
"issue-no-comments"
do
=
icon
(
'comments'
)
=
0
%li
=
link_to
issue_path
(
issue
)
+
"#notes"
,
class:
"issue-no-comments"
do
=
icon
(
'comments'
)
=
notes_count
.issue-info
#{
issue
.
to_reference
}
·
...
...
app/views/projects/merge_requests/_merge_request.html.haml
View file @
f66454be
...
...
@@ -3,31 +3,40 @@
.merge-request-title
%span
.merge-request-title-text
=
link_to_gfm
merge_request
.
title
,
merge_request_path
(
merge_request
),
class:
"row_title"
.pull-right.light
-
if
ci_commit
=
render_ci_status
(
ci_commit
)
%ul
.controls.light
-
if
merge_request
.
merged?
%
span
%
li
=
icon
(
'check'
)
MERGED
-
elsif
merge_request
.
closed?
%
span
%
li
=
icon
(
'ban'
)
CLOSED
-
note_count
=
merge_request
.
mr_and_commit_notes
.
user
.
count
-
if
ci_commit
%li
=
render_ci_status
(
ci_commit
)
-
if
merge_request
.
open?
&&
merge_request
.
broken?
%li
=
link_to
merge_request_path
(
merge_request
),
class:
"has_tooltip"
,
title:
"Cannot be merged automatically"
,
data:
{
container:
'body'
}
do
=
icon
(
'exclamation-triangle'
)
-
if
merge_request
.
assignee
=
link_to_member
(
merge_request
.
source_project
,
merge_request
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
%li
=
link_to_member
(
merge_request
.
source_project
,
merge_request
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
-
note_count
=
merge_request
.
mr_and_commit_notes
.
user
.
count
-
if
note_count
>
0
=
link_to
merge_request_path
(
merge_request
)
+
"#notes"
do
=
icon
(
'comments'
)
=
note_count
%li
=
link_to
merge_request_path
(
merge_request
)
+
"#notes"
do
=
icon
(
'comments'
)
=
note_count
-
else
=
link_to
merge_request_path
(
merge_request
)
+
"#notes"
,
class:
"merge-request-no-comments"
do
=
icon
(
'comments'
)
=
0
%li
=
link_to
merge_request_path
(
merge_request
)
+
"#notes"
,
class:
"merge-request-no-comments"
do
=
icon
(
'comments'
)
=
note_count
.merge-request-info
\##{merge_request.iid}
·
...
...
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