Implemented content interaction buttons
authorMarcel Werk <burntime@woltlab.com>
Mon, 21 Jun 2021 17:07:35 +0000 (19:07 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 21 Jun 2021 17:07:35 +0000 (19:07 +0200)
templates/conversation.tpl
templates/conversationList.tpl

index 32dd551af159cc4e0c82bc7749d5ee317143e017..829e042500adf7a6c20e31b99ac156ac099b18e4 100644 (file)
                        </ul>
                </div>
                
-               <nav class="contentHeaderNavigation">
-                       <ul class="conversation jsConversationInlineEditorContainer" data-conversation-id="{@$conversation->conversationID}" data-label-ids="[ {implode from=$conversation->getAssignedLabels() item=label}{@$label->labelID}{/implode} ]" data-is-closed="{@$conversation->isClosed}" data-can-close-conversation="{if $conversation->userID == $__wcf->getUser()->userID}1{else}0{/if}" data-can-add-participants="{if $conversation->canAddParticipants()}1{else}0{/if}" data-is-draft="{if $conversation->isDraft}1{else}0{/if}">
-                               <li class="jsOnly"><a href="{if $conversation->isDraft}{link controller='ConversationDraftEdit' id=$conversation->conversationID}{/link}{else}#{/if}" class="button jsConversationInlineEditor"><span class="icon icon16 fa-pencil"></span> <span>{lang}wcf.global.button.edit{/lang}</span></a></li>
-                               {if $conversation->canReply()}<li class="jsOnly"><a href="#" class="button buttonPrimary jsQuickReply"><span class="icon icon16 fa-reply"></span> <span>{lang}wcf.conversation.message.button.add{/lang}</span></a></li>{/if}
-                               {event name='contentHeaderNavigation'}
-                       </ul>
-               </nav>
+               {hascontent}
+                       <nav class="contentHeaderNavigation">
+                               <ul>
+                                       {content}
+                                               {if $conversation->canReply()}<li class="jsOnly"><a href="#" class="button buttonPrimary jsQuickReply"><span class="icon icon16 fa-reply"></span> <span>{lang}wcf.conversation.message.button.add{/lang}</span></a></li>{/if}
+                                               {event name='contentHeaderNavigation'}
+                                       {/content}
+                               </ul>
+                       </nav>
+               {/hascontent}
        </header>
 {/capture}
 
+{capture assign='contentInteractionPagination'}
+       {pages print=true assign=pagesLinks controller='Conversation' object=$conversation link="pageNo=%d"}
+{/capture}
+
+{capture assign='contentInteractionButtons'}
+       <div class="conversation jsConversationInlineEditorContainer contentInteractionButton" data-conversation-id="{@$conversation->conversationID}" data-label-ids="[ {implode from=$conversation->getAssignedLabels() item=label}{@$label->labelID}{/implode} ]" data-is-closed="{@$conversation->isClosed}" data-can-close-conversation="{if $conversation->userID == $__wcf->getUser()->userID}1{else}0{/if}" data-can-add-participants="{if $conversation->canAddParticipants()}1{else}0{/if}" data-is-draft="{if $conversation->isDraft}1{else}0{/if}">
+               <a href="{if $conversation->isDraft}{link controller='ConversationDraftEdit' id=$conversation->conversationID}{/link}{else}#{/if}" class="button small jsConversationInlineEditor">{lang}wcf.global.button.edit{/lang}</a>
+       </div>
+{/capture}
+
 {include file='header'}
 
 {if !$conversation->isDraft}
        </section>
 {/if}
 
-{hascontent}
-       <div class="paginationTop">
-               {content}{pages print=true assign=pagesLinks controller='Conversation' object=$conversation link="pageNo=%d"}{/content}
-       </div>
-{/hascontent}
-
 <div class="section">
        <ul class="messageList">
                {if $pageNo == 1 && !$conversation->joinedAt|empty}<li><p class="info" role="status">{lang}wcf.conversation.visibility.previousMessages{/lang}</p></li>{/if}
index 875b1a09918b771c9675302e4ea76598a7b95b2c..4790bcbfe77db7a86af2d5333836e58d4f1d6806 100644 (file)
@@ -10,7 +10,7 @@
                        <nav class="contentHeaderNavigation">
                                <ul>
                                        {content}
-                                               {if $__wcf->session->getPermission('user.conversation.canStartConversation')}<li><a href="{link controller='ConversationAdd'}{/link}" title="{lang}wcf.conversation.add{/lang}" class="button"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.conversation.button.add{/lang}</span></a></li>{/if}
+                                               {if $__wcf->session->getPermission('user.conversation.canStartConversation')}<li><a href="{link controller='ConversationAdd'}{/link}" title="{lang}wcf.conversation.add{/lang}" class="button buttonPrimary"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.conversation.button.add{/lang}</span></a></li>{/if}
                                                {event name='contentHeaderNavigation'}
                                        {/content}
                                </ul>
        {event name='boxes'}
 {/capture}
 
-{capture assign='headerNavigation'}
-       <li><a rel="alternate" href="{link controller='ConversationFeed'}at={@$__wcf->getUser()->userID}-{@$__wcf->getUser()->accessToken}{/link}" title="{lang}wcf.global.button.rss{/lang}" class="rssFeed jsTooltip"><span class="icon icon16 fa-rss"></span> <span class="invisible">{lang}wcf.global.button.rss{/lang}</span></a></li>
-       <li class="jsOnly"><a href="#" title="{lang}wcf.conversation.markAllAsRead{/lang}" class="markAllAsReadButton jsTooltip"><span class="icon icon16 fa-check"></span> <span class="invisible">{lang}wcf.conversation.markAllAsRead{/lang}</span></a></li>
+{capture assign='contentInteractionPagination'}
+       {assign var='participantsParameter' value=''}
+       {if $participants}{capture assign='participantsParameter'}&participants={implode from=$participants item=participant}{$participant|rawurlencode}{/implode}{/capture}{/if}
+       {assign var='labelIDParameter' value=''}
+       {if $labelID}{assign var='labelIDParameter' value="&labelID=$labelID"}{/if}
+       {pages print=true assign=pagesLinks controller='ConversationList' link="filter=$filter$participantsParameter&pageNo=%d&sortField=$sortField&sortOrder=$sortOrder$labelIDParameter"}
 {/capture}
 
-{include file='header'}
+{capture assign='contentInteractionDropdownItems'}
+       <li><a rel="alternate" href="{link controller='ConversationFeed'}at={@$__wcf->getUser()->userID}-{@$__wcf->getUser()->accessToken}{/link}" class="rssFeed">{lang}wcf.global.button.rss{/lang}</a></li>
+       <li class="jsOnly"><a href="#" class="markAllAsReadButton">{lang}wcf.conversation.markAllAsRead{/lang}</a></li>
+{/capture}
 
-{hascontent}
-       <div class="paginationTop">
-               {content}
-                       {assign var='participantsParameter' value=''}
-                       {if $participants}{capture assign='participantsParameter'}&participants={implode from=$participants item=participant}{$participant|rawurlencode}{/implode}{/capture}{/if}
-                       {assign var='labelIDParameter' value=''}
-                       {if $labelID}{assign var='labelIDParameter' value="&labelID=$labelID"}{/if}
-                       {pages print=true assign=pagesLinks controller='ConversationList' link="filter=$filter$participantsParameter&pageNo=%d&sortField=$sortField&sortOrder=$sortOrder$labelIDParameter"}
-               {/content}
-       </div>
-{/hascontent}
+{include file='header'}
 
 {if !$items}
        <p class="info" role="status">{lang}wcf.conversation.noConversations{/lang}</p>