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