mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 11:37:14 +00:00
Merges fav and fav-off icons in only one icon and fill the collor from CSS (#23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@23089 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b406fca2ec
commit
dfbb1b6856
@ -166,9 +166,6 @@
|
||||
<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>
|
||||
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--fav-off">
|
||||
<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>
|
||||
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--file">
|
||||
<path d="M14 3v4a1 1 0 0 0 1 1h4"/>
|
||||
<path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@ -1689,6 +1689,11 @@ svg.icon-ok {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.icon-fav svg.icon-svg {
|
||||
fill: #ffc400;
|
||||
stroke: #ffc400;
|
||||
}
|
||||
|
||||
svg {
|
||||
&.icon-svg {
|
||||
stroke: #169;
|
||||
|
||||
@ -25,8 +25,7 @@ module WatchersHelper
|
||||
return '' unless objects.any?
|
||||
|
||||
watched = Watcher.any_watched?(objects, user)
|
||||
icon = watched ? 'fav' : 'fav-off'
|
||||
css = [watcher_css(objects), 'icon', "icon-#{icon}"].join(' ')
|
||||
css = [watcher_css(objects), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ')
|
||||
text = watched ? l(:button_unwatch) : l(:button_watch)
|
||||
url = watch_path(
|
||||
:object_type => objects.first.class.to_s.underscore,
|
||||
@ -34,7 +33,7 @@ module WatchersHelper
|
||||
)
|
||||
method = watched ? 'delete' : 'post'
|
||||
|
||||
link_to icon_with_label(icon, text), url, :remote => true, :method => method, :class => css
|
||||
link_to icon_with_label('fav', text), url, :remote => true, :method => method, :class => css
|
||||
end
|
||||
|
||||
# Returns the css class used to identify watch links for a given +object+
|
||||
|
||||
@ -28,7 +28,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
|
||||
test '#watcher_link with a non-watched object' do
|
||||
expected = link_to(
|
||||
icon_with_label("fav-off", "Watch"),
|
||||
icon_with_label("fav", "Watch"),
|
||||
"/watchers/watch?object_id=1&object_type=issue",
|
||||
:remote => true, :method => 'post', :class => "issue-1-watcher icon icon-fav-off"
|
||||
)
|
||||
@ -37,7 +37,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
|
||||
test '#watcher_link with a single object array' do
|
||||
expected = link_to(
|
||||
icon_with_label("fav-off", "Watch"),
|
||||
icon_with_label("fav", "Watch"),
|
||||
"/watchers/watch?object_id=1&object_type=issue",
|
||||
:remote => true, :method => 'post', :class => "issue-1-watcher icon icon-fav-off"
|
||||
)
|
||||
@ -46,7 +46,7 @@ class WatchersHelperTest < Redmine::HelperTest
|
||||
|
||||
test '#watcher_link with a multiple objects array' do
|
||||
expected = link_to(
|
||||
icon_with_label("fav-off", "Watch"),
|
||||
icon_with_label("fav", "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"
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user