%doctype;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <!-- $Id: perso.txt,v 5.15 2007-07-25 15:01:02 ddr Exp $ -->
  <!-- Copyright (c) 1998-2007 INRIA -->
  <title>%nn;
    %if;has_public_name;
      %if;has_qualifiers;%public_name; %qualifier;
      %else;%public_name; %surname;%end;
    %else;
      %if;has_qualifiers;%first_name; %qualifier;
      %else;%first_name; %surname;%end;
    %end;
  </title>
  <meta http-equiv="Content-Style-Type" content="text/css"%/>
  <meta http-equiv="Content-Type" content="text/html; charset=%charset;"%/>
  <meta name="robots" content="none"%/>
  <link rel="shortcut icon" href="%image_prefix;/favicon_gwd.png"%/>
  %include.css;
  %base_header;
</head>
<body%body_prop;>

%( Because Safari mobile is just a great browser that can't handle events... %)
%( Added a div with an 'empty event' to handle the modify menu.              %)
<div onclick="void(0);">

%let;central_index;%index;%in;
%message_to_wizard;

%define;show_templ(tpl)
  %include.tpl;
%end;

%define;get_templ(tplnum)
  %let;templ;perso_module/%bvar.perso_module_tplnum;%in
  %apply;show_templ(templ)
%end;

%( initialise le compteur à/avec la valeur passée en paramètre %)
%define;init_count(prev_count)
  %reset_count;
  %for;i;0;prev_count;
    %incr_count;
  %end;
%end;

%define;li_SD(xx)
  <li style="vertical-align: middle;list-style-type: %nn;
    %if;xx.has_parents;disc%else;circle%end;">%nn;
%end;

%define;li_SDC(xx)
  %if;xx.has_families;
    %reset_count;
    %foreach;family;
      %if;(nb_children>0)%incr_count;%end;
    %end;
  %end;
  <li style="vertical-align: middle;list-style-type: %nn;
    %if;xx.has_families;%if;(count!=0)square%else;disc%end;%else;circle%end;;">%nn;
%end;

%define;image_MF(xx,wi_he)
  %if;(xx != "x x")
    %if;xx.is_male;
      <img width="wi_he" height="wi_he" src="%image_prefix;/male.png"%sp;
           style="border: none" alt="[M/F]0"%/>%nn;
    %elseif;xx.is_female;
      <img width="wi_he" height="wi_he" src="%image_prefix;/female.png"%sp;
           style="border: none" alt="[M/F]1"%/>%nn;
    %else;
      <img width="wi_he" height="wi_he" src="%image_prefix;/sexunknown.png" 
           style="border: none" alt="?" title="?"%/>%nn;
    %end;
    %sp;
  %end;
%end;

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

%define;display_sosa(xx)
  %if;(xx.has_sosa and bvar.display_sosa="yes")
    %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;

%define;nav_with_sosa_ref(xxx)
  [*navigation with %t as Sosa reference:::xxx].
%end;

%define;witness_relation(xxx, yyy)
  [*witness at marriage of %s and %s:::xxx:yyy]
%end;

%define;short_display_person(xx)
  %apply;display_sosa("xx")
  %if;(xx.index=central_index)<b>%xx;</b>%else;
    %if;(cancel_links or xx.is_restricted)%xx;
    %else;<a href="%prefix;%xx.access;">%xx;</a>%end;
  %end;
  %xx.title;%xx.dates;
%end;

%define;long_display_person(xx)
  %apply;display_sosa("xx")
  %if;(xx.index=central_index)<b>%xx;</b>%else;
    %if;(cancel_links or xx.is_restricted)%xx;
    %else;<a href="%prefix;%xx.access;">%xx;</a>
    %end;
    %if;xx.has_nobility_titles;
      %foreach;xx.nobility_title;, %nobility_title;%end;
    %end;
  %end;
  <span style="font-size: 90%%">%nn;
    %if;xx.has_birth_date;, %apply;nth([born],xx.sex) %xx.on_birth_date;
      %if;xx.birthday; ([happy birthday to you!])%end;
      %if;xx.has_birth_place; - %xx.birth_place;%end;
    %else;
      %if;xx.has_birth_place;, %apply;nth([born],xx.sex) - %xx.birth_place;%end;
    %end;
    %if;xx.has_baptism_date;, %apply;nth([baptized],xx.sex) %xx.on_baptism_date;
      %if;xx.has_baptism_place; - %xx.baptism_place;%end;
    %else;
      %if;xx.has_baptism_place;, %apply;nth([baptized],xx.sex) - %xx.baptism_place;%end;
    %end;
    %if;xx.computable_age;, [age] : %xx.age; %end;
    %if;xx.is_dead;, %xx.died;
      %if;xx.has_death_date; %xx.on_death_date;%end;
      %if;xx.has_death_place; - %xx.death_place;%end;
      %if;xx.computable_death_age; [age at death:] %xx.death_age;%end;
    %end;
    %if;xx.is_buried; , %apply;nth([buried],xx.sex)%sp;
      %if;xx.has_burial_date; %xx.on_burial_date;%end;
      %if;xx.has_burial_place; - %xx.burial_place;%end;
    %end;
    %if;xx.is_cremated; , %apply;nth([cremated],xx.sex)%sp;
      %if;xx.has_cremation_date; %xx.on_cremation_date;%end;
      %if;xx.has_cremation_place; - %xx.cremation_place;%end;
    %end;
    %if;xx.has_occupation;, %apply;capitalize(xx.occupation)%end;
    %if;(xx.has_consanguinity and bvar.show_consang!="no"),%sp;
      [consanguinity] : %xx.consanguinity;%end;
  </span>
%end;

%define;married_to(sexx, date_place)
  %if;(sexx = 0 or sexx = 2)
    %if;are_married;[*married%t to:::date_place]0%nn;
    %elseif;are_not_married;[*relationship%t to:::date_place]0%nn;
    %elseif;are_engaged;[*engaged%t to:::date_place]0%nn;
    %elseif;is_no_sexes_check;[*relationship%t to:::date_place]0%nn;
    %elseif;is_no_mention;date_place [*with]%nn;
    %end;
  %else;
    %if;are_married;[*married%t to:::date_place]1%nn;
    %elseif;are_not_married;[*relationship%t to:::date_place]1%nn;
    %elseif;are_engaged;[*engaged%t to:::date_place]1%nn;
    %elseif;is_no_sexes_check;[*relationship%t to:::date_place]1%nn;
    %elseif;is_no_mention;date_place [*with]%nn;
    %end;
  %end;
%end;

%define;long_married(xx)
  %apply;married_to%with;%xx.sex%and;
    %if;(marriage_place = "")
      %if;(on_marriage_date = "")
      %else; <em>%on_marriage_date;
        %if;wedding_birthday; ([happy birthday to them!])%end;
        </em>
      %end;
    %else;
      %if;(on_marriage_date = "")<em>, %marriage_place;, </em>
      %else; <em>%on_marriage_date;
        %if;wedding_birthday; ([happy birthday to them!])%end;
        , %marriage_place, </em>
      %end;
    %end;
  %end;
%end;

%define;short_display_siblings()
  %apply;li_SDC("child")
    %apply;image_MF("child","13")
    %apply;short_display_person("child")
  </li>
%end;

%define;long_display_siblings()
  %apply;li_SDC("child")
    %apply;image_MF("child","13")
    %apply;short_display_person("child")
    %if;child.has_families;
      %foreach;child.family;
        %if;(family_cnt!=1)
          <br%/><img src="%image_prefix;/1pixel.png" width="13" height="13" alt=""%/>
          <em>%child;%child.title;%child.dates;</em>
        %end;
        <em> %apply;long_married("child")</em>
        %apply;short_display_person("spouse")
      %end;
    %end;
  </li>
%end;


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


<h1>
  %apply;image_MF("self", "")
  %if;has_public_name;
    %if;has_qualifiers;%public_name; <em>%qualifier;</em>
    %else;%public_name; %surname;%end;
  %else;
    %if;has_qualifiers;%first_name; <em>%qualifier;</em>
    %else;
      %if;cancel_links;%first_name; %surname;
      %else;
        <a href="%prefix;m=P;v=%first_name_key;">%first_name;</a>
        <a href="%prefix;m=N;v=%surname_key;">%surname;</a>
      %end;
    %end;
  %end;
  %if;(wizard)
    &nbsp;
    <a href="%prefix;m=MOD_IND;i=%index;;">
      <img class="modify_family" src="%image_prefix;/picto_molette.png" width="13" height="13" title="[modify::person/persons]0"%/>
    </a>
  %end;
</h1>

%if;(has_sosa or has_qualifiers or has_aliases or has_nobility_titles or
     has_public_name or has_surnames_aliases or has_first_names_aliases or
     has_linked_page.HEAD)
  <table style="width:100%%" border="%border;"><tr><td align="center">
  <table border="%border;" cellspacing="0" cellpadding="0">
  <tr><td>
  %if;has_sosa;
    <img src="%image_prefix/sosa.png" alt="sosa" title="sosa"/>
    <em>[*Sosa]:
    %if;cancel_links;%sosa;
    %else;<a href="%prefix;%sosa_link;">%sosa;</a>%end;
    </em><br%/>
  %end;
  %foreach;qualifier;
    %if;not is_first;
      %if;has_public_name;%public_name; %qualifier;
      %else;%first_name; %qualifier;%end;<br%/>
    %end;
  %end;
  %foreach;alias;
    <em><strong>%alias;</strong></em><br%/>
  %end;
  %if;has_nobility_titles;
    <em>
    %foreach;nobility_title;
      %if;not is_first;,
      %end;
      %nobility_title;
    %end;
    </em><br%/>
  %end;
  %if;has_linked_page.HEAD;%linked_page.HEAD;<br%/>%end;
  %if;(has_public_name or has_qualifiers)
    <em>(%if;cancel_links;%first_name; %surname;
         %else;
           <a href="%prefix;m=P;v=%first_name_key;">%first_name;</a>
           <a href="%prefix;m=N;v=%surname_key;">%surname;</a>%nn;
         %end;)</em><br%/>
  %end;
  %foreach;surname_alias;
    <em>(%first_name; %surname_alias;)</em><br%/>
  %end;
  %foreach;first_name_alias;
    <em>(%first_name_alias; %surname;)</em><br%/>
  %end;
  </td></tr>
  </table>
  </td></tr></table>
  <p></p>
%end;


%if;wizard;
  <div class="select" style="float:right">
    <span><span style="background-image:url(%image_prefix;/picto_molette.png);background-repeat:no-repeat;padding:3px 0px 3px 25px;">[*modify]</span></span>
    <ul>
      <li class="title"><span>[*person/persons]0</span></li>
      <li><a href="%prefix;m=MOD_IND;i=%index;">[*update]</a></li>
      %if;(not has_parents and first_name != "?" and surname != "?")
        <li><a href="%prefix;m=ADD_PAR;ip=%index;">[*add::parents]</a></li>
      %end;
  
      %if;(bvar.can_send_image != "no" and image = "" and first_name != "?" and surname != "?")
        <li><a href="%prefix;m=SND_IMAGE;i=%index;" class="add_portrait">%if;(auto_image_file_name != "")[*modify picture]%else;[*add picture]%end;</a></li>
      %end;
  
      <li class="title"><span>[*family/families]0</span></li>
      <li><a href="%prefix;m=U;%access;">[*update]</a></li>
  
      %if;((first_name = "?" or surname = "?") and (nb_families != 0 or has_parents))
      %elseif;(not is_male and not is_female)
        <li><a href="%prefix;m=ADD_FAM;ip=%index;;sex=M">%nn;[*add::marriage/marriages]0 ([M/F]0)</a></li>
        <li><a href="%prefix;m=ADD_FAM;ip=%index;;sex=F">%nn;[*add::marriage/marriages]0 ([M/F]1)</a></li>
      %else;
        <li><a href="%prefix;m=ADD_FAM;ip=%index;">%nn;[*add::marriage/marriages]0</a></li>
      %end;
    </ul>
  </div>
%end;

%if;(bvar.perso_module_tplnb="" or bvar.perso_module_tplnb=0)
  %apply;show_templ("perso_module/etat_civil")
  %apply;show_templ("perso_module/parent_simple")
  %apply;show_templ("perso_module/union_simple")
  %apply;show_templ("perso_module/freresoeur_simple")
  %apply;show_templ("perso_module/relations")
  %apply;show_templ("perso_module/notes")
  %apply;show_templ("perso_module/sources")
  %apply;show_templ("perso_module/arbre_3gen_v_photo")
%else;
  %for;i;0;bvar.perso_module_tplnb;
    %apply;get_templ(i)
  %end;
%end;

<p></p>


<div id="navigation">
  <h3>[*navigation]</h3>
  %if;not cancel_links;
    <ul class = "li_left">
      %if;has_parents;
        <li>
        <a href="%prefix;m=A;%access;"
         class="highlight">[*ancestors]</a></li>
      %end;
      %if;has_children;
        <li>
        <a href="%prefix;m=D;%access;"
         class="highlight">[*descendants]</a></li>
      %end;
    </ul>
    <ul class = "li_left">
      %if;has_parents;
        %foreach;father.child;
          %if;is_sibling_before;
            <li>
            <a href="%prefix;%child.access;" class="highlight">%nn;
            %apply;capitalize(nth([previous sibling],sex))</a></li>
          %end;
          %if;is_sibling_after;
            <li>
            <a href="%prefix;%child.access;" class="highlight">%nn;
            %apply;capitalize(nth([next sibling],sex))</a></li>
          %end;
        %end;
      %end;
    </ul>
    <ul class = "li_left">
      <li>
        <a href="%prefix;m=R;%access;"
         class="highlight" accesskey="R">[*relationship computing]</a>
      </li>
      %if;(bvar.history_diff="yes" and has_history)
        <li>
          <a href="%prefix;m=HIST_DIFF;t=SUM;f=%history_file;" class="highlight">[*history of updates]</a>
        </li>
      %end;
    </ul>
  %end;
</div>

%if;(evar.opt = "misc")%misc_names;<p>%end;


%base_trailer;
%copyright;

</div> %( the magic Safari div %)
</body>
</html>
