mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 11:37:14 +00:00
Replaces activity events icons with SVG icons (#23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@23020 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4bc9306d4b
commit
59323aecf2
@ -336,7 +336,7 @@
|
||||
<symbol viewBox="0 0 512 512" id="icon--warning">
|
||||
<path d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32m0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24m32 224a32 32 0 1 0-64 0a32 32 0 1 0 64 0"/>
|
||||
</symbol>
|
||||
<symbol viewBox="0 0 448 512" id="icon--wiki-edit">
|
||||
<symbol viewBox="0 0 448 512" id="icon--wiki-page">
|
||||
<path d="M96 0C43 0 0 43 0 96v320c0 53 43 96 96 96h320c17.7 0 32-14.3 32-32s-14.3-32-32-32v-64c17.7 0 32-14.3 32-32V32c0-17.7-14.3-32-32-32zm0 384h256v64H96c-17.7 0-32-14.3-32-32s14.3-32 32-32m32-240c0-8.8 7.2-16 16-16h192c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16m16 48h192c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16s7.2-16 16-16"/>
|
||||
</symbol>
|
||||
<symbol viewBox="0 0 640 512" id="icon--workflows">
|
||||
|
||||
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
@ -1703,7 +1703,7 @@ span.icon-label {
|
||||
.icon-help:not(:has(svg)) { background-image: url(/help.png); }
|
||||
.icon-attachment:not(:has(svg)) { background-image: url(/attachment.png); }
|
||||
.icon-history:not(:has(svg)) { background-image: url(/history.png); }
|
||||
.icon-time-entry, .icon-time:not(:has(svg)) { background-image: url(/time.png); }
|
||||
.icon-time-entry:not(:has(svg)), .icon-time:not(:has(svg)) { background-image: url(/time.png); }
|
||||
.icon-time-add:not(:has(svg)) { background-image: url(/time_add.png); }
|
||||
.icon-stats:not(:has(svg)) { background-image: url(/stats.png); }
|
||||
.icon-warning { background-image: url(/warning.png); }
|
||||
@ -1736,18 +1736,18 @@ span.icon-label {
|
||||
.icon-settings:not(:has(svg)) { background-image: url(/changeset.png); }
|
||||
.icon-group:not(:has(svg)),.icon-groupnonmember, .icon-groupanonymous { background-image: url(/group.png); }
|
||||
.icon-roles { background-image: url(/database_key.png); }
|
||||
.icon-issue-edit { background-image: url(/ticket_edit.png); }
|
||||
.icon-issue-edit:not(:has(svg)) { background-image: url(/ticket_edit.png); }
|
||||
.icon-workflows { background-image: url(/ticket_go.png); }
|
||||
.icon-custom-fields { background-image: url(/textfield.png); }
|
||||
.icon-plugins { background-image: url(/plugin.png); }
|
||||
.icon-news:not(:has(svg)) { background-image: url(/news.png); }
|
||||
.icon-issue-closed { background-image: url(/ticket_checked.png); }
|
||||
.icon-issue-note { background-image: url(/ticket_note.png); }
|
||||
.icon-changeset { background-image: url(/changeset.png); }
|
||||
.icon-message { background-image: url(/message.png); }
|
||||
.icon-reply { background-image: url(/comments.png); }
|
||||
.icon-wiki-page { background-image: url(/wiki_edit.png); }
|
||||
.icon-document { background-image: url(/document.png); }
|
||||
.icon-issue-closed:not(:has(svg)) { background-image: url(/ticket_checked.png); }
|
||||
.icon-issue-note:not(:has(svg)) { background-image: url(/ticket_note.png); }
|
||||
.icon-changeset:not(:has(svg)) { background-image: url(/changeset.png); }
|
||||
.icon-message:not(:has(svg)) { background-image: url(/message.png); }
|
||||
.icon-reply:not(:has(svg)) { background-image: url(/comments.png); }
|
||||
.icon-wiki-page:not(:has(svg)) { background-image: url(/wiki_edit.png); }
|
||||
.icon-document:not(:has(svg)) { background-image: url(/document.png); }
|
||||
.icon-add-bullet { background-image: url(/bullet_add.png); }
|
||||
.icon-shared { background-image: url(/link.png); }
|
||||
.icon-actions:not(:has(svg)) { background-image: url(/3_bullets.png); }
|
||||
|
||||
@ -36,6 +36,21 @@ module IconsHelper
|
||||
end
|
||||
end
|
||||
|
||||
def icon_for_event_type(event_type)
|
||||
icon = case event_type
|
||||
when 'reply', 'issue-note'
|
||||
'comments'
|
||||
when 'time-entry'
|
||||
'time'
|
||||
when 'message'
|
||||
'comment'
|
||||
else
|
||||
event_type
|
||||
end
|
||||
|
||||
sprite_icon icon
|
||||
end
|
||||
|
||||
def sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE)
|
||||
sprite_path = "#{sprite}.svg"
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
<dl>
|
||||
<% sort_activity_events(events_by_day[day]).each do |e, in_group| -%>
|
||||
<dt class="<%= e.event_type %> icon icon-<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
|
||||
<%= icon_for_event_type e.event_type %>
|
||||
<%= avatar(e.event_author) if e.respond_to?(:event_author) %>
|
||||
<span class="time"><%= format_time(e.event_datetime, false) %></span>
|
||||
<%= content_tag('span', e.project, :class => 'project') if @project.nil? || @project != e.project %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user