BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b8113334
Commit
b8113334
authored
Sep 15, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Highlight voting notes for issues and merge requests
parent
0546b9c6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
3 deletions
+24
-3
notes.scss
app/assets/stylesheets/sections/notes.scss
+13
-0
notes_helper.rb
app/helpers/notes_helper.rb
+8
-0
show.html.haml
app/views/issues/show.html.haml
+1
-1
_show.html.haml
app/views/merge_requests/_show.html.haml
+1
-1
_note.html.haml
app/views/notes/_note.html.haml
+1
-1
No files found.
app/assets/stylesheets/sections/notes.scss
View file @
b8113334
...
@@ -81,6 +81,19 @@
...
@@ -81,6 +81,19 @@
border-top
:
1px
solid
#eee
;
border-top
:
1px
solid
#eee
;
}
}
/* mark vote notes */
.voting_notes
.note
{
padding
:
8px
0
8px
12px
;
&
.upvote
{
padding-left
:
8px
;
border-left
:
4px
solid
#468847
;
}
&
.downvote
{
padding-left
:
8px
;
border-left
:
4px
solid
#B94A48
;
}
}
.notes-status
{
.notes-status
{
margin
:
18px
;
margin
:
18px
;
}
}
...
...
app/helpers/notes_helper.rb
View file @
b8113334
...
@@ -6,4 +6,12 @@ module NotesHelper
...
@@ -6,4 +6,12 @@ module NotesHelper
def
loading_new_notes?
def
loading_new_notes?
params
[
:loading_new
].
present?
params
[
:loading_new
].
present?
end
end
def
note_vote_class
(
note
)
if
note
.
upvote?
"vote upvote"
elsif
note
.
downvote?
"vote downvote"
end
end
end
end
app/views/issues/show.html.haml
View file @
b8113334
...
@@ -61,4 +61,4 @@
...
@@ -61,4 +61,4 @@
=
markdown
@issue
.
description
=
markdown
@issue
.
description
.issue_notes
#notes
=
render
"notes/notes_with_form"
,
tid:
@issue
.
id
,
tt:
"issue"
.issue_notes
.voting_notes
#notes
=
render
"notes/notes_with_form"
,
tid:
@issue
.
id
,
tt:
"issue"
app/views/merge_requests/_show.html.haml
View file @
b8113334
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
%i
.icon-list-alt
%i
.icon-list-alt
Diff
Diff
.merge_request_notes
#notes
{
class:
(
controller
.
action_name
==
'show'
)
?
""
:
"hide"
}
.merge_request_notes
.voting_notes
#notes
{
class:
(
controller
.
action_name
==
'show'
)
?
""
:
"hide"
}
=
render
(
"notes/notes_with_form"
,
tid:
@merge_request
.
id
,
tt:
"merge_request"
)
=
render
(
"notes/notes_with_form"
,
tid:
@merge_request
.
id
,
tt:
"merge_request"
)
.merge-request-diffs
.merge-request-diffs
=
render
"merge_requests/show/diffs"
if
@diffs
=
render
"merge_requests/show/diffs"
if
@diffs
...
...
app/views/notes/_note.html.haml
View file @
b8113334
%li
{
id:
dom_id
(
note
),
class:
"note"
}
%li
{
id:
dom_id
(
note
),
class:
"note
#{note_vote_class(note)}
"
}
=
image_tag
gravatar_icon
(
note
.
author
.
email
),
class:
"avatar s32"
=
image_tag
gravatar_icon
(
note
.
author
.
email
),
class:
"avatar s32"
%div
.note-author
%div
.note-author
%strong
=
note
.
author_name
%strong
=
note
.
author_name
...
...
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