Skip to content

Commit

Permalink
another day with svg icons work
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Nov 16, 2024
1 parent 82fdb9d commit 9b1d303
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 26 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Support for Redmine 6
- Redmine 5 support dropped
- Gemify support dropped
- switch icons from fontawesome to tabler

## 3.4.0

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/dashboards_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def render_dashboard_block(block, dashboard, overwritten_settings = {})
content = tag.div(safe_join(icons), class: 'contextual') + content
end

tag.div content, class: "mypage-box block-#{block_definition[:name]}", id: "block-#{block}"
tag.div content, class: "mypage-box dashboard-block block-#{block_definition[:name]}", id: "block-#{block}"
end

def build_dashboard_partial_locals(block, block_definition, settings, dashboard)
Expand Down
4 changes: 2 additions & 2 deletions app/views/dashboards/blocks/_my_spent_time.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ul.dashboard-list

= link_to l(:label_spent_time), _time_entries_path(@project, nil, user_id: 'me')
'
= link_to l(:button_log_time),
= link_to sprite_icon('time-add'),
_new_time_entry_path(@project, nil),
class: 'icon-only icon-add',
class: 'icon-only icon-time-add',
title: l(:button_log_time)
8 changes: 4 additions & 4 deletions app/views/dashboards/blocks/_project_issues.html.slim
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
h3.icon.icon-issue
= l :label_issue_tracking
'
= link_to l(:label_details),
= svg_icon_tag 'issue', label: :label_issue_tracking, plugin: ''

= link_to sprite_icon('zoom-in', l(:label_details)),
project_issues_report_details_path(@project, detail: 'tracker'),
class: 'icon-only icon-zoom-in',
class: 'icon-label icon-only icon-zoom-in',
title: l(:label_details)

- if @trackers.present?
Expand Down
5 changes: 3 additions & 2 deletions app/views/dashboards/blocks/_project_subprojects.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- if @subprojects.any?
h3.icon.icon-projects
= l :label_subproject_plural
h3.icon
= svg_icon_tag 'projects', label: :label_subproject_plural, plugin: ''

ul.subprojects
- @subprojects.each do |project|
li
Expand Down
3 changes: 2 additions & 1 deletion app/views/dashboards/blocks/_project_time_entries.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
h3.icon.icon-time
= block_definition[:label]
= svg_icon_tag 'time', label: block_definition[:label], plugin: ''

ul
- if @total_estimated_hours.present?
li
Expand Down
8 changes: 4 additions & 4 deletions app/views/issues/_additionals_sidebar_issues.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
- unless s == @issue.status
li
- if s.is_closed?
= link_to font_awesome_icon('fas_caret-square-left', post_text: s.name),
= link_to svg_icon_tag('square-chevron-left-filled', label: s.name),
issue_change_status_path(@issue, new_status_id: s.id),
method: :put, class: "status-switch status-#{s.id}"
method: :put, class: "icon icon-flipped-color status-switch status-#{s.id}"
- else
= link_to font_awesome_icon('far_caret-square-left', post_text: s.name),
= link_to svg_icon_tag('square-chevron-left', label: s.name),
issue_change_status_path(@issue, new_status_id: s.id),
method: :put, class: "status-switch status-#{s.id}"
method: :put, class: "icon status-switch status-#{s.id}"
86 changes: 74 additions & 12 deletions assets/images/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/stylesheets/additionals.css
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ div.clear-both { clear: both; }
text-align: left;
}

/* droped with redmine 6, why? */
#sidebar h3 { margin-top: 14px; }

.clipboard-button {
padding-bottom: 2px;
padding-top: 2px;
Expand All @@ -182,8 +185,10 @@ div.clear-both { clear: both; }

img.additionals-avatar { margin-right: 0.25em; }

.dashboard-block h3 svg,
#page-title svg {
stroke: #555;
stroke-width: 2;
}

h2#page-title {
Expand Down

0 comments on commit 9b1d303

Please sign in to comment.