Ignore:
Timestamp:
09/15/12 08:52:20 (12 years ago)
Author:
nanardon
Message:
  • fix merge
Location:
trunk/LATMOS-Accounts-Web
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/MANIFEST

    r1135 r1136  
    138138root/static/icons/gnome-stock-mail-snd.png 
    139139root/static/icons/gtk-about.png 
     140root/static/icons/gtk-add.png 
    140141root/static/icons/gtk-cancel.png 
    141142root/static/icons/gtk-close.png 
     
    168169root/static/icons/user-invisible.png 
    169170root/static/icons/user-properties.png 
     171root/static/icons/user-trash.png 
    170172root/static/icons/video-display.png 
    171173root/static/icons/view-calendar-day.png 
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Services/Mailing.pm

    r1135 r1136  
    9797    $email->header_set( Subject => $c->req->param('subject') ); 
    9898 
    99     warn $email->as_string; 
     99    $c->stash->{receivers} = []; 
    100100    foreach (sort (keys %{ $c->session->{to} })) { 
    101101        my $obj = $c->model('Accounts')->base->get_object( 
     
    103103        ) or next; 
    104104        my $email_addr = $obj->get_attributes('mail') or next; 
     105        push(@{ $c->stash->{receivers} }, $email_addr); 
    105106        my $to = sprintf( 
    106107            '%s <%s>', 
     
    120121        ); 
    121122    } 
     123    $c->session->{mailing}{subject} = ''; 
     124    $c->session->{mailing}{body} = ''; 
     125    $c->session->{to} = {}; 
    122126 
    123127} 
  • trunk/LATMOS-Accounts-Web/root/html/ajax/services/mailing/dest_list.tt

    r1135 r1136  
    77<table> 
    88[% END %] 
     9[% obj = c.model('Accounts').db.get_object('user', u) %] 
     10 
    911<tr> 
    10 <td>[% u | html %]</td> 
     12    <td> 
     13    [% disp = obj.get_attributes('displayName') || u %] 
     14    [% disp | html %] 
     15    </td> 
    1116<td> 
    12 [%  c.prototype.link_to_remote( 'Sup', { 
     17[% c.prototype.link_to_remote( '<img src="' _ c.uri_for('/static/icons', 
     18'user-trash.png') _ '" height="24" width="24" alt="" title="Retirer ' _ disp _ '">', { 
    1319    update => 'destlist', 
    1420    url    => c.uri_for('/ajax', 'services', 'mailing', 'mod_to', { 
    1521        'act'  => 'remove_to', 
    1622        'user' => u, 
    17     }) 
    18 } ) %] 
     23    },) 
     24}, { entities => '' } ) %] 
    1925</td> 
    2026</tr> 
  • trunk/LATMOS-Accounts-Web/root/html/ajax/services/mailing/users_list.tt

    r1135 r1136  
    33<table> 
    44[% END %] 
     5[% obj = c.model('Accounts').db.get_object(ofilter.otype, u) %] 
     6 
    57<tr> 
    6     <td>[% u | html %]</td> 
     8    <td> 
     9    [% disp = obj.get_attributes('displayName') || u %] 
     10    [% disp | html %] 
     11    </td> 
    712    <td><input type=checkbox name="user" checked=1 value="[% u | html %]"> 
    8 [%  c.prototype.link_to_remote( '+', { 
     13[%  c.prototype.link_to_remote( '<img src="' _ c.uri_for('/static/icons', 
     14'gtk-add.png') _ '" height="24" width="24" alt="" title="Ajouter ' _ disp _ '">', { 
    915    update => 'destlist', 
    1016    url    => c.uri_for('/ajax', 'services', 'mailing', 'mod_to', { 
     
    1218        'user' => u, 
    1319    }) 
    14 } ) %] 
     20}, { entities => '' } ) %] 
    1521    </td> 
    1622</tr> 
  • trunk/LATMOS-Accounts-Web/root/html/includes/sidebar.tt

    r1132 r1136  
    1414<li><a href="[% c.uri_for('/summary', 'offices') %]">Annuaire par bureaux</a></li> 
    1515<li><a href="[% c.uri_for('/summary', 'departments') %]">Liste des départements</a></li> 
     16<li><a href="[% c.uri_for('/services', 'mailing') %]">Mail séléctif</a></li> 
    1617</ul> 
    1718 
     
    5253<li><a href="[% c.uri_for('/admin') 
    5354%]">Gestion...</a></li> 
    54 </li> 
    5555</ul> 
    5656 
  • trunk/LATMOS-Accounts-Web/root/html/services/mailing/index.tt

    r1135 r1136  
    11<form action="[% c.uri_for() %]" method="POST"> 
    2 <label for="subject">Sujet</label><br> 
     2<input type="submit" name="sto" value="Selectionner les destinaires ..."> 
     3[% IF c.session.to.keys.size > 0 %][% c.session.to.keys.size %] destinataires[% END %] 
     4<br> 
     5<label for="subject">Sujet:</label> 
    36<input type="text" name="subject" value="[% c.session.mailing.subject | html %]"> 
    47<br> 
    58 
    6 <input type="submit" name="sto" value="To ..."> 
    7 [% IF c.session.to.keys.size > 0 %][% c.session.to.keys.size %] destinataires[% END %] 
    8 <br> 
    99<textarea name="body" rows="6" cols="60"> 
    1010[%- c.session.mailing.body | html -%] 
    1111</textarea><br> 
    12 <input type="submit" name="send" value="send"> 
     12[% IF c.session.to.keys.size > 0 %] 
     13<input type="submit" name="send" value="Envoyer"> 
     14[% END %] 
    1315 
    1416</form> 
  • trunk/LATMOS-Accounts-Web/root/html/services/mailing/send.tt

    r1135 r1136  
    1 Sent 
     1<p>Le message a été envoyé</p> 
     2 
     3<p>Sujet: [% c.req.param('subject') | html %]</p> 
     4 
     5Destinataire: 
     6 
     7<ol> 
     8[% FOREACH m = receivers %] 
     9<li>[% m | html %]</li> 
     10[% END %] 
  • trunk/LATMOS-Accounts-Web/root/html/services/mailing/to.tt

    r1135 r1136  
    5454<div style="width: 20em; float:left; border: solid;"> 
    5555[%  c.prototype.link_to_remote( 
    56     '<img src="' _ c.uri_for('/static/icons', 'editclear.png') _ '">', 
     56    '<img src="' _ c.uri_for('/static/icons', 'editclear.png') _ '" title="Vider la liste">', 
    5757    { 
    5858    update => 'destlist', 
     
    6262<span style="float: right"> 
    6363<a href="[% c.uri_for('/services', 'mailing') %]"> 
    64 <img src="[% c.uri_for('/static/icons', 'emblem-default.png') %]"> 
     64<img src="[% c.uri_for('/static/icons', 'emblem-default.png') %]" 
     65 title="Valider la liste"> 
    6566</a> 
    6667</span> 
Note: See TracChangeset for help on using the changeset viewer.