Commit 2c4bdd21 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

auto_escape sideblock & tags templates


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 3769fe88
{auto_escape off}
{include file="header.tpl"}
{if $tags}
......@@ -6,7 +5,7 @@
<div class="edittags mytags">
<h3>{str tag=selectatagtoedit}:</h3>
{foreach from=$tags item=t}
<a class="tag{if $t->tag == $tag} selected{/if}" href="{$WWWROOT}edittags.php?tag={$t->tag|urlencode}">{$t->tag|str_shorten_text:30|escape}&nbsp;<span class="tagfreq">({$t->count})</span></a>
<a class="tag{if $t->tag == $tag} selected{/if}" href="{$WWWROOT}edittags.php?tag={$t->tag|urlencode|safe}">{$t->tag|str_shorten_text:30}&nbsp;<span class="tagfreq">({$t->count})</span></a>
{/foreach}
</div>
{else}
......@@ -15,17 +14,16 @@
{if $tag}
<div class="edittag">
<h3>{str tag=edittag arg1=$tagsearchurl arg2=$tag|escape}</h3>
<div>{str tag=edittagdescription arg1=$tag|escape}</div>
{$edittagform}
<h3>{str tag=edittag arg1=$tagsearchurl arg2=$tag}</h3>
<div>{str tag=edittagdescription arg1=$tag}</div>
{$edittagform|safe}
</div>
<div class="deletetag">
<h3>{str tag=deletetag arg1=$tagsearchurl arg2=$tag|escape}</h3>
<h3>{str tag=deletetag arg1=$tagsearchurl arg2=$tag}</h3>
<div>{str tag=deletetagdescription}</div>
{$deletetagform}
{$deletetagform|safe}
</div>
{/if}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{foreach from=$data item=result}
<tr class="{cycle name=rows values='r0,r1'}">
<td class="center" style="width:25px;">{if $result->icon}<img src="{$result->icon|escape}" alt="{$result->typestr|escape}"> {/if}</td>
<td class="center" style="width:25px;">{if $result->icon}<img src="{$result->icon}" alt="{$result->typestr}"> {/if}</td>
<td>
<div><strong><a href="{$result->url}">{$result->title|escape}</a></strong></div>
<div>{$result->description|str_shorten_html:100}</div>
<div><strong><a href="{$result->url}">{$result->title}</a></strong></div>
<div>{$result->description|str_shorten_html:100|safe}</div>
{if $result->tags}
<div>{str tag=tags}: {list_tags tags=$result->tags owner=1}</div>
{/if}
......@@ -12,4 +11,4 @@
<td class="right s"><div class="ctime">{$result->ctime}</div>{$result->typestr}</td>
</tr>
{/foreach}
{/auto_escape}
{auto_escape off}
<h3>{str tag="friendsdescr" section="account"}{contextualhelp plugintype='core' pluginname='account' form='accountprefs' element='friendscontrol'}</h3>
<div class="sidebar-content">
{$sbdata}
{$sbdata|safe}
</div>
{/auto_escape}
{auto_escape off}
<h3>{$sbdata.group->name|escape}</h3>
<h3>{$sbdata.group->name}</h3>
<div class="sidebar-content">
<ul>
{foreach from=$sbdata.menu item=item}
......@@ -8,7 +7,7 @@
{if $item.path == 'groups/forums' && $sbdata.forums}
<ul>
{foreach from=$sbdata.forums item=forum}
<li><a href="{$WWWROOT}interaction/forum/view.php?id={$forum->id}">{$forum->title|escape}</a></li>
<li><a href="{$WWWROOT}interaction/forum/view.php?id={$forum->id}">{$forum->title}</a></li>
{/foreach}
</ul>
{/if}
......@@ -17,4 +16,3 @@
{/foreach}
</ul>
</div>
{/auto_escape}
{auto_escape off}
<h3>{str tag="groupinteractions" section="group"}</h3>
<div class="sidebar-content">
......@@ -17,9 +16,9 @@
{foreach from=$interactions item=interaction}
<li>
{if $sbdata.membership}
<a href="{$WWWROOT}interaction/{$interaction->plugin|escape}/view.php?id={$interaction->id|escape}">{$interaction->title|escape}</a>
<a href="{$WWWROOT}interaction/{$interaction->plugin}/view.php?id={$interaction->id}">{$interaction->title}</a>
{else}
{$interaction->title|escape}
{$interaction->title}
{/if}
</li>
{/foreach}
......@@ -30,5 +29,4 @@
{else}
<p>{str tag=nointeractions section=group}</p>
{/if}
</div>
{/auto_escape}
</div>
\ No newline at end of file
{auto_escape off}
<h3>{str tag="login"}{contextualhelp plugintype='core' pluginname='core' section='loginbox'}</h3>
<div class="sideblock-content">
<noscript><p>{str tag="javascriptnotenabled"}</p></noscript>
<div id="loginform_container">{$sbdata.loginform}</div>
<div id="loginform_container">{$sbdata.loginform|safe}</div>
</div>
{/auto_escape}
{auto_escape off}
<p id="lastminutes">({str tag="lastminutes" args=$sbdata.lastminutes})</p>
<h3>{str tag="onlineusers" args=$sbdata.count}</h3>
<div class="sideblock-content">
<ul class="cr">
{foreach from=$sbdata.users item=user}
<li><a href="{$WWWROOT}user/view.php?id={$user->id|escape}"><div class="image-container"><img src="{$user->profileiconurl|escape}" alt=""></div>{$user|display_name|escape}</a>{if $user->loggedinfrom} ({$user->loggedinfrom|escape}){/if}</li>
<li><a href="{$WWWROOT}user/view.php?id={$user->id}"><div class="image-container"><img src="{$user->profileiconurl}" alt=""></div>{$user|display_name|escape}</a>{if $user->loggedinfrom} ({$user->loggedinfrom}){/if}</li>
{/foreach}
</ul>
</div>
{/auto_escape}
{auto_escape off}
<div id="user-profileicon"><a href="{$WWWROOT}user/view.php?id={$sbdata.id}"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=50&amp;maxheight=50&amp;id={$sbdata.id}&amp;earlyexpiry=1" alt=""></a></div>
<h3><a href="{$WWWROOT}user/view.php?id={$sbdata.id}">{$sbdata.myname|escape}</a></h3>
<h3><a href="{$WWWROOT}user/view.php?id={$sbdata.id}">{$sbdata.myname}</a></h3>
<div class="sideblock-content">
{if $sbdata.mnetloggedinfrom} <p>{$sbdata.mnetloggedinfrom}</p>
{if $sbdata.mnetloggedinfrom} <p>{$sbdata.mnetloggedinfrom|clean_html|safe}</p>
{/if}
<ul>
{if $sbdata.unreadnotifications}
......@@ -26,7 +25,7 @@
<li id="groups"><a href="{$WWWROOT}group/mygroups.php">{str tag="mygroups"}:</a>
<ul>
{foreach from=$sbdata.groups item=group}
<li><a href="{$WWWROOT}group/view.php?id={$group->id}">{$group->name|escape}</a>{if $group->role == 'admin'} ({str tag=Admin section=group}){/if}</li>
<li><a href="{$WWWROOT}group/view.php?id={$group->id}">{$group->name}</a>{if $group->role == 'admin'} ({str tag=Admin section=group}){/if}</li>
{/foreach}
</ul></li>
{/if}
......@@ -34,7 +33,7 @@
<li id="views"><a href="{$WWWROOT}view/">{str tag="views"}:</a>
<ul>
{foreach from=$sbdata.views item=view}
<li><a href="{$WWWROOT}view/view.php?id={$view->id}">{$view->title|escape}</a></li>
<li><a href="{$WWWROOT}view/view.php?id={$view->id}">{$view->title}</a></li>
{/foreach}
</ul>
</li>
......@@ -45,21 +44,20 @@
<ul>
{foreach from=$sbdata.artefacts item=artefact}
{if $artefact->artefacttype == 'blog'}
<li><a href="{$WWWROOT}artefact/blog/view/?id={$artefact->id}">{$artefact->title|escape}</a></li>
<li><a href="{$WWWROOT}artefact/blog/view/?id={$artefact->id}">{$artefact->title}</a></li>
{elseif $artefact->artefacttype == 'file' || $artefact->artefacttype == 'image' || $artefact->artefacttype == 'archive'}
<li><a href="{$WWWROOT}artefact/file/download.php?file={$artefact->id}">{$artefact->title|escape}</a></li>
<li><a href="{$WWWROOT}artefact/file/download.php?file={$artefact->id}">{$artefact->title}</a></li>
{elseif $artefact->artefacttype == 'folder'}
<li><a href="{$WWWROOT}artefact/file/?folder={$artefact->id}">{$artefact->title|escape}</a></li>
<li><a href="{$WWWROOT}artefact/file/?folder={$artefact->id}">{$artefact->title}</a></li>
{/if}
{/foreach}
</ul>
</li>
{/if}
</ul>
{if $sbdata.peer} <div class="center"><a href="{$sbdata.peer.wwwroot}">{$sbdata.peer.name|escape}</a></div>
{if $sbdata.peer} <div class="center"><a href="{$sbdata.peer.wwwroot}">{$sbdata.peer.name}</a></div>
{/if}
{if $USERMASQUERADING} <div id="changeuser">{$becomeyouagain}</div>
{if $USERMASQUERADING} <div id="changeuser">{$becomeyouagain|safe}</div>
{/if}
<div class="cb"></div>
</div>
{/auto_escape}
{auto_escape off}
{loadquota}
<h3>{str tag="quota"}</h3>
<div class="sidebar-content">
<p id="quota_message">
{$QUOTA_MESSAGE}
{$QUOTA_MESSAGE|safe}
{contextualhelp plugintype='artefact' pluginname='file' section='quota_message'}
</p>
<div id="quotawrap">
......@@ -19,4 +18,4 @@
</p>
{/if}
</div>
</div>{/auto_escape}
</div>
{auto_escape off}
<h3>{str tag="selfsearch"}</h3>
<div class="sidebar-content">
<div class="sidebar-content">
<form id="selfsearch" method="post" action="{$WWWROOT}selfsearch.php">
<input type="text" name="query">
<button type="submit" class="button">{str tag="go"}</button>
</form>
</div>{/auto_escape}
</div>
{auto_escape off}
<h3>{str tag="networkservers" section="auth.xmlrpc"}{contextualhelp plugintype='auth' pluginname='xmlrpc' section='networkservers'}</h3>
<div class="sidebar-content">
{if $sbdata}
......@@ -6,13 +5,13 @@
{foreach from=$sbdata item=peer}
{if $peer.instance != $userauthinstance}
{if !$MNETUSER}
<li><a href="{$WWWROOT}auth/xmlrpc/jump.php?wr={$peer.wwwroot|escape}&amp;ins={$peer.instance|escape}">{$peer.name|escape}</a></li>
<li><a href="{$WWWROOT}auth/xmlrpc/jump.php?wr={$peer.wwwroot}&amp;ins={$peer.instance}">{$peer.name}</a></li>
{/if}
{else}
<li><a href="{$peer.wwwroot|escape}">{$peer.name|escape}</a></li>
<li><a href="{$peer.wwwroot}">{$peer.name}</a></li>
{/if}
{/foreach}
</ul>
{/if}
</div>
{/auto_escape}
{auto_escape off}
<h3><a href="{$WWWROOT}tags.php">{str tag="tags"}</a></h3>
<div class="sidebar-content tags">
{if $sbdata.tags}
{foreach from=$sbdata.tags item=tag}
<a class="tag"{if $tag->size} style="font-size: {$tag->size}em;"{/if} href="{$WWWROOT}tags.php?tag={$tag->tag|urlencode}" title="{str tag=numitems arg1=$tag->count}">{$tag->tag|str_shorten_text:20|escape}</a>
<a class="tag"{if $tag->size} style="font-size: {$tag->size}em;"{/if} href="{$WWWROOT}tags.php?tag={$tag->tag|urlencode|safe}" title="{str tag=numitems arg1=$tag->count}">{$tag->tag|str_shorten_text:20}</a>
{/foreach}
{else}
{str tag=youhavenottaggedanythingyet}
{/if}
</div>
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
{if $tags}
......@@ -10,7 +9,7 @@
</ul>
<div class="subpage mytags">
{foreach from=$tags item=t}
<a id="tag:{$t->tag|urlencode}" class="tag{if $t->tag == $tag} selected{/if}" href="{$WWWROOT}tags.php?tag={$t->tag|urlencode}">{$t->tag|str_shorten_text:30|escape}&nbsp;<span class="tagfreq">({$t->count})</span></a>
<a id="tag:{$t->tag|urlencode|safe}" class="tag{if $t->tag == $tag} selected{/if}" href="{$WWWROOT}tags.php?tag={$t->tag|urlencode|safe}">{$t->tag|str_shorten_text:30}&nbsp;<span class="tagfreq">({$t->count})</span></a>
{/foreach}
</div>
{else}
......@@ -18,8 +17,8 @@
{/if}
<div id="results_container" class="rel tag-results">
<h3 id="results_heading">{str tag=searchresultsfor} <a class="tag" href="{$WWWROOT}tags.php{if $tag}?tag={$tag|urlencode}{/if}">{if $tag}{$tag|str_shorten_text:50|escape}{else}{str tag=alltags}{/if}</a></h3>
<div class="rbuttons"><a class="btn edit-tag{if !$tag} hidden{/if}" href="{$WWWROOT}edittags.php?tag={$tag|urlencode}">{str tag=editthistag}</a></div>
<h3 id="results_heading">{str tag=searchresultsfor} <a class="tag" href="{$WWWROOT}tags.php{if $tag}?tag={$tag|urlencode|safe}{/if}">{if $tag}{$tag|str_shorten_text:50}{else}{str tag=alltags}{/if}</a></h3>
<div class="rbuttons"><a class="btn edit-tag{if !$tag} hidden{/if}" href="{$WWWROOT}edittags.php?tag={$tag|urlencode|safe}">{str tag=editthistag}</a></div>
<div id="results_sort" class="fl">{str tag=sortresultsby}
{foreach from=$results->sortcols item=sortfield name=sortcols}
<a href="{$results->baseurl}&type={$results->filter}&sort={$sortfield}"{if $results->sort == $sortfield} class="selected"{/if}>{str tag=$sortfield}</a>{if !$.foreach.sortcols.last} <span class="sep">|</span> {/if}
......@@ -37,12 +36,11 @@
</thead>
<tbody>
{if $results->data}
{$results->tablerows}
{$results->tablerows|safe}
{/if}
</tbody>
</table>
{$results->pagination}
{$results->pagination|safe}
</div>
{include file="footer.tpl"}
{/auto_escape}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment