Added lock icon for banned users
authorMarcel Werk <burntime@woltlab.com>
Mon, 22 Sep 2014 12:05:28 +0000 (14:05 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 22 Sep 2014 12:05:28 +0000 (14:05 +0200)
com.woltlab.wcf/templates/messageSidebar.tpl
com.woltlab.wcf/templates/user.tpl
com.woltlab.wcf/templates/userInformationHeadline.tpl
wcfsetup/install/files/js/WCF.User.js
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 7e493711d400947bae2e1987bbe340185e5db451..b9777ce01314e1482ffebb96023202b6c6c68490 100644 (file)
@@ -23,6 +23,7 @@
                                        <a href="{link controller='User' object=$userProfile->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$userProfile->userID}" rel="author">
                                                <span itemprop="name">{if MESSAGE_SIDEBAR_ENABLE_USER_ONLINE_MARKING}{@$userProfile->getFormattedUsername()}{else}{$username}{/if}</span>
                                        </a>
+                                       {if $userProfile->banned}<span class="icon icon16 fa-lock jsTooltip jsUserBanned" title="{lang user=$userProfile}wcf.user.banned{/lang}"></span>{/if}
                                </h2>
                                
                                {event name='header'}
index 55bc7962a726862538f61e2e8bf2d5127d4afe02..9147e128814142814c105e3700d0e82e2515a7d6 100644 (file)
 >
        <span class="framed invisible">{@$user->getAvatar()->getImageTag(48)}</span>
        
-       <h1>{$user->username}{if MODULE_USER_RANK && $user->getUserTitle()} <span class="badge userTitleBadge{if $user->getRank() && $user->getRank()->cssClassName} {@$user->getRank()->cssClassName}{/if}">{$user->getUserTitle()}</span>{/if}</h1>
+       <h1>{$user->username}{if $user->banned} <span class="icon icon16 fa-lock jsTooltip jsUserBanned" title="{lang}wcf.user.banned{/lang}"></span>{/if}{if MODULE_USER_RANK && $user->getUserTitle()} <span class="badge userTitleBadge{if $user->getRank() && $user->getRank()->cssClassName} {@$user->getRank()->cssClassName}{/if}">{$user->getUserTitle()}</span>{/if}</h1>
        
        <ul class="dataList">
                {if $user->isVisibleOption('gender') && $user->gender}<li>{lang}wcf.user.gender.{if $user->gender == 1}male{else}female{/if}{/lang}</li>{/if}
index 72536d701d8e6800dee806e392305fe4934c8b0d..3d7dd3b17535c2e4f35dc029daac80dd20877a3a 100644 (file)
@@ -1,5 +1,5 @@
 <div class="containerHeadline">
-       <h3><a href="{link controller='User' object=$user}{/link}">{$user->username}</a>{if MODULE_USER_RANK && $user->getUserTitle()} <span class="badge userTitleBadge{if $user->getRank() && $user->getRank()->cssClassName} {@$user->getRank()->cssClassName}{/if}">{$user->getUserTitle()}</span>{/if}</h3> 
+       <h3><a href="{link controller='User' object=$user}{/link}">{$user->username}</a>{if $user->banned} <span class="icon icon16 fa-lock jsTooltip jsUserBanned" title="{lang}wcf.user.banned{/lang}"></span>{/if}{if MODULE_USER_RANK && $user->getUserTitle()} <span class="badge userTitleBadge{if $user->getRank() && $user->getRank()->cssClassName} {@$user->getRank()->cssClassName}{/if}">{$user->getUserTitle()}</span>{/if}</h3> 
 </div>
 <ul class="dataList userFacts">
        {if $user->isAccessible('canViewProfile')}
index 21bbbe6af4b7c7935cba34a1b19f5fd1c105ec88..7dad12a7b2603c5003c8205b4319b53d99367b92 100644 (file)
@@ -2967,7 +2967,7 @@ WCF.User.InlineEditor = WCF.InlineEditor.extend({
                
                var $banExpires = '';
                if (!$('#' + $optionName + 'NeverExpires').is(':checked')) {
-                       var $banExpires = $('#' + $optionName + 'ExpiresDatePicker').val();
+                       $banExpires = $('#' + $optionName + 'ExpiresDatePicker').val();
                        if (!$banExpires) {
                                this._dialog.find('#' + $optionName + 'ExpiresSettings > dd > small').prepend($('<small class="innerError" />').text(WCF.Language.get('wcf.global.form.error.empty')));
                                return
@@ -3103,6 +3103,10 @@ WCF.User.InlineEditor = WCF.InlineEditor.extend({
                if (data.actionName == 'ban' || data.actionName == 'disableAvatar' || data.actionName == 'disableSignature') {
                        this._dialog.wcfDialog('close');
                }
+               
+               if (data.actionName == 'unban') {
+                       $('.userHeadline .jsUserBanned').remove();
+               }
        },
        
        /**
index 00d3218ec6e6973d7edc0fdb256eaf98ed94280d..20260f80440d8b1786b99d2fe9e751091e6900e6 100644 (file)
@@ -2802,6 +2802,7 @@ Wenn Sie Probleme mit der Aktivierung haben, wenden Sie sich bitte an den Admini
                <item name="wcf.user.edit"><![CDATA[Benutzer bearbeiten]]></item>
                <item name="wcf.user.birthdayToday"><![CDATA[Hat heute Geburtstag]]></item>
                <item name="wcf.user.login.blocked"><![CDATA[Aufgrund einer hohen Anzahl von fehlgeschlagenen Anmeldeversuchen durch Ihre IP-Adresse steht Ihnen die Anmeldung aus Sicherheitsgründen vorübergehend nicht zur Verfügung. Bitte versuchen Sie es später erneut!]]></item>
+               <item name="wcf.user.banned"><![CDATA[Der Benutzer „{$user->username}“ wurde{if $user->banExpires != 0} bis zum {@$user->banExpires|date}{/if} gesperrt.]]></item>
        </category>
        
        <category name="wcf.user.menu">
index 26f524ed2bf9e40bb02298bc400ad3284c51d207..88e1695ebb602cc1e3117dd96bbb3db9eedf7889 100644 (file)
@@ -2690,6 +2690,7 @@ If you cannot activate your email address or have any troubles following the ins
                <item name="wcf.user.edit"><![CDATA[Edit User]]></item>
                <item name="wcf.user.birthdayToday"><![CDATA[It is their birthday]]></item>
                <item name="wcf.user.login.blocked"><![CDATA[There have been too many failed login attempts originating from your ip address, your login attempts will be temporarily rejected for security reasons. Please try again later!]]></item>
+               <item name="wcf.user.banned"><![CDATA[TODO: Der Benutzer „{$user->username}“ wurde{if $user->banExpires != 0} bis zum {@$user->banExpires|date}{/if} gesperrt.]]></item>
        </category>
        
        <category name="wcf.user.menu">