<!-- $Id: templm/ancsosa_deslist.txt v7.0 2015/01/15 21:11:34 $ -->

  %let;ldsp;%if;(evar.hide="on")dsp0%else;dsp1%end;%in;
  <style id="style0" type="text/css">.dsp0{display:none}</style>
  <style id="style1" type="text/css">.dsp1{display:block}</style>
  <script type="text/javascript">
    <!--
    function dsp01(z1)
    {
      var e = document.getElementById(z1);
      var g = e.getAttribute("class","false");
      if(g == "dsp1")
      {e.setAttribute("class","dsp0","false");}
      else
      {e.setAttribute("class","dsp1","false");}
    }
    function dspAll()
    {
      document.getElementById("style0").firstChild.data = ".dsp0{display:block}";
      document.getElementById("style1").firstChild.data = ".dsp1{display:block}";
    }
    function dspNone()
    {
      document.getElementById("style0").firstChild.data = ".dsp0{display:none}";
      document.getElementById("style1").firstChild.data = ".dsp1{display:none}";
    }
    function dsp()
    {
      document.getElementById("style0").firstChild.data = ".dsp0{display:none}";
      document.getElementById("style1").firstChild.data = ".dsp1{display:block}";
    }

    -->
  </script>
    
%if;(not cancel_links)
  <div class="menu">
    %let;l1;title="(Y)" accesskey="Y"%end;%in;
    <span><a href="javascript:;" onclick="javascript:dspAll()">[visualize/show/hide/summary]1</a></span>
    <span><a href="javascript:;" onclick="javascript:dspNone()">[visualize/show/hide/summary]2</a></span>
    <span><a href="javascript:;" onclick="javascript:dsp()">…</a></span>
    %if;(evar.i1 = "" and evar.p1 = "")
      %if;(evar.m = "D" and has_parents)
        <span><a %l1; href="%prefix_base_password;%if;(evar.lang != "")lang=%evar.lang;&%end;
          %foreach;env_binding;
            %if;(env.key = "m")m=A&%elseif;(env.key = "t")t=G&%else;%env.key;=%env.val.decoded;&%end;
          %end;
        ">[*ancestor/ancestors]1</a></span>
      %end;
      %if;(evar.m = "A" and has_children)
        <span><a %l1; href="%prefix_base_password;%if;(evar.lang != "")lang=%evar.lang;&%end;
          %foreach;env_binding;
            %if;(env.key = "m")m=D&%elseif;(env.key = "t")t=L&%else;%env.key;=%env.val.decoded;&%end;
          %end;
        ">[*descendants]0</a></span>
      %end;
    %end;
  </div>
%end;

%let;lchild;%if;(evar.nosurn = "on")child_name%else;child%end;%in;
%let;lupd;%if;(wizard and not cancel_links and evar.upd = "on")1%end;%in;
%let;ltaf;%if;(wizard and not cancel_links) title="[add::family/families]0" %end;%in;
%let;ltap;%if;(wizard and not cancel_links) title="[add::parents]" %end;%in;
%let;ltmf;%if;(wizard and not cancel_links) title="[modify::family/families]0" %end;%in;
%let;ltmp;%if;(wizard and not cancel_links) title="[modify::person/persons]0" %end;%in;

%define;link_dates(z1)
  %if;(lupd = "1")
    <a id="m%count;" class="date" href="#m%count;" %ltmp;
      onclick="window.open('%prefix;m=MOD_IND;i=%z1.index;');"
    >%z1.dates;%nn;%if;(z1.dates = "") - %end;</a>%nn;
    %if;("z1" = "ancestor" or "z1" = "child" or "z1" = "self")
      %sp;<a style="color:#FF0000;" href="#m%count;" %ltaf;
        onclick="window.open('%prefix;m=ADD_FAM;ip=%z1.index;');"
      ><span class="add">&amp;&amp;</span></a>%nn;
    %end;
  %else;
    %z1.dates;%nn;
  %end;
%end;

%define;link1(z1,z2)
  %incr_count;
  <strong><a id="p%count;" href="%if;(cancel_links or z1.is_restricted)#p%count;%else;%prefix;%z1.access;%end;"
  >%z2;</a></strong>%nn;
%end;

%define;link2(z1)
  %incr_count;
  %if;(cancel_links or z1.is_restricted)%z1;
  %else;
    <a href="%prefix;%z1.access;">%z1;</a>%nn;
  %end;
  %z1.title;%apply;link_dates("z1")
%end;

%define;link_parents()
  %if;(evar.only != "on" and ancestor.father_sosa != "")
    <a id="s%ancestor.anc_sosa.v;" href="#s%ancestor.father.anc_sosa.v;"
       title="[father/mother]0 : %ancestor.father_sosa;"><strong>%ancestor.anc_sosa;</strong></a>%nn;
  %elseif;(lupd = "1" and not ancestor.has_parents and
    ancestor.first_name != "?" and ancestor.surname != "?")
    <a style="color: rgb(255,0,0);" href="#s%ancestor.anc_sosa.v;"
       onclick="window.open('%prefix;m=ADD_PAR;ip=%ancestor.index;');" %ltap;
       ><strong>%ancestor.anc_sosa;</strong></a>%nn;
  %else;
    <strong id="s%ancestor.anc_sosa.v;">%ancestor.anc_sosa;</strong>%nn;
  %end;
%end;

%define;somebody_info1(z1)
  %if;z1.has_qualifiers;
    %apply;lazy_print(", ")
    %foreach;z1.qualifier;
      %if;not is_first;
        %if;(lazy_printed)/%end;
        %lazy_force;
        %qualifier;%nn;
      %end;
    %end;
  %end;
  %if;z1.has_aliases;
    %apply;lazy_print(", ")
    %foreach;z1.alias;
      %if;(lazy_printed)/%end;
      %lazy_force;
      <em><strong>%alias;</strong></em>%nn;
    %end;
  %end;
  %if;(z1.has_nobility_titles)
    <em>%foreach;z1.nobility_title;, %nobility_title;%end;</em>%nn;
  %end;
  %if;(z1.has_linked_pages and z1.has_linked_page.HEAD), %z1.linked_page.HEAD;%end;
  %if;(z1.has_public_name or z1.has_qualifiers), <em>(%z1.first_name; %z1.surname;)</em>%end;
  %if;(evar.alias="on" and (z1.has_first_names_aliases or z1.has_surnames_aliases))
    <small>%nn;
    %if;z1.has_first_names_aliases;
      %apply;lazy_print(", ")
      %foreach;z1.first_name_alias;
        %if;(lazy_printed)/%end;
        %lazy_force;
        %first_name_alias;%nn;
      %end;
    %end;
    %if;z1.has_surnames_aliases;
      %apply;lazy_print(", ")
      %foreach;z1.surname_alias;
        %if;(lazy_printed)/%end;
        %lazy_force;
        %surname_alias;%nn;
      %end;
    %end;
    </small>%nn;
  %end;
  %if;z1.has_occupation;, <span class="highlight1">%z1.occupation;</span>%end;
  %if;(z1.has_linked_pages and z1.has_linked_page.OCCU), %z1.linked_page.OCCU;%end;
  %apply;link_dates("z1")
%end;

%define;somebody_info2(z1)
  %if;(not cancel_links)  <a href="javascript:;" onclick="javascript:dsp01('d%count;');this.focus();"> … </a>%end;
  <div id="d%count;" class="%ldsp;">
    %if;(evar.image!="off" and z1.has_image)
      <img class="image" src="%z1.image_url;" alt="[image/images]0" title="%z1;">%nn;
    %end;
  <dl class="inot">
    %foreach;z1.event;
      <dt>
        %apply;capitalize(event.name)
        %if;event.has_date; · %event.on_date;%nn;
          %if;(bvar.event_age = "yes" and event.age != "") · %event.age;%nn;
          %elseif;(event.name = [birth] and z1.computable_age) · %z1.age;%nn;
          %elseif;(event.age != "" and event.name = [death]) · %event.age;%nn;
          %end;
        %end;
        %if;event.has_place; · %event.place;%end;
        %if;event.has_spouse; · [with] %event.spouse;%end;
      </dt>
      %if;(event.name = [death] and has_linked_page.DEATH)
        <dd>%linked_page.DEATH;</dd>
      %end;
      %if;(evar.witn = "on" and event.has_witnesses)
        <dd>[*witness/witnesses]1 :
        %foreach;event_witness;
          %if;(not is_first), %nl;%end;
          %apply;link2("event_witness")
        %end;
        </dd>
      %end;
      %if;(event.has_note and evar.notes = "on")
        <dd><table><tbody><tr><td>%event.note;</td></tr></tbody></table></dd>
      %end;
    %end;
  </dl>
  %if;(evar.rel = "on" and z1.has_relations)
    <p class="isrc">
      [*relation/relations]1
      %foreach;z1.relation;
        <i> • %relation_type; : </i>
          %if;has_relation_him;
            %apply;link2("relation_him")
            %if;has_relation_her; [and] %end;
          %end;
          %if;has_relation_her;
            %apply;link2("relation_her")
          %end;
      %end;
      %foreach;z1.related;
        <i> • %related_type; : </i>%apply;link2("related")
      %end;
      %foreach;z1.event_witness_relation;
        <i> • %event_witness_relation.event.name;
          %if;event_witness_relation.event.has_date; · %event_witness_relation.event.date;%end;
          %if;event_witness_relation.event.has_place; · %event_witness_relation.event.place;%end; : </i>
          %apply;link2("event_witness_relation.person")
          %if;(event_witness_relation.event.spouse != "") [and] %apply;link2("event_witness_relation.event.spouse")%end;
      %end;
    </p>
  %end;
  %if;(evar.notes = "on")
    %if;(z1.has_notes or z1.has_linked_page.BNOTE or z1.has_linked_page.NOTE)
      <div class="inot"><table><tbody><tr><td>
        %if;z1.has_linked_page.BNOTE;&gt;&gt; %z1.linked_page.BNOTE;<br>%end;
        %if;z1.has_notes;%z1.notes;%end;
        %if;z1.has_linked_page.NOTE;&gt;&gt; %z1.linked_page.NOTE;%end;
      </td></tr></tbody></table></div>
    %end;
  %end;
  %if;(evar.src = "on")
    %apply;lazy_print%with;
      <p class="isrc">
      [*source/sources]1
    %end;
    %if;(z1.has_sources or z1.has_linked_page.BIBLIO)
      %if;(z1.has_linked_page.BIBLIO)%lazy_force;&gt;&gt; %z1.linked_page.BIBLIO;%end;
      %if;(z1.has_sources)
        %foreach;z1.source;
          %if;(source_type = [person/persons]0 or source_type = [family/families]0)
            %lazy_force;
            <i> • %source_type; : </i>%source;
          %end;
        %end;
      %end;
    %end;
    %foreach;z1.event()
      %if;event.has_src;
        %lazy_force;
        <i> • %event.name;%if;(event.has_spouse) [with] %event.spouse;%end; : </i>%event.src;
      %end;
    %end;
    %if;lazy_printed;</p>%else;%apply;lazy_print("")%end;
  %end;
  %if;(evar.image!="off" and z1.has_image)<div style="clear:both;"></div>%end;
  </div>
%end;

%define;somebody_spouse_parent()
  %if;(evar.parents = "on")
    %if;(spouse.has_parents)
      <br><small>[parents] : %apply;link2("spouse.father") [and] %apply;link2("spouse.mother")</small>
    %elseif;(lupd = "1")
      %sp;<a href="#m%count;" %ltap;
      onclick="window.open('%prefix;m=ADD_PAR;ip=%spouse.index;');"><span class="add">--</span></a>
    %end;
  %end;
%end;

%define;marriage_info()
  %if;(lupd = "1")
    <a id="f%count;i%family.index;" class="date" href="#f%count;i%family.index;" %ltmf;
      onclick="window.open('%prefix;m=MOD_FAM&i=%family.index;&ip=%index;&');">%nn;
      &amp;%marriage_date.prec;%marriage_date.year;</a>
  %else;
    &amp;%if;(marriage_date.prec != "")%marriage_date.prec;%end;%if;(marriage_date.year != "")%marriage_date.year;%end;%sp;
  %end;
  %if;(evar.notes = "on" and has_comment)
    <div class="icom">%comment;</div>
  %end;
%end;
