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
Boxiang Sun
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
addDiffNote
:
(
e
)
=>
e
.
preventDefault
()
link
=
e
.
currentTarget
form
=
$
(
".js-new-note-form"
)
row
=
$
(
link
).
closest
(
"tr"
)
nextRow
=
row
.
next
()
hasNotes
=
nextRow
.
is
(
".notes_holder"
)
...
...
@@ -533,7 +532,7 @@ class @Notes
addForm
=
true
if
addForm
newForm
=
form
.
clone
()
newForm
=
@
formClone
.
clone
()
newForm
.
appendTo
row
.
next
().
find
(
targetContent
)
# show the form
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
3b4c4dd7
...
...
@@ -195,39 +195,21 @@
line-height
:
31px
;
}
.disabled-comment-area
{
padding
:
16px
0
;
.disabled-profile
{
width
:
40px
;
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
;
.disabled-comment
{
margin-left
:
-
$gl-padding-top
;
margin-right
:
-
$gl-padding-top
;
background-color
:
$gray-light
;
border-radius
:
$border-radius-base
;
border
:
1px
solid
$border-gray-normal
;
padding-top
:
90px
;
text-align
:
center
;
right
:
20px
;
position
:
absolute
;
left
:
70px
;
margin-bottom
:
20px
;
span
{
color
:
#b2b2b2
;
line-height
:
200px
;
a
{
color
:
$md-link-color
;
}
.disabled-comment-text
{
line-height
:
normal
;
}
a
{
color
:
$gl-link-color
;
}
}
...
...
app/views/projects/notes/_edit_form.html.haml
View file @
3b4c4dd7
.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
)
=
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'
...
...
@@ -7,4 +7,5 @@
.note-form-actions.clearfix
=
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 @@
=
render
"projects/notes/notes"
%ul
.notes.timeline
%li
.timeline-entry
.timeline-icon.hidden-xs.hidden-sm
-
if
can?
current_user
,
:create_note
,
@project
.timeline-icon.hidden-xs.hidden-sm
%a
.author_link
{
href:
user_path
(
current_user
)
}
=
image_tag
avatar_icon
(
current_user
),
alt:
current_user
.
to_reference
,
class:
'avatar s40'
.timeline-content.timeline-content-form
-
if
can?
current_user
,
:create_note
,
@project
=
render
"projects/notes/form"
,
view:
diff_view
-
else
.disabled-comment-area
.disabled-profile
.disabled-comment
%span
.disabled-comment.text-center
.disabled-comment-text.inline
Please
=
link_to
"register"
,
new_user_session_path
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