From 402d95ff6b27800ecbd38e7be1eea18006060752 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 28 Apr 2015 16:57:19 +0100 Subject: [PATCH] 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 --- TemplateDataBlob.php | 92 ++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index a443463e..bd30a2b1 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -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() ) . '';