mirror of
https://github.com/Mibew/mibew.git
synced 2025-03-03 18:38:31 +03:00
Do not use MIBEW_WEB_ROOT in Style classes
This commit is contained in:
parent
dfbbc11cfb
commit
ff917b25ad
@ -50,14 +50,13 @@ class ChatStyle extends AbstractHandlebarsPoweredStyle implements StyleInterface
|
||||
public function render($template_name, $data = array())
|
||||
{
|
||||
// Pass additional variables to template
|
||||
$data['mibewRoot'] = MIBEW_WEB_ROOT;
|
||||
$data['mibewVersion'] = MIBEW_VERSION;
|
||||
$data['currentLocale'] = get_current_locale();
|
||||
|
||||
$locale_info = get_locale_info(get_current_locale());
|
||||
$data['rtl'] = $locale_info && $locale_info['rtl'];
|
||||
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath();
|
||||
$data['stylePath'] = $this->getFilesPath();
|
||||
$data['styleName'] = $this->getName();
|
||||
|
||||
return $this->getHandlebars()->render($template_name, $data);
|
||||
|
@ -50,14 +50,13 @@ class PageStyle extends AbstractHandlebarsPoweredStyle implements StyleInterface
|
||||
public function render($template_name, $data = array())
|
||||
{
|
||||
// Pass additional variables to template
|
||||
$data['mibewRoot'] = MIBEW_WEB_ROOT;
|
||||
$data['mibewVersion'] = MIBEW_VERSION;
|
||||
$data['currentLocale'] = get_current_locale();
|
||||
|
||||
$locale_info = get_locale_info(get_current_locale());
|
||||
$data['rtl'] = $locale_info && $locale_info['rtl'];
|
||||
|
||||
$data['stylePath'] = MIBEW_WEB_ROOT . '/' . $this->getFilesPath();
|
||||
$data['stylePath'] = $this->getFilesPath();
|
||||
$data['styleName'] = $this->getName();
|
||||
|
||||
return $this->getHandlebars()->render($template_name, $data);
|
||||
|
@ -84,7 +84,7 @@
|
||||
style: '{{styleName}}',
|
||||
mibewBasePath: '{{mibewBasePath}}',
|
||||
mibewBaseUrl: '{{mibewBaseUrl}}',
|
||||
stylePath: '{{stylePath}}',
|
||||
stylePath: '{{mibewBasePath}}/{{stylePath}}',
|
||||
company: {
|
||||
name: '{{#jsString}}{{company.name}}{{/jsString}}',
|
||||
chatLogoURL: '{{company.chatLogoURL}}'
|
||||
|
Loading…
Reference in New Issue
Block a user