%nn; [*relationship link between]%sp; %if;(public_name != "")%public_name;%else;%first_name;%end; %if;(qualifier != "") %qualifier;%end; %sp;%surname;

%include;favicon %include;css %(TODO : * highlight/filter by nbr * RLM par chemin vers les mêmes ancêtres / need to fix RLM spouses isolated) * discuter quoi afficher comme « comptage des chemins » * highlight sur les cases avec des individus vivants + counts %) %include;hed %message_to_wizard;
6)-fluid%end;">
%include;perso_utils %include;menubar %let;min;%if;(not has_children)1%else;0%end;%in; %let;max;%if;(bvar.max_anc_level!="" and bvar.max_anc_levelvvv%nn; %end;
%for;i;min;max;%apply;picklvl(i)%end;
%define;cousin_lex_tt(vvv,www) %( condition pour garder la tooltip (title="") vide si elle n'est pas définie pour la langue en cours %) %if;([cousins.vvv.www tt]!="[cousins.vvv.www tt]")[cousins.vvv.www tt]1%else;%end; %end; %define;cousin_lex(vvv,www) [cousins.vvv.www]1 %end; %define;index(ppp,vvv,xxx) %ppp_of_index.vvv.xxx; %end; %define;cous_paths_cnt(vvv,www) %cous_paths_cnt.vvv.www; %end; %define;cousins_cnt(vvv,www) %cousins_cnt.vvv.www; %end; %define;cous_paths_min_date(vvv,www) %cous_paths_min_date.vvv.www; %end; %define;cous_paths_max_date(vvv,www) %cous_paths_max_date.vvv.www; %end; %(%define;setvar(nnn,vvv) %set_var.nnn.vvv; %end; %define;getvar(nnn) %get_var.nnn; %end;%) %empty_sorted_list;%empty_sorted_listb;%empty_sorted_listc;%reset_count3; %define;cous_mod(vvv,www) %empty_sorted_list;%empty_sorted_listb; %( min/max = extremum dates for all individuals at v1/v2 | span = period of the generation %) %let;min_date_vvv_www;%cous_paths_min_date.vvv.www;%in; %let;max_date_vvv_www;%cous_paths_max_date.vvv.www;%in; %foreach;cous_path(vvv,www) %let;cous_isdead;%apply;index("p",path_end.index,"is_dead")%in; %let;cous_nodesc;%apply;index("p",path_end.index,"has_children")%in; %let;cous_sex;%apply;index("p",path_end.index,"sex")%in; %let;birth_prec;%if;(path_end.birth_date.prec="<")1%end;%in; %let;death_prec;%if;(path_end.death_date.prec=">")1%end;%in; %( percent of birth/death into a linear bicolor gradient %) %let;birth_age;%if;((path_end.birth_date.prec="" or path_end.birth_date.prec="<") and path_end.birth_date.year!="" and max_date_vvv_www>min_date_vvv_www)%expr(100-(100*(max_date_vvv_www-path_end.birth_date.year)/(max_date_vvv_www-min_date_vvv_www)))%end;%in; %let;death_age_;%if;((path_end.death_date.prec="" or path_end.death_date.prec=">") and path_end.death_date.year!="" and max_date_vvv_www>min_date_vvv_www)%expr(100-(100*(max_date_vvv_www-path_end.death_date.year)/(max_date_vvv_www-min_date_vvv_www)))%end;%in; %( fix gradient for individual who are dead < 1 year old by forcing a 1% white space %) %let;death_age;%if;(death_age_=birth_age and birth_age>0)%expr(birth_age+1)%else;%death_age_;%end;%in; %let;white;%if;(cous_isdead=1)rgba(245,245,235,1)%else;rgba(255,255,255,1)%end;%in;%let;brown;rgba(245,231,216,1)%in;%let;yellow;rgba(255,235,210,1)%in; %if(path_end.surname="?" and path_end.first_name="?")%incr_count3; %else; %( store all cous_paths individual list item with their 5 buttons in a sorted_list %) %apply;add_in_sorted_list%with;%path_end.dates; %path_end.surname; %path_end.first_name; %path_end.occ;%and;%nn;
- 0)%yellow; 0%%%else;%brown; %if;(birth_prec=1)0%else;%birth_age;%end;%%, %white; %birth_age;%%%end;,%nn; %if;(death_age="" and birth_age>0)%yellow; 100%%%else;%white; %death_age;%%, %brown; %if;(death_prec=1)100%else;%death_age;%end;%%%end;);%nn; %else;background:linear-gradient(90deg, %brown; %birth_age;%%, %white; %birth_age;%%);%end;%nn; %if;(cous_nodesc!=1)border-style:double;%end;" data-surname="%path_end.surname_key; %path_end.first_name_key;%path_end.birth_date.year;" data-birth_year="%path_end.birth_date.year;%path_end.birth_date.month;%path_end.birth_date.day;%path_end.birth_date.prec;%path_end.surname_key;%path_end.first_name_key;" %( TODO toggle between n function in jquery? data-age="%if;((path_end.death_date.year-path_end.birth_date.year<10 and cous_isdead=1) or (today.year-path_end.birth_date.year<10 and cous_isdead=0))0%end;%if;(cous_isdead=1)%expr(path_end.death_date.year-path_end.birth_date.year)%else;%expr(today.year-path_end.birth_date.year)%end;%path_end.surname_key;%path_end.first_name_key;%path_end.birth_date.year;"%)>%nn;
  %if;(www!=0) %if;(path_end.nbr %2 = 0)%else;%end;%nn; %(TODO NBR %if;(path_end.nbr>2)%path_end.nbr;%else; %end;%) %end;
  %( %cous_isdead; | %birth_age;-%death_age_; | %path_end.birth_date.year; %path_end.death_date.year; || %path_end.nbr; | %path_end.lev_cnt; | %path_end.anc_level; DEBUG %)%path_end.surname; %path_end.first_name;%nn; %if;wizard;%end; %if;(path_end.dates!="")%path_end.dates; %else;%if;(cous_isdead=1)†%else;°%end; %end; %if;wizard;%end
%and;%path_end.cnt;%and;%path_end.index;%end; %apply;add_in_sorted_listb%with;%path_end.index;%and;%cous_isdead;%and;%cous_nodesc;%end; %apply;add_in_sorted_listc%with;%path_end.index;%and;%cous_isdead;%and;%cous_nodesc;%end; %end; %end; %reset_count;%reset_count2; %foreach;sorted_listb_item; %if;(item.2=0)%incr_count;%end; %if;(item.3=0)%incr_count2;%end; %end;
%(tofix : quick hack to allow scrolling on next modal and not body after dismissing a first modal%)
%let;extrapaths;%expr(cous_paths_cnt.vvv.www-listb_size)%in;
%listb_size %if;(cousins_cnt.vvv.www=1)[person/persons]0%else;[person/persons]1%end; %if;(count!=0 and count!=cousins_cnt.vvv.www)
%if;(2*count<=cousins_cnt.vvv.www)%count; [alive]3 %else;%expr(cousins_cnt.vvv.www-count) [died]3 %end;
%end;
%if;(count2>0)
%count2; [no descendants] ║
%end; %if;(count3>0)
%count3; [unknown spouse] ? ?
%end;
%nn; %if;(vvv+www=0) %if;(sex=1)[him/her]0%else;[him*her]1%end; %else; %if;(cousins_cnt.vvv.www=1)[cousins.vvv.www]0%else;[cousins.vvv.www]1%end;%nn; %end; %nn; %if;(extrapaths!=0) (+ %extrapaths;)%end; %min_date_vvv_www;-%max_date_vvv_www;
%(
%) %let;cousdown;%apply;cousins_cnt%with;vvv%and;%expr(www+1)%end;%in;
%if;(vvv>0 and www=0)
%end;

%foreach;sorted_list_item;%item.2;%end;

%(
%)
%end; %define;link_cousin(vvv,www) %let;extra_paths_vvv_www;%expr(cous_paths_cnt.vvv.www-cousins_cnt.vvv.www)%in; %let;width;%expr((100/(e.v+1))*vvv)%in; %let;percent_vvv_www;%expr(100-count*100/cousins_cnt.vvv.www)%in;
%end; %( table of cousins.j-vvv+i.i c(k,i) | table size = v × (v+%cousins.max_d;) == l1 asc./l2 = max_desc (plus longue colonne v2) %) %define;table(xxx) %let;maxdesc;%expr(cousins.max_d+xxx)%in;

%for;j;1;maxdesc;
%nn; %for;i;0;xxx; %let;k;%expr(j+i-xxx)%in; %if;(k>=0) %let;tot;%apply;cous_paths_cnt%with;%i;%and;%k;%end;%in; %let;tot_next;%apply;cous_paths_cnt%with;%i;%and;%expr(k+1)%end;%in; %if;(i>1 and k=0) %nn; %expr(xxx-j)%nn; %if;(i>2) | %end; %end; 0 and k=0) colspan="2"%end;%sp; class="border-0 border-top-0 border-bottom-0 border-right-0"> %if;(tot!=0)
%apply;cous_mod(i,k) %apply;link_cousin(i,k)
%if;(i!=0 and k=0) %( for ancestors c(i,0) border links | self has 2×col-6 and his ancestors 4×col-3 prints — only first cell border if c(i-1,0) have no siblings [cousins_cnt.i.1=0] | — two first even cells borders overwise | | — nothing if self has no children %) %let;mx;%if;(i=0)1%else;3%end;%in; %for;z;0;mx; %(%let;couscntk1;%apply;cousins_cnt%with;%i%and;1%end;%in;%)
%end; %else;
%end;
%end; %end; %end; %( | %if;(j>1)%expr(j-1)%else; %end;%)
%end;
[coefficient of relationship] [one ancestor counted] [multiple relations]

%end; %if;(e.v="") %apply;table(4) %else; %apply;table(e.v+1) %end; %( page title + counts shown at top of page using flex order %)
%nn;

### [*link between] %if;(public_name != "")%public_name;%else;%first_name;%end; %if;(qualifier != "") %qualifier;%end; %sp;%surname; %(%if;(alias != "") (%alias;)%end;%) %sp;[and] [close family] [up to] %e.v; [generation/generations]1%( montantes [and] %expr(e.v+cousins.max_d) descendantes…%)

%( quick count ascendants | TODO : filter by index to reduce asc./desc. implexes %) %reset_count; %if;has_parents; %for;i;0;e.v; %let;tt;%apply;cousins_cnt%with;%expr(i+1)%and;0%end;%in; %for;j;0;tt;%incr_count;%end; %end; %end; %count;A%nn; %reset_count; %if;has_children; %for;i;1;cousins.max_d; %let;tt;%apply;cousins_cnt%with;0%and;%i%end;%in; %for;j;0;tt;%incr_count;%end; %end; %end; /%count;D %reset_count;%foreach;sorted_listc_item;%if;(item.2=0)%incr_count;%end;%end;%nn; %listc_size;P/%count;L
%base_trailer; %include;copyr
%include;js