diff --git a/library/Icinga/Web/LessCompiler.php b/library/Icinga/Web/LessCompiler.php index 13205f73c..eae3f565c 100644 --- a/library/Icinga/Web/LessCompiler.php +++ b/library/Icinga/Web/LessCompiler.php @@ -93,14 +93,21 @@ class LessCompiler public function addModule($name, $module) { if ($module->hasCss()) { - $this->source .= "\n/* CSS: modules/$name/module.less */\n" + $contents = array(); + foreach ($module->getCssFiles() as $path) { + if (file_exists($path)) { + $contents[] = "/* CSS: modules/$name/$path */\n" . file_get_contents($path); + } + } + + $this->source .= '' . '.icinga-module.module-' . $name . " {\n" - . file_get_contents($module->getCssFilename()) - . "}\n\n" - ; + . join("\n\n", $contents) + . "}\n\n"; } + return $this; } diff --git a/library/Icinga/Web/StyleSheet.php b/library/Icinga/Web/StyleSheet.php index 2e8ecea2c..af807c6e4 100644 --- a/library/Icinga/Web/StyleSheet.php +++ b/library/Icinga/Web/StyleSheet.php @@ -76,7 +76,11 @@ class StyleSheet $files = $lessFiles; foreach ($app->getModuleManager()->getLoadedModules() as $name => $module) { if ($module->hasCss()) { - $files[] = $module->getCssFilename(); + foreach ($module->getCssFiles() as $path) { + if (file_exists($path)) { + $files[] = $path; + } + } } }