summaryrefslogtreecommitdiffstats
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-10-19 10:06:26 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-10-19 10:06:26 +0000
commitd1008280d8bead4757646d53f18d0b76fa20b429 (patch)
tree6424d06cc95da85711dc27460e39a976760527fd /app/helpers/application_helper.rb
parentffb78c12c35192aff8e13389577ef9564ab278ee (diff)
downloadredmine-d1008280d8bead4757646d53f18d0b76fa20b429.tar.gz
redmine-d1008280d8bead4757646d53f18d0b76fa20b429.zip
Renames and improves methods provided by @IconsHelper@ (#23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@23145 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 8d390d6f7..dd639c0c4 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -143,7 +143,7 @@ module ApplicationHelper
options[:only_path] = true unless options.key?(:only_path)
url = send(route_method, attachment, options)
- label = icon ? icon_with_label(icon, text) : text
+ label = icon ? sprite_icon(icon, text) : text
link_to label, url, html_options
end
@@ -657,7 +657,7 @@ module ApplicationHelper
check_box_tag(name, principal.id, false, :id => nil) +
(avatar(principal, :size => 16).presence ||
content_tag(
- 'span', icon_for_principal(principal.class.name.downcase),
+ 'span', principal_icon(principal.class.name.downcase),
:class => "name icon icon-#{principal.class.name.downcase}"
)
) + principal.to_s
@@ -769,7 +769,7 @@ module ApplicationHelper
:reorder_url => options[:url] || url_for(object),
:reorder_param => options[:param] || object.class.name.underscore
}
- content_tag('span', icon_with_label('reorder', ''),
+ content_tag('span', sprite_icon('reorder', ''),
:class => "icon-only icon-sort-handle sort-handle",
:data => data,
:title => l(:button_sort))
@@ -849,7 +849,7 @@ module ApplicationHelper
content = capture(&)
if content.present?
trigger =
- content_tag('span', icon_with_label('3-bullets', l(:button_actions)), :class => 'icon-only icon-actions',
+ content_tag('span', sprite_icon('3-bullets', l(:button_actions)), :class => 'icon-only icon-actions',
:title => l(:button_actions))
trigger = content_tag('span', trigger, :class => 'drdn-trigger')
content = content_tag('div', content, :class => 'drdn-items')
@@ -1390,7 +1390,7 @@ module ApplicationHelper
content_tag(
'div',
link_to(
- icon_with_label('edit', l(:button_edit_section)),
+ sprite_icon('edit', l(:button_edit_section)),
options[:edit_section_links].merge(
:section => @current_section),
:class => 'icon-only icon-edit'),
@@ -1584,7 +1584,7 @@ module ApplicationHelper
:class => 'icon icon-del'
}.merge(options)
- link_to icon_with_label('del', button_name), url, options
+ link_to sprite_icon('del', button_name), url, options
end
def link_to_function(name, function, html_options={})
@@ -1592,7 +1592,7 @@ module ApplicationHelper
end
def link_to_context_menu
- link_to icon_with_label('3-bullets', l(:button_actions)), '#', title: l(:button_actions), class: 'icon-only icon-actions js-contextmenu '
+ link_to sprite_icon('3-bullets', l(:button_actions)), '#', title: l(:button_actions), class: 'icon-only icon-actions js-contextmenu '
end
# Helper to render JSON in views
@@ -1619,7 +1619,7 @@ module ApplicationHelper
def toggle_checkboxes_link(selector, options={})
css_classes = 'icon icon-checked'
css_classes += ' ' + options[:class] if options[:class]
- link_to_function icon_with_label('checked', ''),
+ link_to_function sprite_icon('checked', ''),
"toggleCheckboxesBySelector('#{selector}')",
:title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}",
:class => css_classes
@@ -1924,7 +1924,7 @@ module ApplicationHelper
def copy_object_url_link(url)
link_to_function(
- icon_with_label('copy-link', l(:button_copy_link)), 'copyTextToClipboard(this);',
+ sprite_icon('copy-link', l(:button_copy_link)), 'copyTextToClipboard(this);',
class: 'icon icon-copy-link',
data: {'clipboard-text' => url}
)