Changeset 273
- Timestamp:
- 01/02/11 18:20:04 (13 years ago)
- Location:
- server/trunk/web
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Distrib.pm
r272 r273 321 321 } 322 322 323 @{$c->stash->{rpm}} = map { 324 { 325 pkgid => $_->pkgid, 326 filename => $_->filename, 327 } 328 } 329 $c->forward('distrib_rs', [ $distribution ]) 330 ->search_related('MediasPaths') 331 ->search_related('Paths') 332 ->search_related('Rpmfiles', {}, { order_by => qw(filename) }) 333 ->all; 323 $c->stash->{rpm} = [ map { 324 { 325 pkgid => $_->pkgid, 326 filename => $_->filename, 327 } 328 } $c->forward('/search/rpms/rpms_rs', [ $distribution ]) 329 ->search( 330 { 331 $c->req->param('fl') 332 ? ( filename => { ILIKE => $c->req->param('fl') . '%' } ) 333 : (), 334 }, { order_by => [ qw(filename) ] }) 335 ->all ]; 334 336 335 337 $c->stash->{xmlrpc} = $c->stash->{rpm}; … … 371 373 } 372 374 375 $distribution->{src} = 0; 376 373 377 $c->stash->{rpm} = [ map { 374 { 375 pkgid => $_->pkgid, 376 filename => $_->filename, 377 } 378 } 379 $c->forward('distrib_rs', [ $distribution ]) 380 ->search_related('MediasPaths') 381 ->search_related('Paths') 382 ->search_related('Rpmfiles', { 383 pkgid => { 384 IN => $c->model('Base')->resultset('Rpms') 385 ->search({ issrc => 'false' })->get_column('pkgid') ->as_query } 386 }, 387 { order_by => [ qw(filename) ] } 388 )->all ]; 378 { 379 pkgid => $_->pkgid, 380 filename => $_->filename, 381 } 382 } $c->forward('/search/rpms/rpms_rs', [ $distribution ]) 383 ->search( 384 { 385 $c->req->param('fl') 386 ? ( filename => { ILIKE => $c->req->param('fl') . '%' } ) 387 : (), 388 }, { order_by => [ qw(filename) ] }) 389 ->all ]; 389 390 390 391 $c->stash->{xmlrpc} = $c->stash->{rpm}; … … 426 427 } 427 428 428 @{$c->stash->{rpm}} = map { 429 { 430 pkgid => $_->pkgid, 431 filename => $_->filename, 432 } 433 } 434 $c->forward('distrib_rs', [ $distribution ]) 435 ->search_related('MediasPaths') 436 ->search_related('Paths') 437 ->search_related('Rpmfiles', { 438 pkgid => { 439 IN => $c->model('Base')->resultset('Rpms') 440 ->search({ issrc => 'true' })->get_column('pkgid') ->as_query } 441 }, 442 { order_by => [ qw(filename) ] } 443 )->all; 429 $distribution->{src} = 1; 430 431 $c->stash->{rpm} = [ map { 432 { 433 pkgid => $_->pkgid, 434 filename => $_->filename, 435 } 436 } $c->forward('/search/rpms/rpms_rs', [ $distribution ]) 437 ->search( 438 { 439 $c->req->param('fl') 440 ? ( filename => { ILIKE => $c->req->param('fl') . '%' } ) 441 : (), 442 }, { order_by => [ qw(filename) ] }) 443 ->all ]; 444 444 445 445 $c->stash->{xmlrpc} = $c->stash->{rpm}; -
server/trunk/web/lib/Sophie/Controller/Search/Rpms.pm
r157 r273 55 55 select => [qw(filename pkgid name shortname version arch label) ], 56 56 as => [qw(filename pkgid distribution dist release arch media) ], 57 rows => $searchspec->{rows} || 10000,57 rows => $searchspec->{rows} || 30000, 58 58 order_by => [ 'Rpmfiles.added desc' ], 59 59 }, … … 173 173 174 174 $c->stash->{rs} = 175 $c->forward('rpms_rs' )->search(175 $c->forward('rpms_rs', [ $searchspec ])->search( 176 176 { 177 177 filename => { LIKE => $file }, -
server/trunk/web/root/templates/html/distrib/list_rpms.html
r184 r273 1 1 <!-- $Id$ --> 2 2 3 <div Id="sophie_body_main"> 4 <form action="[% c.uri_for('/', c.req.path) %]" method="POST"> 5 <label for="fl">Filter to filename starting by:</label> 6 <input type="text" id="fl" name="fl" value="[% c.req.param('fl') | html %]"> 7 </form> 8 [% c.prototype.observe_field( 9 'fl', 10 { 11 url => c.uri_for('/', c.req.path, { ajax => 1 }), 12 frequency => 2, 13 update => 'rpms_list', 14 with => '"ajax=1&fl=" + value', 15 } 16 ) %] 17 18 <div id="rpms_list"> 3 19 [% INCLUDE 'distrib/list_rpms.tt' %] 20 </div> 21 </div> -
server/trunk/web/root/templates/html/distrib/list_srpms.html
r190 r273 1 1 <!-- $Id$ --> 2 2 3 <div Id="sophie_body_main"> 4 <form action="[% c.uri_for('/', c.req.path) %]" method="POST"> 5 <label for="fl">Filter to filename starting by:</label> 6 <input type="text" id="fl" name="fl" value="[% c.req.param('fl') | html %]"> 7 </form> 8 [% c.prototype.observe_field( 9 'fl', 10 { 11 url => c.uri_for('/', c.req.path, { ajax => 1 }), 12 frequency => 2, 13 update => 'rpms_list', 14 with => '"ajax=1&fl=" + value', 15 } 16 ) %] 17 18 <div id="rpms_list"> 3 19 [% INCLUDE 'distrib/list_srpms.tt' %] 20 </div> 21 </div> -
server/trunk/web/root/templates/html/distrib/media_list_rpms.html
r230 r273 1 1 <!-- $Id$ --> 2 2 3 <div Id="sophie_body_main"> 4 <form action="[% c.uri_for('/', c.req.path) %]" method="POST"> 5 <label for="fl">Filter to filename starting by:</label> 6 <input type="text" id="fl" name="fl" value="[% c.req.param('fl') | html %]"> 7 </form> 8 [% c.prototype.observe_field( 9 'fl', 10 { 11 url => c.uri_for('/', c.req.path, { ajax => 1 }), 12 frequency => 2, 13 update => 'rpms_list', 14 with => '"ajax=1&fl=" + value', 15 } 16 ) %] 17 18 <div id="rpms_list"> 3 19 [% INCLUDE 'distrib/media_list_rpms.tt' %] 20 </div> 4 21 </div> 5 22
Note: See TracChangeset
for help on using the changeset viewer.