HtmlView: Move "default", "example", and "autovalue" under description

The table is getting too wide. The sortability isn't that useful
for these columns either.

Change-Id: I080b427f524d0146c9ef5d2e067e83463511fd06
This commit is contained in:
Timo Tijhof 2015-04-28 16:57:19 +01:00
parent 65b101e60c
commit 402d95ff6b

View file

@ -694,21 +694,6 @@ class TemplateDataBlob {
array(),
wfMessage( 'templatedata-doc-param-type' )->inLanguage( $lang )->text()
)
. Html::element(
'th',
array(),
wfMessage( 'templatedata-doc-param-default' )->inLanguage( $lang )->text()
)
. Html::element(
'th',
array(),
wfMessage( 'templatedata-doc-param-example' )->inLanguage( $lang )->text()
)
. Html::element(
'th',
array(),
wfMessage( 'templatedata-doc-param-autovalue' )->inLanguage( $lang )->text()
)
. Html::element(
'th',
array(),
@ -765,15 +750,58 @@ class TemplateDataBlob {
Html::element( 'code', array(), $paramName ) . $aliases
)
// Description
. Html::element( 'td', array(
. Html::rawElement( 'td', array(
'class' => array(
'mw-templatedata-doc-muted' => ( $paramObj->description === null )
)
),
$paramObj->description !== null ?
Html::rawElement( 'p', array(),
$paramObj->description !== null ?
$paramObj->description :
wfMessage( 'templatedata-doc-param-desc-empty' )->inLanguage( $lang )->text()
)
. Html::rawElement( 'dl', array(),
Html::element( 'dt', array(),
wfMessage( 'templatedata-doc-param-default' )->inLanguage( $lang )->text()
)
// Default
. Html::element( 'dd', array(
'class' => array(
'mw-templatedata-doc-muted' => $paramObj->default === null
)
),
$paramObj->default !== null ?
$paramObj->default :
wfMessage( 'templatedata-doc-param-default-empty' )->inLanguage( $lang )->text()
)
// Example
. Html::element( 'dt', array(),
wfMessage( 'templatedata-doc-param-example' )->inLanguage( $lang )->text()
)
. Html::element( 'dd', array(
'class' => array(
'mw-templatedata-doc-muted' => $paramObj->example === null
)
),
$paramObj->example !== null ?
$paramObj->example :
wfMessage( 'templatedata-doc-param-example-empty' )->inLanguage( $lang )->text()
)
// Auto value
. Html::element( 'dt', array(),
wfMessage( 'templatedata-doc-param-autovalue' )->inLanguage( $lang )->text()
)
. Html::rawElement( 'dd', array(
'class' => array(
'mw-templatedata-doc-muted' => $paramObj->autovalue === null
)
),
$paramObj->autovalue !== null ?
Html::element( 'code', array(), $paramObj->autovalue ) :
wfMessage( 'templatedata-doc-param-autovalue-empty' )->inLanguage( $lang )->escaped()
)
)
)
// Type
. Html::rawElement( 'td', array(
'class' => array(
@ -783,36 +811,6 @@ class TemplateDataBlob {
),
Html::element( 'code', array(), $paramObj->type )
)
// Default
. Html::element( 'td', array(
'class' => array(
'mw-templatedata-doc-muted' => $paramObj->default === null
)
),
$paramObj->default !== null ?
$paramObj->default :
wfMessage( 'templatedata-doc-param-default-empty' )->inLanguage( $lang )->text()
)
// Example
. Html::element( 'td', array(
'class' => array(
'mw-templatedata-doc-muted' => $paramObj->example === null
)
),
$paramObj->example !== null ?
$paramObj->example :
wfMessage( 'templatedata-doc-param-example-empty' )->inLanguage( $lang )->text()
)
// Auto value
. Html::rawElement( 'td', array(
'class' => array(
'mw-templatedata-doc-muted' => $paramObj->autovalue === null
)
),
$paramObj->autovalue !== null ?
Html::element( 'code', array(), $paramObj->autovalue ) :
wfMessage( 'templatedata-doc-param-autovalue-empty' )->inLanguage( $lang )->escaped()
)
// Status
. Html::element( 'td', array(), wfMessage( $status )->inLanguage( $lang )->text() )
. '</tr>';