60 $this->
getOutput()->setPreventClickjacking(
false );
62 'jquery.tablesorter.styles',
63 'mediawiki.pager.styles'
65 $this->
getOutput()->addModules(
'jquery.tablesorter' );
67 Html::openElement(
'table', [
'class' =>
'mw-datatable sortable',
68 'id' =>
'mw-trackingcategories-table' ] ) .
"\n" .
71 $this->
msg(
'trackingcategories-msg' )->escaped() .
"
74 $this->
msg(
'trackingcategories-name' )->escaped() .
77 $this->
msg(
'trackingcategories-desc' )->escaped() .
"
82 $categoryList = $this->trackingCategories->getTrackingCategories();
84 $batch = $this->linkBatchFactory->newLinkBatch();
85 foreach ( $categoryList as $data ) {
86 $batch->addObj( $data[
'msg'] );
87 foreach ( $data[
'cats'] as $catTitle ) {
88 $batch->addObj( $catTitle );
93 $this->
getHookRunner()->onSpecialTrackingCategories__preprocess( $this, $categoryList );
97 foreach ( $categoryList as $catMsg => $data ) {
99 $catDesc = $catMsg .
'-desc';
101 $catMsgTitleText = $linkRenderer->makeLink(
106 foreach ( $data[
'cats'] as $catTitle ) {
107 $html = $linkRenderer->makeLink(
112 $this->
getHookRunner()->onSpecialTrackingCategories__generateCatLink(
113 $this, $catTitle, $html );
118 # Extra message, when no category was found
119 if ( $allMsgs === [] ) {
120 $allMsgs[] = $this->
msg(
'trackingcategories-disabled' )->parse();
127 $descMsg = $this->
msg( $catDesc );
128 if ( $descMsg->isBlank() ) {
129 $descMsg = $this->
msg(
'trackingcategories-nodesc' );
133 Html::openElement(
'tr' ) .
134 Html::openElement(
'td', [
'class' =>
'mw-trackingcategories-name' ] ) .
135 $this->
getLanguage()->commaList( array_unique( $allMsgs ) ) .
136 Html::closeElement(
'td' ) .
137 Html::openElement(
'td', [
'class' =>
'mw-trackingcategories-msg' ] ) .
139 Html::closeElement(
'td' ) .
140 Html::openElement(
'td', [
'class' =>
'mw-trackingcategories-desc' ] ) .
142 Html::closeElement(
'td' ) .
143 Html::closeElement(
'tr' )
146 $this->
getOutput()->addHTML( Html::closeElement(
'table' ) );