From: Matthias Schmidt Date: Mon, 24 Mar 2014 18:20:47 +0000 (+0100) Subject: Adds user inline editor X-Git-Tag: 2.1.0_Alpha_1~982 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57f097e8ca8c127fcecbc3fa78f85e824deb7096;p=GitHub%2FWoltLab%2FWCF.git Adds user inline editor Also adds separate permissions for disabling avatar and signature. --- diff --git a/com.woltlab.wcf/templates/headInclude.tpl b/com.woltlab.wcf/templates/headInclude.tpl index 5474143cc7..0432e531a8 100644 --- a/com.woltlab.wcf/templates/headInclude.tpl +++ b/com.woltlab.wcf/templates/headInclude.tpl @@ -124,6 +124,7 @@ 'wcf.global.page.next': '{capture assign=pageNext}{lang}wcf.global.page.next{/lang}{/capture}{@$pageNext|encodeJS}', 'wcf.global.page.previous': '{capture assign=pagePrevious}{lang}wcf.global.page.previous{/lang}{/capture}{@$pagePrevious|encodeJS}', 'wcf.global.pageDirection': '{lang}wcf.global.pageDirection{/lang}', + 'wcf.global.reason': '{lang}wcf.global.reason{/lang}', 'wcf.global.sidebar.hideLeftSidebar': '{lang}wcf.global.sidebar.hideLeftSidebar{/lang}', 'wcf.global.sidebar.hideRightSidebar': '{lang}wcf.global.sidebar.hideRightSidebar{/lang}', 'wcf.global.sidebar.showLeftSidebar': '{lang}wcf.global.sidebar.showLeftSidebar{/lang}', diff --git a/com.woltlab.wcf/templates/user.tpl b/com.woltlab.wcf/templates/user.tpl index 2592ad8e94..a06771db0f 100644 --- a/com.woltlab.wcf/templates/user.tpl +++ b/com.woltlab.wcf/templates/user.tpl @@ -79,6 +79,30 @@ }); {/if} + {if $isAccessible} + 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} + {event name='javascriptInit'} }); //]]> @@ -103,7 +127,20 @@ {include file='header' sidebarOrientation='left'} -
+
session->getPermission('admin.user.canBanUser')} + data-banned="{@$user->banned}" + {/if} + {if $__wcf->session->getPermission('admin.user.canDisableAvatar')} + data-disable-avatar="{@$user->disableAvatar}" + {/if} + {if $__wcf->session->getPermission('admin.user.canDisableSignature')} + data-disable-signature="{@$user->disableSignature}" + {/if} + {/if} +>

{$user->username}{if MODULE_USER_RANK && $user->getUserTitle()} {$user->getUserTitle()}{/if}

@@ -135,8 +172,20 @@ {/hascontent} - {if $user->userID != $__wcf->user->userID}{if $user->isAccessible('canViewEmailAddress')}
  • {elseif $user->isAccessible('canMail') && $__wcf->session->getPermission('user.profile.canMail')}
  • {/if}{/if} + + {if $user->userID != $__wcf->user->userID && $user->isAccessible('canViewEmailAddress')} +
  • {elseif $user->isAccessible('canMail') && $__wcf->session->getPermission('user.profile.canMail')}
  • + {/if} + {event name='buttons'} + + {if $__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'))} + + {/if}
    diff --git a/com.woltlab.wcf/userGroupOption.xml b/com.woltlab.wcf/userGroupOption.xml index 6f3cd2c05e..e8867ec71d 100644 --- a/com.woltlab.wcf/userGroupOption.xml +++ b/com.woltlab.wcf/userGroupOption.xml @@ -224,12 +224,25 @@ 0 1 + + + +