%doctype;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <!-- $Id: anclist.txt, Template x v 6.05d 2012/06/02 12:00:00 ddr/dd Exp $ -->
  <!-- copyright (c) 1998-2012 INRIA -->
  <title>%nn;
    %if;(evar.t = "F")- [*surnames list] -%nn;
    %else
      %apply;a_of_b%with;
        %if;(evar.t = "M")[*missing ancestors]%else;[*ancestors]%end;
      %and;
        %if;(public_name != "")%public_name;%else;%first_name;%end;
        %if;(qualifier != "") %qualifier;%end;
        %sp;%surname;
      %end;
    %end;
  </title>
  <meta name="robots" content="none"%/>
  <meta http-equiv="Content-Style-Type" content="text/css"%/>
  <meta http-equiv="Content-Type" content="text/html; charset=%charset;"%/>
  <link rel="shortcut icon" href="%image_prefix;/favicon_gwd.png"%/>
%include.css;
  <style type="text/css"><!--
  --></style>
%base_header;
</head>

%define;image_sosa(xxx,yyy)
  <img src="%image_prefix;/sosa.png" width="10" height="10"%sp;
    style="border: none" alt=""%sp;
    title="%if;(yyy=1)%else;[direct ancestor of %s:::xxx], %end;[*Sosa] yyy"%/>%nn;
%end;

%define;display_sosa(xx)
  %if;(bvar.display_sosa="" or bvar.display_sosa="yes")
    %if;xx.has_sosa;
      %if;not cancel_links;<a href="%prefix;%xx.sosa_link;">%end;
      %apply;image_sosa%with;%sosa_ref.first_name_key_strip;%sp;
                             %sosa_ref.surname_key_strip;
                        %and;%xx.sosa;%end;
      %if;not cancel_links;</a>%end;%sp;
    %end;
  %end;
%end;

%define;image_MF(xx,wi_he)
  %if;(wizard and not cancel_links and not xx.is_restricted)
    <a href="%prefix;m=MOD_IND;i=%xx.index;">%end;
  %if;xx.is_male;
    <img src="%image_prefix;/male.png" title="[M/F]0"%sp;
  %elseif;xx.is_female;
    <img src="%image_prefix;/female.png" title="[M/F]1"%sp;
  %else;
    <img src="%image_prefix;/sexunknown.png" title="?"%sp;
  %end;
         width="wi_he" height="wi_he" style="border: none" alt=""%/>%nn;
  %if;(wizard and not cancel_links and not xx.is_restricted)</a>%end;
  %sp;
%end;

%define;display_2arrows()
  %if;not cancel_links;
    <table style="float: %right;" border="%border;"><tr><td>
      %if;has_referer;
        <a href="%referer;"><img style="border-width: thin" alt="" title="&lt;&lt;"%sp;
          src="%image_prefix;/left.png"%wid_hei;left.png;%/></a>
      %end;
      <a href="%prefix;"><img style="border-width: thin" alt="" title="^^"%sp;
        src="%image_prefix;/up.png"%wid_hei;up.png;%/></a>
    </td></tr></table>
  %end;
%end;

%define;short_display_person(xx)
  %apply;display_sosa("xx")
  %if;(cancel_links or xx.is_restricted)%xx;
  %else;<a href="%prefix;%xx.access;">%xx;</a>%end;%sp;
  %xx.title;%xx.dates;%if;xx.birthday; ([happy birthday to you!])%end;
%end;

%define;tothegen(xx)
  [*to the %s generation:::xx]%nn;
%end;

%define;togena(xx)
  %if;(xx = 1)[*specify::generation/generations]0%nn;
  %elseif;(xx = 2)[*to the parents]%nn;
  %elseif;(xx = 3)[*to the grandparents]%nn;
  %elseif;(xx = 4)[*to the great-grandparents]%nn;
  %else;
    %apply;tothegen%with;
      %apply;nth([nth (generation)], xx)
    %end;
  %end;
%end;

%define;ancestors_by_list(xx, nnn)
  %if;(xx.has_parents and nnn > 1)
    <ul>
    <li style="list-style-type:square">%apply;image_MF("xx.father","13")
      %apply;short_display_person("xx.father")%nl;
      %apply;ancestors_by_list("xx.father", nnn - 1)</li>
    <li style="list-style-type:circle">%apply;image_MF("xx.mother","13")
      %apply;short_display_person("xx.mother")%nl;
      %apply;ancestors_by_list("xx.mother", nnn - 1)</li>
    </ul>
  %end;
%end;

%define;ancestors_horizontally(xx, nnn, ss1, ss2, ss3)
  %if;(nnn > 0)
    %if;(xx.has_parents)
      %apply;ancestors_horizontally(
        "xx.father", nnn - 1, "ss1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",
        "ss1+----", "ss1|&nbsp;&nbsp;&nbsp;&nbsp;")
    %end;
    <tt>ss2</tt>%apply;image_MF("xx","13")
    %apply;short_display_person("xx")<br%/>
    %if;(xx.has_parents)
      %apply;ancestors_horizontally(
        "xx.mother", nnn - 1, "ss3|&nbsp;&nbsp;&nbsp;&nbsp;",
        "ss3+----", "ss3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")
    %end;
  %end;
%end;

<body%body_prop;>
%let;central_index;%index;%in;
%let;central_person;%first_name_key_strip;%sp;%surname_key_strip;%in;
%message_to_wizard;

<h1>%nn;
  %if;(evar.t = "F")
    %if;(public_name != "")%public_name;%else;%first_name;%end;
    %if;(qualifier != "") <em>%qualifier;</em>%end;
    %sp;%surname;
    %if;(alias != "") <em>(%alias;)</em>%end;<br%/>
    - [*surnames list] -
  %else;
    %apply;a_of_b%with;[*ancestors]%and;
      %if;(public_name != "")%public_name;%else;%first_name;%end;
      %if;(qualifier != "") <em>%qualifier;</em>%end;
      %sp;%surname;
      %if;(alias != "") <em>(%alias;)</em>%end;
    %end;
    %if;(evar.t = "D") [up to] %pvar.1;%end;
  %end;
</h1>

%apply;display_2arrows()

%if;(evar.t = "L")
  %( by list %)
  %let;xx;
    %if;(bvar.max_anc_level = "")%apply;min(evar.v, max_anc_level, 7)
    %else;%apply;min(evar.v, max_anc_level, bvar.max_anc_level)%end;
  %in;
  <p>
  %apply;togena(xx).
  </p>
  %apply;ancestors_by_list("self", xx)
%elseif;(evar.t = "H")
  %( horizontally %)
  %let;xx;
    %if;(bvar.max_anc_level = "")%apply;min(evar.v, max_anc_level, 7)
    %else;%apply;min(evar.v, max_anc_level, bvar.max_anc_level)%end;
  %in;
  <p>
  %apply;togena(xx).
  </p>
  <table><tr><td style="white-space:nowrap">
    %apply;ancestors_horizontally(
    "self", xx, "&nbsp;&nbsp;&nbsp;&nbsp;", "====", "&nbsp;&nbsp;&nbsp;&nbsp;")
  </td></tr></table>
%elseif;(evar.t = "F")
  %( surnames list %)
  <ul>
  %foreach;ancestor_surname(evar.v)
    <li>%nn;
    %if;cancel_links;%ancestor.surname_end;%ancestor.surname_begin;%nn;
    %else;<a href="%prefix;m=DAG;%ancestor.sosa_access;">%nn;
    %ancestor.surname_end;%ancestor.surname_begin;</a>%end;
    %if;(ancestor.nb_times > 1) (%ancestor.nb_times;)%end;
    ; %ancestor.place;
    ; %ancestor.date_begin.year;-%ancestor.date_end.year;</li>
  %end;
  </ul>
%end;

%base_trailer;
%copyright;
</body>
</html>