Use the new UI for the sort order handling of the conversation list
authorMarcel Werk <burntime@woltlab.com>
Tue, 9 Apr 2019 10:54:06 +0000 (12:54 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 9 Apr 2019 10:54:06 +0000 (12:54 +0200)
Closes #121

files/lib/page/ConversationListPage.class.php
language/de.xml
language/en.xml
templates/conversationList.tpl

index 9f5d9868c3ad198517e52e6235a51bf8f67638a1..95b2cc935c1e127367500b287a34981b2ce7e719 100644 (file)
@@ -232,7 +232,8 @@ class ConversationListPage extends SortablePage {
                        'draftCount' => $this->draftCount,
                        'hiddenCount' => $this->hiddenCount,
                        'outboxCount' => $this->outboxCount,
-                       'participants' => $this->participants
+                       'participants' => $this->participants,
+                       'validSortFields' => $this->validSortFields,
                ]);
        }
 }
index 847a9c20e4b0098b3c9235afbd49ad160596f281..e55339703a8650789e3cc604f2da58b31ab1561f 100644 (file)
                <item name="wcf.conversation.visibility.new"><![CDATA[Nur neue Nachrichten]]></item>
                <item name="wcf.conversation.visibility.new.description"><![CDATA[Die neuen Teilnehmer sehen nur neue Nachrichten, alle vorherigen Nachrichten werden nicht angezeigt.]]></item>
                <item name="wcf.conversation.visibility.previousMessages"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Du wurdest{else}Sie wurden{/if} einer laufenden Konversation hinzugefügt, vorherige Nachrichten werden {if LANGUAGE_USE_INFORMAL_VARIANT}dir{else}Ihnen{/if} nicht angezeigt.]]></item>
+               <item name="wcf.conversation.time"><![CDATA[Erstellung]]></item>
+               <item name="wcf.conversation.username"><![CDATA[Autor]]></item>
        </category>
        <category name="wcf.conversation.edit">
                <item name="wcf.conversation.edit.addParticipants"><![CDATA[Teilnehmer hinzufügen]]></item>
index 7f4419cc25e9078c8f526ff82f24f9c408b86711..93fc840a95ce9968027d5c766571784670c3ac55 100644 (file)
                <item name="wcf.conversation.visibility.new"><![CDATA[New messages only]]></item>
                <item name="wcf.conversation.visibility.new.description"><![CDATA[The new participants will see new messages only, older messages will be hidden from them.]]></item>
                <item name="wcf.conversation.visibility.previousMessages"><![CDATA[You have been added to an existing conversation, previously written messages are hidden.]]></item>
+               <item name="wcf.conversation.time"><![CDATA[Creation]]></item>
+               <item name="wcf.conversation.username"><![CDATA[Author]]></item>
        </category>
        <category name="wcf.conversation.edit">
                <item name="wcf.conversation.edit.addParticipants"><![CDATA[Add Participants]]></item>
index 79d910923c181aa6d27676e2d18fcb30924aa67a..f22ed9a9ccf647521f731fa33435e79f3a7f8fab 100644 (file)
                        <li class="tabularListRow tabularListRowHead">
                                <ol class="tabularListColumns">
                                        <li class="columnMark jsOnly"><label><input type="checkbox" class="jsClipboardMarkAll"></label></li>
-                                       <li class="columnSubject{if $sortField === 'subject'} active {@$sortOrder}{/if}"><a href="{link controller='ConversationList'}{if $filter}filter={@$filter}&{/if}{if !$participants|empty}participants={implode from=$participants item=participant}{$participant|rawurlencode}{/implode}&{/if}pageNo={@$pageNo}&sortField=subject&sortOrder={if $sortField == 'subject' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{if $labelID}&labelID={@$labelID}{/if}{/link}">{lang}wcf.global.subject{/lang}</a></li>
-                                       <li class="columnStats{if $sortField == 'replies'} active {@$sortOrder}{/if}"><a href="{link controller='ConversationList'}{if $filter}filter={@$filter}&{/if}{if !$participants|empty}participants={implode from=$participants item=participant}{$participant|rawurlencode}{/implode}&{/if}pageNo={@$pageNo}&sortField=replies&sortOrder={if $sortField == 'replies' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{if $labelID}&labelID={@$labelID}{/if}{/link}">{lang}wcf.conversation.replies{/lang}</a></li>
-                                       <li class="columnLastPost{if $sortField === 'lastPostTime'} active {@$sortOrder}{/if}"><a href="{link controller='ConversationList'}{if $filter}filter={@$filter}&{/if}{if !$participants|empty}participants={implode from=$participants item=participant}{$participant|rawurlencode}{/implode}&{/if}pageNo={@$pageNo}&sortField=lastPostTime&sortOrder={if $sortField == 'lastPostTime' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{if $labelID}&labelID={@$labelID}{/if}{/link}">{lang}wcf.conversation.lastPostTime{/lang}</a></li>
                                        
-                                       {event name='columnHeads'}
+                                       <li class="columnSort">
+                                               <ul class="inlineList">
+                                                       <li>
+                                                               <a rel="nofollow" href="{link controller='ConversationList'}{if $filter}filter={@$filter}&{/if}{if !$participants|empty}participants={implode from=$participants item=participant}{$participant|rawurlencode}{/implode}&{/if}pageNo={@$pageNo}&sortField={$sortField}&sortOrder={if $sortOrder == 'ASC'}DESC{else}ASC{/if}{if $labelID}&labelID={@$labelID}{/if}{/link}">
+                                                                       <span class="icon icon16 fa-sort-amount-{$sortOrder|strtolower} jsTooltip" title="{lang}wcf.global.sorting{/lang} ({lang}wcf.global.sortOrder.{if $sortOrder === 'ASC'}ascending{else}descending{/if}{/lang})"></span>
+                                                               </a>
+                                                       </li>
+                                                       <li>
+                                                               <div class="dropdown">
+                                                                       <span class="dropdownToggle">{if $sortField == 'subject'}{lang}wcf.global.subject{/lang}{else}{lang}wcf.conversation.{$sortField}{/lang}{/if}</span>
+                                                                       
+                                                                       <ul class="dropdownMenu">
+                                                                               {foreach from=$validSortFields item=_sortField}
+                                                                                       <li{if $_sortField === $sortField} class="active"{/if}><a rel="nofollow" href="{link controller='ConversationList'}{if $filter}filter={@$filter}&{/if}{if !$participants|empty}participants={implode from=$participants item=participant}{$participant|rawurlencode}{/implode}&{/if}pageNo={@$pageNo}&sortField={$_sortField}&sortOrder={if $sortField === $_sortField}{if $sortOrder === 'DESC'}ASC{else}DESC{/if}{else}{$sortOrder}{/if}{if $labelID}&labelID={@$labelID}{/if}{/link}">{if $_sortField == 'subject'}{lang}wcf.global.subject{/lang}{else}{lang}wcf.conversation.{$_sortField}{/lang}{/if}</a></li>
+                                                                               {/foreach}
+                                                                       </ul>
+                                                               </div>
+                                                       </li>
+                                               </ul>
+                                       </li>
                                </ol>
                        </li>