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
3b4c4dd7
Commit
3b4c4dd7
authored
Mar 30, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Logged out box
parent
0581df29
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
49 deletions
+28
-49
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+1
-2
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+13
-31
app/views/projects/notes/_edit_form.html.haml
app/views/projects/notes/_edit_form.html.haml
+3
-2
app/views/projects/notes/_notes_with_form.html.haml
app/views/projects/notes/_notes_with_form.html.haml
+11
-14
No files found.
app/assets/javascripts/notes.js.coffee
View file @
3b4c4dd7
...
@@ -501,7 +501,6 @@ class @Notes
...
@@ -501,7 +501,6 @@ class @Notes
addDiffNote
:
(
e
)
=>
addDiffNote
:
(
e
)
=>
e
.
preventDefault
()
e
.
preventDefault
()
link
=
e
.
currentTarget
link
=
e
.
currentTarget
form
=
$
(
".js-new-note-form"
)
row
=
$
(
link
).
closest
(
"tr"
)
row
=
$
(
link
).
closest
(
"tr"
)
nextRow
=
row
.
next
()
nextRow
=
row
.
next
()
hasNotes
=
nextRow
.
is
(
".notes_holder"
)
hasNotes
=
nextRow
.
is
(
".notes_holder"
)
...
@@ -533,7 +532,7 @@ class @Notes
...
@@ -533,7 +532,7 @@ class @Notes
addForm
=
true
addForm
=
true
if
addForm
if
addForm
newForm
=
form
.
clone
()
newForm
=
@
formClone
.
clone
()
newForm
.
appendTo
row
.
next
().
find
(
targetContent
)
newForm
.
appendTo
row
.
next
().
find
(
targetContent
)
# show the form
# show the form
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
3b4c4dd7
...
@@ -195,39 +195,21 @@
...
@@ -195,39 +195,21 @@
line-height
:
31px
;
line-height
:
31px
;
}
}
.disabled-comment-area
{
.disabled-comment
{
padding
:
16px
0
;
margin-left
:
-
$gl-padding-top
;
margin-right
:
-
$gl-padding-top
;
.disabled-profile
{
background-color
:
$gray-light
;
width
:
40px
;
border-radius
:
$border-radius-base
;
height
:
40px
;
background
:
$border-gray-dark
;
border-radius
:
20px
;
display
:
inline-block
;
margin-right
:
10px
;
}
.disabled-comment
{
background
:
$gray-light
;
display
:
inline-block
;
vertical-align
:
top
;
height
:
200px
;
border-radius
:
4px
;
border
:
1px
solid
$border-gray-normal
;
border
:
1px
solid
$border-gray-normal
;
padding-top
:
90px
;
text-align
:
center
;
right
:
20px
;
position
:
absolute
;
left
:
70px
;
margin-bottom
:
20px
;
span
{
color
:
#b2b2b2
;
color
:
#b2b2b2
;
line-height
:
200px
;
a
{
.disabled-comment-text
{
color
:
$md-link-color
;
line-height
:
normal
;
}
}
}
a
{
color
:
$gl-link-color
;
}
}
}
}
...
...
app/views/projects/notes/_edit_form.html.haml
View file @
3b4c4dd7
.note-edit-form
.note-edit-form
=
form_for
note
,
url:
namespace_project_note_path
(
@project
.
namespace
,
@project
,
note
),
method: :put
,
remote:
true
,
authenticity_token:
true
,
html:
{
class:
'edit-note js-quick-submit'
}
do
|
f
|
=
form_for
note
,
url:
namespace_project_note_path
(
@project
.
namespace
,
@project
,
note
),
method: :put
,
remote:
true
,
authenticity_token:
true
,
html:
{
class:
'edit-note
common-note-form
js-quick-submit'
}
do
|
f
|
=
note_target_fields
(
note
)
=
note_target_fields
(
note
)
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
'md-preview'
}
do
=
render
layout:
'projects/md_preview'
,
locals:
{
preview_class:
'md-preview'
}
do
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
classes:
'note-textarea js-note-text js-task-list-field'
=
render
'projects/zen'
,
f:
f
,
attr: :note
,
classes:
'note-textarea js-note-text js-task-list-field'
...
@@ -7,4 +7,5 @@
...
@@ -7,4 +7,5 @@
.note-form-actions.clearfix
.note-form-actions.clearfix
=
f
.
submit
'Save Comment'
,
class:
'btn btn-nr btn-save btn-grouped js-comment-button'
=
f
.
submit
'Save Comment'
,
class:
'btn btn-nr btn-save btn-grouped js-comment-button'
=
link_to
'Cancel'
,
'#'
,
class:
'btn btn-nr btn-cancel note-edit-cancel'
%button
.btn.btn-nr.btn-cancel.note-edit-cancel
{
type:
'button'
}
Cancel
app/views/projects/notes/_notes_with_form.html.haml
View file @
3b4c4dd7
...
@@ -2,18 +2,15 @@
...
@@ -2,18 +2,15 @@
=
render
"projects/notes/notes"
=
render
"projects/notes/notes"
%ul
.notes.timeline
%ul
.notes.timeline
%li
.timeline-entry
%li
.timeline-entry
.timeline-icon.hidden-xs.hidden-sm
-
if
can?
current_user
,
:create_note
,
@project
-
if
can?
current_user
,
:create_note
,
@project
.timeline-icon.hidden-xs.hidden-sm
%a
.author_link
{
href:
user_path
(
current_user
)
}
%a
.author_link
{
href:
user_path
(
current_user
)
}
=
image_tag
avatar_icon
(
current_user
),
alt:
current_user
.
to_reference
,
class:
'avatar s40'
=
image_tag
avatar_icon
(
current_user
),
alt:
current_user
.
to_reference
,
class:
'avatar s40'
.timeline-content.timeline-content-form
.timeline-content.timeline-content-form
-
if
can?
current_user
,
:create_note
,
@project
=
render
"projects/notes/form"
,
view:
diff_view
=
render
"projects/notes/form"
,
view:
diff_view
-
else
-
else
.disabled-comment-area
.disabled-comment.text-center
.disabled-profile
.disabled-comment-text.inline
.disabled-comment
%span
Please
Please
=
link_to
"register"
,
new_user_session_path
=
link_to
"register"
,
new_user_session_path
or
or
...
...
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