Try to fix dashboard block settings style and added tests for Redmine 4.2
This commit is contained in:
parent
1c470e1431
commit
701c847fd5
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
ruby: ['2.7', '2.6', '2.4']
|
||||
redmine: ['4.1-stable', 'master']
|
||||
redmine: ['4.1-stable', '4.2-stable', 'master']
|
||||
db: ['postgres', 'mysql']
|
||||
exclude:
|
||||
- ruby: '2.7'
|
||||
|
@ -91,6 +91,6 @@ module AdditionalsSettingsHelper
|
||||
label_title << tag.span('*', class: 'required') if options[:required].present?
|
||||
|
||||
safe_join [label_tag(tag_name, safe_join(label_title, ' ')),
|
||||
send(tag_field, tag_name, value, options)]
|
||||
send(tag_field, tag_name, value, options)], ' '
|
||||
end
|
||||
end
|
||||
|
@ -3,7 +3,7 @@ Deface::Override.new virtual_path: 'issues/_action_menu',
|
||||
replace: 'erb[loud]:contains("User.current.allowed_to?(:log_time, @project)")',
|
||||
original: '4bbf065b9f960687e07f76e7232eb21bf183a981',
|
||||
partial: 'issues/additionals_action_menu_log_time'
|
||||
if Redmine::VERSION.to_s >= '4.2' || Redmine::VERSION.to_s == '4.1.2.devel'
|
||||
if Redmine::VERSION.to_s >= '4.2'
|
||||
Deface::Override.new virtual_path: 'issues/_action_menu',
|
||||
name: 'add-issue-assign-to-me',
|
||||
insert_after: 'erb[loud]:contains("watcher_link")',
|
||||
|
@ -2,7 +2,7 @@
|
||||
.settings
|
||||
p
|
||||
= additionals_settings_textfield :title,
|
||||
label: "#{l(:field_title)} ",
|
||||
label: l(:field_title),
|
||||
value: settings[:title] || l(:label_text_sync),
|
||||
tag_name: "settings[#{block}][title]"
|
||||
p
|
||||
|
@ -37,7 +37,7 @@
|
||||
data: { confirm: l(:text_are_you_sure) }, method: :post, class: 'icon icon-lock'
|
||||
= link_to l(:button_copy), copy_project_path(@project), class: 'icon icon-copy'
|
||||
= link_to l(:button_delete), project_path(@project), method: :delete, class: 'icon icon-del'
|
||||
- elsif (Redmine::VERSION.to_s >= '4.2' || Redmine::VERSION.to_s == '4.1.2.devel') && @project.deletable?
|
||||
- elsif Redmine::VERSION.to_s >= '4.2' && @project.deletable?
|
||||
= link_to l(:button_delete), project_path(@project), method: :delete, class: 'icon icon-del'
|
||||
|
||||
- if User.current.allowed_to? :save_dashboards, @project
|
||||
|
@ -362,6 +362,17 @@ select.dashboard-block-select {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
#my-page.dashboard #list-left .tabular.settings p,
|
||||
#my-page.dashboard #list-right .tabular.settings p {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#my-page.dashboard #list-left .tabular.settings label,
|
||||
#my-page.dashboard #list-right .tabular.settings label {
|
||||
margin-left: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
div.drdn-items a.disabled,
|
||||
div.drdn-items a.disabled:hover { color: #aaa; }
|
||||
|
||||
|
@ -13,7 +13,7 @@ module Additionals
|
||||
module InstanceOverwriteMethods
|
||||
# this change take care of hidden roles and performance issues (includes for hrm, if installed)
|
||||
def users_by_role
|
||||
if Redmine::VERSION.to_s >= '4.2' || Redmine::VERSION.to_s == '4.1.2.devel'
|
||||
if Redmine::VERSION.to_s >= '4.2'
|
||||
includes = Redmine::Plugin.installed?('redmine_hrm') ? [:roles, { principal: :hrm_user_type }] : %i[roles principal]
|
||||
memberships.includes(includes).each_with_object({}) do |m, h|
|
||||
m.roles.each do |r|
|
||||
|
Loading…
Reference in New Issue
Block a user