]> source.dussan.org Git - redmine.git/commitdiff
Drops icon-error and style the error icon from CSS (#23980).
authorMarius Balteanu <marius.balteanu@zitec.com>
Sun, 29 Sep 2024 19:19:53 +0000 (19:19 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Sun, 29 Sep 2024 19:19:53 +0000 (19:19 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@23092 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/assets/images/icons.svg
app/assets/stylesheets/application.css
app/helpers/icons_helper.rb
app/views/admin/info.html.erb

index 938ca792f0c982c26a7081d9cc25695745992395..43d476b463a05e5d0630bf4dbe47c403392c30a7 100644 (file)
       <path d="M3 7l9 6l.565 -.377m2.435 -1.623l6 -4"/>
       <path d="M3 3l18 18"/>
     </symbol>
-    <symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--error">
-      <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/>
-      <path d="M12 9v4"/>
-      <path d="M12 16v.01"/>
-    </symbol>
     <symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--fav">
       <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"/>
     </symbol>
index 9e02fb871700f4f711fdbd29d8f1bd565cffbfd9..ddda3d9af4f82201db4e6b86fdd5ae25daad1870 100644 (file)
@@ -1673,14 +1673,14 @@ a.icon:hover svg, a.icon-only:hover svg {
   stroke: #c61a1a;
 }
 
-svg.icon-error {
-  stroke: #f37c60;
-}
-
 svg.icon-ok {
   stroke: #5db651;
 }
 
+.icon-error svg.icon-svg {
+  stroke: #c61a1a
+}
+
 .icon-warning svg {
   stroke: #e4bc4b;
 }
@@ -1771,7 +1771,7 @@ span.icon-label {
 .icon-time-add:not(:has(svg)) { background-image: url(/time_add.png); }
 .icon-stats:not(:has(svg)) { background-image: url(/stats.png); }
 .icon-warning:not(:has(svg)) { background-image: url(/warning.png); }
-.icon-error:not(svg) { background-image: url(/exclamation.png); }
+.icon-error:not(:has(svg)) { background-image: url(/exclamation.png); }
 .icon-fav:not(:has(svg))  { background-image: url(/fav.png); }
 .icon-fav-off:not(:has(svg))  { background-image: url(/fav_off.png); }
 .icon-reload:not(:has(svg)) { background-image: url(/reload.png); }
@@ -1791,7 +1791,7 @@ span.icon-label {
 .icon-email:not(:has(svg)) { background-image: url(/email.png); }
 .icon-email-disabled:not(:has(svg)) { background-image: url(/email_disabled.png); }
 .icon-email-add:not(:has(svg)) { background-image: url(/email_add.png); }
-.icon-ok:not(svg) { background-image: url(/true.png); }
+.icon-ok:not(:has(svg)) { background-image: url(/true.png); }
 .icon-not-ok:not(svg) { background-image: url(/false.png); }
 .icon-link-break:not(:has(svg)) { background-image: url(/link_break.png); }
 .icon-list:not(:has(svg)) { background-image: url(/text_list_bullets.png); }
index 7ba87063b8c4826da930bb460d8379d85f831089..e297d950b88632f7e44db73c44de2db94d2ff6ed 100644 (file)
@@ -57,11 +57,13 @@ module IconsHelper
 
   def sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE, css_class: nil)
     sprite_path = "#{sprite}.svg"
+    css_classes = "s#{size} icon-svg"
+    css_classes += " #{css_class}" unless css_class.nil?
 
     content_tag(
       :svg,
       content_tag(:use, '', { 'href' => "#{asset_path(sprite_path)}#icon--#{icon_name}" }),
-      class: "s#{size} icon-svg",
+      class: css_classes,
       aria: {
         hidden: true
       }
index 197bf5993e4558a512be8b7177cfa676f46c4421..23917ef7afa9120dae0636c0343f9f831871ee0b 100644 (file)
@@ -6,7 +6,11 @@
 <% @checklist.each do |label, result| %>
   <tr>
     <td class="name"><%= label.is_a?(Symbol) ? l(label) : label %></td>
-    <td class="tick"><%= result ? sprite_icon('checked', css_class: "icon-ok") : sprite_icon('error', css_class: "icon-error") %></td>
+    <td class="tick">
+      <span class="icon-only icon-<%= result ? "ok" : "error" %>">
+        <%= result ? sprite_icon('checked') : sprite_icon('warning') %>
+      </span>
+    </td>
   </tr>
 <% end %>
 </table>