mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Add pagination to chatSuspensionList and rename variables in chatSuspensionList.tpl and ChatSuspensionListPage.class.php
This commit is contained in:
parent
7cf72a0326
commit
eb27166c6c
@ -22,14 +22,14 @@
|
||||
<dl>
|
||||
<dt><label for="username">{lang}wcf.user.username{/lang}</label></dt>
|
||||
<dd>
|
||||
<input type="text" id="username" name="username" class="medium" value="{$filterUsername}" />
|
||||
<input type="text" id="username" name="username" class="medium" value="{$username}" />
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt><label for="issuerUsername">{lang}chat.acp.suspension.issuer{/lang}</label></dt>
|
||||
<dd>
|
||||
<input type="text" id="issuerUsername" name="issuerUsername" class="medium" value="{$filterIssuerUsername}" />
|
||||
<input type="text" id="issuerUsername" name="issuerUsername" class="medium" value="{$issuerUsername}" />
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -37,11 +37,11 @@
|
||||
<dt><label for="roomID">{lang}chat.general.room{/lang}</label></dt>
|
||||
<dd>
|
||||
<select id="roomID" name="roomID">
|
||||
<option value="-1"{if $filterRoomID == -1} selected="selected"{/if}></option>
|
||||
<option value="0"{if $filterRoomID == 0} selected="selected"{/if}>{lang}chat.room.global{/lang}</option>
|
||||
<option value="-1"{if $roomID == -1} selected="selected"{/if}></option>
|
||||
<option value="0"{if $roomID == 0} selected="selected"{/if}>{lang}chat.room.global{/lang}</option>
|
||||
<option value="" disabled="disabled">————</option>
|
||||
{foreach from=$availableRooms key=id item=room}
|
||||
<option value="{$id}" {if $filterRoomID == $id}selected="selected"{/if}>{$room}</option>
|
||||
<option value="{$id}" {if $roomID == $id}selected="selected"{/if}>{$room}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</dd>
|
||||
@ -51,9 +51,9 @@
|
||||
<dt><label for="suspensionType">{lang}chat.acp.suspension.type{/lang}</label></dt>
|
||||
<dd>
|
||||
<select id="suspensionType" name="suspensionType">
|
||||
<option value=""{if $filterSuspensionType == null} selected="selected"{/if}></option>
|
||||
<option value="{'\chat\data\suspension\Suspension::TYPE_MUTE'|constant}"{if $filterSuspensionType == '\chat\data\suspension\Suspension::TYPE_MUTE'|constant} selected="selected"{/if}>{lang}chat.suspension.{'\chat\data\suspension\Suspension::TYPE_MUTE'|constant}{/lang}</option>
|
||||
<option value="{'\chat\data\suspension\Suspension::TYPE_BAN'|constant}"{if $filterSuspensionType == '\chat\data\suspension\Suspension::TYPE_BAN'|constant} selected="selected"{/if}>{lang}chat.suspension.{'\chat\data\suspension\Suspension::TYPE_BAN'|constant}{/lang}</option>
|
||||
<option value=""{if $suspensionType == null} selected="selected"{/if}></option>
|
||||
<option value="{'\chat\data\suspension\Suspension::TYPE_MUTE'|constant}"{if $suspensionType == '\chat\data\suspension\Suspension::TYPE_MUTE'|constant} selected="selected"{/if}>{lang}chat.suspension.{'\chat\data\suspension\Suspension::TYPE_MUTE'|constant}{/lang}</option>
|
||||
<option value="{'\chat\data\suspension\Suspension::TYPE_BAN'|constant}"{if $suspensionType == '\chat\data\suspension\Suspension::TYPE_BAN'|constant} selected="selected"{/if}>{lang}chat.suspension.{'\chat\data\suspension\Suspension::TYPE_BAN'|constant}{/lang}</option>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
@ -65,6 +65,10 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="contentNavigation">
|
||||
{pages print=true assign=pagesLinks application="chat" controller="ChatSuspensionList" link="pageNo=%d&userID=$userID&issuerUserID=$issuerUserID&roomID=$roomID&suspensionType=$suspensionType"}
|
||||
</div>
|
||||
|
||||
<div class="tabularBox tabularBoxTitle marginTop">
|
||||
<header>
|
||||
<h2>{lang}chat.acp.suspension.list{/lang} <span class="badge badgeInverse">{#$items}</span></h2>
|
||||
@ -98,6 +102,10 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="contentNavigation">
|
||||
{pages print=true assign=pagesLinks application="chat" controller="ChatSuspensionList" link="pageNo=%d&username=$username&issuerUsername=$issuerUsername&roomID=$roomID&suspensionType=$suspensionType"}
|
||||
</div>
|
||||
{else}
|
||||
<p class="info">{lang}wcf.global.noItems{/lang}</p>
|
||||
{/if}
|
||||
|
@ -28,11 +28,6 @@ class ChatSuspensionListPage extends \wcf\page\SortablePage {
|
||||
*/
|
||||
public $defaultSortField = 'expires';
|
||||
|
||||
/**
|
||||
* @see \wcf\page\MultipleLinkPage::$itemsPerPage
|
||||
*/
|
||||
public $itemsPerPage = 30;
|
||||
|
||||
/**
|
||||
* @see \wcf\page\SortablePage::$validSortFields
|
||||
*/
|
||||
@ -120,10 +115,12 @@ public function assignVariables() {
|
||||
|
||||
WCF::getTPL()->assign(array(
|
||||
'availableRooms' => \chat\data\room\RoomCache::getInstance()->getRooms(),
|
||||
'filterRoomID' => ($this->filterRoomID !== null) ? $this->filterRoomID : -1,
|
||||
'filterUsername' => $this->filterUsername,
|
||||
'filterIssuerUsername' => $this->filterIssuerUsername,
|
||||
'filterSuspensionType' => $this->filterSuspensionType
|
||||
'roomID' => ($this->filterRoomID !== null) ? $this->filterRoomID : -1,
|
||||
'username' => $this->filterUsername,
|
||||
'issuerUsername' => $this->filterIssuerUsername,
|
||||
'suspensionType' => $this->filterSuspensionType,
|
||||
'userID' => $this->filterUserID,
|
||||
'issuerUserID' => $this->filterIssuerUserID
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user