diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-08-29 21:46:40 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-08-29 21:46:40 +0000 |
commit | ffce07e78556580e503a93d6f8decb25a15823b7 (patch) | |
tree | 740ea59d0469c5857408641df9a32d5f2a7aac39 /app/views/context_menus | |
parent | fdd90bab2b02d6fdd08a860808560eb2cf382af6 (diff) | |
download | redmine-ffce07e78556580e503a93d6f8decb25a15823b7.tar.gz redmine-ffce07e78556580e503a93d6f8decb25a15823b7.zip |
Start working on replacing old icons with SVG icons (#23980):
* Introduces IconsHelper with methods to render SVG icon from a sprite file.
* Adds SVG sprite file with icons mainly from Font Awesome, but also from Material Design Icons and Fluent UI System Icons (based on the work made by Takashi Kato (@tohosaku)).
* Replaces specific icons with new SVG icons.
* Temporarily keep all old CSS icon definitions for backard compatibility.
git-svn-id: https://svn.redmine.org/redmine/trunk@22988 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/context_menus')
-rw-r--r-- | app/views/context_menus/issues.html.erb | 18 | ||||
-rw-r--r-- | app/views/context_menus/projects.html.erb | 2 | ||||
-rw-r--r-- | app/views/context_menus/time_entries.html.erb | 6 | ||||
-rw-r--r-- | app/views/context_menus/users.html.erb | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/app/views/context_menus/issues.html.erb b/app/views/context_menus/issues.html.erb index a61b951fa..9b9c7f07a 100644 --- a/app/views/context_menus/issues.html.erb +++ b/app/views/context_menus/issues.html.erb @@ -2,10 +2,10 @@ <%= call_hook(:view_issues_context_menu_start, {:issues => @issues, :can => @can, :back => @back }) %> <% if @issue -%> - <li><%= context_menu_link l(:button_edit), edit_issue_path(@issue), + <li><%= context_menu_link icon_with_label('edit', l(:button_edit)), edit_issue_path(@issue), :class => 'icon icon-edit', :disabled => !@can[:edit] %></li> <% else %> - <li><%= context_menu_link l(:label_bulk_edit), bulk_edit_issues_path(:ids => @issue_ids), + <li><%= context_menu_link icon_with_label('edit', l(:label_bulk_edit)), bulk_edit_issues_path(:ids => @issue_ids), :class => 'icon icon-edit', :disabled => !@can[:edit] %></li> <% end %> @@ -130,7 +130,7 @@ <li class="folder"> <a href="#" class="submenu"><%= l(:label_issue_watchers) %></a> <ul> - <li><%= context_menu_link l(:button_add), + <li><%= context_menu_link icon_with_label('add', l(:button_add)), new_watchers_path(:object_type => 'issue', :object_id => @issue_ids), :remote => true, :class => 'icon icon-add' %></li> @@ -143,28 +143,28 @@ <% end %> <% unless @issue %> - <li><%= context_menu_link l(:button_filter), _project_issues_path(@project, :set_filter => 1, :status_id => "*", :issue_id => @issue_ids.join(","), :c => @columns), + <li><%= context_menu_link icon_with_label('list', l(:button_filter)), _project_issues_path(@project, :set_filter => 1, :status_id => "*", :issue_id => @issue_ids.join(","), :c => @columns), :class => 'icon icon-list' %></li> <% end %> <% if @issue.present? %> <% if @can[:log_time] -%> - <li><%= context_menu_link l(:button_log_time), new_issue_time_entry_path(@issue), + <li><%= context_menu_link icon_with_label('time', l(:button_log_time)), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' %></li> <% end %> <% if @can[:add_subtask] -%> - <li><%= context_menu_link l(:button_add_subtask), url_for_new_subtask(@issue), + <li><%= context_menu_link icon_with_label('add', l(:button_add_subtask)), url_for_new_subtask(@issue), :class => 'icon icon-add' %></li> <% end %> <li><%= copy_object_url_link(issue_url(@issue)) %></li> - <li><%= context_menu_link l(:button_copy), project_copy_issue_path(@project, @issue), + <li><%= context_menu_link icon_with_label('copy', l(:button_copy)), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy', :disabled => !@can[:copy] %></li> <% else %> <li><%= copy_object_url_link(_project_issues_url(@project, set_filter: 1, status_id: '*', issue_id: @issue_ids.join(','))) %></li> - <li><%= context_menu_link l(:button_copy), bulk_edit_issues_path(:ids => @issue_ids, :copy => '1'), + <li><%= context_menu_link icon_with_label('copy', l(:button_copy)), bulk_edit_issues_path(:ids => @issue_ids, :copy => '1'), :class => 'icon icon-copy', :disabled => !@can[:copy] %></li> <% end %> - <li><%= context_menu_link l(:button_delete_object, object_name: (@issue_ids.size > 1 ? l(:label_issue_plural) : l(:label_issue)).downcase), issues_path(:ids => @issue_ids, :back_url => @back), + <li><%= context_menu_link icon_with_label('del', l(:button_delete_object, object_name: (@issue_ids.size > 1 ? l(:label_issue_plural) : l(:label_issue)).downcase)), issues_path(:ids => @issue_ids, :back_url => @back), :method => :delete, :data => {:confirm => issues_destroy_confirmation_message(@issues)}, :class => 'icon icon-del', :disabled => !@can[:delete] %></li> <%= call_hook(:view_issues_context_menu_end, {:issues => @issues, :can => @can, :back => @back }) %> diff --git a/app/views/context_menus/projects.html.erb b/app/views/context_menus/projects.html.erb index c200311f2..ba18b4e06 100644 --- a/app/views/context_menus/projects.html.erb +++ b/app/views/context_menus/projects.html.erb @@ -6,7 +6,7 @@ <li><%= context_menu_link l(:button_archive), archive_project_path(@project), data: {confirm: l(:text_project_archive_confirmation, @project.to_s)}, method: :post, class: 'icon icon-lock' %></li> <% end %> <li> - <%= context_menu_link l(:button_copy), copy_project_path(@projects), class: 'icon icon-copy' %> + <%= context_menu_link icon_with_label('copy', l(:button_copy)), copy_project_path(@projects), class: 'icon icon-copy' %> </li> <li> <%= context_menu_link l(:button_delete), project_path(@project, back_url: @back), method: :delete, class: 'icon icon-del' %> diff --git a/app/views/context_menus/time_entries.html.erb b/app/views/context_menus/time_entries.html.erb index 3bf138e91..2282a6ea3 100644 --- a/app/views/context_menus/time_entries.html.erb +++ b/app/views/context_menus/time_entries.html.erb @@ -1,9 +1,9 @@ <ul> <% if !@time_entry.nil? -%> - <li><%= context_menu_link l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => @time_entry}, + <li><%= context_menu_link icon_with_label('edit', l(:button_edit)), {:controller => 'timelog', :action => 'edit', :id => @time_entry}, :class => 'icon icon-edit', :disabled => !@can[:edit] %></li> <% else %> - <li><%= context_menu_link l(:label_bulk_edit), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id)}, + <li><%= context_menu_link icon_with_label('edit', l(:label_bulk_edit)), {:controller => 'timelog', :action => 'bulk_edit', :ids => @time_entries.collect(&:id)}, :class => 'icon icon-edit', :disabled => !@can[:edit] %></li> <% end %> @@ -38,7 +38,7 @@ <%= call_hook(:view_time_entries_context_menu_end, {:time_entries => @time_entries, :can => @can, :back => @back }) %> <li> - <%= context_menu_link l(:button_delete), + <%= context_menu_link icon_with_label('del', l(:button_delete)), {:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back}, :method => :delete, :data => {:confirm => l(:text_time_entries_destroy_confirmation)}, :class => 'icon icon-del', :disabled => !@can[:delete] %> </li> diff --git a/app/views/context_menus/users.html.erb b/app/views/context_menus/users.html.erb index 93fe061e6..4fa60779b 100644 --- a/app/views/context_menus/users.html.erb +++ b/app/views/context_menus/users.html.erb @@ -11,7 +11,7 @@ <% end %> <li> - <%= context_menu_link l(:button_edit), edit_user_path(@user, back_url: @back), class: 'icon icon-edit' %> + <%= context_menu_link icon_with_label('edit', l(:button_edit)), edit_user_path(@user, back_url: @back), class: 'icon icon-edit' %> </li> <% unless User.current == @user %> |