1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Use placeholder instead of Template-Listener

Moved sidebar into an own template
This commit is contained in:
Tim Düsterhus 2012-03-04 16:03:18 +01:00
parent 24f27cecda
commit e8b1a759f4
4 changed files with 12 additions and 46 deletions

View File

@ -31,7 +31,6 @@
<instruction type="option">option.xml</instruction>
<instruction type="pageMenu">pagemenu.xml</instruction>
<instruction type="eventListener">eventListener.xml</instruction>
<instruction type="templateListener">templatelistener.xml</instruction>
<instruction type="aclOption">acloptions.xml</instruction>
<instruction type="acpMenu">acpMenu.xml</instruction>
<instruction type="userGroupOption">userGroupOption.xml</instruction>
@ -46,7 +45,6 @@
<instruction type="option">option.xml</instruction>
<instruction type="pageMenu">pagemenu.xml</instruction>
<instruction type="eventListener">eventListener.xml</instruction>
<instruction type="templateListener">templatelistener.xml</instruction>
<instruction type="aclOption">acloptions.xml</instruction>
<instruction type="acpMenu">acpMenu.xml</instruction>
<instruction type="userGroupOption">userGroupOption.xml</instruction>

View File

@ -90,35 +90,8 @@
</head>
<body id="tpl{$templateName|ucfirst}">
{capture assign='sidebar'}
<div id="sidebarContent" class="wcf-sidebarContent">
<nav class="timsChatSidebarTabs">
<ul>
<li id="toggleUsers" class="active"><a href="javascript:;" title="{lang}wcf.chat.users{/lang}">{lang}wcf.chat.users{/lang} <span class="wcf-badge">0</span></a></li>
<li id="toggleRooms"><a href="javascript:;" title="{lang}wcf.chat.rooms{/lang}" data-refresh-url="{link controller="Chat" action="RefreshRoomList"}{/link}">{lang}wcf.chat.rooms{/lang} <span class="wcf-badge">{#$rooms|count}</span></a></li>
</ul>
</nav>
<div id="sidebarContainer">
<ul id="timsChatUserList">
</ul>
<nav id="timsChatRoomList" class="wcf-sidebarMenu" style="display: none;">
<div>
<ul>
{foreach from=$rooms item='roomListRoom'}
{if $roomListRoom->canEnter()}
<li{if $roomListRoom->roomID == $room->roomID} class="activeMenuItem"{/if}>
<a href="{link controller='Chat' object=$roomListRoom}{/link}" class="timsChatRoom">{$roomListRoom}</a>
</li>
{/if}
{/foreach}
</ul>
<div style="text-align: center;"><button type="button">{lang}wcf.chat.forceRefresh{/lang}</button></div>
</div>
</nav>
</div>
</div>
{/capture}
{capture assign='sidebar'}{include file='chatSidebar'}{/capture}
{capture assign='headerNavigation'}{include file='chatNavigationInclude'}{/capture}
{include file='header' sandbox=false sidebarOrientation='right'}
<div id="timsChatRoomContent">

View File

@ -1,4 +1,10 @@
{if $templateName == 'chat'}
<li><a href="{link controller="Chat" action="Log"}{/link}" title="{lang}wcf.chat.protocol{/lang}" class="jsTooltip"><img src="{icon size='S'}session1{/icon}" alt="" /> <span>{lang}wcf.chat.protocol{/lang}</span></a></li>
<li><a href="{link controller="Chat"}{/link}" title="{lang}wcf.chat.title{/lang}" class="jsTooltip"><img src="{icon size='S'}chat{/icon}" alt="" /> <span>{lang}wcf.chat.title{/lang}</span></a></li>
{/if}
<li>
<a href="{link controller="Chat" action="Log"}{/link}" title="{lang}wcf.chat.protocol{/lang}" class="jsTooltip">
<img src="{icon size='S'}session1{/icon}" alt="" /> <span>{lang}wcf.chat.protocol{/lang}</span>
</a>
</li>
<li>
<a href="{link controller="Chat"}{/link}" title="{lang}wcf.chat.title{/lang}" class="jsTooltip">
<img src="{icon size='S'}chat{/icon}" alt="" /> <span>{lang}wcf.chat.title{/lang}</span>
</a>
</li>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/templatelistener.xsd">
<import>
<templatelistener name="chatHeaderNavigation">
<environment>user</environment>
<templatename>header</templatename>
<eventname>headerNavigation</eventname>
<templatecode><![CDATA[{include file='chatNavigationInclude'}]]></templatecode>
</templatelistener>
</import>
</data>