'core' => [
'site',
'mediawiki.page.startup',
- 'mediawiki.user',
],
// modules that enhance the content in some way
'content' => [
'mediawiki.page.ready',
],
// modules relating to search functionality
- 'search' => [],
+ 'search' => [
+ 'mediawiki.searchSuggest',
+ ],
// modules relating to functionality relating to watching an article
'watch' => [],
// modules which relate to the current users preferences
$modules['watch'][] = 'mediawiki.page.watch.ajax';
}
- $modules['search'][] = 'mediawiki.searchSuggest';
-
if ( $user->getBoolOption( 'editsectiononrightclick' ) ) {
$modules['user'][] = 'mediawiki.action.view.rightClickEdit';
}
*/
function getPageClasses( $title ) {
$numeric = 'ns-' . $title->getNamespace();
+ $user = $this->getUser();
if ( $title->isSpecialPage() ) {
$type = 'ns-special';
} else {
$type .= ' mw-invalidspecialpage';
}
- } elseif ( $title->isTalkPage() ) {
- $type = 'ns-talk';
} else {
- $type = 'ns-subject';
+ if ( $title->isTalkPage() ) {
+ $type = 'ns-talk';
+ } else {
+ $type = 'ns-subject';
+ }
+ // T208315: add HTML class when the user can edit the page
+ if ( $title->quickUserCan( 'edit', $user ) ) {
+ $type .= ' mw-editable';
+ }
}
$name = Sanitizer::escapeClass( 'page-' . $title->getPrefixedText() );
// TTL in seconds
600,
function () use ( $notice ) {
- return $this->getOutput()->parse( $notice );
+ return $this->getOutput()->parseAsInterface( $notice );
}
);