Changeset 201 for server


Ignore:
Timestamp:
12/27/10 16:32:15 (13 years ago)
Author:
nanardon
Message:
  • add distrib selection to search form
Location:
server/trunk/web
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • server/trunk/web/lib/Sophie/Controller/Search.pm

    r148 r201  
    3030        $c->req->params->{type} = $c->session->{type}; 
    3131        $c->req->params->{deptype} = $c->session->{deptype}; 
     32        foreach (qw(distribution release arch)) { 
     33            $c->req->params->{$_} = $c->session->{search_dist}{$_}; 
     34        } 
    3235    } else { 
    3336        $c->session->{search} = $c->req->params->{search}; 
    3437        $c->session->{type} = $c->req->params->{type}; 
    3538        $c->session->{deptype} = $c->req->params->{deptype}; 
    36     } 
    37  
    38     my $searchspec = { 
    39     }; 
     39        foreach (qw(distribution release arch)) { 
     40            $c->session->{search_dist}{$_} = $c->req->params->{$_}; 
     41        } 
     42    } 
     43 
     44    my $searchspec = { %{ $c->session->{search_dist} } }; 
    4045 
    4146    for ($c->req->param('type')) { 
  • server/trunk/web/root/templates/html/search/adv_search.tt

    r177 r201  
    55    <td> 
    66<input type="text" name="search" value="[% c.req.param('search') | html %]"> 
     7    </td> 
     8</tr> 
     9<tr> 
     10    <td></td> 
     11    <td> 
     12    <span id="distribselect"> 
     13    [% INCLUDE 'ajax/forms/distribselect.tt' %] 
     14    </span> 
     15    [% c.prototype.observe_form('sophie_adv_search', 
     16            { 
     17            url => c.uri_for('/ajax/forms/distribselect', { 
     18                'ajax' => 1 }), 
     19            frequency => 2, 
     20            update => 'distribselect', 
     21            } 
     22            ) %] 
    723    </td> 
    824</tr> 
Note: See TracChangeset for help on using the changeset viewer.