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
a2d188f6
Commit
a2d188f6
authored
Dec 22, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render MR diff full size of screen
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
3eb586c1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
38 deletions
+46
-38
app/assets/stylesheets/sections/merge_requests.scss
app/assets/stylesheets/sections/merge_requests.scss
+0
-4
app/assets/stylesheets/sections/notes.scss
app/assets/stylesheets/sections/notes.scss
+12
-5
app/helpers/notes_helper.rb
app/helpers/notes_helper.rb
+5
-2
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+29
-27
No files found.
app/assets/stylesheets/sections/merge_requests.scss
View file @
a2d188f6
...
@@ -20,16 +20,12 @@
...
@@ -20,16 +20,12 @@
}
}
.merge-request
.merge-request-tabs
{
.merge-request
.merge-request-tabs
{
border-bottom
:
2px
solid
$border_primary
;
margin
:
20px
0
;
margin
:
20px
0
;
li
{
li
{
a
{
a
{
padding
:
15px
40px
;
padding
:
15px
40px
;
font-size
:
14px
;
font-size
:
14px
;
margin-bottom
:
-2px
;
border-bottom
:
2px
solid
$border_primary
;
@include
border-radius
(
0px
);
}
}
}
}
}
}
...
...
app/assets/stylesheets/sections/notes.scss
View file @
a2d188f6
...
@@ -155,19 +155,26 @@ ul.notes {
...
@@ -155,19 +155,26 @@ ul.notes {
}
}
.add-diff-note
{
.add-diff-note
{
background
:
image-url
(
"diff_note_add.png"
)
no-repeat
left
0
;
margin-top
:
-4px
;
border
:
none
;
@include
border-radius
(
40px
);
height
:
22px
;
background
:
#FFF
;
margin-left
:
-65px
;
padding
:
4px
;
font-size
:
16px
;
color
:
$link_color
;
margin-left
:
-60px
;
position
:
absolute
;
position
:
absolute
;
width
:
22px
;
z-index
:
10
;
z-index
:
10
;
transition
:
all
0
.2s
ease
;
// "hide" it by default
// "hide" it by default
opacity
:
0
.0
;
opacity
:
0
.0
;
filter
:
alpha
(
opacity
=
0
);
filter
:
alpha
(
opacity
=
0
);
&
:hover
{
&
:hover
{
font-size
:
24px
;
background
:
$bg_primary
;
color
:
#FFF
;
@include
show-add-diff-note
;
@include
show-add-diff-note
;
}
}
}
}
...
...
app/helpers/notes_helper.rb
View file @
a2d188f6
...
@@ -52,8 +52,11 @@ module NotesHelper
...
@@ -52,8 +52,11 @@ module NotesHelper
discussion_id:
discussion_id
discussion_id:
discussion_id
}
}
button_tag
''
,
class:
'btn add-diff-note js-add-diff-note-button'
,
button_tag
(
class:
'btn add-diff-note js-add-diff-note-button'
,
data:
data
,
title:
'Add a comment to this line'
data:
data
,
title:
'Add a comment to this line'
)
do
content_tag
:i
,
nil
,
class:
'fa fa-comment-o'
end
end
end
def
link_to_reply_diff
(
note
)
def
link_to_reply_diff
(
note
)
...
...
app/views/projects/merge_requests/_show.html.haml
View file @
a2d188f6
...
@@ -26,33 +26,6 @@
...
@@ -26,33 +26,6 @@
=
render
"projects/merge_requests/show/commits"
=
render
"projects/merge_requests/show/commits"
=
render
"projects/merge_requests/show/participants"
=
render
"projects/merge_requests/show/participants"
-
if
@commits
.
present?
%ul
.nav.nav-pills.merge-request-tabs
%li
.notes-tab
{
data:
{
action:
'notes'
}}
=
link_to
project_merge_request_path
(
@project
,
@merge_request
)
do
%i
.fa.fa-comment
Discussion
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
count
%li
.diffs-tab
{
data:
{
action:
'diffs'
}}
=
link_to
diffs_project_merge_request_path
(
@project
,
@merge_request
)
do
%i
.fa.fa-list-alt
Changes
%span
.badge
=
@merge_request
.
diffs
.
size
-
content_for
:note_actions
do
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
@merge_request
.
open?
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-grouped btn-close close-mr-link js-note-target-close"
,
title:
"Close merge request"
-
if
@merge_request
.
closed?
=
link_to
'Reopen'
,
project_merge_request_path
(
@project
,
@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"
.diffs.tab-content
-
if
current_page?
(
action:
'diffs'
)
=
render
"projects/merge_requests/show/diffs"
.notes.tab-content.voting_notes
#notes
{
class:
(
controller
.
action_name
==
'show'
)
?
""
:
"hide"
}
=
render
"projects/notes/notes_with_form"
.mr-loading-status
=
spinner
.col-sm-3
.col-sm-3
.issue-btn-group
.issue-btn-group
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
...
@@ -84,6 +57,35 @@
...
@@ -84,6 +57,35 @@
%cite
.cgray
%cite
.cgray
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
=
render
partial:
'projects/merge_requests/show/context'
,
locals:
{
merge_request:
@merge_request
}
-
if
@commits
.
present?
%ul
.nav.nav-tabs.merge-request-tabs
%li
.notes-tab
{
data:
{
action:
'notes'
}}
=
link_to
project_merge_request_path
(
@project
,
@merge_request
)
do
%i
.fa.fa-comment
Discussion
%span
.badge
=
@merge_request
.
mr_and_commit_notes
.
count
%li
.diffs-tab
{
data:
{
action:
'diffs'
}}
=
link_to
diffs_project_merge_request_path
(
@project
,
@merge_request
)
do
%i
.fa.fa-list-alt
Changes
%span
.badge
=
@merge_request
.
diffs
.
size
-
content_for
:note_actions
do
-
if
can?
(
current_user
,
:modify_merge_request
,
@merge_request
)
-
if
@merge_request
.
open?
=
link_to
'Close'
,
project_merge_request_path
(
@project
,
@merge_request
,
merge_request:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-grouped btn-close close-mr-link js-note-target-close"
,
title:
"Close merge request"
-
if
@merge_request
.
closed?
=
link_to
'Reopen'
,
project_merge_request_path
(
@project
,
@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"
.diffs.tab-content
-
if
current_page?
(
action:
'diffs'
)
=
render
"projects/merge_requests/show/diffs"
.notes.tab-content.voting_notes
#notes
{
class:
(
controller
.
action_name
==
'show'
)
?
""
:
"hide"
}
.row
.col-sm-9
=
render
"projects/notes/notes_with_form"
.mr-loading-status
=
spinner
:javascript
:javascript
...
...
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