Fixed broken links in quick reply sidebar
[GitHub/WoltLab/com.woltlab.wcf.conversation.git] / templates / conversation.tpl
1 {capture assign='pageTitle'}{$conversation->subject} {if $pageNo > 1} - {lang}wcf.page.pageNo{/lang}{/if}{/capture}
2
3 {capture assign='contentHeader'}
4 <header class="contentHeader">
5 <div class="contentHeaderIcon">
6 {@$conversation->getUserProfile()->getAvatar()->getImageTag(64)}
7 </div>
8
9 <div class="contentHeaderTitle">
10 <h1 class="contentTitle">{$conversation->subject}</h1>
11
12 <ul class="inlineList contentHeaderMetaData">
13 {hascontent}
14 <li>
15 <span class="icon icon16 fa-tags"></span>
16 <ul class="labelList">
17 {content}
18 {foreach from=$conversation->getAssignedLabels() item=label}
19 <li><span class="label badge{if $label->cssClassName} {$label->cssClassName}{/if}">{lang}{$label->label}{/lang}</span></li>
20 {/foreach}
21 {/content}
22 </ul>
23 </li>
24 {/hascontent}
25
26 <li>
27 <span class="icon icon16 fa-user"></span>
28 {if $conversation->userID}
29 <a href="{link controller='User' object=$conversation->getUserProfile()->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$conversation->userID}">{$conversation->username}</a>
30 {else}
31 {$conversation->username}
32 {/if}
33 </li>
34
35 <li>
36 <span class="icon icon16 fa-clock-o"></span>
37 {@$conversation->time|time}
38 </li>
39
40 {if $conversation->isClosed}
41 <li>
42 <span class="icon icon16 fa-lock jsIconLock"></span>
43 {lang}wcf.global.state.closed{/lang}
44 </li>
45 {/if}
46 </ul>
47 </div>
48
49 <nav class="contentHeaderNavigation">
50 <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}">
51 <li class="jsOnly"><a href="#" class="button jsConversationInlineEditor"><span class="icon icon16 fa-pencil"></span> <span>{lang}wcf.global.button.edit{/lang}</span></a></li>
52 {if !$conversation->isClosed}<li class="jsOnly"><a href="#" title="{lang}wcf.conversation.message.add{/lang}" class="button buttonPrimary jsQuickReply"><span class="icon icon16 fa-plus"></span> <span>{lang}wcf.conversation.message.button.add{/lang}</span></a></li>{/if}
53 {event name='contentHeaderNavigation'}
54 </ul>
55 </nav>
56 </header>
57 {/capture}
58
59 {include file='header'}
60
61 {if !$conversation->isDraft}
62 <section class="section">
63 <h2 class="sectionTitle">{lang}wcf.conversation.participants{/lang}</h2>
64
65 <ul class="containerBoxList tripleColumned conversationParticipantList">
66 {foreach from=$participants item=participant}
67 <li class="jsParticipant{if !$participant->userID || $participant->hideConversation == 2} conversationLeft{/if}">
68 <div class="box24">
69 {if $participant->userID}<a href="{link controller='User' object=$participant}{/link}">{@$participant->getAvatar()->getImageTag(24)}</a>{else}<span>{@$participant->getAvatar()->getImageTag(24)}</span>{/if}
70 <div>
71 <p>
72 {if $participant->userID}<a href="{link controller='User' object=$participant}{/link}" class="userLink" data-user-id="{@$participant->userID}">{$participant->username}</a>{else}<span>{$participant->username}</span>{/if}
73 {if $participant->isInvisible}<small>({lang}wcf.conversation.invisible{/lang})</small>{/if}
74 {if $participant->userID && ($conversation->userID == $__wcf->getUser()->userID) && ($participant->userID != $__wcf->getUser()->userID) && $participant->hideConversation != 2}
75 <a href="#" class="jsDeleteButton jsTooltip jsOnly" title="{lang}wcf.conversation.participants.removeParticipant{/lang}" data-confirm-message-html="{lang __encode=true}wcf.conversation.participants.removeParticipant.confirmMessage{/lang}" data-object-id="{@$participant->userID}"><span class="icon icon16 fa-times"></span></a>
76 {/if}
77 </p>
78 <dl class="plain inlineDataList small">
79 <dt>{lang}wcf.conversation.lastVisitTime{/lang}</dt>
80 <dd>{if $participant->lastVisitTime}{@$participant->lastVisitTime|time}{else}-{/if}</dd>
81 </dl>
82 </div>
83 </div>
84 </li>
85 {/foreach}
86 </ul>
87 </section>
88 {/if}
89
90 {hascontent}
91 <div class="paginationTop">
92 {content}{pages print=true assign=pagesLinks controller='Conversation' object=$conversation link="pageNo=%d"}{/content}
93 </div>
94 {/hascontent}
95
96 <div class="section">
97 <ul class="messageList">
98 {include file='conversationMessageList'}
99 {if !$conversation->isClosed}{include file='conversationQuickReply'}{/if}
100 </ul>
101 </div>
102
103 <footer class="contentFooter">
104 {hascontent}
105 <div class="paginationBottom">
106 {content}{@$pagesLinks}{/content}
107 </div>
108 {/hascontent}
109
110 {hascontent}
111 <nav class="contentFooterNavigation">
112 <ul>
113 {content}
114 {event name='contentFooterNavigation'}
115 {/content}
116 </ul>
117 </nav>
118 {/hascontent}
119 </footer>
120
121 {if !ENABLE_DEBUG_MODE}<script src="{@$__wcf->getPath()}js/WoltLabSuite.Core.Conversation.min.js?v={@LAST_UPDATE_TIME}"></script>{/if}
122 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Conversation{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@LAST_UPDATE_TIME}"></script>
123 <script data-relocate="true">
124 //<![CDATA[
125 $(function() {
126 WCF.Language.addObject({
127 'wcf.conversation.edit.addParticipants': '{lang}wcf.conversation.edit.addParticipants{/lang}',
128 'wcf.conversation.edit.assignLabel': '{lang}wcf.conversation.edit.assignLabel{/lang}',
129 'wcf.conversation.edit.close': '{lang}wcf.conversation.edit.close{/lang}',
130 'wcf.conversation.edit.leave': '{lang}wcf.conversation.edit.leave{/lang}',
131 'wcf.conversation.edit.open': '{lang}wcf.conversation.edit.open{/lang}',
132 'wcf.conversation.leave.title': '{lang}wcf.conversation.leave.title{/lang}',
133 'wcf.global.state.closed': '{lang}wcf.global.state.closed{/lang}',
134 'wcf.message.bbcode.code.copy': '{lang}wcf.message.bbcode.code.copy{/lang}',
135 'wcf.message.error.editorAlreadyInUse': '{lang}wcf.message.error.editorAlreadyInUse{/lang}',
136 'wcf.moderation.report.reportContent': '{lang}wcf.moderation.report.reportContent{/lang}',
137 'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}',
138 'wcf.conversation.label.assignLabels': '{lang}wcf.conversation.label.assignLabels{/lang}'
139 });
140
141 var $availableLabels = [ {implode from=$labelList item=label}{ cssClassName: '{if $label->cssClassName}{@$label->cssClassName}{/if}', labelID: {@$label->labelID}, label: '{$label->label}' }{/implode} ];
142 var $editorHandler = new WCF.Conversation.EditorHandlerConversation($availableLabels);
143 var $inlineEditor = new WCF.Conversation.InlineEditor('.conversation');
144 $inlineEditor.setEditorHandler($editorHandler);
145
146 {assign var=__supportPaste value=true}
147 {if $conversation->isClosed}{assign var=__supportPaste value=false}{/if}
148 {include file='__messageQuoteManager' wysiwygSelector='text' supportPaste=$__supportPaste}
149
150 new WCF.Conversation.Message.InlineEditor({@$conversation->conversationID}, $quoteManager);
151 new WCF.Conversation.Message.QuoteHandler($quoteManager);
152 {* if !$conversation->isClosed}new WCF.Conversation.QuickReply($quoteManager);{/if *}
153
154 {if $__wcf->session->getPermission('user.profile.canReportContent')}
155 new WCF.Moderation.Report.Content('com.woltlab.wcf.conversation.message', '.jsReportConversationMessage');
156 {/if}
157 new WCF.Conversation.RemoveParticipant({@$conversation->conversationID});
158 new WCF.Message.BBCode.CodeViewer();
159 });
160 //]]>
161 </script>
162
163 {include file='footer'}