Skip to content

Commit

Permalink
another svg update - endless changes required
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Nov 15, 2024
1 parent 2f42c6a commit 08d3b21
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 130 deletions.
4 changes: 2 additions & 2 deletions app/helpers/additionals_journals_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ def render_entity_journal_actions(entity, journal)

entity_type = entity.model_name.param_key

safe_join [link_to(l(:button_edit),
safe_join [link_to(sprite_icon('edit', l(:button_edit)),
send(:"edit_#{entity_type}_journal_path", journal),
remote: true,
method: 'get',
title: l(:button_edit),
class: 'icon-only icon-edit'),
link_to(l(:button_delete),
link_to(sprite_icon('del', l(:button_delete)),
send(:"#{entity_type}_journal_path", journal, journal: { notes: '' }),
remote: true,
method: 'put', data: { confirm: l(:text_are_you_sure) },
Expand Down
20 changes: 12 additions & 8 deletions app/helpers/dashboards_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ def render_dashboard_actionlist(active_dashboard, project = nil)
css_class = base_css
dashboard_name = "#{l :label_dashboard}: #{dashboard.name}"
out << if dashboard.id == active_dashboard.id
link_to_function dashboard_name,
link_to_function svg_icon_tag('dashboard', label: dashboard_name, css_class: 'disabled'),
'',
class: "#{base_css} disabled"
else
dashboard_link dashboard, project,
class: css_class,
title: l(:label_change_to_dashboard),
name: dashboard_name
name: svg_icon_tag('dashboard', label: dashboard_name)
end
end

Expand Down Expand Up @@ -166,11 +166,11 @@ def sidebar_action_toggle(enabled, dashboard, project = nil)
return unless dashboard

if enabled
link_to l(:label_disable_sidebar),
link_to sprite_icon('chevrons-right', l(:label_disable_sidebar)),
dashboard_link_path(project, dashboard, enable_sidebar: 0),
class: 'icon icon-sidebar'
else
link_to l(:label_enable_sidebar),
link_to sprite_icon('chevrons-left', l(:label_enable_sidebar)),
dashboard_link_path(project, dashboard, enable_sidebar: 1),
class: 'icon icon-sidebar'
end
Expand All @@ -187,7 +187,7 @@ def delete_dashboard_link(url, dashboard)
options[:data] = { confirm: l(:text_are_you_sure) }
end

link_to l(:button_dashboard_delete), url, options
link_to sprite_icon('del', l(:button_dashboard_delete)), url, options
end

# Returns the select tag used to add or remove a block
Expand Down Expand Up @@ -231,15 +231,19 @@ def render_dashboard_block(block, dashboard, overwritten_settings = {})
icons = []
if block_definition[:no_settings].blank? &&
(!block_definition.key?(:with_settings_if) || block_definition[:with_settings_if].call(@project))
icons << link_to_function(l(:label_options),
icons << link_to_function(sprite_icon('settings', l(:label_options)),
"$('##{block}-settings').toggle()",
class: 'icon-only icon-settings',
title: l(:label_options))
end
if block_definition.key? :async
icons << tag.span('', class: 'icon-only icon-warning', title: dashboard_block_sync_info(block_definition))
icons << svg_icon_tag('warning',
plugin: '',
wrapper: :span,
wrapper_class: 'icon-only',
title: dashboard_block_sync_info(block_definition))
end
icons << tag.span('', class: 'icon-only icon-sort-handle sort-handle', title: l(:button_move))
icons << tag.span(sprite_icon('reorder', ''), class: 'icon-only icon-sort-handle sort-handle', title: l(:button_move))
icons << delete_link(_remove_block_dashboard_path(@project, dashboard, block:),
method: :post,
remote: true,
Expand Down
2 changes: 1 addition & 1 deletion app/overrides/issues_show.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module IssuesShow
Deface::Override.new virtual_path: 'issues/_action_menu',
name: 'show-issue-log-time',
replace: 'erb[loud]:contains("User.current.allowed_to?(:log_time, @project)")',
original: '4bbf065b9f960687e07f76e7232eb21bf183a981',
original: 'b6e18c6fee9b49bcbdeb6a51cdfa43896a75c99e',
partial: 'issues/additionals_action_menu_log_time'

Deface::Override.new virtual_path: 'issues/_action_menu',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
- if @issue.editable? && Additionals.setting?(:issue_fast_description_edit)
- desc_link = link_to sprite_icon('edit', l(:button_edit)),
edit_issue_path(@issue),
class: 'icon icon-edit',
id: 'fast-desc-link'
javascript:
$(function() {
$('.issue .description .contextual')
.prepend("#{escape_javascript link_to(l(:button_edit), edit_issue_path(@issue), class: 'icon icon-edit', id: 'fast-desc-link')} ");
.prepend("#{escape_javascript desc_link}");
$("#fast-desc-link").click(function() {
$("#issue_description_and_toolbar").parent().find('a').first().hide();
Expand Down
11 changes: 6 additions & 5 deletions app/views/projects/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@

- if User.current.admin?
- if @project.archived?
= link_to l(:button_unarchive),
= link_to svg_icon_tag('archive-off', label: :button_unarchive),
unarchive_project_path(@project, status: params[:status]),
method: :post, class: 'icon icon-unlock'
method: :post, class: 'icon icon-archive-off'
- else
- confirm_msg = l :text_project_archive_confirmation, @project.to_s
= link_to l(:button_archive),
= link_to svg_icon_tag('archive', label: :button_archive),
archive_project_path(@project, status: params[:status]),
data: { confirm: confirm_msg }, method: :post, class: 'icon icon-lock'
data: { confirm: confirm_msg }, method: :post, class: 'icon icon-archive'
= link_to sprite_icon('copy', l(:button_copy)), copy_project_path(@project), class: 'icon icon-copy'
= link_to sprite_icon('del', l(:button_delete)), project_path(@project), method: :delete, class: 'icon icon-del'
- elsif @project.deletable?
Expand Down Expand Up @@ -69,8 +69,9 @@ h2 = project_overview_name @project, @dashboard

- unless @project.active?
p.warning
=
span.icon.icon-lock
= l :text_project_closed
= sprite_icon 'lock', l(:text_project_closed)

= render 'common/dashboard', dashboard: @dashboard
= content_for :render_async
Expand Down
5 changes: 4 additions & 1 deletion app/views/users/_additionals_contextual.html.slim
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- if Additionals.setting?(:new_issue_on_profile) && user.active? && @memberships.present?
- project_url = memberships_new_issue_project_url user, @memberships
= link_to l(:label_issue_new), project_url, class: 'user-new-issue icon icon-add' if project_url.present?
- if project_url.present?
= link_to sprite_icon('add', l(:label_issue_new)),
project_url,
class: 'user-new-issue icon icon-add'
Loading

0 comments on commit 08d3b21

Please sign in to comment.