Prtksxna has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/162148

Change subject: [WIP] SpecialContributions: Use mediawiki.ui controls and 
change layout
......................................................................

[WIP] SpecialContributions: Use mediawiki.ui controls and change layout

Change-Id: Ic96a4405a353ea6f8d8009210dc6e9e00179c7f9
---
M includes/specials/SpecialContributions.php
M resources/src/mediawiki.special/mediawiki.special.css
2 files changed, 40 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/162148/1

diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index 32a887c..ce8d2b4 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -39,6 +39,16 @@
                $out = $this->getOutput();
                $out->addModuleStyles( 'mediawiki.special' );
 
+               // Generic styles and scripts for both login and signup form
+               $out->addModuleStyles( array(
+                       'mediawiki.ui',
+                       'mediawiki.ui.button',
+                       'mediawiki.ui.checkbox',
+                       'mediawiki.ui.input',
+               ) );
+
+
+
                $this->opts = array();
                $request = $this->getRequest();
 
@@ -448,7 +458,7 @@
                        array(
                                'method' => 'get',
                                'action' => wfScript(),
-                               'class' => 'mw-contributions-form'
+                               'class' => 'mw-contributions-form mw-ui-vform'
                        )
                );
 
@@ -477,17 +487,17 @@
 
                if ( $tagFilter ) {
                        $filterSelection = Html::rawElement(
-                               'td',
+                               'div',
                                array( 'class' => 'mw-label' ),
                                array_shift( $tagFilter )
                        );
                        $filterSelection .= Html::rawElement(
-                               'td',
+                               'div',
                                array( 'class' => 'mw-input' ),
                                implode( '&#160', $tagFilter )
                        );
                } else {
-                       $filterSelection = Html::rawElement( 'td', array( 
'colspan' => 2 ), '' );
+                       $filterSelection = Html::rawElement( 'div', array( 
'colspan' => 2 ), '' );
                }
 
                $labelNewbies = Xml::radioLabel(
@@ -521,7 +531,7 @@
                );
 
                $namespaceSelection = Xml::tags(
-                       'td',
+                       'div',
                        array( 'class' => 'mw-label' ),
                        Xml::label(
                                $this->msg( 'namespace' )->text(),
@@ -530,7 +540,7 @@
                        )
                );
                $namespaceSelection .= Html::rawElement(
-                       'td',
+                       'div',
                        null,
                        Html::namespaceSelector(
                                array( 'selected' => $this->opts['namespace'], 
'all' => '' ),
@@ -541,7 +551,7 @@
                                )
                        ) . ' ' .
                                Html::rawElement(
-                                       'span',
+                                       'div',
                                        array( 'style' => 'white-space: nowrap' 
),
                                        Xml::checkLabel(
                                                $this->msg( 'invert' )->text(),
@@ -554,7 +564,7 @@
                                                )
                                        ) . ' '
                                ) .
-                               Html::rawElement( 'span', array( 'style' => 
'white-space: nowrap' ),
+                               Html::rawElement( 'div', array( 'style' => 
'white-space: nowrap' ),
                                        Xml::checkLabel(
                                                $this->msg( 
'namespace_association' )->text(),
                                                'associated',
@@ -570,7 +580,7 @@
 
                if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
                        $deletedOnlyCheck = Html::rawElement(
-                               'span',
+                               'div',
                                array( 'style' => 'white-space: nowrap' ),
                                Xml::checkLabel(
                                        $this->msg( 'history-show-deleted' 
)->text(),
@@ -585,7 +595,7 @@
                }
 
                $checkLabelTopOnly = Html::rawElement(
-                       'span',
+                       'div',
                        array( 'style' => 'white-space: nowrap' ),
                        Xml::checkLabel(
                                $this->msg( 'sp-contributions-toponly' 
)->text(),
@@ -596,7 +606,7 @@
                        )
                );
                $checkLabelNewOnly = Html::rawElement(
-                       'span',
+                       'div',
                        array( 'style' => 'white-space: nowrap' ),
                        Xml::checkLabel(
                                $this->msg( 'sp-contributions-newonly' 
)->text(),
@@ -607,7 +617,7 @@
                        )
                );
                $extraOptions = Html::rawElement(
-                       'td',
+                       'div',
                        array( 'colspan' => 2 ),
                        $deletedOnlyCheck . $checkLabelTopOnly . 
$checkLabelNewOnly
                );
@@ -616,20 +626,19 @@
                        Xml::dateMenu(
                                $this->opts['year'] === '' ? 
MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],
                                $this->opts['month']
-                       ) . ' ' .
+                       ) . '<br>' .
                                Xml::submitButton(
                                        $this->msg( 'sp-contributions-submit' 
)->text(),
-                                       array( 'class' => 'mw-submit' )
+                                       array( 'class' => 'mw-submit 
mw-ui-button mw-ui-big mw-ui-block mw-ui-constructive' )
                                )
                );
 
-               $form .= Xml::fieldset( $this->msg( 'sp-contributions-search' 
)->text() );
-               $form .= Html::rawElement( 'table', array( 'class' => 
'mw-contributions-table' ), "\n" .
-                       Html::rawElement( 'tr', array(), $targetSelection ) . 
"\n" .
-                       Html::rawElement( 'tr', array(), $namespaceSelection ) 
. "\n" .
-                       Html::rawElement( 'tr', array(), $filterSelection ) . 
"\n" .
-                       Html::rawElement( 'tr', array(), $extraOptions ) . "\n" 
.
-                       Html::rawElement( 'tr', array(), 
$dateSelectionAndSubmit ) . "\n"
+       $form .= Html::rawElement( 'div', array( 'class' => 
'mw-contributions-table' ), "\n" .
+                       Html::rawElement( 'div', array(), $targetSelection ) . 
"\n" .
+                       Html::rawElement( 'div', array(), $namespaceSelection ) 
. "\n" .
+                       Html::rawElement( 'div', array(), $filterSelection ) . 
"\n" .
+                       Html::rawElement( 'div', array(), $extraOptions ) . 
"\n" .
+                       Html::rawElement( 'div', array(), 
$dateSelectionAndSubmit ) . "\n"
                );
 
                $explain = $this->msg( 'sp-contributions-explain' );
@@ -637,7 +646,7 @@
                        $form .= "<p 
id='mw-sp-contributions-explain'>{$explain->parse()}</p>";
                }
 
-               $form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 
'form' );
+               $form .= Xml::closeElement( 'form' );
 
                return $form;
        }
@@ -935,7 +944,7 @@
         * @return string
         */
        function getStartBody() {
-               return "<ul>\n";
+               return "<ul class=\"mw-contributions-list\">\n";
        }
 
        /**
diff --git a/resources/src/mediawiki.special/mediawiki.special.css 
b/resources/src/mediawiki.special/mediawiki.special.css
index 0356fc7..0f18c60 100644
--- a/resources/src/mediawiki.special/mediawiki.special.css
+++ b/resources/src/mediawiki.special/mediawiki.special.css
@@ -118,3 +118,11 @@
 table.mw-userrights-groups * th {
        padding-right: 1.5em;
 }
+
+/* Special:Contributions */
+ul.mw-contributions-list {
+       margin-left: 350px;
+}
+.mw-contributions-form {
+       float: left;
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/162148
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic96a4405a353ea6f8d8009210dc6e9e00179c7f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to