Changeset 129
- Timestamp:
- 12/17/10 03:26:32 (13 years ago)
- Location:
- server/trunk/web
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Search.pm
r128 r129 29 29 $c->req->params->{search} = $c->session->{search}; 30 30 $c->req->params->{type} = $c->session->{type}; 31 $c->req->params->{deptype} = $c->session->{deptype}; 31 32 } else { 32 33 $c->session->{search} = $c->req->params->{search}; 33 34 $c->session->{type} = $c->req->params->{type}; 35 $c->session->{deptype} = $c->req->params->{deptype}; 34 36 } 35 37 … … 42 44 $c->forward('byname', [ $searchspec, $c->req->param('search') || 43 45 undef ]); 46 last; 47 }; 48 /^bydep$/ and do { 49 $c->forward('bydep', [ $searchspec, $c->req->param('deptype'), grep { $_ } split (/\s+/, 50 $c->req->param('search') || '') ]); 44 51 last; 45 52 }; … … 64 71 65 72 } 73 } 74 75 sub adv_search :Local { 76 my ( $self, $c ) = @_; 66 77 } 67 78 … … 288 299 ] } 289 300 : ()), 290 $distrs301 ($distrs 291 302 ? { pkgid => { IN => $distrs->get_column('pkgid')->as_query, }, } 292 : () ,303 : ()), 293 304 ] 294 305 }, … … 354 365 )->get_column('pkgid')->as_query, }, } 355 366 : ()), 367 ($searchspec->{pkgid} 368 ? { pkgid => $searchspec->{pkgid} } 369 : ()), 356 370 ] 357 371 }, … … 381 395 ($distrs 382 396 ? (pkgid => { IN => $distrs->get_column('pkgid')->as_query, },) 397 : ()), 398 ($searchspec->{pkgid} 399 ? { pkgid => $searchspec->{pkgid} } 383 400 : ()), 384 401 ], -
server/trunk/web/root/templates/html/search/index.tt
- Property svn:keywords set to Id
r96 r129 1 1 <!-- $Id$ --> 2 <form action="[% c.uri_for('/search') %]" method="POST"> 3 <input type="text" name="search" value="[% c.req.param('search') | html %]"> 4 <select name="type"> 5 <option value="byname">rpm named</option> 6 </select> 7 <input type="submit"> 2 <form action="[% c.uri_for('/search') %]" method="POST" id="sophie_adv_search"> 3 [% INCLUDE 'search/adv_search.tt' %] 8 4 </form> 5 [%# c.prototype.observe_form('sophie_adv_search', 6 { 7 url => c.uri_for('/search/adv_search', { ajax => 1 }), 8 update => 'sophie_adv_search', 9 frequency => 5, 10 }) %] 9 11 10 12 [% INCLUDE 'search/results.tt' %]
Note: See TracChangeset
for help on using the changeset viewer.