Changeset 1348


Ignore:
Timestamp:
06/01/15 17:57:34 (9 years ago)
Author:
nanardon
Message:

Add endcircuit attribute

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm

    r1329 r1348  
    227227            'label' => 'Expire le' 
    228228        }, 
     229        'endcircuit' => { 
     230            'label' => 'Fin de Circuit d\'entrée' 
     231        }, 
    229232        'postalCode' => { 
    230233            'label' => 'Code postal' 
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm

    r1346 r1348  
    2626            mail initials nickname 
    2727            expire 
     28            endcircuit 
    2829            locked 
    2930            create 
     
    4243            contratType 
    4344            expire 
     45            endcircuit 
    4446            snNative 
    4547            givenNameNative 
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrFormsA.pm

    r1329 r1348  
    288288    my ($self, $value) = @_; 
    289289    return sprintf(q| 
    290         $('[name="%s"]').datepicker( { dateFormat: 'dd/mm/yy' } ); 
     290        $('[name="%s"]').datepicker( { 
     291            changeMonth: true, 
     292            changeYear: true, 
     293            dateFormat: 'dd/mm/yy' 
     294        } ); 
    291295    |, $self->escape($self->htmlname)); 
    292296} 
  • trunk/LATMOS-Accounts/bin/la-sql-upgrade.in

    r1346 r1348  
    509509            EXECUTE PROCEDURE rev_tg_f(); 
    510510            }, 
     511        ], 
     512    }, 
     513    { 
     514        ver => 11, 
     515        sql => [ 
     516            q{ 
     517            ALTER TABLE "user" ADD COLUMN endcircuit timestamp with time zone 
     518            } 
    511519        ], 
    512520    }, 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm

    r1347 r1348  
    192192                monitored => 1, 
    193193            }, 
    194             expire    => { inline => 1, formtype => 'DATE', monitored => 1, }, 
     194            expire        => { inline => 1, formtype => 'DATE', monitored => 1, }, 
     195            endcircuit    => { inline => 1, formtype => 'DATE', monitored => 1, }, 
    195196            cn        => { 
    196197                inline => 1, ro => 1, 
     
    595596                    my $sth = $obj->db->prepare_cached( 
    596597                        sprintf( 
    597                             q{select extract(epoch from expire) + 11644474161 as expire 
     598                            q{select extract(epoch from COALESCE(endcircuit,  expire)) + 11644474161 as expire 
    598599                            from %s where %s = ?}, 
    599600                            $obj->db->quote_identifier($obj->_object_table), 
     
    615616                    my $sth = $obj->db->prepare_cached( 
    616617                        sprintf( 
    617                             q{select justify_hours(expire - '1/1/1970'::timestamp) as expire 
     618                            q{select justify_hours(COALESCE(endcircuit,  expire) - '1/1/1970'::timestamp) as expire 
    618619                            from %s where %s = ?}, 
    619620                            $obj->db->quote_identifier($obj->_object_table), 
     
    726727                    my $sth = $obj->db->prepare_cached( 
    727728                        sprintf( 
    728                             q{select to_char(expire, 'YYYY/MM/DD') as expire 
     729                            q{select to_char(COALESCE(endcircuit,  expire), 'YYYY/MM/DD') as expire 
    729730                            from %s where %s = ?}, 
    730731                            $obj->db->quote_identifier($obj->_object_table), 
     
    745746                    my $sth = $self->object->db->prepare_cached( 
    746747                        sprintf( 
    747                             q{select date_part('epoch', expire)::int as expire 
     748                            q{select date_part('epoch', COALESCE(endcircuit,  expire))::int as expire 
    748749                            from %s where %s = ?}, 
    749750                            $self->object->db->quote_identifier($self->object->_object_table), 
     
    780781                        my $sth = $obj->db->prepare_cached( 
    781782                            sprintf( 
    782                                 q{select to_char(expire AT TIME ZONE 'Z', 'YYYYMMDDHH24MISSZ') as expire 
     783                                q{select to_char(COALESCE(endcircuit,  expire) AT TIME ZONE 'Z', 'YYYYMMDDHH24MISSZ') as expire 
    783784                                from %s where %s = ? and expire < now()}, 
    784785                                $obj->db->quote_identifier($obj->_object_table), 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Maintenance.pm

    r1275 r1348  
    3838 
    3939    my $sth= $base->db->prepare(q{ 
    40         select name, justify_hours(expire - now()) as delay from "user" where 
    41             expire < now() + ?::interval 
     40        select name, 
     41            justify_hours(coalesce(endcircuit, expire) - now()) as delay, 
     42            endcircuit 
     43            from "user" 
     44            where 
     45            coalesce(endcircuit, expire) < now() + ?::interval 
    4246            and expire > now() 
    43             and expire is not null 
     47            and coalesce(endcircuit, expire) is not null 
    4448            and exported = True 
    4549            order by expire 
  • trunk/LATMOS-Accounts/man/man8/latmos-accounts-base-sql.pod

    r1323 r1348  
    5050NS, TXT...). 
    5151 
     52=head2 User endcircuit 
     53 
     54The C<endcircuit> attribute contain the deadline for people to make 
     55admnistrative task when starting to work. 
     56If set this attribute take precedence to C<expire> attribute for computed 
     57attributes (C<accountExpires> for Active Directory). 
     58 
    5259=head2 Group AutoMemberFilter 
    5360 
  • trunk/LATMOS-Accounts/templates/mail/account_expire.mail

    r1279 r1348  
    77En aucun cas vos fichiers ne seront détruits.  
    88 
    9 Si ce dernier devait être prolongé, merci de dire à votre responsable 
    10 de contacter svp@latmos.ipsl.fr afin de nous donner la nouvelle date.  
     9[% IF endcircuit %] 
     10Pour que votre compte soit prolongé vous finir le circuit d'accueil et remettre 
     11la fiche à Brigitte Fromager (Guyancourt - bureau 2421) ou Irina Tchoumakova 
     12(Jussieu - bureau 409). 
    1113 
    12  
    13 Cas d'un nouvel arrivant: 
    14  
    15 Si vous êtes un nouvel arrivant, veuillez réaliser votre circuit d'entrée et 
    16 remettre la fiche à Brigitte Fromager (Guyancourt - bureau 2421) ou Irina 
    17 Tchoumakova (Jussieu - bureau 409).       
    1814Si vous rencontrez des difficultés, n'hésitez pas à vous adresser à votre 
    1915responsable, ou à Brigitte et Irina. 
    2016 
     17[% ELSE %] 
     18 
     19Si ce dernier devait être prolongé, merci de dire à votre responsable 
     20de contacter svp@latmos.ipsl.fr afin de nous donner la nouvelle date. 
     21[% END %] 
    2122 
    2223Votre statut: 
    2324 
    2425Société: [% obj.get_c_field('company') %] 
     26 
    2527Département: [% obj.get_c_field('department') %] 
     28 
    2629Contrat: [% obj.get_c_field('contratType') %] 
    2730 
     
    3740In no case your files will be destroyed. 
    3841 
    39 If your account had to be extended, please ask your manager to contact 
    40 svp@latmos.ipsl.fr to give us a new expiration date. 
    41  
    42  
    43 If you are new in laboratory: 
    44  
    45 If you are a newcomer, please make your entrance circuit and pass on the sheet 
    46 to Brigitte Fromager (Guyancourt - office 2421) or Irina Tchoumakova (Jussieu - 
    47 office 409).                      
     42[% IF endcircuit %] 
     43To have your account renew please end make your entrance circuit and pass on the 
     44sheet to Brigitte Fromager (Guyancourt - office 2421) or Irina Tchoumakova 
     45(Jussieu - office 409). 
    4846If you meet difficulties, don't hesitate to deal with your manager, or with 
    4947Brigitte and Irina. 
    5048 
     49[% ELSE %] 
     50 
     51If your account had to be extended, please ask your manager to contact 
     52svp@latmos.ipsl.fr to give us a new expiration date. 
     53[% END %] 
    5154 
    5255Your status: 
    5356 
    5457Company: [% obj.get_c_field('company') %] 
     58 
    5559Department: [% obj.get_c_field('department') %] 
     60 
    5661Contract: [% obj.get_c_field('contratType') %] 
    5762 
Note: See TracChangeset for help on using the changeset viewer.