* Add a nice fieldset for consistency
authorRaimond Spekking <raymond@users.mediawiki.org>
Wed, 30 Jul 2008 11:29:18 +0000 (11:29 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Wed, 30 Jul 2008 11:29:18 +0000 (11:29 +0000)
* Switch result line and input form
* Do not show result line "Below is a list of 0 files...". We have the message 'noimages' instead.

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

index e57f6fc..b7a5280 100644 (file)
@@ -147,24 +147,26 @@ 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, '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) {
-               $text = wfMsgExt( 'imagelisttext', array('parse'), $lt, $bydate );
+       if ( $shownav && count( $images ) ) {
+               $text = wfMsgExt( 'imagelisttext', array( 'parse' ), $lt, $bydate );
                $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 6b07118..90e6b60 100644 (file)
@@ -2220,8 +2220,10 @@ $1',
 
 # Special:Newimages
 'newimages'             => 'Neue Dateien',
-'imagelisttext'         => "Hier ist eine Liste von '''$1''' {{PLURAL:$1|Datei|Dateien}}, sortiert $2.",
+'imagelisttext'         => "Hier ist eine Liste mit '''$1''' {{PLURAL:$1|Datei|Dateien}}, sortiert $2.",
 'newimages-summary'     => 'Diese Spezialseite zeigt die zuletzt hochgeladenen Dateien an.',
+'newimages-legend'      => 'Dateiname',
+'newimages-label'       => 'Dateiname (oder ein Teil davon):',
 'showhidebots'          => '(Bots $1)',
 'noimages'              => 'Keine Dateien gefunden.',
 'ilsubmit'              => 'Suchen',
index 7650306..97b818e 100644 (file)
@@ -2823,6 +2823,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'      => 'Filename',
+'newimages-label'       => 'Filename (or a part of it):',
 'showhidebots'          => '($1 bots)',
 'noimages'              => 'Nothing to see.',
 'ilsubmit'              => 'Search',
index 82f69a4..18649c2 100644 (file)
@@ -1991,6 +1991,8 @@ $wgMessageStructure = array(
                'newimages',
                'imagelisttext',
                'newimages-summary',
+               'newimages-legend',
+               'newimages-label',
                'showhidebots',
                'noimages',
                'ilsubmit',