diff --git a/app/overrides/issues.rb b/app/overrides/issues.rb deleted file mode 100644 index 83475e82..00000000 --- a/app/overrides/issues.rb +++ /dev/null @@ -1,33 +0,0 @@ -module Issues - Deface::Override.new( - :virtual_path => "issues/index", - :name => "deface_view_issues_index_map", - :insert_after => "h2", - :original => 'b807967c7184cb012c4bd5ccce90893349bc66e3', - :partial => "issues/index/map" - ) - - Deface::Override.new( - :virtual_path => "issues/index", - :name => "deface_view_issues_index_format_geojson", - :insert_after => "erb[loud]:contains('PDF')", - :original => '2b4102bf118f0a9866cf50477dce9cc7a78da6d5', - :partial => "issues/index/geojson" - ) - - Deface::Override.new( - :virtual_path => "issues/show", - :name => "deface_view_issues_show_map", - :insert_before => "div.attributes", - :original => 'c56981aa84b0fee66ff43ea773cf1444193a2862', - :partial => "issues/show/map" - ) - - Deface::Override.new( - :virtual_path => "issues/show", - :name => "deface_view_issues_show_format_geojson", - :insert_after => "erb[loud]:contains('PDF')", - :original => '1419e0dcba37f62ff95372d41d9b73845889d826', - :partial => "issues/show/geojson" - ) -end diff --git a/app/overrides/issues/index.rb b/app/overrides/issues/index.rb new file mode 100644 index 00000000..77dc4015 --- /dev/null +++ b/app/overrides/issues/index.rb @@ -0,0 +1,15 @@ +Deface::Override.new( + :virtual_path => "issues/index", + :name => "deface_view_issues_index_map", + :insert_after => "h2", + :original => 'b807967c7184cb012c4bd5ccce90893349bc66e3', + :partial => "issues/index/map" +) + +Deface::Override.new( + :virtual_path => "issues/index", + :name => "deface_view_issues_index_format_geojson", + :insert_after => "erb[loud]:contains('PDF')", + :original => '2b4102bf118f0a9866cf50477dce9cc7a78da6d5', + :partial => "issues/index/geojson" +) diff --git a/app/overrides/issues/show.rb b/app/overrides/issues/show.rb new file mode 100644 index 00000000..b9b0a564 --- /dev/null +++ b/app/overrides/issues/show.rb @@ -0,0 +1,15 @@ +Deface::Override.new( + :virtual_path => "issues/show", + :name => "deface_view_issues_show_map", + :insert_before => "div.attributes", + :original => 'c56981aa84b0fee66ff43ea773cf1444193a2862', + :partial => "issues/show/map" +) + +Deface::Override.new( + :virtual_path => "issues/show", + :name => "deface_view_issues_show_format_geojson", + :insert_after => "erb[loud]:contains('PDF')", + :original => '1419e0dcba37f62ff95372d41d9b73845889d826', + :partial => "issues/show/geojson" +) diff --git a/app/overrides/projects.rb b/app/overrides/projects.rb deleted file mode 100644 index 2ec8baa1..00000000 --- a/app/overrides/projects.rb +++ /dev/null @@ -1,17 +0,0 @@ -module Projects - Deface::Override.new( - :virtual_path => "projects/show", - :name => "deface_view_projects_show_map", - :insert_bottom => "div.splitcontentright", - :original => 'b939fb5ea208476399dbfb4b253dcff0ab1ace91', - :partial => "projects/show/map" - ) - - Deface::Override.new( - :virtual_path => "projects/show", - :name => "deface_view_projects_show_other_formats", - :insert_bottom => "div.splitcontentright", - :original => '1d2f0cb0b1439dddc34ac9c50b6b1b111fe702ce', - :partial => "projects/show/other_formats" - ) -end diff --git a/app/overrides/projects/show.rb b/app/overrides/projects/show.rb new file mode 100644 index 00000000..8a613201 --- /dev/null +++ b/app/overrides/projects/show.rb @@ -0,0 +1,15 @@ +Deface::Override.new( + :virtual_path => "projects/show", + :name => "deface_view_projects_show_map", + :insert_bottom => "div.splitcontentright", + :original => 'b939fb5ea208476399dbfb4b253dcff0ab1ace91', + :partial => "projects/show/map" +) + +Deface::Override.new( + :virtual_path => "projects/show", + :name => "deface_view_projects_show_other_formats", + :insert_bottom => "div.splitcontentright", + :original => '1d2f0cb0b1439dddc34ac9c50b6b1b111fe702ce', + :partial => "projects/show/other_formats" +) diff --git a/app/overrides/users.rb b/app/overrides/users.rb deleted file mode 100644 index 824cd4c1..00000000 --- a/app/overrides/users.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Users - Deface::Override.new( - :virtual_path => "users/show", - :name => "deface_view_users_show_other_formats", - :insert_bottom => "div.splitcontentleft", - :original => 'abe916df0691ebe8848cfc0dde536abd3bfe39b8', - :partial => "users/show/other_formats" - ) -end diff --git a/app/overrides/users/show.rb b/app/overrides/users/show.rb new file mode 100644 index 00000000..1960a447 --- /dev/null +++ b/app/overrides/users/show.rb @@ -0,0 +1,7 @@ +Deface::Override.new( + :virtual_path => "users/show", + :name => "deface_view_users_show_other_formats", + :insert_bottom => "div.splitcontentleft", + :original => 'abe916df0691ebe8848cfc0dde536abd3bfe39b8', + :partial => "users/show/other_formats" +) diff --git a/init.rb b/init.rb index 4759cdbf..53dbac82 100644 --- a/init.rb +++ b/init.rb @@ -58,9 +58,10 @@ end if Rails.version > '6.0' && Rails.autoloaders.zeitwerk_enabled? - require File.expand_path('../app/overrides/issues', __FILE__) - require File.expand_path('../app/overrides/projects', __FILE__) - require File.expand_path('../app/overrides/users', __FILE__) + Dir.glob("#{Rails.root}/plugins/redmine_gtt/app/overrides/**/*.rb").each do |path| + Rails.autoloaders.main.ignore(path) + require path + end RedmineGtt.setup_normal_patches Rails.application.config.after_initialize do RedmineGtt.setup_controller_patches diff --git a/package.json b/package.json index d0b339e6..0cc66d09 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "fontfaceobserver": "^2.3.0", "geojson": "^0.5.0", "ol": "^9.1.0", - "ol-ext": "^4.0.21", + "ol-ext": "4.0.18", "ol-mapbox-style": "^12.3.4" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 66012a63..3ab1998d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -634,11 +634,6 @@ fastest-levenshtein@^1.0.12: resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== -fflate@^0.4.8: - version "0.4.8" - resolved "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz" - integrity sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA== - fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -900,10 +895,10 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -ol-ext@^4.0.21: - version "4.0.21" - resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.21.tgz#78ba613d1b95e66629c3ce252da6f8367ba0f3eb" - integrity sha512-xP4oVD5KBvJW6P9UQwmPcgqMDh6nzUrHjle4qhNqzRW7OkP02mObw5UMGAgz+uhIW8doJ3hYCwy2HcpU1JFpig== +ol-ext@4.0.18: + version "4.0.18" + resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.18.tgz#87e68566bae1a7821e3a1af8b7019409ce922324" + integrity sha512-zzeTAoCg9IocaM7LlXiLNnVCgVmfxxLzlDTWvYn3Y2gFxtICHSfRrIQl/8vumgBjftBksVl1Fds8P5uFReTmew== ol-mapbox-style@^12.3.4: version "12.3.4"