Tobias Gritschacher has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/59125


Change subject: Handle blocked-user and protected-page different in UI
......................................................................

Handle blocked-user and protected-page different in UI

- The tooltip message for a protected-page should differ from
  the message for a blocked-user
- Message and events were already there, just the IF statement was wrong

Change-Id: I82e173a772dabe203179c80a50f2e42d5925ad81
---
M repo/resources/wikibase.ui.entityViewInit.js
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/25/59125/1

diff --git a/repo/resources/wikibase.ui.entityViewInit.js 
b/repo/resources/wikibase.ui.entityViewInit.js
index 4494c33..b8a1f9c 100644
--- a/repo/resources/wikibase.ui.entityViewInit.js
+++ b/repo/resources/wikibase.ui.entityViewInit.js
@@ -156,10 +156,14 @@
                        }
                }
 
-               if ( mw.config.get( 'wbUserIsBlocked' ) || !mw.config.get( 
'wbUserCanEdit' ) ) {
+               if ( mw.config.get( 'wbUserIsBlocked' ) ) {
                        $( wb ).triggerHandler( 'blockEntityPageActions' );
                }
 
+               if ( !mw.config.get( 'wbUserCanEdit' ) ) {
+                       $( wb ).triggerHandler( 'restrictEntityPageActions' );
+               }
+
                if( !mw.config.get( 'wbIsEditView' ) ) {
                        // no need to implement a 'disableEntityPageActions' 
since hiding all the toolbars directly like this is
                        // not really worse than hacking the Toolbar prototype 
to achieve this:

-- 
To view, visit https://gerrit.wikimedia.org/r/59125
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82e173a772dabe203179c80a50f2e42d5925ad81
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to