Fallback CSS includes for theme subfolder in install.php

Themes can't "share" the "themes/" toplevel folder if checked out directly via git, or indirectly via composer. That's a problem for themes like blackcandy, which have nested subthemes. The theme autoloading already handles this transparently, but we need to adjust the installer which is also using blackcandy.
This commit is contained in:
Ingo Schommer 2012-11-01 16:59:05 +01:00
parent 5f3b70f6d3
commit 5779b89382

View File

@ -909,13 +909,14 @@ class Installer extends InstallRequirements {
} }
function install($config) { function install($config) {
$themePath = file_exists('themes/blackcandy/blackcandy') ? 'themes/blackcandy/blackcandy' : 'themes/blackcandy';
?> ?>
<html> <html>
<head> <head>
<title>Installing SilverStripe...</title> <title>Installing SilverStripe...</title>
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/layout.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $themePath ?>/css/layout.css" />
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/typography.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $themePath ?>/css/typography.css" />
<link rel="stylesheet" type="text/css" href="themes/blackcandy/css/form.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $themePath ?>/css/form.css" />
<link rel="stylesheet" type="text/css" href="sapphire/dev/install/install.css" /> <link rel="stylesheet" type="text/css" href="sapphire/dev/install/install.css" />
<script src="sapphire/thirdparty/jquery/jquery.js"></script> <script src="sapphire/thirdparty/jquery/jquery.js"></script>
</head> </head>