Changeset 1607


Ignore:
Timestamp:
01/08/16 00:37:09 (8 years ago)
Author:
nanardon
Message:

Add some date to timeline

Location:
trunk/LATMOS-Accounts-Web
Files:
3 edited

Legend:

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

    r1584 r1607  
    4343            color => '#000000', 
    4444            spans => [], 
     45            events => [], 
    4546        }, 
    4647    }; 
     
    7273 
    7374        push(@{$var->{employments}{spans}}, $vemp); 
     75 
     76        push(@{$var->{employments}{events}}, { 
     77                name => 'Today', 
     78                date => DateTime->now->ymd('-'), 
     79        }); 
     80        if (my $expire = $ouser->get_attributes('expire')) { 
     81            push(@{$var->{employments}{events}}, { 
     82                    name => 'Expire', 
     83                    date => $expire, 
     84            }); 
     85        } 
    7486    } 
    7587 
  • trunk/LATMOS-Accounts-Web/root/html/users/employment.tt

    r1606 r1607  
    77 
    88<div id="objectform" class="objectform"> 
    9  
    109 
    1110[% IF c.stash.user.listEmployment %] 
     
    3231[% END %] 
    3332 
     33[% IF employment %] 
     34<h3> 
     35Statut du [% employment.get_attributes('firstday') | html %] 
     36[% IF employment.get_attributes('lastday') %] au [% employment.get_attributes('lastday') | html %][% END %] 
     37[% ELSE %] 
     38Nouveau statut: 
     39[% END %] 
     40</h3> 
    3441 
    3542[% BLOCK formattr %] 
     
    4754[% END %] 
    4855 
    49 [% IF employment %] 
    5056<div style="display: inline-block;"> 
    51 <h3> 
    52 Statut du [% employment.get_attributes('firstday') | html %] 
    53 [% IF employment.get_attributes('lastday') %] au [% employment.get_attributes('lastday') | html %][% END %] 
    54 [% ELSE %] 
    55 Nouveau statut: 
    56 [% END %] 
    57 </h3> 
    5857<form action="[% c.uri_for(username, subform, employment.id || '@create') %]" method="POST"> 
    5958<table border=1> 
     
    7675 
    7776[% IF c.stash.user.listEmployment %] 
    78     <div id=listemp style="display: inline-block; border: outset; padding-left: padding-right: 20px;"> 
     77    <div id=listemp style="display: inline-block; border: outset; padding-left: 20px; padding-right: 20px;"> 
    7978    <h3>Listes de status:</h3> 
    8079    [% IF employment %] 
  • trunk/LATMOS-Accounts-Web/root/static/js/timeline/timeframe.js

    r1584 r1607  
    227227                        .appendTo(group); 
    228228 
     229        var line = $svg.line( 
     230           x, 
     231           this.height - this.options.textHeight - this.options.tickHeight + this.paddingY, 
     232           x, 
     233           this.height - this.options.textHeight - this.options.tickHeight + this.paddingY - 24 
     234        ) 
     235            .attr("stroke", "blue") 
     236            .attr("stroke-width", 1) 
     237            .appendTo(group);  
     238 
    229239                var label = $svg.text( 
    230240                        x, 
    231                         this.height - this.options.textHeight - this.options.tickHeight + this.paddingY - 8, 
     241                        this.height - this.options.textHeight - this.options.tickHeight + this.paddingY - 32, 
    232242                        event.name, 
    233243                        { 
    234                                 fill: "black", 
     244                                fill: "blue", 
    235245                                "font-size": "12", 
    236246                                "text-anchor": "middle" 
Note: See TracChangeset for help on using the changeset viewer.