summaryrefslogtreecommitdiffstats
path: root/app/views/projects
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/projects
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/projects')
-rw-r--r--app/views/projects/index.html.erb4
-rw-r--r--app/views/projects/settings/_activities.html.erb4
-rw-r--r--app/views/projects/settings/_boards.html.erb4
-rw-r--r--app/views/projects/settings/_issue_categories.html.erb4
-rw-r--r--app/views/projects/settings/_issues.html.erb4
-rw-r--r--app/views/projects/settings/_members.html.erb6
-rw-r--r--app/views/projects/settings/_repositories.html.erb6
-rw-r--r--app/views/projects/settings/_versions.html.erb8
-rw-r--r--app/views/projects/show.html.erb12
9 files changed, 26 insertions, 26 deletions
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index d18cf6e47..f783e1daa 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -21,8 +21,8 @@
<% if User.current.logged? %>
<p style="text-align:right;">
-<span class="icon icon-user my-project"><%= l(:label_my_projects) %></span>
-<span class="icon icon-bookmarked-project"><%= l(:label_my_bookmarks) %></span>
+<span class="icon icon-user my-project"><%= icon_with_label('user', l(:label_my_projects)) %></span>
+<span class="icon icon-bookmarked-project"><%= icon_with_label('bookmarked', l(:label_my_bookmarks)) %></span>
</p>
<% end %>
diff --git a/app/views/projects/settings/_activities.html.erb b/app/views/projects/settings/_activities.html.erb
index dce68df2c..12e95c8d9 100644
--- a/app/views/projects/settings/_activities.html.erb
+++ b/app/views/projects/settings/_activities.html.erb
@@ -1,10 +1,10 @@
<div class="contextual">
-<%= link_to(l(:button_reset), project_enumerations_path(@project),
+<%= link_to(icon_with_label('del', l(:button_reset)), project_enumerations_path(@project),
:method => :delete,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del') %>
<% if User.current.admin? %>
-<%= link_to l(:label_administration), enumerations_path, :class => "icon icon-settings" %>
+<%= link_to icon_with_label('settings', l(:label_administration)), enumerations_path, :class => "icon icon-settings" %>
<% end %>
</div>
diff --git a/app/views/projects/settings/_boards.html.erb b/app/views/projects/settings/_boards.html.erb
index bf0b786fd..b5a6f36d6 100644
--- a/app/views/projects/settings/_boards.html.erb
+++ b/app/views/projects/settings/_boards.html.erb
@@ -1,5 +1,5 @@
<% if User.current.allowed_to?(:manage_boards, @project) %>
-<p><%= link_to l(:label_board_new), new_project_board_path(@project), :class => 'icon icon-add' %></p>
+<p><%= link_to icon_with_label('add', l(:label_board_new)), new_project_board_path(@project), :class => 'icon icon-add' %></p>
<% end %>
<% if @project.boards.any? %>
@@ -16,7 +16,7 @@
<div class="table-list-cell buttons">
<% if User.current.allowed_to?(:manage_boards, @project) %>
<%= reorder_handle(board) %>
- <%= link_to l(:button_edit), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
+ <%= link_to icon_with_label('edit', l(:button_edit)), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
<%= delete_link project_board_path(@project, board) %>
<% end %>
</div>
diff --git a/app/views/projects/settings/_issue_categories.html.erb b/app/views/projects/settings/_issue_categories.html.erb
index 3cd78e387..0123d7ce4 100644
--- a/app/views/projects/settings/_issue_categories.html.erb
+++ b/app/views/projects/settings/_issue_categories.html.erb
@@ -1,4 +1,4 @@
-<p><%= link_to l(:label_issue_category_new), new_project_issue_category_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_categories, @project) %></p>
+<p><%= link_to icon_with_label('add', l(:label_issue_category_new)), new_project_issue_category_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_categories, @project) %></p>
<% if @project.issue_categories.any? %>
<table class="list">
@@ -15,7 +15,7 @@
<td><%= category.assigned_to.name if category.assigned_to %></td>
<td class="buttons">
<% if User.current.allowed_to?(:manage_categories, @project) %>
- <%= link_to l(:button_edit), edit_issue_category_path(category), :class => 'icon icon-edit' %>
+ <%= link_to icon_with_label('edit', l(:button_edit)), edit_issue_category_path(category), :class => 'icon icon-edit' %>
<%= delete_link issue_category_path(category) %>
<% end %>
</td>
diff --git a/app/views/projects/settings/_issues.html.erb b/app/views/projects/settings/_issues.html.erb
index 4fe977fb8..f7a84cdaa 100644
--- a/app/views/projects/settings/_issues.html.erb
+++ b/app/views/projects/settings/_issues.html.erb
@@ -4,7 +4,7 @@
<% unless @trackers.empty? %>
<fieldset class="box tabular" id="project_trackers"><legend><%= toggle_checkboxes_link('#project_trackers input[type=checkbox]') %><%= l(:label_tracker_plural)%></legend>
<% if User.current.admin? %>
- <div class="contextual"><%= link_to l(:label_administration), trackers_path, :class => "icon icon-settings" %></div>
+ <div class="contextual"><%= link_to icon_with_label('settings', l(:label_administration)), trackers_path, :class => "icon icon-settings" %></div>
<% end %>
<% @trackers.each do |tracker| %>
<label class="floating">
@@ -19,7 +19,7 @@
<% unless @issue_custom_fields.empty? %>
<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%= toggle_checkboxes_link('#project_issue_custom_fields input[type=checkbox]:enabled') %><%=l(:label_custom_field_plural)%></legend>
<% if User.current.admin? %>
- <div class="contextual"><%= link_to l(:label_administration), custom_fields_path, :class => "icon icon-settings" %></div>
+ <div class="contextual"><%= link_to icon_with_label('settings', l(:label_administration)), custom_fields_path, :class => "icon icon-settings" %></div>
<% end %>
<% all_issue_custom_field_ids = @project.all_issue_custom_fields.ids %>
<% @issue_custom_fields.each do |custom_field| %>
diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb
index 811b0051c..0582ef840 100644
--- a/app/views/projects/settings/_members.html.erb
+++ b/app/views/projects/settings/_members.html.erb
@@ -1,9 +1,9 @@
<% members = @project.memberships.preload(:project).sorted.to_a %>
<% if User.current.admin? %>
- <div class="contextual"><%= link_to l(:label_administration), users_path, :class => "icon icon-settings" %></div>
+ <div class="contextual"><%= link_to icon_with_label('settings', l(:label_administration)), users_path, :class => "icon icon-settings" %></div>
<% end %>
-<p><%= link_to l(:label_member_new), new_project_membership_path(@project), :remote => true, :class => "icon icon-add" %></p>
+<p><%= link_to icon_with_label('add', l(:label_member_new)), new_project_membership_path(@project), :remote => true, :class => "icon icon-add" %></p>
<% if members.any? %>
<table class="list members">
@@ -25,7 +25,7 @@
<div id="member-<%= member.id %>-form"></div>
</td>
<td class="buttons">
- <%= link_to l(:button_edit),
+ <%= link_to icon_with_label('edit', l(:button_edit)),
edit_membership_path(member),
:remote => true,
:class => 'icon icon-edit' %>
diff --git a/app/views/projects/settings/_repositories.html.erb b/app/views/projects/settings/_repositories.html.erb
index 8ae2ba25b..db1b992c8 100644
--- a/app/views/projects/settings/_repositories.html.erb
+++ b/app/views/projects/settings/_repositories.html.erb
@@ -1,5 +1,5 @@
<% if User.current.allowed_to?(:manage_repository, @project) %>
- <p><%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %></p>
+ <p><%= link_to icon_with_label('add', l(:label_repository_new)), new_project_repository_path(@project), :class => 'icon icon-add' %></p>
<% end %>
<% if @project.repositories.any? %>
@@ -26,9 +26,9 @@
<td><%= repository.url %></td>
<td class="buttons">
<% if User.current.allowed_to?(:manage_repository, @project) %>
- <%= link_to(l(:label_user_plural), committers_repository_path(repository),
+ <%= link_to(icon_with_label('user', l(:label_user_plural)), committers_repository_path(repository),
:class => 'icon icon-user') %>
- <%= link_to(l(:button_edit), edit_repository_path(repository),
+ <%= link_to(icon_with_label('edit', l(:button_edit)), edit_repository_path(repository),
:class => 'icon icon-edit') %>
<%= delete_link repository_path(repository) %>
<% end %>
diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb
index 80d67cc24..172d6e895 100644
--- a/app/views/projects/settings/_versions.html.erb
+++ b/app/views/projects/settings/_versions.html.erb
@@ -1,10 +1,10 @@
<% if @versions.any? %>
<div class="contextual">
- <%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :class => 'icon icon-locked', :method => :put %>
+ <%= link_to icon_with_label('lock', l(:label_close_versions)), close_completed_project_versions_path(@project), :class => 'icon icon-locked', :method => :put %>
</div>
<% end %>
<p>
- <%= link_to l(:label_version_new), new_project_version_path(@project, :back_url => ''), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>
+ <%= link_to icon_with_label('add', l(:label_version_new)), new_project_version_path(@project, :back_url => ''), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>
</p>
<%= form_tag(settings_project_path(@project, :tab => 'versions'), :method => :get) do %>
@@ -14,7 +14,7 @@
<label for='name'><%= l(:label_version) %>:</label>
<%= text_field_tag 'version_name', @version_name, :size => 30 %>
<%= submit_tag l(:button_apply), :name => nil %>
-<%= link_to l(:button_clear), settings_project_path(@project, :tab => 'versions'), :class => 'icon icon-reload' %>
+<%= link_to icon_with_label('reload', l(:button_clear)), settings_project_path(@project, :tab => 'versions'), :class => 'icon icon-reload' %>
</fieldset>
<% end %>
&nbsp;
@@ -43,7 +43,7 @@
<td><%= link_to_if_authorized(version.wiki_page_title, {:controller => 'wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %></td>
<td class="buttons">
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
- <%= link_to l(:button_edit), edit_version_path(version), :class => 'icon icon-edit' %>
+ <%= link_to icon_with_label('edit', l(:button_edit)), edit_version_path(version), :class => 'icon icon-edit' %>
<%= delete_link version_path(version) %>
<% end %>
</td>
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index a1035927f..abb5ec23f 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -3,19 +3,19 @@
<%= actions_dropdown do %>
<% if User.current.allowed_to?(:add_subprojects, @project) %>
- <%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
+ <%= link_to icon_with_label('add', l(:label_subproject_new)), new_project_path(:parent_id => @project), :class => 'icon icon-add' %>
<% end %>
<% if User.current.allowed_to?(:close_project, @project) %>
<% if @project.active? %>
- <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_project_close_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-lock' %>
+ <%= link_to icon_with_label('lock', l(:button_close)), close_project_path(@project), :data => {:confirm => l(:text_project_close_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-lock' %>
<% else %>
- <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_project_reopen_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-unlock' %>
+ <%= link_to icon_with_label('unlock', l(:button_reopen)), reopen_project_path(@project), :data => {:confirm => l(:text_project_reopen_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-unlock' %>
<% end %>
<% end %>
<% if @project.deletable? %>
- <%= link_to l(:button_delete), project_path(@project), :method => :delete, :class => 'icon icon-del' %>
+ <%= link_to icon_with_label('del', l(:button_delete)), project_path(@project), :method => :delete, :class => 'icon icon-del' %>
<% 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},
:class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %>
<% end %>
@@ -137,7 +137,7 @@
<ul class="subprojects">
<% @subprojects.each do |project| %>
<li><%= link_to(project.name, project_path(project), :class => project.css_classes).html_safe %></li>
- <% end %>
+ <% end %>
</ul>
</div>
<% end %>