Adjusted/unified html attributes for avatars
[GitHub/WoltLab/com.woltlab.wcf.conversation.git] / templates / conversation.tpl
index 30951db68d50ec1a2b868667721b060c6d01a6e0..2c6956dabec9f0122420e0ad090e54c85880d278 100644 (file)
                                
                                <li>
                                        <span class="icon icon16 fa-user"></span>
-                                       {if $conversation->userID}
-                                               <a href="{link controller='User' object=$conversation->getUserProfile()->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$conversation->userID}">{$conversation->username}</a>
-                                       {else}
-                                               {$conversation->username}
-                                       {/if}
+                                       {user object=$conversation->getUserProfile()}
                                </li>
                                
                                <li>
                        {foreach from=$participants item=participant}
                                <li class="jsParticipant{if !$participant->userID || $participant->hideConversation == 2 || $participant->leftAt > 0} conversationLeft{/if}">
                                        <div class="box24">
-                                               {if $participant->userID}<a href="{link controller='User' object=$participant}{/link}">{@$participant->getAvatar()->getImageTag(24)}</a>{else}<span>{@$participant->getAvatar()->getImageTag(24)}</span>{/if}
+                                               {user object=$participant type='avatar24' ariaHidden='true' tabindex='-1'}
                                                <div>
                                                        <p>
-                                                               {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}
+                                                               {user object=$participant}
                                                                {if $participant->isInvisible}<small>({lang}wcf.conversation.invisible{/lang})</small>{/if}
                                                                {if $participant->userID && ($conversation->userID == $__wcf->getUser()->userID) && ($participant->userID != $__wcf->getUser()->userID) && $participant->hideConversation != 2 && $participant->leftAt == 0}
                                                                        <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>
 <script data-relocate="true">
        $(function() {
                WCF.Language.addObject({
-                       'wcf.conversation.edit.addParticipants': '{lang}wcf.conversation.edit.addParticipants{/lang}',
-                       'wcf.conversation.edit.assignLabel': '{lang}wcf.conversation.edit.assignLabel{/lang}',
-                       'wcf.conversation.edit.close': '{lang}wcf.conversation.edit.close{/lang}',
-                       'wcf.conversation.edit.leave': '{lang}wcf.conversation.edit.leave{/lang}',
-                       'wcf.conversation.edit.open': '{lang}wcf.conversation.edit.open{/lang}',
-                       'wcf.conversation.edit.subject': '{lang}wcf.conversation.edit.subject{/lang}',
-                       'wcf.conversation.leave.title': '{lang}wcf.conversation.leave.title{/lang}',
-                       'wcf.global.state.closed': '{lang}wcf.global.state.closed{/lang}',
-                       'wcf.global.subject': '{lang}wcf.global.subject{/lang}',
-                       'wcf.message.bbcode.code.copy': '{lang}wcf.message.bbcode.code.copy{/lang}',
-                       'wcf.message.error.editorAlreadyInUse': '{lang}wcf.message.error.editorAlreadyInUse{/lang}',
-                       'wcf.moderation.report.reportContent': '{lang}wcf.moderation.report.reportContent{/lang}',
-                       'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}',
-                       'wcf.conversation.label.assignLabels': '{lang}wcf.conversation.label.assignLabels{/lang}'
+                       'wcf.conversation.edit.addParticipants': '{jslang}wcf.conversation.edit.addParticipants{/jslang}',
+                       'wcf.conversation.edit.assignLabel': '{jslang}wcf.conversation.edit.assignLabel{/jslang}',
+                       'wcf.conversation.edit.close': '{jslang}wcf.conversation.edit.close{/jslang}',
+                       'wcf.conversation.edit.leave': '{jslang}wcf.conversation.edit.leave{/jslang}',
+                       'wcf.conversation.edit.open': '{jslang}wcf.conversation.edit.open{/jslang}',
+                       'wcf.conversation.edit.subject': '{jslang}wcf.conversation.edit.subject{/jslang}',
+                       'wcf.conversation.leave.title': '{jslang}wcf.conversation.leave.title{/jslang}',
+                       'wcf.global.state.closed': '{jslang}wcf.global.state.closed{/jslang}',
+                       'wcf.global.subject': '{jslang}wcf.global.subject{/jslang}',
+                       'wcf.message.bbcode.code.copy': '{jslang}wcf.message.bbcode.code.copy{/jslang}',
+                       'wcf.message.error.editorAlreadyInUse': '{jslang}wcf.message.error.editorAlreadyInUse{/jslang}',
+                       'wcf.moderation.report.reportContent': '{jslang}wcf.moderation.report.reportContent{/jslang}',
+                       'wcf.moderation.report.success': '{jslang}wcf.moderation.report.success{/jslang}',
+                       'wcf.conversation.label.assignLabels': '{jslang}wcf.conversation.label.assignLabels{/jslang}'
                });
                
                var $availableLabels = [ {implode from=$labelList item=label}{ cssClassName: '{if $label->cssClassName}{@$label->cssClassName}{/if}', labelID: {@$label->labelID}, label: '{$label->label|encodeJS}' }{/implode} ];
                        new WCF.Moderation.Report.Content('com.woltlab.wcf.conversation.message', '.jsReportConversationMessage');
                {/if}
                new WCF.Conversation.RemoveParticipant({@$conversation->conversationID});
-               new WCF.Message.BBCode.CodeViewer();
        });
 </script>