Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentchalamon committed Jun 17, 2011
1 parent 0c0824a commit 1bed6a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/view/sfAdminTemplateView.class.php
Expand Up @@ -4,11 +4,16 @@ class sfAdminTemplateView extends sfPHPView
{
public function configure() {
parent::configure();
$response = $this->context->getResponse();
// Use admin theme
if($response->getStatusCode() != 200) {
$this->decoratorTemplate = "clean".$this->getExtension();
}
if(preg_match('/^(admin|clean)/i', $this->getDecoratorTemplate(), $matches)) {
$response = $this->context->getResponse();
//$response = new sfWebResponse();
$this->decoratorDirectory = sfConfig::get('sf_plugins_dir').DIRECTORY_SEPARATOR."sfAdminTemplatePlugin".DIRECTORY_SEPARATOR."templates";
$this->decoratorDirectory = sfConfig::get('sf_app_template_dir');
if(!is_file($this->decoratorDirectory.DIRECTORY_SEPARATOR.$this->getDecoratorTemplate())) {
$this->decoratorDirectory = sfConfig::get('sf_plugins_dir').DIRECTORY_SEPARATOR."sfAdminTemplatePlugin".DIRECTORY_SEPARATOR."templates";
}
$this->decorator = true;
// Stylesheets
$stylesheets = array('/sfAdminTemplatePlugin/css/layout.css', '/sfAdminTemplatePlugin/css/styles.css', '/sfAdminTemplatePlugin/js/jqtransformplugin/jqtransform.css', '/sfAdminTemplatePlugin/css/jquery.fancybox-1.3.4.css');
Expand All @@ -23,14 +28,9 @@ public function configure() {
foreach($javascripts as $js) {
$response->addJavascript($js, preg_match('/(jquery\.min\.js|jquery\-1\.5\.1\.min\.js)/i', $js) ? 'first' : '');
}
// Load template
if($response->getStatusCode() != 200) {
$this->decoratorTemplate = "clean".$this->getExtension();
$response->addStylesheet('/sfAdminTemplatePlugin/css/login.css', '', array('media' => 'all'));
}
else {
$this->decoratorTemplate = $this->getDecoratorTemplate();
}
}
}
}
1 change: 1 addition & 0 deletions web/css/login.css
Expand Up @@ -5,6 +5,7 @@ body {background: #E5E5E5 url(../images/bg_login_page.png) repeat-x top;}
#loginheader {text-align: center; padding: 15px 0; background: url(../images/bg_login_header.png) repeat-x bottom; border-bottom: 1px solid #424242; border-top-left-radius: 20px; border-top-right-radius: 20px; -moz-border-radius-topright: 20px; -moz-border-radius-topleft: 20px;}
#innerlogin {width: 260px; margin: 0 auto; text-align: center; padding: 5px 20px 20px 20px;}
.logininput {width: 240px; padding: 17px 10px; border: 1px solid #fff; border-radius: 8px; -moz-border-radius: 8px; font-size: 15px; margin: 10px 0;}
.ui-keyboard .logininput {padding: 5px;}
#innerlogin p {color: #ddd; font-weight: 700; text-shadow: 1px 1px 1px #222; padding: 5px 0;}
#innerlogin p label {font-size: 1.2em;}
#innerlogin p a {background: #ccc url(../images/bg_forgotten_password.png) repeat-x top; text-shadow: 1px 1px 1px #fff; color: #666; font-size: 11px; padding: 4px 10px; border-radius: 5px; -moz-border-radius: 5px; text-decoration: none;}
Expand Down

0 comments on commit 1bed6a7

Please sign in to comment.