diff --git a/app/assets/stylesheets/scm.css b/app/assets/stylesheets/scm.css
index e3eca24df..0df148f8e 100644
--- a/app/assets/stylesheets/scm.css
+++ b/app/assets/stylesheets/scm.css
@@ -19,24 +19,48 @@ div.revision-graph { position: absolute; min-width: 1px; }
div.changeset-changes ul { margin: 0; padding: 0; }
div.changeset-changes ul > ul { margin-left: 18px; padding: 0; }
+div.changeset-changes ul:first-child > li {padding-left: 0}
li.change {
list-style-type:none;
- background-image: url(/bullet_black.png);
- background-position: 1px 2px;
- background-repeat: no-repeat;
padding-top: 1px;
padding-bottom: 1px;
padding-left: 20px;
margin: 0;
}
-li.change.folder { background-image: url(/folder_open.png); }
+li.change:not(:has(svg)) {
+ background-image: url(/bullet_black.png);
+ background-position: 1px 2px;
+ background-repeat: no-repeat;
+}
+li.change.folder:not(:has(svg)) { background-image: url(/folder_open.png); }
li.change.folder.change-A { background-image: url(/folder_open_add.png); }
li.change.folder.change-M { background-image: url(/folder_open_orange.png); }
-li.change.change-A { background-image: url(/bullet_add.png); }
-li.change.change-M { background-image: url(/bullet_orange.png); }
-li.change.change-C { background-image: url(/bullet_blue.png); }
-li.change.change-R { background-image: url(/bullet_purple.png); }
-li.change.change-D { background-image: url(/bullet_delete.png); }
+
+li.change.change-A:not(:has(svg)) { background-image: url(/bullet_add.png); }
+li.change.change-A svg.icon-svg {
+ fill: #5db651;
+ stroke: #ffffff;
+}
+li.change.change-M:not(:has(svg)) { background-image: url(/bullet_orange.png); }
+li.change.change-M svg.icon-svg {
+ fill: #f0a810;
+ stroke: #ffffff;
+}
+li.change.change-C:not(:has(svg)) { background-image: url(/bullet_blue.png); }
+li.change.change-C svg.icon-svg {
+ fill: #049cec;
+ stroke: #ffffff;
+}
+li.change.change-R:not(:has(svg)) { background-image: url(/bullet_purple.png); }
+li.change.change-R svg.icon-svg {
+ fill: #8404ee;
+ stroke: #ffffff;
+}
+li.change.change-D:not(:has(svg)) { background-image: url(/bullet_delete.png); }
+li.change.change-D svg.icon-svg {
+ fill: #c61a1a;
+ stroke: #ffffff;
+}
li.change .copied-from { font-style: italic; color: #999; font-size: 0.9em; }
li.change .copied-from:before { content: " - "}
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb
index 99006308e..473f8f780 100644
--- a/app/helpers/icons_helper.rb
+++ b/app/helpers/icons_helper.rb
@@ -67,6 +67,18 @@ module IconsHelper
sprite_icon(icon_name, **options)
end
+ def scm_change_icon(action, name, **options)
+ icon_name = case action
+ when 'A'
+ "add"
+ when 'D'
+ "circle-minus"
+ else
+ "circle-dot-filled"
+ end
+ sprite_icon(icon_name, name, size: 14)
+ end
+
private
def svg_sprite_icon(icon_name, size: DEFAULT_ICON_SIZE, sprite: DEFAULT_SPRITE, css_class: nil)
diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb
index 7a6978979..c72816367 100644
--- a/app/helpers/repositories_helper.rb
+++ b/app/helpers/repositories_helper.rb
@@ -96,7 +96,7 @@ module RepositoriesHelper
if s = tree[file][:s]
style << ' folder'
path_param = to_path_param(@repository.relative_path(file))
- text = link_to(h(text), :controller => 'repositories',
+ text = link_to(sprite_icon("folder-open", h(text)), :controller => 'repositories',
:action => 'show',
:id => @project,
:repository_id => @repository.identifier_param,
@@ -108,7 +108,7 @@ module RepositoriesHelper
elsif c = tree[file][:c]
style << " change-#{c.action}"
path_param = to_path_param(@repository.relative_path(c.path))
- text = link_to(h(text), :controller => 'repositories',
+ text = link_to(scm_change_icon(c.action, h(text)), :controller => 'repositories',
:action => 'entry',
:id => @project,
:repository_id => @repository.identifier_param,
diff --git a/app/views/repositories/revision.html.erb b/app/views/repositories/revision.html.erb
index ba716dd41..9423e5438 100644
--- a/app/views/repositories/revision.html.erb
+++ b/app/views/repositories/revision.html.erb
@@ -30,11 +30,11 @@
<% if User.current.allowed_to?(:browse_repository, @project) %>
-- <%= l(:label_added) %>
-- <%= l(:label_modified) %>
-- <%= l(:label_copied) %>
-- <%= l(:label_renamed) %>
-- <%= l(:label_deleted) %>
+- <%= scm_change_icon("A", (:label_added)) %>
+- <%= scm_change_icon("M", l(:label_modified)) %>
+- <%= scm_change_icon("C", l(:label_copied)) %>
+- <%= scm_change_icon("R", l(:label_renamed)) %>
+- <%= scm_change_icon("D", l(:label_deleted)) %>
diff --git a/config/icon_source.yml b/config/icon_source.yml
index 8769a3212..a73e9a2ba 100644
--- a/config/icon_source.yml
+++ b/config/icon_source.yml
@@ -209,3 +209,8 @@
svg: square-rounded-plus
- name: toggle-minus
svg: square-rounded-minus
+- name: circle-minus
+ svg: circle-minus
+- name: circle-dot-filled
+ svg: circle-dot
+ style: filled