1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00
Tims-Chat/template/chat.tpl

251 lines
6.4 KiB
Smarty
Raw Normal View History

{include file='documentHeader'}
<head>
2011-12-13 16:25:58 +00:00
<title>{$room} - {lang}wcf.chat.title{/lang} - {PAGE_TITLE|language}</title>
{include file='headInclude' sandbox=false}
<style type="text/css">
2011-12-11 22:29:43 +00:00
#chatBox {
2011-12-05 16:12:30 +00:00
padding: 0;
}
2011-12-11 22:29:43 +00:00
#chatBox > div {
text-align: center;
}
2011-12-11 22:29:43 +00:00
#chatBox aside, #chatRoomContent {
text-align: left;
}
2011-12-15 17:55:44 +00:00
aside {
2011-12-11 22:29:43 +00:00
overflow: auto;
padding: 0 1px 0 0;
width: 190px;
}
2011-12-15 17:55:44 +00:00
aside h2 {
margin: auto;
text-align: center;
2011-12-11 22:29:43 +00:00
font-size: 130%;
color: #336699;
cursor: default;
font-weight: bold;
margin-top: 5px;
}
2011-12-15 17:55:44 +00:00
aside ul li a {
2011-12-11 22:29:43 +00:00
color: #6699CC;
display: block;
padding: 5px 25px 7px 35px;
text-shadow: 0 1px 0 #FFFFFF;
}
2011-12-11 22:29:43 +00:00
#topic, #smileyList, #chatOptions {
padding: 5px;
}
2011-12-05 20:17:01 +00:00
2011-12-12 14:52:36 +00:00
.chatMessageContainer {
2011-12-13 20:10:10 +00:00
height: 200px;
2011-12-11 22:29:43 +00:00
overflow-y: scroll;
2011-12-05 20:17:01 +00:00
}
2011-12-11 22:29:43 +00:00
#smileyList .smilies li, .smallButtons li {
display: inline;
margin-right: 5px;
margin-top: 5px;
2011-12-05 20:17:01 +00:00
}
2011-12-11 22:29:43 +00:00
#chatForm {
margin-top: 15px;
white-space: nowrap;
margin-top: 10px;
2011-12-15 20:45:37 +00:00
/* Fix to align chatInput in center */
text-align: center;
}
#chatInput {
background-position: right center;
background-repeat: no-repeat;
}
2011-12-15 20:45:37 +00:00
2011-12-11 22:29:43 +00:00
#chatOptions {
display: inline-block;
}
2011-12-15 17:55:44 +00:00
#chatUserList > li > .bgFix a {
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}arrowRight{/icon});
background-position: 15px center;
background-repeat: no-repeat;
background-size: 16px auto;
}
2011-12-15 17:55:44 +00:00
#chatUserList > li.activeMenuItem > .bgFix a {
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}arrowDown{/icon});
}
2011-12-15 17:55:44 +00:00
#chatUserList .chatUserMenu li a {
2011-12-11 22:29:43 +00:00
margin-left: 30px !important;
}
2011-12-15 17:55:44 +00:00
#chatUserList .chatUserMenu {
2011-12-11 22:29:43 +00:00
display: none;
}
2011-12-15 17:55:44 +00:00
#chatUserList > li a {
2011-12-11 22:29:43 +00:00
margin-left: 20px;
}
2011-12-11 22:29:43 +00:00
.chatMessage time, .chatMessage time::before, .chatMessage time::after {
font-size: .8em;
}
2011-12-11 22:29:43 +00:00
.chatMessage time::before {
content: "[";
}
2011-12-03 23:50:04 +00:00
2011-12-11 22:29:43 +00:00
.chatMessage time::after {
content: "]";
2011-12-04 10:52:56 +00:00
}
2011-12-13 21:42:28 +00:00
.chatMessage {
padding-left: 16px;
min-height: 16px;
}
{assign var='type' value='\wcf\data\chat\message\ChatMessage::TYPE_'}
.chatMessage{$type|concat:'JOIN'|constant}, .chatMessage{$type|concat:'LEAVE'|constant} {
background-position: left top;
background-repeat: no-repeat;
}
.chatMessage{$type|concat:'JOIN'|constant} {
background-image: url({icon size='S'}toRight1{/icon});
}
.chatMessage{$type|concat:'LEAVE'|constant} {
background-image: url({icon size='S'}toLeft1{/icon});
}
2011-12-11 22:29:43 +00:00
.ajaxLoad {
background-position: right center;
background-repeat: no-repeat;
2011-12-13 21:42:28 +00:00
background-image: url({icon size='S'}spinner1{/icon});
2011-12-04 10:52:56 +00:00
}
2011-12-11 22:29:43 +00:00
.bgFix {
display: block;
2011-12-03 23:50:04 +00:00
}
</style>
</head>
<body id="tpl{$templateName|ucfirst}">
2011-12-15 20:45:37 +00:00
{capture assign='sidebar'}{/capture}
{capture assign='header'}{include file='header' sandbox=false}{/capture}
{assign var='header' value='class="main"'|str_replace:'class="main right"':$header}
{assign var='header' value='<!-- CONTENT -->'|str_replace:$sidebar:$header}
{assign var='header' value='<section id="content" class="content">'|str_replace:$sidebar:$header}
{@$header}
<aside class="sidebar">
<div id="sidebar">
<button title="{lang}wcf.chat.title{/lang}" value="{link controller="Chat"}{/link}">{lang}wcf.chat.title{/lang}</button>
<button title="{lang}wcf.chat.protocol{/lang}" value="{link controller="Chat" action="Log"}{/link}">{lang}wcf.chat.protocol{/lang}</button>
<h2>{lang}wcf.chat.users{/lang}</h2>
<ul id="chatUserList">
{section name=user start=1 loop=11}
<li id="user-{$user}" class="chatUser">
<span class="bgFix"><a class="chatUserLink" href="javascript:;">User {$user}</a></span>
<ul class="chatUserMenu">
<li>
<a href="javascript:;">Query</a>
<a href="javascript:;">Kick</a>
<a href="javascript:;">Ban</a>
<a href="{link controller="User" id=$user}{/link}">Profile</a>
</li>
2011-12-15 17:55:44 +00:00
</ul>
2011-12-15 20:45:37 +00:00
</li>
{/section}
</ul>
<h2>{lang}wcf.chat.rooms{/lang}</h2>
<nav class="sidebarMenu">
2011-12-15 17:55:44 +00:00
<div>
<ul>
2011-12-15 20:45:37 +00:00
{foreach from=$rooms item='roomListRoom'}
<li{if $roomListRoom->roomID == $room->roomID} class="activeMenuItem"{/if}>
<a href="{link controller='Chat' object=$roomListRoom}{/link}" class="chatRoom">{$roomListRoom}</a>
</li>
{/foreach}
2011-12-15 17:55:44 +00:00
</ul>
</div>
</nav>
</div>
</aside>
<!-- CONTENT -->
<section id="content" class="content">
{include file='breadcrumbs' sandbox=false}
<div id="chatRoomContent">
<div id="topic" class="border"{if $room->topic|language === ''} style="display: none;"{/if}>{$room->topic|language}</div>
<div class="chatMessageContainer border content">
<ul></ul>
</div>
2011-12-11 22:29:43 +00:00
2011-12-15 17:55:44 +00:00
<form id="chatForm" action="{link controller="Chat" action="Send"}{/link}" method="post">
<input type="text" id="chatInput" class="inputText long" name="text" autocomplete="off" required="required" placeholder="Submit with enter" />
</form>
<div id="chatControls">
<div id="smileyList" class="border">
<ul class="smilies">
{foreach from=$smilies item='smiley'}
<li>
<img src="{$smiley->getURL()}" alt="{$smiley->smileyCode}" title="{$smiley->smileyCode}" class="smiley" />
2011-12-13 16:22:54 +00:00
</li>
{/foreach}
2011-12-15 17:55:44 +00:00
</ul>
</div>
<div id="chatOptions" class="border">
<div class="smallButtons">
2011-12-11 22:29:43 +00:00
<ul>
2011-12-15 17:55:44 +00:00
<li>
<a id="chatAutoscrollButton" href="javascript:;">
<img alt="" src="{icon}enabled1{/icon}" /> <span>Scroll</span>
</a>
</li>
<li>
<a href="javascript:;">
<img alt="" src="{icon}disabled1{/icon}" /> <span>Notify</span>
</a>
</li>
<li>
<a href="javascript:;">
<img alt="" src="{icon}delete1{/icon}" /> <span>Clear</span>
</a>
2011-12-11 22:29:43 +00:00
</li>
2011-12-15 17:55:44 +00:00
<li>
<a href="javascript:;">
<img alt="" src="{icon}check1{/icon}" /> <span>Mark</span>
</a>
</li>
2011-12-11 22:29:43 +00:00
</ul>
</div>
</div>
2011-12-15 17:55:44 +00:00
</div>
</div>
<script type="text/javascript">
//<![CDATA[
2011-12-03 17:07:57 +00:00
TimWolla.WCF.Chat.titleTemplate = new WCF.Template('{ldelim}$title} - {'wcf.chat.title'|language|encodeJS} - {PAGE_TITLE|language|encodeJS}');
2011-12-04 22:12:12 +00:00
{capture assign='chatMessageTemplate'}{include file='chatMessage'}{/capture}
2011-12-05 14:40:30 +00:00
TimWolla.WCF.Chat.messageTemplate = new WCF.Template('{@$chatMessageTemplate|encodeJS}');
2011-12-04 21:50:17 +00:00
TimWolla.WCF.Chat.init({$room->roomID}, 1);
TimWolla.WCF.Chat.handleMessages([
{implode from=$newestMessages item='message'}
{@$message->jsonify()}
{/implode}
]);
//]]>
</script>
{include file='footer' sandbox=false}
</body>
</html>