From cc50cfc3248869ead8fe1100cb0e897d5a1d618c Mon Sep 17 00:00:00 2001
From: Marius Balteanu
Date: Thu, 5 Sep 2024 21:32:22 +0000
Subject: [PATCH] Replaces icons in calendar view with SVG icons (#23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@23024 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
app/assets/stylesheets/application.css | 5 +----
app/views/calendars/show.html.erb | 6 +++---
app/views/common/_calendar.html.erb | 8 +++++++-
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 0c9d68a44..a77f33215 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -1193,11 +1193,8 @@ ul.cal {
.cal .calbody .icon {padding-top: 2px; padding-bottom: 3px;}
.cal .calbody.nwday:not(.odd) {background-color:#f1f1f1;}
-.cal .starting a.issue, p.cal.legend .starting {background: url(/bullet_go.png) no-repeat -1px -2px; padding-left:16px;}
-.cal .ending a.issue, p.cal.legend .ending {background: url(/bullet_end.png) no-repeat -1px -2px; padding-left:16px;}
-.cal .starting.ending a.issue, p.cal.legend .starting.ending {background: url(/bullet_diamond.png) no-repeat -1px -2px; padding-left:16px;}
-p.cal.legend span {display:block;}
+p.cal.legend span {display:flex;}
.controller-calendars p.buttons {margin-top: unset;}
/***** Tooltips ******/
diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb
index adfd288b9..950836a15 100644
--- a/app/views/calendars/show.html.erb
+++ b/app/views/calendars/show.html.erb
@@ -54,9 +54,9 @@
<%= call_hook(:view_calendars_show_bottom, :year => @year, :month => @month, :project => @project, :query => @query) %>
- <%= l(:text_tip_issue_begin_day) %>
- <%= l(:text_tip_issue_end_day) %>
- <%= l(:text_tip_issue_begin_end_day) %>
+ <%= icon_with_label('bullet-go', l(:text_tip_issue_begin_day)) %>
+ <%= icon_with_label('bullet-end', l(:text_tip_issue_end_day)) %>
+ <%= icon_with_label('bullet-go-end', l(:text_tip_issue_begin_end_day)) %>
<% end %>
diff --git a/app/views/common/_calendar.html.erb b/app/views/common/_calendar.html.erb
index 533ed2c4d..e1b202333 100644
--- a/app/views/common/_calendar.html.erb
+++ b/app/views/common/_calendar.html.erb
@@ -16,14 +16,20 @@
<% calendar.events_on(day).each do |i| %>
<% if i.is_a? Issue %>
- <%= tag.div class: [ i.css_classes, 'tooltip hascontextmenu', starting: day == i.start_date, ending: day == i.due_date] do %>
+ <% starting = day == i.start_date %>
+ <% ending = day == i.due_date %>
+ <%= tag.div class: [ i.css_classes, 'tooltip hascontextmenu', starting: starting, ending: ending] do %>
<%= "#{i.project} -" unless @project && @project == i.project %>
+ <%= sprite_icon('bullet-go') if starting && starting != ending %>
+ <%= sprite_icon('bullet-end') if ending && starting != ending %>
+ <%= sprite_icon('bullet-go-end') if starting && ending %>
<%= link_to_issue i, :truncate => 30 %>
<%= render_issue_tooltip i %>
<%= check_box_tag 'ids[]', i.id, false, :style => 'display:none;', :id => nil %>
<% end %>
<% else %>
+ <%= sprite_icon 'package' %>
<%= "#{i.project} -" unless @project && @project == i.project %>
<%= link_to_version i %>