Changeset 77 for server


Ignore:
Timestamp:
12/05/10 17:43:24 (14 years ago)
Author:
nanardon
Message:
  • add distrib selection to explorer
Location:
server/trunk/web
Files:
6 added
6 edited

Legend:

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

    r65 r77  
    2424    Authentication 
    2525    Authorization::Roles 
     26    Prototype 
    2627/; 
    2728 
  • server/trunk/web/lib/Sophie/Controller/Chat/Cmd.pm

    r63 r77  
    3838        message => [ 
    3939            'availlable command:', 
    40             join(', ', @{ $self->_commands }), 
     40            join(', ', grep { $_ !~ /^end$/ } @{ $self->_commands }), 
    4141        ], 
    4242    } 
     
    4747    my ( $self, $c ) = @_; 
    4848    return $c->stash->{xmlrpc} = { 
    49         message => [ 'Sophie ' . $Sophie::VERSION . ' Chat: ' . q$Rev$ ], 
     49        message => [ 'Sophie: ' . $Sophie::VERSION . ', Chat ' . q$Rev$ ], 
    5050    }; 
    5151} 
    5252 
     53sub end : Private { 
     54    my ($self, $c ) = @_; 
     55    my $reqspec = $c->req->arguments->[0]; 
    5356 
     57    $c->forward('/end'); 
     58} 
    5459 
    5560=head1 AUTHOR 
  • server/trunk/web/lib/Sophie/Controller/Explorer.pm

    r43 r77  
    3131            arch => $c->req->param('arch') || undef, 
    3232        }; 
     33    } else { 
     34        foreach (qw(distribution release arch)) { 
     35            $c->req->params->{$_} = $c->session->{explorer}{$_} 
     36        } 
    3337    } 
     38 
    3439    $c->session->{__explorer} = $c->session->{explorer}; 
    3540 
  • server/trunk/web/lib/Sophie/Controller/Root.pm

    r65 r77  
    5454    if ($c->action =~ m/^admin\//) { 
    5555        if (!($c->user_exists && $c->check_user_roles($c->user, 'Admin'))) { 
    56             $c->res->redirect($c->uri_for('/login')); 
     56            #$c->go('/login/index'); 
    5757        } 
    5858    } 
  • server/trunk/web/root/templates/html/explorer/index.html

    r50 r77  
    11 
    2 <!-- <p> 
    3 <a href="[% c.uri_for('/explorer') %]">/</a> 
    4 [% FOREACH p = eachpath %] 
    5 <a href="[% c.uri_for('/explorer', p.path) %]">[% p.dir | html %]</a> 
    6 [% END %] 
    7 </p>--> 
     2<form action="[% c.uri_for('/', c.req.path) %]" id="explorer_d"> 
     3    <span id="distribselect"> 
     4    [% INCLUDE 'ajax/forms/distribselect.tt' %] 
     5    </span> 
     6    <input type="submit" value="Update view..."> 
     7</form> 
     8[% c.prototype.observe_form('explorer_d', 
     9    { 
     10    url => c.uri_for('/ajax/forms/distribselect', { 'ajax' => 1 }), 
     11    frequency => 1, 
     12    update => 'distribselect', 
     13    } 
     14) %] 
     15 
    816 
    917<div id="exp_dir" style="float: left; border: outset; width: 30%"> 
  • server/trunk/web/t/controller_Distrib.t

    r57 r77  
    4747    request("/distrib/$distribution/$release/$arch/media/$media/by-pkgid/$pkgid/changelog") 
    4848    ->is_success, "request media/pkgid/changelog"); 
     49 
     50ok( 
     51    request("/distrib/$distribution/$release/$arch/rpms/$rpmname") 
     52    ->is_success, "request rpms/$rpmname"); 
     53ok( 
     54    request("/distrib/$distribution/$release/$arch/srpms/$rpmname") 
     55    ->is_success, "request srpms/$rpmname"); 
     56 
     57 
    4958done_testing(); 
Note: See TracChangeset for help on using the changeset viewer.