mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding changes for new Theme view
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3313 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
303c366a2e
commit
4594e09cde
4 changed files with 10 additions and 10 deletions
|
@ -180,7 +180,7 @@ class FormHelper extends Helper {
|
|||
if (strpos($path, '://')) {
|
||||
$url = $path;
|
||||
} else {
|
||||
$url = $this->webroot . IMAGES_URL . $this->themeWeb . $path;
|
||||
$url = $this->webroot . $this->themeWeb . IMAGES_URL . $path;
|
||||
}
|
||||
return sprintf($this->tags['submitimage'], $url, $this->_parseAttributes($htmlAttributes, null, '', ' '));
|
||||
}
|
||||
|
|
|
@ -331,7 +331,7 @@ class HtmlHelper extends Helper {
|
|||
* @return mixed Either string or boolean value, depends on AUTO_OUTPUT and $return.
|
||||
*/
|
||||
function css($path, $rel = 'stylesheet', $htmlAttributes = null, $return = false) {
|
||||
$url = "{$this->webroot}" . (COMPRESS_CSS ? 'c' : '') . CSS_URL . $this->themeWeb . $path . ".css";
|
||||
$url = "{$this->webroot}" . (COMPRESS_CSS ? 'c' : '') . $this->themeWeb . CSS_URL . $path . ".css";
|
||||
if ($rel == 'import') {
|
||||
return $this->output(sprintf($this->tags['style'], $this->parseHtmlOptions($htmlAttributes, null, '', ' '), '@import url(' . $url . ');'), $return);
|
||||
} else {
|
||||
|
@ -409,7 +409,7 @@ class HtmlHelper extends Helper {
|
|||
if (strpos($path, '://')) {
|
||||
$url = $path;
|
||||
} else {
|
||||
$url = $this->webroot . IMAGES_URL . $this->themeWeb . $path;
|
||||
$url = $this->webroot . $this->themeWeb . IMAGES_URL . $path;
|
||||
}
|
||||
|
||||
if (!isset($htmlAttributes['alt'])) {
|
||||
|
|
|
@ -63,7 +63,7 @@ class JavascriptHelper extends Helper{
|
|||
$script .= "\n" . '//--><!]]>' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($block) {
|
||||
return sprintf($this->tags['javascriptblock'], $script);
|
||||
} else {
|
||||
|
@ -82,7 +82,7 @@ class JavascriptHelper extends Helper{
|
|||
$url .= '.js';
|
||||
}
|
||||
if (strpos($url, '://') === false) {
|
||||
$url = $this->webroot . JS_URL . $this->themeWeb . $url;
|
||||
$url = $this->webroot . $this->themeWeb . JS_URL . $url;
|
||||
}
|
||||
return sprintf($this->tags['javascriptlink'], $url);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* SVN FILE: $Id:$ */
|
||||
/* SVN FILE: $Id$ */
|
||||
/**
|
||||
* A custom view class that is used for themeing
|
||||
*
|
||||
|
@ -60,10 +60,10 @@ class ThemeView extends View {
|
|||
function __construct (&$controller) {
|
||||
parent::__construct($controller);
|
||||
$this->theme =& $controller->theme;
|
||||
$this->themeWeb = $this->theme.'/';
|
||||
$this->themeElement = VIEWS.$this->theme.DS.'elements'.DS;
|
||||
$this->themeLayout = VIEWS.$this->theme.DS.'layouts'.DS;
|
||||
$this->themePath = VIEWS.$this->theme.DS;
|
||||
$this->themeWeb = 'themed/'.$this->theme.'/';
|
||||
$this->themeElement = VIEWS.'themed'.DS.$this->theme.DS.'elements'.DS;
|
||||
$this->themeLayout = VIEWS.'themed'.DS.$this->theme.DS.'layouts'.DS;
|
||||
$this->themePath = VIEWS.'themed'.DS.$this->theme.DS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue