Merge branch 'master' of github.com:WoltLab/WCF
authorMarcel Werk <burntime@woltlab.com>
Wed, 26 Mar 2014 16:27:41 +0000 (17:27 +0100)
committerMarcel Werk <burntime@woltlab.com>
Wed, 26 Mar 2014 16:27:41 +0000 (17:27 +0100)
Conflicts:
com.woltlab.wcf/templates/user.tpl

1  2 
com.woltlab.wcf/templates/user.tpl
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 306d9ef8e3d046b0099eb77e90bd8028a2b1f95b,fc1323ec1e4b103c380cc456b5d749492cb3ba3a..d8a4d2ea6c201c65d9e9f1df3cbb031547bbcd25
@@@ -6,9 -6,8 +6,9 @@@
        {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>
Simple merge
Simple merge