%include;css
%include;hed %message_to_wizard;
%include;home

# [*history of updates]

%define;search_form() %if;(wizard or friend) %hidden; %if;(e.m="HIST_SEARCH" and found) %end;
[*number of rows]
[*search/case sensitive]1
%end; %end; %let;kk;%if;(e.k="")3%else;%e.k%end;%in; %let;wiz;%if;(e.wiz!="" and e.n="")%e.wiz;%end;%in; %define;table()

[*date/dates]0 | [*person/persons]0 | [*wizard/wizards/friend/friends/exterior]0 | [*update] %if;(bvar.history_diff="yes") | %end;
--- | --- | --- | --- | ---
%foreach;history_line(kk, e.pos, wiz)
%time; | %if;(first_name!="") %person;, %person.title; %person.dates; %if;(b.show_invisible="on" and wizard and person.is_invisible) %nn; %end; %elseif;is_note; - %if;(note.page="")[note/notes]1%else;%[%note.page;%]%end; %if;(note.part!="")- #%note.part; %nn; %end; %else; %key; %end; | %if;(user!="") %if;(wiz="") %user;%nn; %else; %user; %end; %end; | %apply;update_text(update.var) %if;(b.history_diff="yes") | %if;(first_name!="" and person.has_history) [history] %else; %end; %end;
%end;

%end; %define;update_text(uu) %if;(uu = "ap")[add::person/persons]0%nn; %elseif;(uu = "mp")[modify::person/persons]0%nn; %elseif;(uu = "dp")[delete::person/persons]0%nn; %elseif;(uu = "fp")[merge::person/persons]1%nn; %elseif;(uu = "si")[send::portrait]%nn; %elseif;(uu = "sb")[send::image/images]0 note and source [to carrousel]%nn; %elseif;(uu = "so")[send::image/images]0 [to carrousel]%nn; %elseif;(uu = "sc")[send::note/notes]0 [to carrousel]%nn; %elseif;(uu = "ss")[send::source/sources]0 [to carrousel]%nn; %elseif;(uu = "di")[delete::portrait]0%nn; %elseif;(uu = "do")[delete::image/images]0 [from carrousel]%nn; %elseif;(uu = "af")[add::family/families]0%nn; %elseif;(uu = "mf")[modify::family/families]0%nn; %elseif;(uu = "df")[delete::family/families]0%nn; %elseif;(uu = "if")[invert::family/families]1%nn; %elseif;(uu = "ff")[merge::family/families]1%nn; %elseif;(uu = "cn")[change children's names]%nn; %elseif;(uu = "aa")[add::parents]%nn; %elseif;(uu = "mn")[modify::note/notes]1%nn; %elseif;(uu = "cp")[modify::place]%nn; %elseif;(uu = "cs")[modify::source/sources]0%nn; %elseif;(uu = "co")[modify::occupation/occupations]0%nn; %elseif;(uu = "fn")[modify::first name/first names]0%nn; %elseif;(uu = "sn")[modify::surname/surnames]0%nn; %else;%apply;interp(uu) %nn; %end; %end; %define;nav() %if;(pos!="") %hidden;
%if;(wiz!="") ([wizard/wizards/friend/friends/exterior]0[:] %wiz;) %end;
%end; %end; %if;(not cancel_links and (e.m!="HIST_SEARCH" or not found))
%apply;search_form()
%apply;table()
%apply;nav()
%end; %apply;table() %if;(e.m="HIST_SEARCH" and found)
%apply;search_form() %apply;nav()
%end; %base_trailer; %include;copyr
%include;js