summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-08-31 08:11:18 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-08-31 08:11:18 +0000
commit1bf607edb9140f77fd2fc9b3eb371c7704929d23 (patch)
treea7b97226a3ee2fa94e869bcb3bc17756c13ef595
parentcafb610b7f02d7e6946a327d5e2a467d11da2ff8 (diff)
downloadredmine-1bf607edb9140f77fd2fc9b3eb371c7704929d23.tar.gz
redmine-1bf607edb9140f77fd2fc9b3eb371c7704929d23.zip
Replaces icon-email and icon-passwd icons with SVG icons (#23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@22999 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/assets/images/icons.svg2
-rw-r--r--app/assets/stylesheets/application.css8
-rw-r--r--app/helpers/email_addresses_helper.rb4
-rw-r--r--app/helpers/users_helper.rb2
-rw-r--r--app/views/my/account.html.erb2
5 files changed, 9 insertions, 9 deletions
diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg
index 88f17e2ae..b6a5ed020 100644
--- a/app/assets/images/icons.svg
+++ b/app/assets/images/icons.svg
@@ -303,7 +303,7 @@
<symbol viewBox="0 0 384 512" id="icon--textfield">
<path d="M64 464c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16h160v80c0 17.7 14.3 32 32 32h80v288c0 8.8-7.2 16-16 16zM64 0C28.7 0 0 28.7 0 64v384c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3l-90.6-90.5C262.7 6.7 246.5 0 229.5 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24h144c13.3 0 24-10.7 24-24s-10.7-24-24-24zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24h144c13.3 0 24-10.7 24-24s-10.7-24-24-24z"/>
</symbol>
- <symbol viewBox="0 0 512 512" id="icon--textfield-key">
+ <symbol viewBox="0 0 512 512" id="icon--key">
<path d="M336 352c97.2 0 176-78.8 176-176S433.2 0 336 0S160 78.8 160 176c0 18.7 2.9 36.8 8.3 53.7L7 391c-4.5 4.5-7 10.6-7 17v80c0 13.3 10.7 24 24 24h80c13.3 0 24-10.7 24-24v-40h40c13.3 0 24-10.7 24-24v-40h40c6.4 0 12.5-2.5 17-7l33.3-33.3c16.9 5.4 35 8.3 53.7 8.3m40-256a40 40 0 1 1 0 80a40 40 0 1 1 0-80"/>
</symbol>
<symbol viewBox="0 0 512 512" id="icon--time">
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 9c3ad38c9..21948670b 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -1718,11 +1718,11 @@ span.icon-label {
.icon-zoom-in:not(:has(svg)) { background-image: url(/zoom_in.png); }
.icon-zoom-out:not(:has(svg)) { background-image: url(/zoom_out.png); }
.icon-magnifier { background-image: url(/magnifier.png); }
-.icon-passwd { background-image: url(/textfield_key.png); }
+.icon-passwd:not(:has(svg)) { background-image: url(/textfield_key.png); }
.icon-arrow-right, .icon-test:not(:has(svg)), .icon-sticky { background-image: url(/bullet_go.png); }
-.icon-email { background-image: url(/email.png); }
-.icon-email-disabled { background-image: url(/email_disabled.png); }
-.icon-email-add { background-image: url(/email_add.png); }
+.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 { background-image: url(/true.png); }
.icon-not-ok { background-image: url(/false.png); }
.icon-link-break:not(:has(svg)) { background-image: url(/link_break.png); }
diff --git a/app/helpers/email_addresses_helper.rb b/app/helpers/email_addresses_helper.rb
index 06ea8f0a1..093f1b1c3 100644
--- a/app/helpers/email_addresses_helper.rb
+++ b/app/helpers/email_addresses_helper.rb
@@ -22,14 +22,14 @@ module EmailAddressesHelper
def toggle_email_address_notify_link(address)
if address.notify?
link_to(
- l(:label_disable_notifications),
+ icon_with_label('email', l(:label_disable_notifications)),
user_email_address_path(address.user, address, :notify => '0'),
:method => :put, :remote => true,
:title => l(:label_disable_notifications),
:class => 'icon-only icon-email')
else
link_to(
- l(:label_enable_notifications),
+ icon_with_label('email-disabled', l(:label_enable_notifications)),
user_email_address_path(address.user, address, :notify => '1'),
:method => :put, :remote => true,
:title => l(:label_enable_notifications),
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index 2fc2d809c..2091bb835 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -79,7 +79,7 @@ module UsersHelper
def additional_emails_link(user)
if user.email_addresses.count > 1 || Setting.max_additional_emails.to_i > 0
- link_to l(:label_email_address_plural), user_email_addresses_path(@user), :class => 'icon icon-email-add', :remote => true
+ link_to icon_with_label('email', l(:label_email_address_plural)), user_email_addresses_path(@user), :class => 'icon icon-email-add', :remote => true
end
end
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 4240832b7..872472d6b 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -1,6 +1,6 @@
<div class="contextual">
<%= additional_emails_link(@user) %>
-<%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
+<%= link_to(icon_with_label('key', l(:button_change_password)), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
<%= call_hook(:view_my_account_contextual, :user => @user)%>
</div>