mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Make ACP WCF conform
This commit is contained in:
parent
6f02c6c787
commit
6fc06ba56f
@ -24,17 +24,22 @@
|
||||
{/if}
|
||||
|
||||
<div class="contentNavigation">
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{link application='chat' controller='RoomList'}{/link}" title="{lang}chat.acp.menu.link.room.list{/lang}" class="button"><span class="icon icon16 icon-list"></span> <span>{lang}chat.acp.menu.link.room.list{/lang}</span></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{hascontent}
|
||||
<nav>
|
||||
<ul>
|
||||
{content}
|
||||
<li><a href="{link application='chat' controller='RoomList'}{/link}" title="{lang}chat.acp.menu.link.room.list{/lang}" class="button"><span class="icon icon16 icon-list"></span> <span>{lang}chat.acp.menu.link.room.list{/lang}</span></a></li>
|
||||
{event name='contentNavigationButtonsTop'}
|
||||
{/content}
|
||||
</ul>
|
||||
</nav>
|
||||
{/hascontent}
|
||||
</div>
|
||||
|
||||
<form method="post" action="{if $action == 'add'}{link application='chat' controller='RoomAdd'}{/link}{else}{link application='chat' controller='roomEdit' id=$roomID}{/link}{/if}">
|
||||
<div class="container containerPadding sortableListContainer marginTop shadow">
|
||||
<form method="post" action="{if $action == 'add'}{link application='chat' controller='RoomAdd'}{/link}{else}{link application='chat' controller='RoomEdit' id=$roomID}{/link}{/if}">
|
||||
<div class="container containerPadding marginTop">
|
||||
<fieldset>
|
||||
<legend>{lang}chat.acp.room.data{/lang}</legend>
|
||||
<legend>{lang}wcf.global.form.data{/lang}</legend>
|
||||
|
||||
<dl{if $errorField == 'title'} class="formError"{/if}>
|
||||
<dt><label for="title">{lang}chat.acp.room.title{/lang}</label></dt>
|
||||
|
@ -16,47 +16,52 @@
|
||||
</header>
|
||||
|
||||
<div class="contentNavigation">
|
||||
{if $__wcf->session->getPermission('admin.chat.canAddRoom')}
|
||||
{hascontent}
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{link application='chat' controller='roomAdd'}{/link}" title="{lang}chat.acp.room.add{/lang}" class="button"><span class="icon icon16 icon-plus"></span> <span>{lang}chat.acp.room.add{/lang}</span></a></li>
|
||||
{content}
|
||||
{if $__wcf->session->getPermission('admin.chat.canAddRoom')}
|
||||
<li><a href="{link application='chat' controller='RoomAdd'}{/link}" title="{lang}chat.acp.room.add{/lang}" class="button"><span class="icon icon16 icon-plus"></span> <span>{lang}chat.acp.room.add{/lang}</span></a></li>
|
||||
{/if}
|
||||
{event name='contentNavigationButtonsTop'}
|
||||
{/content}
|
||||
</ul>
|
||||
</nav>
|
||||
{/if}
|
||||
{/hascontent}
|
||||
</div>
|
||||
{hascontent}
|
||||
<section id="roomList" class="container containerPadding sortableListContainer marginTop shadow">
|
||||
{if $objects|count}
|
||||
<section id="roomList" class="container containerPadding sortableListContainer marginTop">
|
||||
<ol class="sortableList" data-object-id="0">
|
||||
{content}
|
||||
{foreach from=$objects item=chatRoom}
|
||||
<li class="sortableNode sortableNoNesting chatRoomRow" data-object-id="{@$chatRoom->roomID}">
|
||||
<span class="sortableNodeLabel">
|
||||
{foreach from=$objects item=chatRoom}
|
||||
<li class="sortableNode sortableNoNesting chatRoomRow" data-object-id="{@$chatRoom->roomID}">
|
||||
<span class="sortableNodeLabel">
|
||||
{if $__wcf->session->getPermission('admin.chat.canEditRoom')}
|
||||
<a href="{link application='chat' controller='RoomEdit' id=$chatRoom->roomID}{/link}">{$chatRoom->title|language}</a>
|
||||
{else}
|
||||
{$chatRoom->title|language}
|
||||
{/if}
|
||||
|
||||
<span class="statusDisplay sortableButtonContainer">
|
||||
{if $__wcf->session->getPermission('admin.chat.canEditRoom')}
|
||||
<a href="{link application='chat' controller='roomEdit' id=$chatRoom->roomID}{/link}">{$chatRoom->title|language}</a>
|
||||
{else}
|
||||
{$chatRoom->title|language}
|
||||
<a href="{link application='chat' controller='RoomEdit' id=$chatRoom->roomID}{/link}"><span title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip icon icon16 icon-pencil" /></a>
|
||||
{/if}
|
||||
{if $__wcf->session->getPermission('admin.chat.canDeleteRoom')}
|
||||
<span title="{lang}wcf.global.button.delete{/lang}" class="jsDeleteButton jsTooltip icon icon16 icon-remove" data-object-id="{@$chatRoom->roomID}" data-confirm-message="{lang}chat.acp.room.delete.sure{/lang}" />
|
||||
{/if}
|
||||
|
||||
<span class="statusDisplay sortableButtonContainer">
|
||||
{if $__wcf->session->getPermission('admin.chat.canEditRoom')}
|
||||
<a href="{link application='chat' controller='roomEdit' id=$chatRoom->roomID}{/link}"><span title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip icon icon16 icon-pencil" /></a>
|
||||
{/if}
|
||||
{if $__wcf->session->getPermission('admin.chat.canDeleteRoom')}
|
||||
<span title="{lang}wcf.global.button.delete{/lang}" class="jsDeleteButton jsTooltip icon icon16 icon-remove" data-object-id="{@$chatRoom->roomID}" data-confirm-message="{lang}chat.acp.room.delete.sure{/lang}" />
|
||||
{/if}
|
||||
</span>
|
||||
{event name='itemButtons'}
|
||||
</span>
|
||||
<ol class="sortableList" data-object-id="{@$chatRoom->roomID}"></ol></li>
|
||||
</li>
|
||||
{/foreach}
|
||||
{/content}
|
||||
</span>
|
||||
<ol class="sortableList" data-object-id="{@$chatRoom->roomID}"></ol></li>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ol>
|
||||
<div class="formSubmit">
|
||||
<button class="button" data-type="submit">{lang}wcf.global.button.submit{/lang}</button>
|
||||
</div>
|
||||
</section>
|
||||
{hascontentelse}
|
||||
{else}
|
||||
<p class="warning">{lang}chat.acp.room.noneAvailable{/lang}</p>
|
||||
{/hascontent}
|
||||
{/if}
|
||||
|
||||
{include file='footer'}
|
||||
|
@ -62,9 +62,9 @@ public function readParameters() {
|
||||
*/
|
||||
public function readFormParameters() {
|
||||
parent::readFormParameters();
|
||||
|
||||
|
||||
I18nHandler::getInstance()->readValues();
|
||||
|
||||
|
||||
if (I18nHandler::getInstance()->isPlainValue('title')) $this->title = I18nHandler::getInstance()->getValue('title');
|
||||
if (I18nHandler::getInstance()->isPlainValue('topic')) $this->topic = I18nHandler::getInstance()->getValue('topic');
|
||||
}
|
||||
@ -86,7 +86,7 @@ public function validate() {
|
||||
*/
|
||||
public function save() {
|
||||
parent::save();
|
||||
|
||||
|
||||
// save room
|
||||
$this->objectAction = new \chat\data\room\RoomAction(array(), 'create', array('data' => array(
|
||||
'title' => $this->title,
|
||||
|
@ -84,7 +84,7 @@ public function prune() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see wcf\data\ISortableAction
|
||||
* @see wcf\data\ISortableAction::validateUpdatePosition()
|
||||
*/
|
||||
public function validateUpdatePosition() {
|
||||
// validate permissions
|
||||
@ -101,7 +101,7 @@ public function validateUpdatePosition() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see wcf\data\ISortableAction
|
||||
* @see wcf\data\ISortableAction::updatePosition()
|
||||
*/
|
||||
public function updatePosition() {
|
||||
$roomList = new RoomList();
|
||||
|
Loading…
Reference in New Issue
Block a user