- Use patches. - Overwrite default design variables. - Move images to plugin.pull/7115/head
parent
7fccc2e198
commit
4dfe4d5dec
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
@ -1,9 +0,0 @@ |
||||
module BimSeeder |
||||
module RootSeeder |
||||
def seed_basic_data |
||||
::BimSeeder::BasicDataSeeder.new.seed! |
||||
end |
||||
end |
||||
end |
||||
|
||||
RootSeeder.prepend BimSeeder::RootSeeder |
@ -1,5 +1,9 @@ |
||||
module OpenProject |
||||
module BimSeeder |
||||
require "open_project/bim_seeder/engine" |
||||
|
||||
# The DesignPatch is not a typical method patch, as it replaces a constant and thus needs to be applied without the |
||||
# standard patch logic for plugins. |
||||
require "open_project/bim_seeder/patches/design_patch" |
||||
end |
||||
end |
||||
|
@ -0,0 +1,23 @@ |
||||
require 'open_project/design' |
||||
|
||||
module OpenProject::BimSeeder |
||||
module Patches |
||||
module DesignPatch |
||||
DEFAULTS = OpenProject::Design::DEFAULTS.merge( |
||||
{ |
||||
'primary-color' => "#748EA8", |
||||
'primary-color-dark' => "#566484", |
||||
'header-bg-color' => "#566484", |
||||
'header-item-bg-hover-color' => "#748EA8", |
||||
'main-menu-bg-color' => "#333739", |
||||
'main-menu-bg-selected-background' => "#748EA8", |
||||
'main-menu-bg-hover-background' => "#566484", |
||||
'header-home-link-bg' => '#{image-url("bim/logo_openproject_bim_big.png") no-repeat 20px 0}' |
||||
} |
||||
).freeze |
||||
end |
||||
end |
||||
end |
||||
|
||||
OpenProject::Design.send(:remove_const, 'DEFAULTS') |
||||
OpenProject::Design.const_set('DEFAULTS', OpenProject::BimSeeder::Patches::DesignPatch::DEFAULTS) |
@ -0,0 +1,11 @@ |
||||
module OpenProject::BimSeeder::Patches::RootSeederPatch |
||||
def self.included(base) # :nodoc: |
||||
base.prepend InstanceMethods |
||||
end |
||||
|
||||
module InstanceMethods |
||||
def seed_basic_data |
||||
::BimSeeder::BasicDataSeeder.new.seed! |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue