mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-23 22:03:39 +00:00
Update anon talk messages to show on non-main namespaces
- Loads messageBox styles on non-main namespaces - Add messageBox styles to 'skins.minerva.scripts' module for MobileFrontend's edit overlay page - Prevent warning box from showing with empty message Bug: T284642 Change-Id: I70d0d86671384210cc3ab43cb1d350ff2a862fd9
This commit is contained in:
parent
ce6802b4b6
commit
a2d065c062
|
@ -366,18 +366,20 @@ class MinervaHooks {
|
|||
* - special pages
|
||||
* - edit workflow (action=edit and action=submit)
|
||||
* - when viewing old revisions
|
||||
* - non-main namespaces for anon talk page messages
|
||||
*
|
||||
* @param OutputPage $out
|
||||
*/
|
||||
private static function addMessageBoxStylesToPage( OutputPage $out ) {
|
||||
$request = $out->getRequest();
|
||||
$title = $out->getTitle();
|
||||
// Warning box styles are needed when reviewing old revisions
|
||||
// and inside the fallback editor styles to action=edit page.
|
||||
$requestAction = $request->getVal( 'action' );
|
||||
$viewAction = $requestAction === null || $requestAction === 'view';
|
||||
|
||||
if (
|
||||
$out->getTitle()->isSpecialPage() ||
|
||||
$title->getNamespace() !== NS_MAIN ||
|
||||
$request->getText( 'oldid' ) ||
|
||||
!$viewAction
|
||||
) {
|
||||
|
|
|
@ -50,10 +50,12 @@
|
|||
<div class="banner-container">
|
||||
{{>banners}}
|
||||
</div>
|
||||
{{#html-user-message}}
|
||||
<div class="minerva-anon-talk-message warningbox">
|
||||
<span class="mw-ui-icon mw-ui-icon-wikimedia-userTalk-warning"> </span>
|
||||
{{{html-user-message}}}
|
||||
</div>
|
||||
{{/html-user-message}}
|
||||
<div class="pre-content heading-holder">
|
||||
<div class="page-heading">
|
||||
{{{headinghtml}}}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
.minerva-anon-talk-message.warningbox {
|
||||
display: none;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 0;
|
||||
|
||||
|
@ -13,6 +12,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.ns-special .minerva-anon-talk-message {
|
||||
display: block;
|
||||
// Hide on all non-main namespaces
|
||||
.ns-0 .minerva-anon-talk-message {
|
||||
display: none;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue