Changeset 478

Show
Ignore:
Timestamp:
2007-12-18 12:58:34 (1 year ago)
Author:
tdb01r
Message:
  • UI to unlock a repository
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/celestial-2/lib/Celestial/Handler/repository.pm

    r447 r478  
    9595sub _status { 
    9696        my( $self, $body, $CGI, $repo ) = @_; 
     97 
     98        if( $CGI->action eq 'unlock' and $CGI->authorised ) 
     99        { 
     100                $repo->unlock; 
     101        } 
    97102 
    98103        my $ds = $repo->getLock; 
     
    110115        } else { 
    111116                $tr->appendChild( dataElement( 'td', $CGI->cross, {class=>'state failed'})); 
     117 
     118                if( $CGI->authorised ) 
     119                { 
     120                        $body->appendChild( my $p = dataElement( 'p' )); 
     121                        my $url = $CGI->as_link('repository', repository=>$repo->id, action=>'unlock'); 
     122                        $p->appendChild( dataElement( 'a', $CGI->msg( 'repository.status.unlock' ), { href => $url } )); 
     123                } 
    112124        } 
    113125}