mirror of
https://github.com/redmine/redmine.git
synced 2026-01-26 17:30:00 +01:00
Merge r23553 from trunk to 6.0-stable (#41967).
git-svn-id: https://svn.redmine.org/redmine/branches/6.0-stable@23556 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -104,6 +104,13 @@
|
||||
<path d="M7 7l5 5l-5 5"/>
|
||||
<path d="M13 7l5 5l-5 5"/>
|
||||
</symbol>
|
||||
<symbol viewBox="0 0 24 24" id="icon--circle-dot-filled">
|
||||
<path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 6.66a2 2 0 0 0 -1.977 1.697l-.018 .154l-.005 .149l.005 .15a2 2 0 1 0 1.995 -2.15z"/>
|
||||
</symbol>
|
||||
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--circle-minus">
|
||||
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/>
|
||||
<path d="M9 12l6 0"/>
|
||||
</symbol>
|
||||
<symbol viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" id="icon--clear-query">
|
||||
<path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"/>
|
||||
<path d="M9 9l6 6m0 -6l-6 6"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
@@ -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: " - "}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
<% if User.current.allowed_to?(:browse_repository, @project) %>
|
||||
<ul id="changes-legend">
|
||||
<li class="change change-A"><%= l(:label_added) %></li>
|
||||
<li class="change change-M"><%= l(:label_modified) %></li>
|
||||
<li class="change change-C"><%= l(:label_copied) %></li>
|
||||
<li class="change change-R"><%= l(:label_renamed) %></li>
|
||||
<li class="change change-D"><%= l(:label_deleted) %></li>
|
||||
<li class="change change-A"><%= scm_change_icon("A", (:label_added)) %></li>
|
||||
<li class="change change-M"><%= scm_change_icon("M", l(:label_modified)) %></li>
|
||||
<li class="change change-C"><%= scm_change_icon("C", l(:label_copied)) %></li>
|
||||
<li class="change change-R"><%= scm_change_icon("R", l(:label_renamed)) %></li>
|
||||
<li class="change change-D"><%= scm_change_icon("D", l(:label_deleted)) %></li>
|
||||
</ul>
|
||||
|
||||
<div class="changeset-changes">
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user