summaryrefslogtreecommitdiffstats
path: root/app/views/issues
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-08-29 21:46:40 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-08-29 21:46:40 +0000
commitffce07e78556580e503a93d6f8decb25a15823b7 (patch)
tree740ea59d0469c5857408641df9a32d5f2a7aac39 /app/views/issues
parentfdd90bab2b02d6fdd08a860808560eb2cf382af6 (diff)
downloadredmine-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/issues')
-rw-r--r--app/views/issues/_action_menu.html.erb16
-rw-r--r--app/views/issues/_attributes.html.erb6
-rw-r--r--app/views/issues/_form.html.erb4
-rw-r--r--app/views/issues/index.html.erb8
-rw-r--r--app/views/issues/show.html.erb2
-rw-r--r--app/views/issues/tabs/_time_entries.html.erb10
6 files changed, 23 insertions, 23 deletions
diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb
index 1904f2171..abb157d5a 100644
--- a/app/views/issues/_action_menu.html.erb
+++ b/app/views/issues/_action_menu.html.erb
@@ -1,16 +1,16 @@
<div class="contextual">
-<%= link_to l(:button_edit), edit_issue_path(@issue),
+<%= link_to icon_with_label('edit', l(:button_edit)), edit_issue_path(@issue),
:onclick => 'showAndScrollTo("update", "issue_notes"); return false;',
- :class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
-<%= link_to l(:button_log_time), new_issue_time_entry_path(@issue),
- :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
+ :class => 'icon icon-edit ', :accesskey => accesskey(:edit) if @issue.editable? %>
+<%= link_to icon_with_label('time', l(:button_log_time)), new_issue_time_entry_path(@issue),
+ :class => 'icon icon-time-add ' if User.current.allowed_to?(:log_time, @project) %>
<%= watcher_link(@issue, User.current) %>
-<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue),
- :class => 'icon icon-copy' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %>
+<%= link_to icon_with_label('copy', l(:button_copy)), project_copy_issue_path(@project, @issue),
+ :class => 'icon icon-copy ' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %>
<%= actions_dropdown do %>
<%= copy_object_url_link(issue_url(@issue, only_path: false)) %>
- <%= link_to l(:button_delete_object, object_name: l(:label_issue).downcase), issue_path(@issue),
+ <%= link_to icon_with_label('del', l(:button_delete_object, object_name: l(:label_issue).downcase)), issue_path(@issue),
:data => {:confirm => issues_destroy_confirmation_message(@issue)},
- :method => :delete, :class => 'icon icon-del' if @issue.deletable? %>
+ :method => :delete, :class => 'icon icon-del ' if @issue.deletable? %>
<% end %>
</div>
diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb
index 517b67f95..3ee16fc66 100644
--- a/app/views/issues/_attributes.html.erb
+++ b/app/views/issues/_attributes.html.erb
@@ -7,7 +7,7 @@
<%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true},
:onchange => "updateIssueFrom('#{escape_javascript(update_issue_form_path(@project, @issue))}', this)",
:title => @issue.status.description %>
- <%= content_tag 'a', l(:label_open_issue_statuses_description), :class => 'icon-only icon-help', :title => l(:label_open_issue_statuses_description), :onclick => "showModal('issue_statuses_description', '500px'); return false;", :href => '#' if @allowed_statuses.any? {|s| s.description.present? } %>
+ <%= content_tag 'a', icon_with_label('help', l(:label_open_issue_statuses_description)), :class => 'icon-only icon-help', :title => l(:label_open_issue_statuses_description), :onclick => "showModal('issue_statuses_description', '500px'); return false;", :href => '#' if @allowed_statuses.any? {|s| s.description.present? } %>
<% if @issue.transition_warning %>
<span class="icon-only icon-warning" title="<%= @issue.transition_warning %>"><%= @issue.transition_warning %></span>
<% end %>
@@ -36,7 +36,7 @@
<p><%= f.select :category_id, category_options,
{:include_blank => true, :required => @issue.required_attribute?('category_id')},
:onchange => ("updateIssueFrom('#{escape_javascript(update_issue_form_path(@project, @issue))}', this)" if @issue.new_record?) %>
-<%= link_to(l(:label_issue_category_new),
+<%= link_to(icon_with_label('add', l(:label_issue_category_new)),
new_project_issue_category_path(@issue.project),
:remote => true,
:method => 'get',
@@ -49,7 +49,7 @@
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
:include_blank => true, :required => @issue.required_attribute?('fixed_version_id') %>
-<%= link_to(l(:label_version_new),
+<%= link_to(icon_with_label('add', l(:label_version_new)),
new_project_version_path(@issue.project),
:remote => true,
:method => 'get',
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb
index b1693f7b3..88e7a9a1f 100644
--- a/app/views/issues/_form.html.erb
+++ b/app/views/issues/_form.html.erb
@@ -20,7 +20,7 @@
<%= f.select :tracker_id, trackers_options_for_select(@issue), {:required => true},
:onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)",
:title => @issue.tracker.description %>
- <%= content_tag 'a', l(:label_open_trackers_description), :class => 'icon-only icon-help', :title => l(:label_open_trackers_description), :onclick => "showModal('trackers_description', '500px'); return false;", :href => '#' if trackers_for_select(@issue).any? {|t| t.description.present? } %>
+ <%= content_tag 'a', icon_with_label('help', l(:label_open_trackers_description)), :class => 'icon-only icon-help', :title => l(:label_open_trackers_description), :onclick => "showModal('trackers_description', '500px'); return false;", :href => '#' if trackers_for_select(@issue).any? {|t| t.description.present? } %>
</p>
<%= render partial: 'issues/trackers_description', locals: {trackers: trackers_for_select(@issue)} %>
<% end %>
@@ -40,7 +40,7 @@
},
:no_label => true %>
<% end %>
- <%= link_to_function content_tag(:span, l(:button_edit), :class => 'icon icon-edit'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
+ <%= link_to_function content_tag(:span, icon_with_label('edit', l(:button_edit)), :class => 'icon icon-edit'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
</p>
<%= wikitoolbar_for 'issue_description', preview_issue_path(:project_id => @issue.project, :issue_id => @issue.id) %>
<% end %>
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index 1ab5198a1..5d10f7473 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -1,17 +1,17 @@
<div class="contextual">
<% if User.current.allowed_to?(:add_issues, @project, :global => true) && (@project.nil? || Issue.allowed_target_trackers(@project).any?) %>
- <%= link_to l(:label_issue_new), _new_project_issue_path(@project), :class => 'icon icon-add new-issue' %>
+ <%= link_to icon_with_label('add', l(:label_issue_new)), _new_project_issue_path(@project), :class => 'icon icon-add new-issue' %>
<% end %>
<%= actions_dropdown do %>
<% if @project %>
- <%= link_to l(:field_summary), project_issues_report_path(@project), :class => 'icon icon-stats' %>
+ <%= link_to icon_with_label('summary', l(:field_summary)), project_issues_report_path(@project), :class => 'icon icon-stats' %>
<% end %>
<% if User.current.allowed_to?(:import_issues, @project, :global => true) %>
- <%= link_to l(:button_import), new_issues_import_path(:project_id => @project), :class => 'icon icon-import' %>
+ <%= link_to icon_with_label('import', l(:button_import)), new_issues_import_path(:project_id => @project), :class => 'icon icon-import' %>
<% end %>
- <%= link_to_if_authorized l(:label_settings),
+ <%= link_to_if_authorized icon_with_label('settings', l(:label_settings)),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'issues'},
:class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %>
<% end %>
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 3b713b4e7..13c1bc632 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -84,7 +84,7 @@ end %>
<hr />
<div class="description">
<div class="contextual">
- <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if @issue.notes_addable? %>
+ <%= link_to icon_with_label('comment', l(:button_quote)), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment ' if @issue.notes_addable? %>
</div>
<p><strong><%=l(:field_description)%></strong></p>
diff --git a/app/views/issues/tabs/_time_entries.html.erb b/app/views/issues/tabs/_time_entries.html.erb
index 1807475bd..039f4b6a4 100644
--- a/app/views/issues/tabs/_time_entries.html.erb
+++ b/app/views/issues/tabs/_time_entries.html.erb
@@ -4,14 +4,14 @@
<% if time_entry.editable_by?(User.current) -%>
<div class="contextual">
<span class="journal-actions">
- <%= link_to l(:button_edit), edit_time_entry_path(time_entry),
+ <%= link_to icon_with_label('edit', l(:button_edit)), edit_time_entry_path(time_entry),
:title => l(:button_edit),
- :class => 'icon-only icon-edit' %>
- <%= link_to l(:button_delete), time_entry_path(time_entry),
+ :class => 'icon-only icon-edit ' %>
+ <%= link_to icon_with_label('del', l(:button_delete)), time_entry_path(time_entry),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:button_delete),
- :class => 'icon-only icon-del' %>
+ :class => 'icon-only icon-del ' %>
</span>
</div>
<% end -%>
@@ -29,4 +29,4 @@
</div>
</div>
<%= call_hook(:view_issues_history_time_entry_bottom, { :time_entry => time_entry }) %>
-<% end %> \ No newline at end of file
+<% end %>