add dark selectize theme + "ternary" template modifier

git-svn-id: http://piwigo.org/svn/trunk@28703 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
mistic100
2014-06-14 14:15:05 +00:00
parent 296ae7021e
commit 84d94906d2
10 changed files with 417 additions and 9 deletions
+17 -1
View File
@@ -121,6 +121,7 @@ class Template
$this->smarty->registerPlugin('modifiercompiler', 'translate', array('Template', 'modcompiler_translate') );
$this->smarty->registerPlugin('modifiercompiler', 'translate_dec', array('Template', 'modcompiler_translate_dec') );
$this->smarty->registerPlugin('modifier', 'explode', array('Template', 'mod_explode') );
$this->smarty->registerPlugin('modifier', 'ternary', array('Template', 'mod_ternary') );
$this->smarty->registerPlugin('modifier', 'get_extent', array($this, 'get_extent') );
$this->smarty->registerPlugin('block', 'html_head', array($this, 'block_html_head') );
$this->smarty->registerPlugin('block', 'html_style', array($this, 'block_html_style') );
@@ -665,7 +666,7 @@ class Template
/**
* "explode" variable modifier.
* Usage :
* - {assign var=valueExploded value=$value|@explode:','}
* - {assign var=valueExploded value=$value|explode:','}
*
* @param string $text
* @param string $delimiter
@@ -675,6 +676,21 @@ class Template
{
return explode($delimiter, $text);
}
/**
* ternary variable modifier.
* Usage :
* - {$variable|ternary:'yes':'no'}
*
* @param mixed $param
* @param mixed $true
* @param mixed $false
* @return mixed
*/
static function mod_ternary($param, $true, $false)
{
return $param ? $true : $false;
}
/**
* The "html_head" block allows to add content just before