Index: trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php |
— | — | @@ -5,7 +5,6 @@ |
6 | 6 | parent::__construct( $repo ); |
7 | 7 | $this->mAuthor = $author; |
8 | 8 | $this->mUser = $this->mRepo->authorWikiUser( $author ); |
9 | | - $this->mAppliedFilter = wfMsg( 'code-revfilter-cr_author', $author ); |
10 | 9 | } |
11 | 10 | |
12 | 11 | function getPager() { |
Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php |
— | — | @@ -25,7 +25,21 @@ |
26 | 26 | |
27 | 27 | $this->mAuthor = $wgRequest->getText( 'author' ); |
28 | 28 | $this->mStatus = $wgRequest->getText( 'status' ); |
29 | | - $this->mAppliedFilter = null; |
| 29 | + |
| 30 | + $filters = array(); |
| 31 | + if ( $this->mAuthor ) { |
| 32 | + $filters[] = wfMsg( 'code-revfilter-cr_author', $this->mAuthor ); |
| 33 | + } |
| 34 | + if ( $this->mStatus ) { |
| 35 | + $filters[] = wfMsg( 'code-revfilter-cr_status', $this->mStatus ); |
| 36 | + } |
| 37 | + |
| 38 | + if ( count( $filters) ) { |
| 39 | + global $wgLang; |
| 40 | + $this->mAppliedFilter = $wgLang->listToText( $filters ); |
| 41 | + } else { |
| 42 | + $this->mAppliedFilter = null; |
| 43 | + } |
30 | 44 | } |
31 | 45 | |
32 | 46 | /** |
— | — | @@ -70,7 +84,7 @@ |
71 | 85 | $revCount = $this->getRevCount( $dbr ); |
72 | 86 | |
73 | 87 | $pager = $this->getPager(); |
74 | | - $pathForm = $this->showForm( $pager->getHiddenFields( array( 'path' ) ) ); |
| 88 | + $pathForm = $this->showForm( $pager ); |
75 | 89 | |
76 | 90 | // Build batch change interface as needed |
77 | 91 | $this->batchForm = $wgUser->isAllowed( 'codereview-set-status' ) || |
— | — | @@ -182,32 +196,34 @@ |
183 | 197 | } |
184 | 198 | |
185 | 199 | /** |
186 | | - * @param $hidden string |
| 200 | + * @param $pager SvnTablePager |
187 | 201 | * |
188 | 202 | * @return string |
189 | 203 | */ |
190 | | - function showForm( $hidden = '' ) { |
| 204 | + function showForm( $pager ) { |
191 | 205 | global $wgScript; |
192 | 206 | |
193 | | - $ret = Xml::openElement( 'form', array( 'action' => $wgScript, 'method' => 'get' ) ) . |
194 | | - "<fieldset><legend>" . wfMsgHtml( 'code-pathsearch-legend' ) . "</legend>" . |
| 207 | + $ret = "<fieldset><legend>" . wfMsgHtml( 'code-pathsearch-legend' ) . "</legend>" . |
195 | 208 | '<table width="100%"><tr><td>' . |
| 209 | + Xml::openElement( 'form', array( 'action' => $wgScript, 'method' => 'get' ) ) . |
196 | 210 | Xml::inputlabel( wfMsg( "code-pathsearch-path" ), 'path', 'path', 55, $this->getPathsAsString() ) . |
197 | 211 | ' ' . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . |
| 212 | + $pager->getHiddenFields( array( 'path' ) ) . |
| 213 | + Xml::closeElement( 'form' ) . |
198 | 214 | '</td>'; |
199 | 215 | |
200 | 216 | if ( strlen( $this->mAppliedFilter ) ) { |
201 | 217 | $ret .= '<td>' . |
| 218 | + Xml::openElement( 'form', array( 'action' => $pager->getTitle()->getLocalURL(), 'method' => 'get' ) ) . |
202 | 219 | Xml::label( wfMsg( 'code-pathsearch-filter' ), 'revFilter' ) . ' <strong>' . |
203 | 220 | Xml::span( $this->mAppliedFilter, '' ) . '</strong> ' . |
204 | 221 | Xml::submitButton( wfMsg( 'code-revfilter-clear' ) ) . |
| 222 | + Xml::closeElement( 'form' ) . |
205 | 223 | '</td>'; |
206 | 224 | } |
207 | 225 | |
208 | | - $ret .= $hidden; |
| 226 | + $ret .= "</tr></table></fieldset>" ; |
209 | 227 | |
210 | | - $ret .= "</tr></table></fieldset></form>" ; |
211 | | - |
212 | 228 | return $ret; |
213 | 229 | } |
214 | 230 | |
Index: trunk/extensions/CodeReview/ui/CodeRevisionStatusView.php |
— | — | @@ -4,7 +4,6 @@ |
5 | 5 | function __construct( $repo, $status ) { |
6 | 6 | parent::__construct( $repo ); |
7 | 7 | $this->mStatus = $status; |
8 | | - $this->mAppliedFilter = wfMsg( 'code-revfilter-cr_status', $status ); |
9 | 8 | } |
10 | 9 | |
11 | 10 | function getPager() { |