Make 'required' bold in the TD documentation block

Bug: T104674
Change-Id: Ie3bb75a3e1df9096f911615ecf362fe16625d8ed
This commit is contained in:
Alex Monk 2016-02-21 01:59:03 +00:00
parent 02e39e42d1
commit 3d4e71956c
2 changed files with 11 additions and 1 deletions

View file

@ -785,10 +785,12 @@ class TemplateDataBlob {
}
}
$statusClass = '';
if ( $paramObj->deprecated ) {
$status = 'templatedata-doc-param-status-deprecated';
} elseif ( $paramObj->required ) {
$status = 'templatedata-doc-param-status-required';
$statusClass = 'mw-templatedata-doc-param-status-required';
} elseif ( $paramObj->suggested ) {
$status = 'templatedata-doc-param-status-suggested';
} else {
@ -869,7 +871,11 @@ class TemplateDataBlob {
Html::element( 'code', array(), $paramObj->type )
)
// Status
. Html::element( 'td', array(), wfMessage( $status )->inLanguage( $lang )->text() )
. Html::element(
'td',
[ 'class' => $statusClass ],
wfMessage( $status )->inLanguage( $lang )->text()
)
. '</tr>';
}
$html .= '</tbody></table>'

View file

@ -14,6 +14,10 @@
color: #777;
}
.mw-templatedata-doc-param-status-required {
font-weight: bold;
}
.mw-templateData-doc-params .oo-ui-widget {
font-size: 0.9143em;
}