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
32e4a0f3
Commit
32e4a0f3
authored
Mar 31, 2017
by
Annabel Dunstone Gray
Committed by
Jacob Schatz
Apr 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add system notes icon helper; add icons
parent
d2aea4cd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
14 deletions
+41
-14
app/assets/stylesheets/pages/notes.scss
app/assets/stylesheets/pages/notes.scss
+0
-12
app/helpers/system_note_helper.rb
app/helpers/system_note_helper.rb
+28
-0
app/views/projects/notes/_note.html.haml
app/views/projects/notes/_note.html.haml
+7
-2
app/views/shared/icons/_icon_closed.svg
app/views/shared/icons/_icon_closed.svg
+1
-0
app/views/shared/icons/_icon_merge.svg
app/views/shared/icons/_icon_merge.svg
+1
-0
app/views/shared/icons/_icon_merged.svg
app/views/shared/icons/_icon_merged.svg
+1
-0
app/views/shared/icons/_icon_opened.svg
app/views/shared/icons/_icon_opened.svg
+1
-0
app/views/shared/icons/_icon_pencil.svg
app/views/shared/icons/_icon_pencil.svg
+1
-0
app/views/shared/icons/_icon_user.svg
app/views/shared/icons/_icon_user.svg
+1
-0
No files found.
app/assets/stylesheets/pages/notes.scss
View file @
32e4a0f3
...
...
@@ -130,18 +130,6 @@ ul.notes {
}
}
}
.timeline-icon
{
display
:
none
;
.avatar
{
visibility
:
hidden
;
.discussion-body
&
{
visibility
:
visible
;
}
}
}
}
.discussion-body
{
...
...
app/helpers/system_note_helper.rb
0 → 100644
View file @
32e4a0f3
module
SystemNoteHelper
def
icon_for_system_note
(
note
)
icon_name
=
case
note
.
system_note_metadata
.
action
when
'commit'
'icon_commit'
when
'merge'
'icon_merge'
when
'merged'
'icon_merged'
when
'opened'
'icon_opened'
when
'closed'
'icon_closed'
when
'time_tracking'
'icon_timer'
when
'assignee'
'icon_user'
when
'title'
'icon_pencil'
else
'icon_status_canceled'
end
custom_icon
(
icon_name
)
end
end
app/views/projects/notes/_note.html.haml
View file @
32e4a0f3
...
...
@@ -5,8 +5,13 @@
%li
.timeline-entry
{
id:
dom_id
(
note
),
class:
[
"note"
,
"note-row-#{note.id}"
,
(
'system-note'
if
note
.
system
)],
data:
{
author_id:
note
.
author
.
id
,
editable:
note_editable
,
note_id:
note
.
id
}
}
.timeline-entry-inner
.timeline-icon
%a
{
href:
user_path
(
note
.
author
)
}
=
image_tag
avatar_icon
(
note
.
author
),
alt:
''
,
class:
'avatar s40'
-
if
note
.
system
-# = render "#{note.system_note_metadata.action}.svg"
=
icon_for_system_note
(
note
)
%h1
=
note
.
system_note_metadata
.
action
.
inspect
-
else
%a
{
href:
user_path
(
note
.
author
)
}
=
image_tag
avatar_icon
(
note
.
author
),
alt:
''
,
class:
'avatar s40'
.timeline-content
.note-header
%a
.visible-xs
{
href:
user_path
(
note
.
author
)
}
...
...
app/views/shared/icons/_icon_closed.svg
0 → 100644
View file @
32e4a0f3
<svg
width=
"14"
height=
"14"
viewBox=
"0 0 14 14"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M0 7c0-3.866 3.142-7 7-7 3.866 0 7 3.142 7 7 0 3.866-3.142 7-7 7-3.866 0-7-3.142-7-7z"
/><path
d=
"M1 7c0 3.309 2.69 6 6 6 3.309 0 6-2.69 6-6 0-3.309-2.69-6-6-6-3.309 0-6 2.69-6 6z"
fill=
"#FFF"
/><rect
x=
"3.36"
y=
"6.16"
width=
"7.28"
height=
"1.68"
rx=
".84"
/></svg>
app/views/shared/icons/_icon_merge.svg
0 → 100644
View file @
32e4a0f3
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 16 16"
><path
d=
"m5 5.563v4.875c1.024.4 1.75 1.397 1.75 2.563 0 1.519-1.231 2.75-2.75 2.75-1.519 0-2.75-1.231-2.75-2.75 0-1.166.726-2.162 1.75-2.563v-4.875c-1.024-.4-1.75-1.397-1.75-2.563 0-1.519 1.231-2.75 2.75-2.75 1.519 0 2.75 1.231 2.75 2.75 0 1.166-.726 2.162-1.75 2.563m-1 8.687c.69 0 1.25-.56 1.25-1.25 0-.69-.56-1.25-1.25-1.25-.69 0-1.25.56-1.25 1.25 0 .69.56 1.25 1.25 1.25m0-10c.69 0 1.25-.56 1.25-1.25 0-.69-.56-1.25-1.25-1.25-.69 0-1.25.56-1.25 1.25 0 .69.56 1.25 1.25 1.25"
/><path
d=
"m10.501 2c1.381.001 2.499 1.125 2.499 2.506v5.931c1.024.4 1.75 1.397 1.75 2.563 0 1.519-1.231 2.75-2.75 2.75-1.519 0-2.75-1.231-2.75-2.75 0-1.166.726-2.162 1.75-2.563v-5.931c0-.279-.225-.506-.499-.506v.926c0 .346-.244.474-.569.271l-2.952-1.844c-.314-.196-.325-.507 0-.71l2.952-1.844c.314-.196.569-.081.569.271v.93m1.499 12.25c.69 0 1.25-.56 1.25-1.25 0-.69-.56-1.25-1.25-1.25-.69 0-1.25.56-1.25 1.25 0 .69.56 1.25 1.25 1.25"
/></svg>
\ No newline at end of file
app/views/shared/icons/_icon_merged.svg
0 → 100644
View file @
32e4a0f3
<svg
width=
"14"
height=
"14"
viewBox=
"0 0 14 14"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M0 7c0-3.866 3.142-7 7-7 3.866 0 7 3.142 7 7 0 3.866-3.142 7-7 7-3.866 0-7-3.142-7-7z"
/><path
d=
"M1 7c0 3.309 2.69 6 6 6 3.309 0 6-2.69 6-6 0-3.309-2.69-6-6-6-3.309 0-6 2.69-6 6z"
fill=
"#FFF"
/><path
d=
"M9.427 6.523a.932.932 0 0 0-.808.489v-.01c-.49-.01-1.059-.172-1.46-.489-.35-.278-.7-.772-.882-1.17a.964.964 0 0 0 .35-.744.943.943 0 0 0-.934-.959c-.518 0-.933.432-.933.964 0 .35.191.662.467.825v3.147a.97.97 0 0 0-.467.825c0 .532.415.959.933.959a.943.943 0 0 0 .934-.96.965.965 0 0 0-.467-.824V6.844c.313.336.672.61 1.073.81.402.202.948.303 1.386.308v-.01c.168.293.467.49.808.49a.943.943 0 0 0 .933-.96.943.943 0 0 0-.933-.96z"
/></svg>
app/views/shared/icons/_icon_opened.svg
0 → 100644
View file @
32e4a0f3
<svg
width=
"14"
height=
"14"
viewBox=
"0 0 14 14"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M0 7c0-3.866 3.142-7 7-7 3.866 0 7 3.142 7 7 0 3.866-3.142 7-7 7-3.866 0-7-3.142-7-7z"
/><path
d=
"M1 7c0 3.309 2.69 6 6 6 3.309 0 6-2.69 6-6 0-3.309-2.69-6-6-6-3.309 0-6 2.69-6 6z"
fill=
"#FFF"
/><path
d=
"M7 9.219a2.218 2.218 0 1 0 0-4.436A2.218 2.218 0 0 0 7 9.22zm0 1.12a3.338 3.338 0 1 1 0-6.676 3.338 3.338 0 0 1 0 6.676z"
/></svg>
app/views/shared/icons/_icon_pencil.svg
0 → 100644
View file @
32e4a0f3
<svg
width=
"1792"
height=
"1792"
viewBox=
"0 0 1792 1792"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"
/></svg>
\ No newline at end of file
app/views/shared/icons/_icon_user.svg
0 → 100644
View file @
32e4a0f3
<svg
width=
"1792"
height=
"1792"
viewBox=
"0 0 1792 1792"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M1600 1405q0 120-73 189.5t-194 69.5h-874q-121 0-194-69.5t-73-189.5q0-53 3.5-103.5t14-109 26.5-108.5 43-97.5 62-81 85.5-53.5 111.5-20q9 0 42 21.5t74.5 48 108 48 133.5 21.5 133.5-21.5 108-48 74.5-48 42-21.5q61 0 111.5 20t85.5 53.5 62 81 43 97.5 26.5 108.5 14 109 3.5 103.5zm-320-893q0 159-112.5 271.5t-271.5 112.5-271.5-112.5-112.5-271.5 112.5-271.5 271.5-112.5 271.5 112.5 112.5 271.5z"
/></svg>
\ No newline at end of file
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