summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/images/icons.svg7
-rw-r--r--app/assets/stylesheets/application.css2
-rw-r--r--app/assets/stylesheets/context_menu.css3
-rw-r--r--app/assets/stylesheets/context_menu_rtl.css11
-rw-r--r--app/assets/stylesheets/rtl.css14
-rw-r--r--app/assets/stylesheets/scm.css42
-rw-r--r--app/helpers/icons_helper.rb12
-rw-r--r--app/helpers/repositories_helper.rb4
-rw-r--r--app/views/context_menus/issues.html.erb9
-rw-r--r--app/views/context_menus/time_entries.html.erb2
-rw-r--r--app/views/repositories/revision.html.erb10
-rw-r--r--app/views/versions/_sidebar.html.erb2
12 files changed, 89 insertions, 29 deletions
diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg
index 55925cddd..ef44b6ddf 100644
--- a/app/assets/images/icons.svg
+++ b/app/assets/images/icons.svg
@@ -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"/>
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index a17be1e81..61df9fd98 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -241,6 +241,8 @@ a.user.user-mention {
#admin-menu a.selected:not(:has(svg)) {padding-left: 20px !important; background-position: 2px 40%;}
a#toggle-completed-versions {color:#999;}
+a#toggle-completed-versions span.icon-label {margin-left: 0}
+a#toggle-completed-versions svg, a#toggle-completed-versions:hover svg {stroke:#999}
/***** Dropdown *****/
.drdn {position:relative;}
diff --git a/app/assets/stylesheets/context_menu.css b/app/assets/stylesheets/context_menu.css
index 875564c8f..a4405ffb2 100644
--- a/app/assets/stylesheets/context_menu.css
+++ b/app/assets/stylesheets/context_menu.css
@@ -45,7 +45,8 @@
}
#context-menu li>a { flex-grow: 1; }
#context-menu a.disabled, #context-menu a.disabled:hover {color: #aaa;}
-#context-menu li a.submenu { padding-right:16px; background:url("/arrow_right.png") right no-repeat; padding-left: 28px;}
+#context-menu li a.submenu:not(:has(+ span)) { padding-right:16px; background:url("/arrow_right.png") right no-repeat;}
+#context-menu li a.submenu { padding-left: 28px;}
#context-menu li:hover { border:1px solid #628db6; background-color:#eef5fd; border-radius:3px; }
#context-menu a:hover {color:#2A5685;}
#context-menu li.folder ul li a:not(.icon) {
diff --git a/app/assets/stylesheets/context_menu_rtl.css b/app/assets/stylesheets/context_menu_rtl.css
index cab05ad64..b373ad146 100644
--- a/app/assets/stylesheets/context_menu_rtl.css
+++ b/app/assets/stylesheets/context_menu_rtl.css
@@ -6,10 +6,9 @@
#context-menu li.folder ul { left:auto; right:168px; }
#context-menu li.folder>ul { left:auto; right:148px; }
-#context-menu li a.submenu { background:url("/arrow_left.png") left no-repeat; }
-
-#context-menu a {
- background-position: 100% 40%;
- padding-right: 20px;
- padding-left: 0px;
+#context-menu li a.submenu:not(:has(+ span)) { background:url("/arrow_left.png") left no-repeat; }
+#context-menu li.folder ul li a:not(.icon) {padding-right: 28px;}
+#context-menu li a.submenu {
+ padding-right: 28px;
+ padding-left: 0;
}
diff --git a/app/assets/stylesheets/rtl.css b/app/assets/stylesheets/rtl.css
index 0e7096d8a..83b08b23b 100644
--- a/app/assets/stylesheets/rtl.css
+++ b/app/assets/stylesheets/rtl.css
@@ -40,8 +40,8 @@ div.modal p.buttons {text-align:left;}
#sidebar a.selected {padding:1px 2px 2px 3px; margin-left:0px; margin-right:-2px;}
#admin-menu a.selected {padding-left:0!important; padding-right:20px!important; background-position:right 2px 40%;}
-a.collapsible {padding-left:0px; padding-right:12px; background: url(/arrow_down.png) no-repeat right 0px top 50%;}
-a.collapsible.collapsed {background-image: url(/arrow_left.png);}
+a.collapsible:not(:has(svg)) {padding-left:0px; padding-right:12px; background: url(/arrow_down.png) no-repeat right 0px top 50%;}
+a.collapsible.collapsed:not(:has(svg)) {background-image: url(/arrow_left.png);}
/***** Tables *****/
table.list td {padding-left:0px; padding-right:10px;}
@@ -137,8 +137,8 @@ div.issue div.subject div div {padding-left:0px; padding-right:16px;}
div.issue span.private, div.journal span.private {margin-right:0px; margin-left:2px;}
-fieldset.collapsible>legend {padding-left:0px; padding-right:18px; background: url(/arrow_down.png) no-repeat right 50%;}
-fieldset.collapsible.collapsed>legend { background-image: url(/arrow_left.png); }
+fieldset.collapsible>legend:not(:has(svg)) {padding-left:0px; padding-right:18px; background: url(/arrow_down.png) no-repeat right 50%;}
+fieldset.collapsible.collapsed>legend:not(:has(svg)) { background-image: url(/arrow_left.png); }
fieldset#filters td.add-filter {text-align:left; }
@@ -345,7 +345,7 @@ a.wiki-anchor {margin-left:0px; margin-right:6px;}
.project.marker {margin-left:0; margin-right:-4px;}
/***** Icons *****/
-.icon {
+.icon:not(:has(svg)) {
background-position: right 50%;
padding-left:0; padding-right:20px;
}
@@ -360,6 +360,10 @@ div.issue table img.gravatar {
margin: 0 0em 0 0.5em;
}
+span.icon-label {
+ margin-right: 4px;
+}
+
h2 img.gravatar {margin: -2px 0 -4px 4px;}
h3 img.gravatar {margin: -4px 0 -4px 4px;}
h4 img.gravatar {margin: -6px 0 -4px 4px;}
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/context_menus/issues.html.erb b/app/views/context_menus/issues.html.erb
index 64603dc61..3406e78d6 100644
--- a/app/views/context_menus/issues.html.erb
+++ b/app/views/context_menus/issues.html.erb
@@ -12,6 +12,7 @@
<% if @allowed_statuses.present? %>
<li class="folder">
<a href="#" class="submenu"><%= l(:field_status) %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% @allowed_statuses.each do |s| -%>
<li>
@@ -33,6 +34,7 @@
<% if @trackers.present? %>
<li class="folder">
<a href="#" class="submenu"><%= l(:field_tracker) %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% @trackers.each do |t| -%>
<li><%= context_menu_link t.name, _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'tracker_id' => t}, :back_url => @back), :method => :patch,
@@ -45,6 +47,7 @@
<% if @safe_attributes.include?('priority_id') && @priorities.present? -%>
<li class="folder">
<a href="#" class="submenu"><%= l(:field_priority) %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% @priorities.each do |p| -%>
<li><%= context_menu_link p.name, _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'priority_id' => p}, :back_url => @back), :method => :patch,
@@ -57,6 +60,7 @@
<% if @safe_attributes.include?('fixed_version_id') && @versions.present? -%>
<li class="folder">
<a href="#" class="submenu"><%= l(:field_fixed_version) %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% @versions.sort.each do |v| -%>
<li><%= context_menu_link format_version_name(v), _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'fixed_version_id' => v}, :back_url => @back), :method => :patch,
@@ -71,6 +75,7 @@
<% if @safe_attributes.include?('assigned_to_id') && @assignables.present? -%>
<li class="folder">
<a href="#" class="submenu"><%= l(:field_assigned_to) %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% if @assignables.include?(User.current) %>
<li><%= context_menu_link "<< #{l(:label_me)} >>", _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'assigned_to_id' => User.current}, :back_url => @back), :method => :patch,
@@ -89,6 +94,7 @@
<% if @safe_attributes.include?('category_id') && @project && @project.issue_categories.any? -%>
<li class="folder">
<a href="#" class="submenu"><%= l(:field_category) %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% @project.issue_categories.each do |u| -%>
<li><%= context_menu_link u.name, _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'category_id' => u}, :back_url => @back), :method => :patch,
@@ -103,6 +109,7 @@
<% if @safe_attributes.include?('done_ratio') && Issue.use_field_for_done_ratio? %>
<li class="folder">
<a href="#" class="submenu"><%= l(:field_done_ratio) %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% (0..10).map{|x|x*10}.each do |p| -%>
<li><%= context_menu_link "#{p}%", _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'done_ratio' => p}, :back_url => @back), :method => :patch,
@@ -115,6 +122,7 @@
<% @options_by_custom_field.each do |field, options| %>
<li class="folder <%= field.css_classes %>">
<a href="#" class="submenu"><%= field.name %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% options.each do |text, value| %>
<li><%= bulk_update_custom_field_context_menu_link(field, text, value || text) %></li>
@@ -129,6 +137,7 @@
<% if @can[:add_watchers] %>
<li class="folder">
<a href="#" class="submenu"><%= l(:label_issue_watchers) %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<li><%= context_menu_link sprite_icon('add', l(:button_add)),
new_watchers_path(:object_type => 'issue', :object_id => @issue_ids),
diff --git a/app/views/context_menus/time_entries.html.erb b/app/views/context_menus/time_entries.html.erb
index c350aa337..0073b87cf 100644
--- a/app/views/context_menus/time_entries.html.erb
+++ b/app/views/context_menus/time_entries.html.erb
@@ -12,6 +12,7 @@
<% if @activities.present? -%>
<li class="folder">
<a href="#" class="submenu"><%= l(:field_activity) %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% @activities.each do |u| -%>
<li><%= context_menu_link u.name, {:controller => 'timelog', :action => 'bulk_update', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => u}, :back_url => @back}, :method => :post,
@@ -24,6 +25,7 @@
<% @options_by_custom_field.each do |field, options| %>
<li class="folder <%= field.css_classes %>">
<a href="#" class="submenu"><%= field.name %></a>
+ <span class="icon-only"><%= sprite_icon('angle-right') %></span>
<ul>
<% options.each do |text, value| %>
<li><%= bulk_update_time_entry_custom_field_context_menu_link(field, text, value || text) %></li>
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) %>
<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">
diff --git a/app/views/versions/_sidebar.html.erb b/app/views/versions/_sidebar.html.erb
index 2b197388b..3b5269ed8 100644
--- a/app/views/versions/_sidebar.html.erb
+++ b/app/views/versions/_sidebar.html.erb
@@ -43,7 +43,7 @@
<% if @completed_versions.present? %>
<p>
<%= link_to_function sprite_icon('angle-right', l(:label_completed_versions)),
- '$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expanded"); $("#completed-versions").toggle()',
+ '$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expanded"); $("#completed-versions").toggle(); toggleExpendCollapseIcon(this);',
:id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %>
<ul id = "completed-versions" style = "display:none;">
<% @completed_versions.each do |version| %>