diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg
index 8fc5dee62..dadb68167 100644
--- a/app/assets/images/icons.svg
+++ b/app/assets/images/icons.svg
@@ -167,6 +167,9 @@
+
+
+
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 409ea2e21..9aec31925 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -171,7 +171,7 @@ a.user.user-mention {
#sidebar a.selected:hover {text-decoration:none;}
#sidebar .query.default {font-weight: bold;}
#admin-menu a {line-height:1.7em;}
-#admin-menu a.selected {padding-left: 20px !important; background-position: 2px 40%;}
+#admin-menu a.selected:not(:has(svg)) {padding-left: 20px !important; background-position: 2px 40%;}
a.collapsible {padding-left: 12px; }
@@ -354,10 +354,11 @@ body.avatars-on #replies .message.reply {padding-left: 32px;}
#replies h4 img.gravatar {margin-left:-32px;}
tr.version.closed, tr.version.closed a { color: #999; }
-tr.version td.name { padding-left: 20px; }
+tr.version td.name:not(.icon-shared) { padding-left: 20px; }
tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: center; white-space:nowrap; }
tr.member td.icon-user, #principals_for_new_member .icon-user {background:transparent;}
+#principals_for_new_member svg {margin-right: 4px;}
tr.user td {width:13%;white-space: nowrap;}
td.username, td.firstname, td.lastname, td.email {text-align:left !important;}
@@ -1000,6 +1001,8 @@ span.required {color: #bb0000;}
.attachments_fields input.description, #existing-attachments input.description {margin-left:4px; width:340px;}
.attachments_fields>span, #existing-attachments>span {display:block; white-space:nowrap;}
+/* ToDo: delete this line when legacy icons are deleted */
+.attachments_fields , #existing-attachments .icon-attachment {background-image: none; padding-left: 0}
.attachments_fields input.filename, #existing-attachments .filename {border:0; width:250px; color:#555; background-color:inherit; }
.tabular input.filename {max-width:75% !important;}
.attachments_fields input.filename {height:1.8em;}
@@ -1634,6 +1637,18 @@ a.icon:hover svg, a.icon-only:hover svg {
fill: #c61a1a;
}
+svg.icon-error {
+ fill: #f37c60;
+}
+
+svg.icon-ok {
+ fill: #5db651;
+}
+
+.icon-warning svg {
+ fill: #e4bc4b;
+}
+
.icon-only span {
display: none;
}
@@ -1646,6 +1661,11 @@ svg {
width: 14px;
height: 14px;
}
+
+ &.s12 {
+ width: 12px;
+ height: 12px;
+ }
}
span.icon-label {
@@ -1655,6 +1675,7 @@ span.icon-label {
.icon-bookmarked-project svg {
fill: #169;
}
+
.icon-user svg {
fill: #169;
}
@@ -1703,8 +1724,8 @@ span.icon-label {
.icon-time-entry:not(:has(svg)), .icon-time:not(:has(svg)) { background-image: url(/time.png); }
.icon-time-add:not(:has(svg)) { background-image: url(/time_add.png); }
.icon-stats:not(:has(svg)) { background-image: url(/stats.png); }
-.icon-warning { background-image: url(/warning.png); }
-.icon-error { background-image: url(/exclamation.png); }
+.icon-warning:not(:has(svg)) { background-image: url(/warning.png); }
+.icon-error:not(svg) { background-image: url(/exclamation.png); }
.icon-fav:not(:has(svg)) { background-image: url(/fav.png); }
.icon-fav-off:not(:has(svg)) { background-image: url(/fav_off.png); }
.icon-reload:not(:has(svg)) { background-image: url(/reload.png); }
@@ -1724,14 +1745,14 @@ span.icon-label {
.icon-email:not(:has(svg)) { background-image: url(/email.png); }
.icon-email-disabled:not(:has(svg)) { background-image: url(/email_disabled.png); }
.icon-email-add:not(:has(svg)) { background-image: url(/email_add.png); }
-.icon-ok { background-image: url(/true.png); }
+.icon-ok:not(svg) { background-image: url(/true.png); }
.icon-not-ok { background-image: url(/false.png); }
.icon-link-break:not(:has(svg)) { background-image: url(/link_break.png); }
.icon-list:not(:has(svg)) { background-image: url(/text_list_bullets.png); }
.icon-close:not(:has(svg)) { background-image: url(/close.png); }
.icon-close:hover:not(:has(svg)) { background-image: url(/close_hl.png); }
.icon-settings:not(:has(svg)) { background-image: url(/changeset.png); }
-.icon-group:not(:has(svg)),.icon-groupnonmember, .icon-groupanonymous { background-image: url(/group.png); }
+.icon-group:not(:has(svg)),.icon-groupnonmember:not(:has(svg)), .icon-groupanonymous:not(:has(svg)) { background-image: url(/group.png); }
.icon-roles:not(:has(svg)) { background-image: url(/database_key.png); }
.icon-issue-edit:not(:has(svg)) { background-image: url(/ticket_edit.png); }
.icon-workflows:not(:has(svg)) { background-image: url(/ticket_go.png); }
@@ -1745,8 +1766,8 @@ span.icon-label {
.icon-reply:not(:has(svg)) { background-image: url(/comments.png); }
.icon-wiki-page:not(:has(svg)) { background-image: url(/wiki_edit.png); }
.icon-document:not(:has(svg)) { background-image: url(/document.png); }
-.icon-add-bullet { background-image: url(/bullet_add.png); }
-.icon-shared { background-image: url(/link.png); }
+.icon-add-bullet:not(:has(svg)) { background-image: url(/bullet_add.png); }
+.icon-shared:not(:has(svg)) { background-image: url(/link.png); }
.icon-actions:not(:has(svg)) { background-image: url(/3_bullets.png); }
.icon-sort-handle:not(:has(svg)) { background-image: url(/reorder.png); }
.icon-expanded { background-image: url(/arrow_down.png); }
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a677b80a8..eedf4f891 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -657,7 +657,7 @@ module ApplicationHelper
check_box_tag(name, principal.id, false, :id => nil) +
(avatar(principal, :size => 16).presence ||
content_tag(
- 'span', nil,
+ 'span', icon_for_principal(principal.class.name.downcase),
:class => "name icon icon-#{principal.class.name.downcase}"
)
) + principal.to_s
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb
index dc7d94ae0..24dbf0c31 100644
--- a/app/helpers/icons_helper.rb
+++ b/app/helpers/icons_helper.rb
@@ -21,22 +21,26 @@ module IconsHelper
DEFAULT_ICON_SIZE = "14"
DEFAULT_SPRITE = "icons"
- def icon_with_label(icon_name, label_text, icon_only: false)
+ def icon_with_label(icon_name, label_text, icon_only: false, size: DEFAULT_ICON_SIZE, css_class: nil)
label_classes = ["icon-label"]
label_classes << "hidden" if icon_only
- sprite_icon(icon_name) + content_tag(:span, label_text, class: label_classes.join(' '))
+ sprite_icon(icon_name, size: size, css_class: css_class) + content_tag(:span, label_text, class: label_classes.join(' '))
end
- def icon_for_file(entry, name)
+ def icon_for_file(entry, name, size: DEFAULT_ICON_SIZE, css_class: nil)
if entry.is_dir?
- icon_with_label("folder", name)
+ icon_with_label("folder", name, size: size, css_class: css_class)
else
icon = icon_for_mime_type(Redmine::MimeType.css_class_of(name))
- icon_with_label(icon, name)
+ icon_with_label(icon, name, size: size, css_class: css_class)
end
end
- def icon_for_event_type(event_type)
+ def icon_for_principal(principal_class, size: DEFAULT_ICON_SIZE, css_class: nil)
+ sprite_icon('group', size: size, css_class:css_class) if ['groupanonymous', 'groupnonmember', 'group'].include?(principal_class)
+ end
+
+ def icon_for_event_type(event_type, size: DEFAULT_ICON_SIZE, css_class: nil)
icon = case event_type
when 'reply', 'issue-note'
'comments'
@@ -48,10 +52,10 @@ module IconsHelper
event_type
end
- sprite_icon icon
+ sprite_icon(icon, size: size, css_class: css_class)
end
- def sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE)
+ def sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE, css_class: nil)
sprite_path = "#{sprite}.svg"
content_tag(
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index 2091bb835..71527b87b 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -69,11 +69,11 @@ module UsersHelper
url = {:controller => 'users', :action => 'update', :id => user, :page => params[:page], :status => params[:status], :tab => nil}
if user.locked?
- link_to l(:button_unlock), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
+ link_to icon_with_label('unlock', l(:button_unlock)), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
elsif user.registered?
- link_to l(:button_activate), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
+ link_to icon_with_label('unlock', l(:button_activate)), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
elsif user != User.current
- link_to l(:button_lock), url.merge(:user => {:status => User::STATUS_LOCKED}), :method => :put, :class => 'icon icon-lock'
+ link_to icon_with_label('lock', l(:button_lock)), url.merge(:user => {:status => User::STATUS_LOCKED}), :method => :put, :class => 'icon icon-lock'
end
end
diff --git a/app/views/admin/info.html.erb b/app/views/admin/info.html.erb
index 2ff8de50d..197bf5993 100644
--- a/app/views/admin/info.html.erb
+++ b/app/views/admin/info.html.erb
@@ -6,7 +6,7 @@
<% @checklist.each do |label, result| %>
| <%= label.is_a?(Symbol) ? l(label) : label %> |
- |
+ <%= result ? sprite_icon('checked', css_class: "icon-ok") : sprite_icon('error', css_class: "icon-error") %> |
<% end %>
diff --git a/app/views/common/error.html.erb b/app/views/common/error.html.erb
index 04b4b0377..4a7e2bf0c 100644
--- a/app/views/common/error.html.erb
+++ b/app/views/common/error.html.erb
@@ -5,7 +5,7 @@
<% end %>
<% if @archived_project && User.current.admin? %>
- <%= link_to l(:button_unarchive), unarchive_project_path(@archived_project), :method => :post, :class => 'icon icon-unlock' %>
+ <%= link_to icon_with_label('unlock', l(:button_unarchive)), unarchive_project_path(@archived_project), :method => :post, :class => 'icon icon-unlock' %>
<% end %>
<%= l(:button_back) %>
diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb
index 219122d25..f00b65750 100644
--- a/app/views/issues/_edit.html.erb
+++ b/app/views/issues/_edit.html.erb
@@ -54,6 +54,7 @@
<% @issue.attachments.each do |attachment| %>
+ <%= sprite_icon('attachment', size: 12) %>
<%= text_field_tag '', attachment.filename, :class => "icon icon-attachment filename", :disabled => true %>
- <%= link_to l(:label_search_for_watchers),
+ <%= link_to icon_with_label('add', l(:label_search_for_watchers), size: 12),
{:controller => 'watchers', :action => 'new', :project_id => @issue.project},
:class => 'icon icon-add-bullet',
:remote => true,
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index 5d10f7473..9a8d63fac 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -63,7 +63,7 @@
<%= export_csv_separator_select_tag %>
<% if @issue_count > Setting.issues_export_limit.to_i %>
- <%= l(:setting_issues_export_limit) %>: <%= Setting.issues_export_limit.to_i %>
+ <%= icon_with_label('warning', l(:setting_issues_export_limit)) %>: <%= Setting.issues_export_limit.to_i %>
<% end %>
diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb
index 0582ef840..2c635e823 100644
--- a/app/views/projects/settings/_members.html.erb
+++ b/app/views/projects/settings/_members.html.erb
@@ -19,7 +19,10 @@
<% members.each do |member| %>
<% next if member.new_record? %>
- | <%= link_to_user member.principal %> |
+
+ <%= icon_for_principal(member.principal.class.name.downcase) %>
+ <%= link_to_user member.principal %>
+ |
<%= member.roles.sort.collect(&:to_s).join(', ') %>
diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb
index 172d6e895..8af654b2c 100644
--- a/app/views/projects/settings/_versions.html.erb
+++ b/app/views/projects/settings/_versions.html.erb
@@ -34,7 +34,11 @@
|
<% @versions.each do |version| %>
- | <%= link_to_version version %> |
+ <% is_shared = version.project != @project %>
+
+ <%= sprite_icon('link') if is_shared %>
+ <%= link_to_version version %>
+ |
<%= checked_image(version.id == @project.default_version_id) %> |
<%= format_date(version.effective_date) %> |
<%= version.description %> |
diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb
index 1c001cae4..7add70419 100644
--- a/app/views/roles/index.html.erb
+++ b/app/views/roles/index.html.erb
@@ -18,7 +18,7 @@
<% unless role.builtin? || role.workflow_rules.exists? %>
- <%= l(:text_role_no_workflow) %> (<%= link_to l(:button_edit), edit_workflows_path(:role_id => role) %>)
+ <%= icon_with_label('warning', l(:text_role_no_workflow)) %> (<%= link_to l(:button_edit), edit_workflows_path(:role_id => role) %>)
<% end %>
|
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index 786630869..adc43d417 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -1,5 +1,5 @@
-<%= link_to l(:label_profile), user_path(@user), :class => 'icon icon-user' %>
+<%= link_to icon_with_label('user', l(:label_profile)), user_path(@user), :class => 'icon icon-user' %>
<%= additional_emails_link(@user) %>
<%= change_status_link(@user) %>
<%= delete_link user_path(@user) if User.current != @user %>
diff --git a/app/views/wiki/date_index.html.erb b/app/views/wiki/date_index.html.erb
index b58ae1fcb..ac9e34505 100644
--- a/app/views/wiki/date_index.html.erb
+++ b/app/views/wiki/date_index.html.erb
@@ -4,7 +4,7 @@
<% end %>
<%= watcher_link(@wiki, User.current) %>
<% if User.current.allowed_to?(:manage_wiki, @project) %>
-<%= link_to l(:button_delete), {:controller => 'wikis', :action => 'destroy', :id => @project}, :class => 'icon icon-del' %>
+<%= link_to icon_with_label('del', l(:button_delete)), {:controller => 'wikis', :action => 'destroy', :id => @project}, :class => 'icon icon-del' %>
<% end %>
diff --git a/app/views/wiki/diff.html.erb b/app/views/wiki/diff.html.erb
index 765e51a0a..dd109ba79 100644
--- a/app/views/wiki/diff.html.erb
+++ b/app/views/wiki/diff.html.erb
@@ -1,5 +1,5 @@
-<%= link_to(l(:label_history), {:action => 'history', :id => @page.title},
+<%= link_to(icon_with_label('history', l(:label_history)), {:action => 'history', :id => @page.title},
:class => 'icon icon-history') %>
diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb
index 7e9cf42af..47204c945 100644
--- a/app/views/wiki/edit.html.erb
+++ b/app/views/wiki/edit.html.erb
@@ -41,6 +41,7 @@
<% @page.attachments.each do |attachment| %>
+ <%= sprite_icon('attachment', size: 12) %>
<%= text_field_tag '', attachment.filename, :class => "icon icon-attachment filename", :disabled => true %>