mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 11:37:14 +00:00
Changes issue watch button icon to eye image to align icon with function and improve visual clarity (#42305).
Patch by Katsuya HIDAKA (user:hidakatsuya). git-svn-id: https://svn.redmine.org/redmine/trunk@23557 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2ed9e46b78
commit
e02d265f2c
@ -476,6 +476,11 @@
|
||||
<path d="M12 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/>
|
||||
<path d="M8 11v-5a4 4 0 0 1 8 0"/>
|
||||
</symbol>
|
||||
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--unwatch">
|
||||
<path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/>
|
||||
<path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/>
|
||||
<path d="M3 3l18 18"/>
|
||||
</symbol>
|
||||
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--user">
|
||||
<path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"/>
|
||||
<path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"/>
|
||||
@ -485,6 +490,10 @@
|
||||
<path d="M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z"/>
|
||||
<path d="M12 16h.01"/>
|
||||
</symbol>
|
||||
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--watch">
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/>
|
||||
<path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/>
|
||||
</symbol>
|
||||
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--wiki-page">
|
||||
<path d="M6 4h11a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-11a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1m3 0v18"/>
|
||||
<path d="M13 8l2 0"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@ -1779,11 +1779,6 @@ svg.icon-ok {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.icon-fav svg.icon-svg {
|
||||
fill: #ffc400;
|
||||
stroke: #ffc400;
|
||||
}
|
||||
|
||||
svg.icon-svg {
|
||||
stroke: #169;
|
||||
fill: none;
|
||||
|
||||
@ -26,6 +26,7 @@ module WatchersHelper
|
||||
|
||||
watched = Watcher.any_watched?(objects, user)
|
||||
css = [watcher_css(objects), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ')
|
||||
icon = watched ? 'unwatch' : 'watch'
|
||||
text = watched ? l(:button_unwatch) : l(:button_watch)
|
||||
url = watch_path(
|
||||
:object_type => objects.first.class.to_s.underscore,
|
||||
@ -33,7 +34,7 @@ module WatchersHelper
|
||||
)
|
||||
method = watched ? 'delete' : 'post'
|
||||
|
||||
link_to sprite_icon('fav', text), url, :remote => true, :method => method, :class => css
|
||||
link_to sprite_icon(icon, text), url, :remote => true, :method => method, :class => css
|
||||
end
|
||||
|
||||
# Returns the css class used to identify watch links for a given +object+
|
||||
|
||||
@ -214,3 +214,7 @@
|
||||
- name: circle-dot-filled
|
||||
svg: circle-dot
|
||||
style: filled
|
||||
- name: watch
|
||||
svg: eye
|
||||
- name: unwatch
|
||||
svg: eye-off
|
||||
|
||||
@ -26,7 +26,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
|
||||
test '#watcher_link with a non-watched object' do
|
||||
expected = link_to(
|
||||
sprite_icon("fav", "Watch"),
|
||||
sprite_icon("watch", "Watch"),
|
||||
"/watchers/watch?object_id=1&object_type=issue",
|
||||
:remote => true, :method => 'post', :class => "issue-1-watcher icon icon-fav-off"
|
||||
)
|
||||
@ -35,7 +35,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
|
||||
test '#watcher_link with a single object array' do
|
||||
expected = link_to(
|
||||
sprite_icon("fav", "Watch"),
|
||||
sprite_icon("watch", "Watch"),
|
||||
"/watchers/watch?object_id=1&object_type=issue",
|
||||
:remote => true, :method => 'post', :class => "issue-1-watcher icon icon-fav-off"
|
||||
)
|
||||
@ -44,7 +44,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
|
||||
test '#watcher_link with a multiple objects array' do
|
||||
expected = link_to(
|
||||
sprite_icon("fav", "Watch"),
|
||||
sprite_icon("watch", "Watch"),
|
||||
"/watchers/watch?object_id%5B%5D=1&object_id%5B%5D=3&object_type=issue",
|
||||
:remote => true, :method => 'post', :class => "issue-bulk-watcher icon icon-fav-off"
|
||||
)
|
||||
@ -59,7 +59,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
Watcher.create!(:watchable => Issue.find(1), :user => User.find(1))
|
||||
|
||||
expected = link_to(
|
||||
sprite_icon("fav", "Unwatch"),
|
||||
sprite_icon("unwatch", "Unwatch"),
|
||||
"/watchers/watch?object_id=1&object_type=issue",
|
||||
:remote => true, :method => 'delete', :class => "issue-1-watcher icon icon-fav"
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user