mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API CHANGE Removed LeftAndMain->setLogo() $logoStyle parameter and LeftAndMain->LogoStyle(), use CSS
This commit is contained in:
parent
e3928a0517
commit
05f0ce3a21
@ -1138,39 +1138,16 @@ class LeftAndMain extends Controller {
|
||||
*/
|
||||
static $application_logo = 'sapphire/admin/images/mainmenu/logo.gif';
|
||||
|
||||
/**
|
||||
* The application logo style. Customisable by calling
|
||||
* LeftAndMain::setLogo() - the second parameter.
|
||||
*
|
||||
* @var String
|
||||
*/
|
||||
static $application_logo_style = '';
|
||||
|
||||
/**
|
||||
* Set the CMS application logo.
|
||||
*
|
||||
* @param String $logo Relative path to the logo
|
||||
* @param String $logoStyle Custom CSS styles for the logo
|
||||
* e.g. "border: 1px solid red; padding: 5px;"
|
||||
*/
|
||||
static function setLogo($logo, $logoStyle) {
|
||||
static function setLogo($logo) {
|
||||
self::$application_logo = $logo;
|
||||
self::$application_logo_style = $logoStyle;
|
||||
self::$application_logo_text = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Combines an optional background image and additional CSS styles,
|
||||
* set through {@link setLogo()}.
|
||||
*
|
||||
* @return String CSS attribute
|
||||
*/
|
||||
function LogoStyle() {
|
||||
$attr = self::$application_logo_style;
|
||||
if(self::$application_logo) $attr .= "background: url(" . self::$application_logo . ") no-repeat; ";
|
||||
return $attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the base directory of the tiny_mce codebase
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="Logo" style="$LogoStyle">
|
||||
<div id="Logo">
|
||||
<% if ApplicationLogoText %>
|
||||
<a href="$ApplicationLink" target="_blank">$ApplicationLogoText</a><br />
|
||||
<% end_if %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user