Reapply part of r38229 under consideration of Brions revert comment (r38249):
authorRaimond Spekking <raymond@users.mediawiki.org>
Wed, 6 Aug 2008 15:59:20 +0000 (15:59 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Wed, 6 Aug 2008 15:59:20 +0000 (15:59 +0000)
* Add a nice fieldset for consistency with a better legend
* Switch result line and input form in kind that the hotspot for "Show new images since..." link does not change when following new uploads

includes/specials/SpecialNewimages.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 4892af6..953efad 100644 (file)
@@ -136,6 +136,19 @@ function wfSpecialNewimages( $par, $specialPage ) {
                $lastTimestamp = $timestamp;
        }
 
+       $titleObj = SpecialPage::getTitleFor( 'Newimages' );
+       $action = $titleObj->getLocalURL( $hidebots ? '' : 'hidebots=0' );
+       if ( $shownav && !$wgMiserMode ) {
+               $wgOut->addHTML(
+                       Xml::openElement( 'form', array( 'action' => $action, 'method' => 'post', 'id' => 'imagesearch' ) ) .
+                       Xml::fieldset( wfMsg( 'newimages-legend' ) ) .
+                       Xml::inputLabel( wfMsg( 'newimages-label' ), 'wpIlMatch', 'wpIlMatch', 20, $wpIlMatch ) . ' ' .
+                       Xml::submitButton( wfMsg( 'ilsubmit' ), array( 'name' => 'wpIlSubmit' ) ) .
+                       Xml::closeElement( 'fieldset' ) .
+                       Xml::closeElement( 'form' )
+                );
+       }
+
        $bydate = wfMsg( 'bydate' );
        $lt = $wgLang->formatNum( min( $shownImages, $limit ) );
        if ( $shownav ) {
@@ -143,17 +156,6 @@ function wfSpecialNewimages( $par, $specialPage ) {
                $wgOut->addHTML( $text . "\n" );
        }
 
-       $sub = wfMsg( 'ilsubmit' );
-       $titleObj = SpecialPage::getTitleFor( 'Newimages' );
-       $action = $titleObj->escapeLocalURL( $hidebots ? '' : 'hidebots=0' );
-       if ($shownav && !$wgMiserMode) {
-               $wgOut->addHTML( "<form id=\"imagesearch\" method=\"post\" action=\"" .
-                 "{$action}\">" .
-                       Xml::input( 'wpIlMatch', 20, $wpIlMatch ) . ' ' .
-                 Xml::submitButton( $sub, array( 'name' => 'wpIlSubmit' ) ) .
-                 "</form>" );
-       }
-
        /**
         * Paging controls...
         */
index a04bd7a..cc75ea3 100644 (file)
@@ -2819,6 +2819,8 @@ $1',
 'newimages'             => 'Gallery of new files',
 'imagelisttext'         => "Below is a list of '''$1''' {{PLURAL:$1|file|files}} sorted $2.",
 'newimages-summary'     => 'This special page shows the last uploaded files.',
+'newimages-legend'      => 'Filter',
+'newimages-label'       => 'Filename (or a part of it):',
 'showhidebots'          => '($1 bots)',
 'noimages'              => 'Nothing to see.',
 'ilsubmit'              => 'Search',
index e07a274..1b971e8 100644 (file)
@@ -1986,6 +1986,8 @@ $wgMessageStructure = array(
                'newimages',
                'imagelisttext',
                'newimages-summary',
+               'newimages-legend',
+               'newimages-label',
                'showhidebots',
                'noimages',
                'ilsubmit',