Changeset 36


Ignore:
Timestamp:
03/15/09 19:02:05 (15 years ago)
Author:
nanardon
Message:
  • beautify web pages
Location:
trunk
Files:
2 added
9 edited

Legend:

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

    r34 r36  
    5050    # login succeed, but those this user has already voted 
    5151    if (my $date = $c->model('Vote')->voting_has_sign($id, $mail)) { 
    52         $c->stash->{uid} = $c->session->{uid}; 
     52        $c->stash->{mail} = $c->session->{mail}; 
    5353        $c->stash->{template} = 'ballot/signed.tt'; 
    5454        $c->stash->{signed_date} = $date; 
    55         $c->delete_session('invalid user/pass'); 
     55        $c->delete_session('already signed'); 
    5656        return; 
    5757    } 
  • trunk/lib/Vote/View/TT.pm

    r3 r36  
    1919TT View for Vote.  
    2020 
     21=cut 
     22 
     23sub process { 
     24    my ($self, $c) = @_; 
     25 
     26    $c->stash->{Vote}{VERSION} = $Vote::VERSION; 
     27    Catalyst::View::TT::process($self, $c); 
     28} 
     29 
    2130=head1 SEE ALSO 
    2231 
  • trunk/root/static/vote.css

    r35 r36  
     1img { 
     2    border: 0; 
     3    vertical-align: middle; 
     4} 
     5 
     6/* The CLASS used in epoll */ 
     7 
     8.alert { 
     9    color: red; 
     10} 
     11 
     12/* The ID used in epoll */ 
     13 
     14#poll_summary { 
     15    border-style: outset; 
     16    border-width: 5px; 
     17} 
     18 
     19#poll_label {} 
     20 
     21#voting_list {} 
     22 
     23#poll_running { 
     24    border-style: outset; 
     25    border-width: 5px; 
     26} 
     27 
     28#vote_done {} 
  • trunk/root/templates/ballot/login.tt

    r34 r36  
    1 <form action="[% c.uri_for(voteid) %]"> 
    2 <input type="text" name="mail" value="[% c.req.param('mail') %]"> 
    3 <input type="password" name="password" value=""> 
    4 <input type="submit"> 
     1[% INCLUDE 'includes/poll.tt' %] 
     2 
     3<div id="login"> 
     4<p>Veuillez vous authentifier pour voter:</p> 
     5<form action="[% c.uri_for(voteid) %]" method="POST"> 
     6<table border="0" align="center"> 
     7<tr> 
     8<td>Email:</td> 
     9<td><input type="text" name="mail" value="[% c.req.param('mail') %]"></td> 
     10</tr> 
     11<tr> 
     12<td>Mot de passe:</td> 
     13<td><input type="password" name="password" value=""></td> 
     14</tr> 
     15<tr><td colspan="2" align="center"><input type="submit"></td></tr> 
     16</table> 
    517</form> 
     18</div> 
  • trunk/root/templates/ballot/signed.tt

    r16 r36  
    1 [% uid | html %] has already vote at: [% signed_date | html %]<br> 
     1[% INCLUDE 'includes/poll.tt' %] 
     2 
     3<div id="vote_done"> 
     4<p>[% mail | html %] a d&eacute;j&agrave; vot&eacute; le: [% signed_date | html %]</p> 
     5<p>Les résultats du vote seront disponible <a href="[% c.uri_for('/vote', voteid) %]">ici</a>.</p> 
     6</div> 
     7 
  • trunk/root/templates/includes/footer.tt

    r3 r36  
    1  
     1<div id="footer"> 
     2<a href="http://forge.ipsl.jussieu.fr/epoll"> Epoll [% Vote.VERSION | html %]</a> 
     3<a href="http://www.catalystframework.org/"><img src="[% c.uri_for('/static', 'images', 'btn_88x31_powered_shadow.png') %]"></a> 
     4</div> 
    25</body> 
    36</html> 
  • trunk/root/templates/includes/header.tt

    r35 r36  
    33<head> 
    44<title>[% page.title %]</title> 
     5<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    56<link rel="stylesheet" href="[% c.uri_for('/static', 'vote.css') %]" type="text/css"> 
    6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    77<link rel="icon" href="[%- c.uri_for('/static', 'images', 'favicon.ico') -%]" type="image/x-icon"> 
    88 
  • trunk/root/templates/includes/poll.tt

    r15 r36  
    11[% vote = c.model('Vote') %] 
     2[% thisvote = vote.vote_info(voteid) %] 
     3[% signing = [vote.vote_signing(voteid)] %] 
    24 
    3 [% thisvote = vote.vote_info(voteid) %] 
    4 [% thisvote.label | html %]<br> 
    5 [% signing = [vote.vote_signing(voteid)] %] 
     5<div id="poll_summary"> 
     6<p id="poll_label">[% thisvote.label | html %]</p> 
     7<p>[% thisvote.description | html %]</p> 
     8 
    69Ont voté: [% vote.signing_count(voteid) %] /  [% signing.size %]<br> 
    7 Bulletins: [% vote.ballot_count(voteid) %]<br> 
    8 <hr> 
     10Bulletins: [% vote.ballot_count(voteid) %] 
     11[% IF vote.signing_count(voteid) != vote.ballot_count(voteid) %] 
     12<p class="alert">Le nombre de bulletins et le nombre de personnes ayant voté divergent, 
     13suspicion de tricherie</p> 
     14[% END %] 
     15</div> 
     16 
  • trunk/root/templates/vote/default.tt

    r34 r36  
    55[% SWITCH vote.vote_status(voteid) %] 
    66[% CASE 'RUNNING' %] 
    7 <p>en cours</p> 
     7[% INCLUDE 'includes/poll_running.tt' %] 
    88[% CASE 'BEFORE' %] 
    99<p>Avant</p> 
    1010[% CASE 'AFTER' %] 
    1111<p>Resultats:</p> 
    12 Nombre de bulletin exprimés: [% vote.ballot_count_nonull(voteid) %] 
     12Nombre de vote(s) exprimé(s): [% vote.ballot_count_nonull(voteid) %] 
    1313[% IF vote.ballot_count(voteid) %] 
    1414([% vote.ballot_count_nonull(voteid) * 100 / vote.ballot_count(voteid) %]%) 
     
    4646[% END %] 
    4747 
    48 [% signing = [ vote.vote_signing(voteid) ] %] 
    49 [% FOREACH voting = signing %] 
    50 [% voting.label | html %] [% voting.date %]<br> 
    51 [% END %] 
     48[% INCLUDE 'includes/signing_list.tt' %] 
    5249 
Note: See TracChangeset for help on using the changeset viewer.