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
fd2f907b
Commit
fd2f907b
authored
Aug 07, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move command line insturction out of mr widget
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
3cf4a981
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
46 deletions
+30
-46
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+2
-15
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+10
-0
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+18
-23
app/views/projects/merge_requests/widget/_open.html.haml
app/views/projects/merge_requests/widget/_open.html.haml
+0
-8
No files found.
app/assets/stylesheets/pages/merge_requests.scss
View file @
fd2f907b
...
@@ -115,23 +115,10 @@
...
@@ -115,23 +115,10 @@
}
}
.label-branch
{
.label-branch
{
@include
border-radius
(
4px
);
color
:
#222
;
padding
:
3px
4px
;
border
:
none
;
background
:
$hover
;
color
:
#333
;
font-family
:
$monospace_font
;
font-family
:
$monospace_font
;
font-weight
:
normal
;
font-weight
:
bold
;
overflow
:
hidden
;
overflow
:
hidden
;
.label-project
{
@include
border-radius-left
(
4px
);
padding
:
3px
4px
;
background
:
#279
;
position
:
relative
;
left
:
-4px
;
letter-spacing
:
-1px
;
}
}
}
.mr-list
{
.mr-list
{
...
...
app/helpers/merge_requests_helper.rb
View file @
fd2f907b
...
@@ -61,4 +61,14 @@ module MergeRequestsHelper
...
@@ -61,4 +61,14 @@ module MergeRequestsHelper
}
}
)
)
end
end
def
source_branch_with_namespace
(
merge_request
)
if
merge_request
.
for_fork?
namespace
=
link_to
(
merge_request
.
source_project_namespace
,
project_path
(
merge_request
.
source_project
))
namespace
+
":
#{
merge_request
.
source_branch
}
"
else
merge_request
.
source_branch
end
end
end
end
app/views/projects/merge_requests/_show.html.haml
View file @
fd2f907b
...
@@ -6,30 +6,25 @@
...
@@ -6,30 +6,25 @@
=
render
"projects/merge_requests/show/mr_box"
=
render
"projects/merge_requests/show/mr_box"
%hr
%hr
.append-bottom-20
.append-bottom-20
.slead
-
if
@merge_request
.
open?
%span
From
.btn-group.btn-group-sm.pull-right
-
if
@merge_request
.
for_fork?
%a
.btn.btn-sm.dropdown-toggle
{
data:
{
toggle: :dropdown
}
}
%strong
.label-branch
<
=
icon
(
'download'
)
-
if
@merge_request
.
source_project
Download as
=
link_to
@merge_request
.
source_project_namespace
,
namespace_project_path
(
@merge_request
.
source_project
.
namespace
,
@merge_request
.
source_project
)
%span
.caret
-
else
%ul
.dropdown-menu
\
#{
@merge_request
.
source_project_namespace
}
%li
=
link_to
"Email Patches"
,
merge_request_path
(
@merge_request
,
format: :patch
)
\
:
#{
@merge_request
.
source_branch
}
%li
=
link_to
"Plain Diff"
,
merge_request_path
(
@merge_request
,
format: :diff
)
.light
%div
%span
From
%span
.label-branch
#{
source_branch_with_namespace
(
@merge_request
)
}
%span
into
%span
into
%strong
.label-branch
#{
@merge_request
.
target_project_namespace
}
:
#{
@merge_request
.
target_branch
}
%span
.label-branch
#{
@merge_request
.
target_branch
}
-
else
-
if
@merge_request
.
open?
&&
!
@merge_request
.
branch_missing?
%strong
.label-branch
#{
@merge_request
.
source_branch
}
%div
%span
into
If you want to try or merge this request manually, you can use the
%strong
.label-branch
#{
@merge_request
.
target_branch
}
=
link_to
"command line"
,
"#modal_merge_info"
,
class:
"how_to_merge_link vlink"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
-
if
@merge_request
.
open?
.btn-group.btn-group-sm.pull-right
%a
.btn.btn-sm.dropdown-toggle
{
data:
{
toggle: :dropdown
}
}
=
icon
(
'download'
)
Download
as
%span
.caret
%ul
.dropdown-menu
%li
=
link_to
"Email Patches"
,
merge_request_path
(
@merge_request
,
format: :patch
)
%li
=
link_to
"Plain Diff"
,
merge_request_path
(
@merge_request
,
format: :diff
)
=
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"
...
...
app/views/projects/merge_requests/widget/_open.html.haml
View file @
fd2f907b
...
@@ -18,14 +18,6 @@
...
@@ -18,14 +18,6 @@
-
elsif
@merge_request
.
can_be_merged?
-
elsif
@merge_request
.
can_be_merged?
=
render
'projects/merge_requests/widget/open/accept'
=
render
'projects/merge_requests/widget/open/accept'
-
unless
@merge_request
.
branch_missing?
.mr-widget-footer
=
icon
(
'info-circle'
)
If you want to try or merge this request manually, you can use the
%strong
=
link_to
"command line"
,
"#modal_merge_info"
,
class:
"how_to_merge_link vlink"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
-
if
@closes_issues
.
present?
-
if
@closes_issues
.
present?
.mr-widget-footer
.mr-widget-footer
%span
%span
...
...
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