diff --git a/.rubocop.yml b/.rubocop.yml index a2a31632..82abac08 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -110,8 +110,8 @@ Rails/SkipsModelValidations: Exclude: - app/helpers/dmsf_upload_helper.rb # touch is Okay - app/models/dmsf_workflow.rb # update doesn't work here - - patches/user_patch.rb - - patches/role_patch.rb + - lib/redmine_dmsf/patches/user_patch.rb + - lib/redmine_dmsf/patches/role_patch.rb - db/migrate/20170526144701_dmsf_attachable.rb - db/migrate/20170421101901_dmsf_file_container_rollback.rb - db/migrate/20170118142001_dmsf_file_container.rb diff --git a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb index 7b6e9b43..b442f561 100644 --- a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb @@ -28,6 +28,7 @@ module RedmineDmsf ) return end + context[:controller].send :render_to_string, { partial: 'hooks/redmine_dmsf/view_layouts_base_html_head' } end end diff --git a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb index f21a8903..159c1ec7 100644 --- a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb @@ -93,8 +93,8 @@ module RedmineDmsf end def view_issues_edit_notes_bottom_style(context = {}) - if ((User.current.pref.dmsf_attachments_upload_choice == 'Attachments') || - !allowed_to_attach_documents(context[:container])) + if User.current.pref.dmsf_attachments_upload_choice == 'Attachments' || + !allowed_to_attach_documents(context[:container]) '' else 'display: none' @@ -150,9 +150,7 @@ module RedmineDmsf return unless allowed_to_attach_documents(container) html = +'