From 1bed6a7d4635cec4789cdc24840b1af453990bd4 Mon Sep 17 00:00:00 2001 From: Vincent CHALAMON Date: Fri, 17 Jun 2011 20:44:16 +0200 Subject: [PATCH] Update theme --- lib/view/sfAdminTemplateView.class.php | 16 ++++++++-------- web/css/login.css | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/view/sfAdminTemplateView.class.php b/lib/view/sfAdminTemplateView.class.php index 52492c0..4071ff9 100644 --- a/lib/view/sfAdminTemplateView.class.php +++ b/lib/view/sfAdminTemplateView.class.php @@ -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'); @@ -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(); - } } } } \ No newline at end of file diff --git a/web/css/login.css b/web/css/login.css index 497333b..234c0ea 100644 --- a/web/css/login.css +++ b/web/css/login.css @@ -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;}