Changeset 61 for trunk/lib


Ignore:
Timestamp:
03/17/09 19:11:33 (15 years ago)
Author:
nanardon
Message:
  • improve admin page
Location:
trunk/lib/Vote
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Vote/Controller/Admin.pm

    r58 r61  
    7070                and $vote->db->commit; 
    7171        } elsif ($c->req->param('label')) { 
     72            if ($c->req->param('dstart')) { 
     73                $c->req->param('start', 
     74                    $c->req->param('dstart') . ' ' . ($c->req->param('hstart') || '') 
     75                ); 
     76            } 
     77            if ($c->req->param('dend')) { 
     78                $c->req->param('end', 
     79                    $c->req->param('dend') . ' ' . ($c->req->param('hend') || '') 
     80                ); 
     81            } 
    7282            $vote->vote_param( 
    7383                $id, 
  • trunk/lib/Vote/Model/Vote.pm

    r58 r61  
    165165    my $sth = $self->db->prepare_cached( 
    166166        q{ 
    167         select * from poll where id = ? 
     167        select *, 
     168        to_char("start", 'DD/MM/YYYY') as dstart, 
     169        to_char("start", 'HH24:MI:SS') as hstart, 
     170        to_char("end", 'DD/MM/YYYY') as dend, 
     171        to_char("end", 'HH24:MI:SS') as hend 
     172        from poll where id = ? 
    168173        } 
    169174    ); 
Note: See TracChangeset for help on using the changeset viewer.