Browse Source

- Fix fatal error with the new RainTPL library

pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
c00477482e
  1. 4
      app/widgets/Bookmark/_bookmark_list.tpl
  2. 2
      app/widgets/Chat/_chat_muc_list.tpl
  3. 2
      app/widgets/Config/config.tpl
  4. 4
      app/widgets/ConfigData/configdata.tpl
  5. 2
      app/widgets/Explore/_explore_chatrooms.tpl
  6. 2
      app/widgets/Explore/_explore_groups.tpl
  7. 2
      app/widgets/Roster/_roster_contact.tpl
  8. 2
      app/widgets/Roster/_roster_list.tpl
  9. 16
      app/widgets/WidgetCommon/WidgetCommon.php
  10. 2
      app/widgets/WidgetCommon/_submit_form.tpl

4
app/widgets/Bookmark/_bookmark_list.tpl

@ -1,6 +1,6 @@
<h2>{$c->t('Conferences')}</h2>
<ul>
{loop="conferences"}
{loop="$conferences"}
<li>
<a href="#" onclick="{$c->getMucJoin($value)}">{$value->name}</a>
<a href="#" onclick="{$c->getMucRemove($value)}">X</a>
@ -9,7 +9,7 @@
</ul>
<h2>{$c->t('Groups')}</h2>
{loop="subscriptions"}
{loop="$subscriptions"}
{if="$c->checkNewServer($value)"}
<a href="{$c->route('server', $value->server)}">
<h3>{$value->server}</h3>

2
app/widgets/Chat/_chat_muc_list.tpl

@ -1,5 +1,5 @@
<ul>
{loop="muclist"}
{loop="$muclist"}
{if="$value->value < 5"}
<li class="{$c->colorNameMuc($value->ressource)}">
{$value->ressource}

2
app/widgets/Config/config.tpl

@ -13,7 +13,7 @@
<div class="select">
<select name="language" id="language">
<option value="en">English (default)</option>
{loop="languages"}
{loop="$languages"}
{if="$key == $conf"}
<option
value="{$key}"

4
app/widgets/ConfigData/configdata.tpl

@ -17,7 +17,7 @@
<legend>{$c->t('Posts')} - {$stats.post}</legend>
<div class="clear"></div>
<ul class="stats">
{loop="pstats"}
{loop="$pstats"}
<li style="height: {$c->formatHeight($value.count)}%;">
<span class="date">
{$c->formatDate($value.month, $value.year)}
@ -41,7 +41,7 @@
<legend>{$c->t('Messages')} - {$stats.message}</legend>
<div class="clear"></div>
<ul class="stats">
{loop="mstats"}
{loop="$mstats"}
<li style="height: {$c->formatHeight($value.count)}%">
<span class="date">
{$c->formatDate($value.month, $value.year)}

2
app/widgets/Explore/_explore_chatrooms.tpl

@ -1,4 +1,4 @@
{loop="chatrooms"}
{loop="$chatrooms"}
<li class="block">
<a href="{$c->route('server', $value->server)}">
<span class="tag green">{$c->t('Chatrooms')}</span>

2
app/widgets/Explore/_explore_groups.tpl

@ -1,4 +1,4 @@
{loop="groups"}
{loop="$groups"}
<li class="block">
<a href="{$c->route('server', $value->server)}">
<span class="tag orange">{$c->t('Groups')}</span>

2
app/widgets/Roster/_roster_contact.tpl

@ -3,7 +3,7 @@
title="{$jid}_{$name}"
class="{$presence}">
<ul class="contact">
{loop="contact"}
{loop="$contact"}
<li
title="{$value.jid}{if="$value.status != ''"} - {$value.status}{/if}"
class="{$value.presencetxt} {$value.inactive} {if="$value.client"}client {$value.client}{/if}">

2
app/widgets/Roster/_roster_list.tpl

@ -7,7 +7,7 @@
<a class="button color green icon users" href="{$c->route('explore')}">{$c->t('Explore')}</a>
</span>
{else}
{loop="roster"}
{loop="$roster"}
<div id="group{$value->name}" class="{$value->shown}">
<h1 onclick="{$value->toggle}">{$key}</h1>
{$value->html}

16
app/widgets/WidgetCommon/WidgetCommon.php

@ -13,16 +13,24 @@
* Copyright (C)2010 MOVIM Project
*
* See COPYING for licensing information.
*
*/
use Rain\Tpl;
use \Michelf\Markdown;
class WidgetCommon extends WidgetBase {
private function loadTemplate() {
$view = new RainTPL;
$view->configure('tpl_dir', APP_PATH.'widgets/WidgetCommon/');
$view->configure('cache_dir', CACHE_PATH);
$view->configure('tpl_ext', 'tpl');
$config = array(
'tpl_dir' => APP_PATH.'widgets/WidgetCommon/',
'cache_dir' => CACHE_PATH,
'tpl_ext' => 'tpl',
'auto_escape' => false
);
// We load the template engine
$view = new Tpl;
$view->objectConfigure($config);
$view->assign('c', $this);
return $view;

2
app/widgets/WidgetCommon/_submit_form.tpl

@ -24,7 +24,7 @@
<div class="popup post" id="galleryselect" style="padding: 0;">
<ul class="thumb">
{loop="gallery"}
{loop="$gallery"}
<li style="background-image: url({$value.thumb});">
<a
href="#"

Loading…
Cancel
Save