diff options
-rw-r--r-- | app/assets/images/icons.svg | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/application.css | 18 | ||||
-rw-r--r-- | app/helpers/icons_helper.rb | 15 | ||||
-rw-r--r-- | app/views/activities/_activities.html.erb | 1 |
4 files changed, 26 insertions, 10 deletions
diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg index c22c19f06..7875ea782 100644 --- a/app/assets/images/icons.svg +++ b/app/assets/images/icons.svg @@ -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"> diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 7e2e7093d..30a3f8200 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -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); } diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index 57d30400f..dc7d94ae0 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -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" diff --git a/app/views/activities/_activities.html.erb b/app/views/activities/_activities.html.erb index aaeea76bc..5c19585d0 100644 --- a/app/views/activities/_activities.html.erb +++ b/app/views/activities/_activities.html.erb @@ -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 %> |