{include file='headInclude'}
<link rel="canonical" href="{link controller='User' object=$user}{/link}" />
--
- <script data-relocate="true" src="{@$__wcf->getPath('wcf')}js/WCF.User{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
++
+ <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Moderation{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
+ <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.User{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
{event name='javascriptInclude'}
<script data-relocate="true">
//<![CDATA[
});
{/if}
-
+ {if $isAccessible && $__wcf->user->userID != $user->userID}
+ WCF.Language.addObject({
+ 'wcf.user.ban': '{lang}wcf.user.ban{/lang}',
+ 'wcf.user.ban.confirmMessage': '{lang}wcf.user.ban.confirmMessage{/lang}',
+ 'wcf.user.ban.reason.description': '{lang}wcf.user.ban.reason.description{/lang}',
+ 'wcf.user.unban': '{lang}wcf.user.unban{/lang}',
+ 'wcf.user.disableAvatar': '{lang}wcf.user.disableAvatar{/lang}',
+ 'wcf.user.disableAvatar.confirmMessage': '{lang}wcf.user.disableAvatar.confirmMessage{/lang}',
+ 'wcf.user.disableSignature': '{lang}wcf.user.disableSignature{/lang}',
+ 'wcf.user.disableSignature.confirmMessage': '{lang}wcf.user.disableSignature.confirmMessage{/lang}',
+ 'wcf.user.edit': '{lang}wcf.user.edit{/lang}',
+ 'wcf.user.enableAvatar': '{lang}wcf.user.enableAvatar{/lang}',
+ 'wcf.user.enableSignature': '{lang}wcf.user.enableSignature{/lang}'
+ });
+
+ var $userInlineEditor = new WCF.User.InlineEditor('.userHeadline');
+ $userInlineEditor.setPermissions({
+ canBanUser: {if $__wcf->session->getPermission('admin.user.canBanUser')}true{else}false{/if},
+ canDisableAvatar: {if $__wcf->session->getPermission('admin.user.canDisableAvatar')}true{else}false{/if},
+ canDisableSignature: {if $__wcf->session->getPermission('admin.user.canDisableSignature')}true{else}false{/if},
+ canEditUser: {if $__wcf->session->getPermission('admin.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')}true{else}false{/if}
+ });
+ {/if}
+
+ WCF.Language.addObject({
+ 'wcf.moderation.report.reportContent': '{lang}wcf.user.profile.report{/lang}',
+ 'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}'
+ });
+ new WCF.Moderation.Report.Content('com.woltlab.wcf.user', '.jsReportUser');
++
{event name='javascriptInit'}
});
//]]>
</ul>
</li>
{/hascontent}
- {if $user->userID != $__wcf->user->userID}{if $user->isAccessible('canViewEmailAddress')}<li><a class="button jsTooltip" href="mailto:{@$user->getEncodedEmail()}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 icon-envelope-alt"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>{elseif $user->isAccessible('canMail') && $__wcf->session->getPermission('user.profile.canMail')}<li><a class="button jsTooltip" href="{link controller='Mail' object=$user}{/link}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 icon-envelope-alt"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>{/if}{/if}
+
+ <li class="jsReportUser jsOnly" data-object-id="{@$user->userID}"><a title="{lang}wcf.user.profile.report{/lang}" class="button jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.user.profile.report{/lang}</span></a></li>
++
+ {if $user->userID != $__wcf->user->userID && $user->isAccessible('canViewEmailAddress')}
+ <li><a class="button jsTooltip" href="mailto:{@$user->getEncodedEmail()}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 icon-envelope-alt"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>{elseif $user->isAccessible('canMail') && $__wcf->session->getPermission('user.profile.canMail')}<li><a class="button jsTooltip" href="{link controller='Mail' object=$user}{/link}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 icon-envelope-alt"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>
+ {/if}
+
{event name='buttons'}
+
+ {if $isAccessible && $__wcf->user->userID != $user->userID && ($__wcf->session->getPermission('admin.user.canBanUser') || $__wcf->session->getPermission('admin.user.canDisableAvatar') || $__wcf->session->getPermission('admin.user.canDisableSignature') || ($__wcf->session->getPermission('admin.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')))}
+ <li class="dropdown">
+ {* todo: better icon? *}
+ <a href="{link controller='UserEdit' object=$user isACP=true}{/link}" class="button jsTooltip jsUserInlineEditor" title="{lang}wcf.user.moderate{/lang}"><span class="icon icon16 icon-lock"></span> <span class="invisible">{lang}{lang}wcf.acp.user.edit{/lang}{/lang}</span></a>
+ <ul class="dropdownMenu"></ul>
+ </li>
+ {/if}
</ul>
</nav>
</header>