1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-18 01:20:40 +00:00

Make ACP WCF conform

This commit is contained in:
Tim Düsterhus 2013-04-20 17:19:17 +02:00
parent 6f02c6c787
commit 6fc06ba56f
4 changed files with 49 additions and 39 deletions

View File

@ -24,17 +24,22 @@
{/if}
<div class="contentNavigation">
{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>

View File

@ -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">
{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}">{$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}"><span title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip icon icon16 icon-pencil" /></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>
{/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}
{event name='itemButtons'}
</span>
</span>
<ol class="sortableList" data-object-id="{@$chatRoom->roomID}"></ol></li>
</li>
{/foreach}
{/content}
</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'}

View File

@ -84,7 +84,7 @@ class RoomAction extends \wcf\data\AbstractDatabaseObjectAction implements \wcf\
}
/**
* @see wcf\data\ISortableAction
* @see wcf\data\ISortableAction::validateUpdatePosition()
*/
public function validateUpdatePosition() {
// validate permissions
@ -101,7 +101,7 @@ class RoomAction extends \wcf\data\AbstractDatabaseObjectAction implements \wcf\
}
/**
* @see wcf\data\ISortableAction
* @see wcf\data\ISortableAction::updatePosition()
*/
public function updatePosition() {
$roomList = new RoomList();