mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Merge remote-tracking branch 'origin/suspensionList' into suspensionList
This commit is contained in:
commit
878831a659
@ -45,7 +45,7 @@
|
||||
<select id="roomID" name="roomID">
|
||||
<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>
|
||||
<option value="" disabled="disabled">-------------</option>
|
||||
{foreach from=$availableRooms key=id item=room}
|
||||
<option value="{$id}" {if $roomID == $id}selected="selected"{/if}>{$room}</option>
|
||||
{/foreach}
|
||||
@ -70,9 +70,17 @@
|
||||
<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{capture assign=additionalParameters}{*
|
||||
*}{if $userID}&userID={$userID}{/if}{*
|
||||
*}{if $issuerUserID}&issuerUserID={$issuerUserID}{/if}{*
|
||||
*}{if $roomID}&roomID={$roomID}{/if}{*
|
||||
*}{if $suspensionType}&suspensionType={$suspensionType}{/if}{*
|
||||
*}{if $displayRevoked}&displayRevoked={$displayRevoked}{/if}{*
|
||||
*}{/capture}
|
||||
|
||||
<div class="contentNavigation">
|
||||
{pages print=true assign=pagesLinks application="chat" controller="ChatSuspensionList" link="pageNo=%d&userID=$userID&issuerUserID=$issuerUserID&roomID=$roomID&suspensionType=$suspensionType"}
|
||||
{pages print=true assign=pagesLinks application="chat" controller="ChatSuspensionList" link="pageNo=%d$additionalParameters"}
|
||||
</div>
|
||||
|
||||
<div class="tabularBox tabularBoxTitle marginTop">
|
||||
@ -83,28 +91,38 @@
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="columnID{if $sortField == 'suspensionID'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=suspensionID&sortOrder={if $sortField == 'suspensionID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
|
||||
<th class="columnUsername{if $sortField == 'username'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=username&sortOrder={if $sortField == 'username' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.user.username{/lang}</a></th>
|
||||
<th class="columnRoomID{if $sortField == 'roomID'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=roomID&sortOrder={if $sortField == 'roomID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}chat.general.room{/lang}</a></th>
|
||||
<th class="columnSuspensionType{if $sortField == 'suspensionType'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=suspensionType&sortOrder={if $sortField == 'suspensionType' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}chat.acp.suspension.type{/lang}</a></th>
|
||||
<th class="columnTime{if $sortField == 'time'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=time&sortOrder={if $sortField == 'time' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}chat.general.time{/lang}</a></th>
|
||||
<th class="columnExpires{if $sortField == 'expires'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=expires&sortOrder={if $sortField == 'expires' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}chat.general.expires{/lang}</a></th>
|
||||
<th class="columnIssuer{if $sortField == 'issuer'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=issuer&sortOrder={if $sortField == 'issuer' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}chat.acp.suspension.issuer{/lang}</a></th>
|
||||
<th class="columnMessage{if $sortField == 'reason'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=reason&sortOrder={if $sortField == 'reason' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}chat.acp.suspension.reason{/lang}</a></th>
|
||||
<th class="columnID{if $sortField == 'suspensionID'} active {@$sortOrder}{/if}" colspan="2"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=suspensionID&sortOrder={if $sortField == 'suspensionID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$additionalParameters}{/link}">{lang}wcf.global.objectID{/lang}</a></th>
|
||||
<th class="columnUsername{if $sortField == 'username'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=username&sortOrder={if $sortField == 'username' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$additionalParameters}{/link}">{lang}wcf.user.username{/lang}</a></th>
|
||||
<th class="columnRoomID{if $sortField == 'roomID'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=roomID&sortOrder={if $sortField == 'roomID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$additionalParameters}{/link}">{lang}chat.general.room{/lang}</a></th>
|
||||
<th class="columnSuspensionType{if $sortField == 'type'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=type&sortOrder={if $sortField == 'type' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$additionalParameters}{/link}">{lang}chat.acp.suspension.type{/lang}</a></th>
|
||||
<th class="columnTime{if $sortField == 'time'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=time&sortOrder={if $sortField == 'time' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$additionalParameters}{/link}">{lang}chat.general.time{/lang}</a></th>
|
||||
<th class="columnExpires{if $sortField == 'expires'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=expires&sortOrder={if $sortField == 'expires' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$additionalParameters}{/link}">{lang}chat.general.expires{/lang}</a></th>
|
||||
<th class="columnIssuer{if $sortField == 'issuer'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=issuer&sortOrder={if $sortField == 'issuer' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$additionalParameters}{/link}">{lang}chat.acp.suspension.issuer{/lang}</a></th>
|
||||
<th class="columnMessage{if $sortField == 'reason'} active {@$sortOrder}{/if}"><a href="{link application='chat' controller='ChatSuspensionList'}pageNo={@$pageNo}&sortField=reason&sortOrder={if $sortField == 'reason' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@$additionalParameters}{/link}">{lang}chat.acp.suspension.reason{/lang}</a></th>
|
||||
|
||||
{event name='columnHeads'}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{foreach from=$objects item=$suspension}
|
||||
<tr>
|
||||
<tr class="jsSuspensionRow" data-object-id="{$suspension->suspensionID}">
|
||||
<td class="columnIcon">
|
||||
<span class="icon icon16 icon-undo{if $suspension->expires <= TIME_NOW} disabled{/if}" title="{lang}chat.acp.suspension.revoked{/lang}"></span>
|
||||
{event name='rowButtons'}
|
||||
</td>
|
||||
<td id="columnID">{#$suspension->suspensionID}</td>
|
||||
<td id="columnUsername"><a href="{link application='chat' controller='ChatSuspensionList'}userID={$suspension->userID}{/link}">{$suspension->username}</a></td>
|
||||
<td id="columnRoomID"><a href="{link application='chat' controller='ChatSuspensionList'}roomID={if $suspension->roomID}{$suspension->roomID}{else}0{/if}{/link}">{if $suspension->roomID}{$suspension->roomTitle|language}{else}{lang}chat.room.global{/lang}{/if}</a></td>
|
||||
<td id="columnSuspensionType"><a href="{link application='chat' controller='ChatSuspensionList'}suspensionType={$suspension->type}{/link}">{lang}chat.suspension.{@$suspension->type}{/lang}</a></td>
|
||||
<td id="columnTime">{$suspension->time|plainTime}</td>
|
||||
<td id="columnExpires">{$suspension->expires|plainTime} ({$suspension->expires|dateDiff})</td>
|
||||
<td id="columnExpires">
|
||||
<p>{$suspension->expires|plainTime}{if $suspension->expires > TIME_NOW} ({$suspension->expires|dateDiff}){/if}</p>
|
||||
{if $suspension->revoker}<p><small>{lang}chat.acp.suspension.revokedBy{/lang}</small></p>{/if}
|
||||
</td>
|
||||
<td id="columnIssuer"><a href="{link application='chat' controller='ChatSuspensionList'}issuerUserID={$suspension->issuer}{/link}">{$suspension->issuerUsername}</a></td>
|
||||
<td id="columnMessage" {if $suspension->reason != $suspension->reason|truncate:30} class="jsTooltip" title="{$suspension->reason}"{/if}>{$suspension->reason|truncate:30}</a></td>
|
||||
<td id="columnMessage"{if $suspension->reason != $suspension->reason|truncate:30} class="jsTooltip" title="{$suspension->reason}"{/if}>{$suspension->reason|truncate:30}</a></td>
|
||||
{event name='columns'}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
|
@ -141,12 +141,14 @@ public function assignVariables() {
|
||||
protected function initObjectList() {
|
||||
parent::initObjectList();
|
||||
|
||||
$this->objectList->sqlSelects .= "user_table.username, user_table2.username as issuerUsername, room_table.title AS roomTitle";
|
||||
$this->objectList->sqlSelects .= "user_table.username, user_table2.username AS issuerUsername, user_table3.username AS revokerUsername, room_table.title AS roomTitle";
|
||||
$this->objectList->sqlJoins .= "
|
||||
LEFT JOIN wcf".WCF_N."_user user_table
|
||||
ON suspension.userID = user_table.userID
|
||||
LEFT JOIN wcf".WCF_N."_user user_table2
|
||||
ON suspension.issuer = user_table2.userID";
|
||||
ON suspension.issuer = user_table2.userID
|
||||
LEFT JOIN wcf".WCF_N."_user user_table3
|
||||
ON suspension.issuer = user_table3.userID";
|
||||
$conditionJoins = " LEFT JOIN chat".WCF_N."_room room_table
|
||||
ON suspension.roomID = room_table.roomID";
|
||||
$this->objectList->sqlConditionJoins .= $conditionJoins;
|
||||
|
@ -15,13 +15,17 @@
|
||||
<item name="chat.acp.suspension.list"><![CDATA[Sanktionen]]></item>
|
||||
<item name="chat.acp.suspension.type"><![CDATA[Art der Sanktion]]></item>
|
||||
<item name="chat.acp.suspension.issuer"><![CDATA[Aussteller]]></item>
|
||||
<item name="chat.acp.suspension.displayRevoked"><![CDATA[Abgelaufene Sanktionen anzeigen]]></item>
|
||||
<item name="chat.acp.suspension.reason"><![CDATA[Grund]]></item>
|
||||
<item name="chat.acp.suspension.revoked"><![CDATA[Zurückziehen]]></item>
|
||||
<item name="chat.acp.suspension.revokedBy"><![CDATA[Zurückgezogen von {$suspension->revokerUsername}]]></item>
|
||||
</category>
|
||||
|
||||
<category name="chat.acp.menu">
|
||||
<item name="chat.acp.menu.link"><![CDATA[Chat]]></item>
|
||||
<item name="chat.acp.menu.link.room.list"><![CDATA[Chaträume auflisten]]></item>
|
||||
<item name="chat.acp.menu.link.room.add"><![CDATA[Chatraum hinzufügen]]></item>
|
||||
<item name="chat.acp.menu.link.suspension.list"><![CDATA[Sperren auflisten]]></item>
|
||||
<item name="chat.acp.menu.link.suspension.list"><![CDATA[Sanktionen auflisten]]></item>
|
||||
</category>
|
||||
|
||||
<category name="wcf.acp.group">
|
||||
|
Loading…
Reference in New Issue
Block a user