mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-12 09:24:17 +00:00
Merge "Display format icon and message inside parameters table caption"
This commit is contained in:
commit
f9390b1a97
|
@ -136,6 +136,7 @@ class TemplateDataHooks {
|
|||
* @return string: HTML to insert in the page.
|
||||
*/
|
||||
public static function render( $input, $args, $parser, $frame ) {
|
||||
$parser->enableOOUI();
|
||||
$ti = TemplateDataBlob::newFromJSON( $input );
|
||||
|
||||
$status = $ti->getStatus();
|
||||
|
|
|
@ -693,17 +693,26 @@ class TemplateDataBlob {
|
|||
$data->description :
|
||||
wfMessage( 'templatedata-doc-desc-empty' )->inLanguage( $lang )->text()
|
||||
)
|
||||
. Html::element(
|
||||
'p',
|
||||
array(),
|
||||
// Messages: templatedata-modal-format-inline, templatedata-modal-format-block
|
||||
wfMessage( 'templatedata-doc-format-' . $data->format )->inLanguage( $lang )->text()
|
||||
)
|
||||
. '<table class="wikitable mw-templatedata-doc-params sortable">'
|
||||
. Html::element(
|
||||
. Html::rawElement(
|
||||
'caption',
|
||||
array(),
|
||||
wfMessage( 'templatedata-doc-params' )->inLanguage( $lang )->text()
|
||||
Html::element(
|
||||
'p',
|
||||
array(),
|
||||
wfMessage( 'templatedata-doc-params' )->inLanguage( $lang )->text()
|
||||
)
|
||||
. Html::rawElement(
|
||||
'p',
|
||||
array(),
|
||||
new OOUI\IconWidget( array( 'icon' => 'template-format-' . $data->format ) )
|
||||
. Html::element(
|
||||
'span',
|
||||
array( 'class' => 'mw-templatedata-format' ),
|
||||
// Messages: templatedata-modal-format-inline, templatedata-modal-format-block
|
||||
wfMessage( 'templatedata-doc-format-' . $data->format )->inLanguage( $lang )->text()
|
||||
)
|
||||
)
|
||||
)
|
||||
. '<thead><tr>'
|
||||
. Html::element(
|
||||
|
|
|
@ -79,13 +79,3 @@
|
|||
/* @embed */
|
||||
background-image: url(images/parameter-set-ltr.svg);
|
||||
}
|
||||
|
||||
.oo-ui-icon-template-format-block {
|
||||
/* @embed */
|
||||
background-image: url(images/block-ltr.svg);
|
||||
}
|
||||
|
||||
.oo-ui-icon-template-format-inline {
|
||||
/* @embed */
|
||||
background-image: url(images/inline.svg);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,26 @@
|
|||
color: #777;
|
||||
}
|
||||
|
||||
.mw-templatedata-doc-params .oo-ui-widget {
|
||||
font-size: 0.9143em;
|
||||
}
|
||||
|
||||
.mw-templatedata-format {
|
||||
font-weight: normal;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
.mw-templatedata-doc-param-name,
|
||||
.mw-templatedata-doc-param-type {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.oo-ui-icon-template-format-block {
|
||||
/* @embed */
|
||||
background-image: url(../modules/images/block-ltr.svg);
|
||||
}
|
||||
|
||||
.oo-ui-icon-template-format-inline {
|
||||
/* @embed */
|
||||
background-image: url(../modules/images/inline.svg);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue