r62710 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62709‎ | r62710 | r62711 >
Date:17:27, 19 February 2010
Author:pdhanda
Status:ok
Tags:
Comment:
Made filtering by status and author a little more user friendly
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionListView.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionStatusView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.i18n.php
@@ -88,6 +88,10 @@
8989 'code-status-deferred' => 'deferred',
9090 'code-pathsearch-legend' => 'Search revisions in this repo by path',
9191 'code-pathsearch-path' => 'Path:',
 92+ 'code-pathsearch-filter' => 'Filter applied: ',
 93+ 'code-revfilter-cr_status' => 'Status = $1',
 94+ 'code-revfilter-cr_author' => 'Author = $1',
 95+ 'code-revfilter-clear' => 'Clear Filter',
9296 'code-rev-submit' => 'Save changes',
9397 'code-rev-submit-accesskey' => 's',
9498 'code-rev-submit-next' => 'Save & next unresolved',
Index: trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php
@@ -5,6 +5,7 @@
66 parent::__construct( $repoName );
77 $this->mAuthor = $author;
88 $this->mUser = $this->authorWikiUser( $author );
 9+ $this->mAppliedFilter = wfMsg( 'code-revfilter-cr_author', $author );
910 }
1011
1112 function getPager() {
Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php
@@ -12,6 +12,7 @@
1313 $this->mPath = "/{$this->mPath}"; // make sure this is a valid path
1414 }
1515 $this->mAuthor = null;
 16+ $this->mAppliedFilter = null;
1617 }
1718
1819 function execute() {
@@ -149,11 +150,24 @@
150151 $wgOut->addHTML(
151152 Xml::openElement( 'form', array( 'action' => $wgScript, 'method' => 'get' ) ) .
152153 "<fieldset><legend>" . wfMsgHtml( 'code-pathsearch-legend' ) . "</legend>" .
153 - Xml::hidden( 'title', $special->getPrefixedDBKey() ) .
 154+ '<table width="100%"><tr><td>' .
154155 Xml::inputlabel( wfMsg( "code-pathsearch-path" ), 'path', 'path', 55, $this->mPath ) .
155 - '&nbsp;' . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" .
156 - "</fieldset>" . Xml::closeElement( 'form' )
 156+ '&nbsp;' . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) .
 157+ '</td>'
157158 );
 159+ if ( strlen( $this->mAppliedFilter) ) {
 160+ $wgOut->addHTML(
 161+ '<td>' .
 162+ Xml::label(wfMsg( 'code-pathsearch-filter' ), 'revFilter' ) . '<strong>' .
 163+ Xml::span( $this->mAppliedFilter, '') . '</strong>&nbsp;' .
 164+ Xml::submitButton( wfMsg( 'code-revfilter-clear' ) ) .
 165+ '</td>' .
 166+ Xml::hidden( 'title', SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ) )
 167+ );
 168+ } else {
 169+ $wgOut->addHTML( Xml::hidden( 'title', $special->getPrefixedDBKey() ) );
 170+ }
 171+ $wgOut->addHTML( "</tr></table></fieldset>" . Xml::closeElement( 'form' ) );
158172 }
159173
160174 function getPager() {
Index: trunk/extensions/CodeReview/ui/CodeRevisionStatusView.php
@@ -4,6 +4,7 @@
55 function __construct( $repoName, $status ) {
66 parent::__construct( $repoName );
77 $this->mStatus = $status;
 8+ $this->mAppliedFilter = wfMsg( 'code-revfilter-cr_status', $status );
89 }
910
1011 function getPager() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r62733Follow-up r62710: consistency tweaksraymond09:22, 20 February 2010

Status & tagging log