%define;event_tree(z1)
%reset_count;
href="%prefix;spouse=on;m=RLM;image=%evar.image;;%nn;
%foreach;event_witness;
%let;enamex;%if;(event_witness_kind=[officer/officer/officers]0)
%if;(event_witness.sex=1)[officer/officer/officers]1%nn;
%else;[officer/officer/officers]0%nn;
%end;
%else;
%event.name;
%end;
%in;
%incr_count;i%count;=%event_witness.index;;%nn;
t%count;=%enamex;;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%if;has_relations;
%foreach;relation;
%if;(has_relation_him and has_relation_her)
%if;(relation_type=[godfather/godmother/godparents]2 and event.name=[baptism])
%incr_count;i%count;=%relation_him.index;;%nn;
t%count;=[godfather/godmother/godparents]0;%nn;
%incr_count;i%count;=z1;%nn;
%incr_count;i%count;=%relation_her.index;;%nn;
t%count;=[godfather/godmother/godparents]1;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%elseif;has_relation_him;
%if;(relation_type=[godfather/godmother/godparents]0 and event.name=[baptism])
%incr_count;i%count;=%relation_him.index;;%nn;
t%count;=[godfather/godmother/godparents]0;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%elseif;has_relation_her;
%if;(relation_type=[godfather/godmother/godparents]1 and event.name=[baptism])
%incr_count;i%count;=%relation_him.index;;%nn;
t%count;=[godfather/godmother/godparents]1;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%end;
%end;
%end;
%incr_count;%nn;
i%count;=%index;;%nn;
t%count;=%if;(sex=0)[him/her]0%elseif;(sex=1)[him/her]1%else;0%end;;%nn;
%if;browsing_with_sosa_ref;
%incr_count;i%count;=%sosa_ref.index;;%nn;
t%count;=sosa_1;%nn;
%end;
"%if;(count < 3) style="display:none;"%end; title="[*witness tree] ([witnesses to my events and godparents])"%nn;
%reset_count;
%end;
%define;relations_tree(z1)
%reset_count;
href="%prefix;spouse=on;m=RLM;image=%evar.image;;%nn;
%foreach;relation;
%if;(has_relation_him)
%incr_count;i%count;=%relation_him.index;;%nn;
t%count;=%relation_him.type;;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%if;(has_relation_her)
%incr_count;i%count;=%relation_her.index;;%nn;
t%count;=%relation_her.type;;%nn;
%incr_count;%nn;i%count;=z1;%nn;
%end;
%end;
%foreach;related;
%incr_count;i%count;=%related.index;;%nn;
t%count;=%related_type;;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%foreach;event_witness_relation;
%incr_count;i%count;=%event_witness_relation.person.index;;%nn;
t%count;=%event_witness_relation.event.name;;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%foreach;event;
%foreach;event_witness;
%incr_count;i%count;=%event_witness.index;;%nn;
t%count;=%event.name;;%nn;
%incr_count;i%count;=z1;%nn;
%end;
%end;
%incr_count;i%count;=%index;;%nn;
t%count;=%if;(sex=0)[him/her]0%elseif;(sex=1)[him/her]1%else;0%end;%nn;
%if;browsing_with_sosa_ref;
%incr_count;i%count;=%sosa_ref.index;;t%count;=sosa_1;%nn;
%end;
" class="ml-2" title="[*relations tree]"
%reset_count;
%end;
%define;list_witness_of_kind(kindx)
%reset_count;
%foreach;event_witness;
%if;(event_witness_kind = [kindx]0)
%incr_count;
%end;
%end;
%let;k_cnt;%count;%in;
%reset_count;
%foreach;event_witness;
%incr_count;
%end;
%let;w_cnt;%count;%in;
%if;(k_cnt>1)
[*kindx]2[:]
%elseif(k_cnt=1)
%foreach;event_witness
%if;(event_witness_kind=[kindx]0)
%if;(event_witness.sex=1)
[*kindx]1%else;[*kindx]0%end;[:]
%end;
%end;
%end;
%reset_count
%foreach;event_witness;
%if;(event_witness_kind = [kindx]0)
%incr_count;
%nn;
%apply;short_display_person("event_witness")%nn;
%nn;
%if;(count=k_cnt).
%else;
%if;(count=k_cnt-1)%sp;[and]%sp;%else;,%sp;%end;%sq;
%end;
%end;
%end;
%end;
%define;date_to_sort(ddd)
%let;yyyy;%if;(ddd.year!="")%ddd.year;%else;0000%end;%in;
%let;mm;%if;(ddd.month!="")%ddd.month;%else;00%end;%in;
%let;dd;%if;(ddd.day!="")%ddd.day;%else;00%end;%in;
%let;m1;%if;(mm>0 and mm<10)0%mm;%else;%mm;%end;%in;
%let;d1;%if;(dd>0 and dd<10)0%dd;%else;%dd;%end;%in;
%ddd;, %yyyy;%m1;%d1;%nn;
%end;
%define;month(mmm)
%if;(mmm.month="")%if;(mmm.prec=">")12%else;00%end;
%elseif;(mmm.month<10)0%mmm.month;%else;%mmm.month;%end;
%end;
%define;day(ddd)
%if;(ddd.day="")%if;(ddd.prec=">")32%else;00%end;
%elseif;(ddd.day<10)0%ddd.day;%else;%ddd.day;%end;
%end;
%define;dprec(ddd)
%if;(ddd.prec="<")2%elseif;(ddd.prec=">")2%else;2%end;
%end;
%define;one_child(ccc,evm,labl,ddd)
%( no test for his_birth_date <= my_death_date here %)
%apply;add_in_sorted_list%with;
%dummy;%nn;
%and;%ccc.birth_date.year;%nn;
%and;%apply;month("ccc.birth_date")%nn;
%and;%apply;day("ccc.birth_date")%nn;
%and;%apply;dprec("ccc.birth_date")%nn;
%and;%count2;
%and;%if;(ccc.birth_date!="")%ccc.birth_date;%else;([missing date]0)%end;%nn;
%and;%apply;a_of_b%with;[birth]%and;%if;ccc.is_male;[labl]0%elseif;ccc.is_female;[labl]1%else;[labl]2%end;%end;%sp;%apply;short_display_person("ccc")%nn;
%and;%nn;
%and;%nn;
%and;%(debug sort: %ccc.birth_date.year;%apply;month("ccc.birth_date")%apply;day("ccc.birth_date")%apply;dprec("ccc.birth_date"),%)%nn;
%and;%ccc;%nn;
%and;%ddd;%nn;
%end;
%( what happens if date.year is yyy1..yyy2 ? %)
%let;his_death_date_year;%if;(ccc.death_date.year!="")%ccc.death_date.year;%else;0%end;%in;
%let;his_death_date_month;%if;(ccc.death_date.month!="")%if;(ccc.death_date.month<=9)0%end;%ccc.death_date.month;%else;00%end;%in;
%let;his_death_date_day;%if;(ccc.death_date.day!="")%if;(ccc.death_date.day<=9)0%end;%ccc.death_date.day;%else;00%end;%in;
%let;his_death_date;%his_death_date_year;%his_death_date_month;%his_death_date_day%in;
%if;(ccc.is_dead and his_death_date<=my_death_date)
%apply;add_in_sorted_list%with;
%dummy;%nn;
%and;%ccc.death_date.year;%nn;
%and;%apply;month("ccc.death_date")%nn;
%and;%apply;day("ccc.death_date")%nn;
%and;%apply;dprec("ccc.death_date")%nn;
%and;%count2;
%and;%if;(ccc.death_date!="")%ccc.death_date;%else;([missing date]0)%end;%nn;
%and;%apply;a_of_b%with;[death]%and;%if;ccc.is_male;[labl]0%elseif;ccc.is_female;[labl]1%else;[labl]2%end;%end;%sp;%apply;short_display_person("ccc")%if;(ccc.computable_death_age)%sp;(%ccc.death_age;)%end;%nn;
%and;%nn;
%and;%nn;
%and;%(debug sort: %ccc.birth_date.year;%apply;month("ccc.birth_date")%apply;day("ccc.birth_date")%apply;dprec("ccc.birth_date"),%)%nn;
%and;%ccc;%nn;
%and;%ddd;%nn;
%end;
%end;
%if;(ccc.has_families and evm=1)
%foreach;family;
%let;his_marriage_date_year;%if;(ccc.marriage_date.year!="")%ccc.marriage_date.year;%else;0%end;%in;
%let;his_marriage_date_month;%if;(ccc.marriage_date.month!="")%if;(ccc.marriage_date.month<=9)0%end;%ccc.marriage_date.month;%else;00%end;%in;
%let;his_marriage_date_day;%if;(ccc.marriage_date.day!="")%if;(ccc.marriage_date.day<=9)0%end;%ccc.marriage_date.day;%else;00%end;%in;
%let;his_marriage_date;%his_marriage_date_year;%his_marriage_date_month;%his_marriage_date_day%in;
%if;(his_marriage_date<=my_death_date)
%apply;add_in_sorted_list%with;
%dummy;%nn;
%and;%ccc.marriage_date.year;%nn;
%and;%apply;month("ccc.marriage_date")%nn;
%and;%apply;day("ccc.marriage_date")%nn;
%and;%apply;dprec("ccc.marriage_date")%nn;
%and;%count2;
%and;%if;(ccc.marriage_date!="")%ccc.marriage_date;%else;([missing date]0)%end;%nn;
%and;%apply;a_of_b%with[marriage/marriages]0%and;%ccc.first_name; [with] %apply;short_display_person("ccc.spouse")%end;%nn;
%and;%nn;
%and;%nn;
%and;%(debug sort: %ccc.birth_date.year;%apply;month("ccc.birth_date")%apply;day("ccc.birth_date")%apply;dprec("ccc.birth_date"),%)%nn;
%and;%ccc;%nn;
%and;%ddd;%nn;
%end;
%end;
%end;
%end;
%end;
%if;(has_event)
%let;evarmac;%if;(evar.mar_sp_ch!="" and evar.mar_sp_ch="on")1%else;0%end;%in; %(marriage child %)
%let;evarmas;%if;(evar.ma_s!="" and evar.ma_s="on")1%else;0%end;%in; %(marriage siblings %)
%let;evarevp;%if;(evar.evt_pr_sib!="" and evar.evt_pr_sib="on")1%else;0%end;%in; %(events parents %)
%let;oneline;%if;(evar.simple!="" and evar.simple="on")1%else;0%end;%in; %(one line by event %)
%let;l_ref;%if;browsing_with_sosa_ref;%sosa_ref.index;%else;%index;%end;%in;
%item.7; %( date %) | %if;(item.13=cas1)–%nn; %(%elseif;(item.13=cas2)· %elseif;(item.13=cas3)· %elseif;(item.13=cas4)· %else;·%) %end; |
%if;(item.8="new_event_sorted")
%reset_count2;
%foreach;event;
%incr_count2;
%if;(item.6=count2)
%apply;capitalize(event.name)
%if;event.has_spouse;%sp;[with] %apply;short_display_person%with;event.spouse%end;%end;
%if;(event.has_witnesses)
%if;(not cancel_links)
%nn;
%else;
%end;
%end;
%end;
%end;
%else;
%apply;capitalize(item.8) %( name %)
%end;
%if;(item.9!="")
%if;(oneline=0) %else;%sp;–%sp;%end; %item.9; %( place %) %end; |
%if;(item.10!="")
%if;(item.8="new_event_sorted")
%reset_count2;
%foreach;event;
%incr_count2;
%if;(item.6=count2)
%if;(event.name=[baptism])
%if;has_relations;
%foreach;relation;
%if;(has_relation_him and has_relation_her)
%if;(relation_type=[godfather/godmother/godparents]2)
[*godfather/godmother/godparents]0[:]
%apply;short_display_person("relation_him"). [*godfather/godmother/godparents]1[:] %apply;short_display_person("relation_her"). %end; %elseif;has_relation_him; %if;(relation_type=[godfather/godmother/godparents]0) %apply;capitalize(relation_type)[:] %apply;short_display_person("relation_him"). %end; %elseif;has_relation_her; %if;(relation_type=[godfather/godmother/godparents]1) %apply;capitalize(relation_type)[:] %apply;short_display_person("relation_her"). %end; %end; %end; %end; %end; %if;(event.name=[baptism] and has_relations and event.has_witnesses) %end; %if;event.has_witnesses; %apply;list_witness_of_kind("witness/witness/witnesses") %apply;list_witness_of_kind("officer/officer/officers") %end; %end; %end; %else; %item.10; %( godparents and witness %) %end; %end; %if;(item.11!="") %item.11; %( note %) %end; |
||