<!-- $Id: buttons.txt v7.1 30/08/2023 15:51:15 $ -->
<!-- Copyright (c) 1998-2007 INRIA -->
%( Boutons de configurations et d'options %)
%define;urlset(xx,yy)
  %url_set.xx.yy;
%end;
%let;istable;%if;((evar.m="D" and (evar.t="H" or evar.t="I")) or (evar.m="A" and (evar.t="Z" or evar.t="Y")))1%end;%in;
<div class="button-group" role="group" aria-label="nav buttons">
  <a role="button" class="btn btn-link ml-1 mt-0 px-0"%sp;
    href="%prefix_base_password;%if;(evar.templ!="")&templ=%evar.templ;%end;&%access;&m=%evar.m;"><i class="fa fa-cog fa-lg fa-fw mr-1" aria-hidden="true"></i>%nn;
    [*options] %if;(evar.m="D")[descendants]%elseif;(evar.m="A")[ancestor/ancestors]1%end;%nn;
  </a>
  %let;cond;%if;((evar.m="A" and (evar.t="Z" or evar.t="X" or evar.t="Y")) or (evar.m="D" and evar.t="D" or evar.t="T"))1%end;%in;
  %let;root;%if;(evar.iz!="")&iz=%evar.iz;%end;%if;(evar.pz!="")&pz=%evar.pz;%end;%if;(evar.nz!="")&nz=%evar.nz;%end;%if;(evar.ocz!="" and evar.ocz!=0)&ocz=%evar.ocz;%end;%in;
  <span class="sr-only">—</span>
  <a role="button" class="btn btn-link ml-1 mt-0 px-0%if;(cond=1 and not has_children) disabled%end;"%sp;
  href="%prefix_base_password;%nn;
        %foreach;env_binding;
          %if;(env.key="m")&m=%if;(cond=1)D%else;A%end;%nn;
          %elseif;(env.key="t")&t=%if;(cond=1)H%else;Z%end;%nn;
          %elseif;(env.key="v")&v=%if;(evar.v="")1%else;%if;(cond=1)%expr(evar.v-1)%else;%expr(evar.v+1)%end;%end;%nn;
          %elseif;(env.key!="")&%env.key=%env.val;%nn;
          %end;%nn;
        %end;
        %if;(istable!=1)
          %if;(evar.num="")&num=on%end;%if;(evar.birth="")&birth=on%end;%nn;
          %if;(evar.birth_place="")&birth_place=on%end;%nn;
          %if;(evar.marr="")&marr=on%end;%if;(evar.marr_date="")&marr_date=on%end;%nn;
          %if;(evar.marr_place="")&marr_place=on%end;%if;(evar.child="")&child=on%end;%nn;
          %if;(evar.death="")&death=on%end;%if;(evar.death_place="")&death_place=on%end;%nn;
          %if;(evar.age="")&age=on%end;%if;(evar.occu="")&occu=on%end;%nn;
          %if;(e.gen="")&gen=1%end;%if;(evar.repeat="" and evar.m="A")&repeat=on%end;
          %if;(e.ns="")&ns=1%end;%nn;
        %end;
        ">%nn;
  <i class="fa fa-table fa-lg fa-fw mr-1" aria-hidden="true"></i>[*table] %if;(cond=1)[descendants]%else;[ancestor/ancestors]1%end;</a>
  <span class="sr-only">—</span>
  <a role="button" class="btn btn-link ml-1 my-0 px-0"%sp;
    href="%prefix_base_password;%if;(evar.templ!="")&templ=%evar.templ;%end;&%access;%root;&m=%evar.m;&t=T&v=%evar.v;%if;(e.im=0)&im=0%end;">%nn;
    <i class="fa fa-sitemap%if;(evar.m="A") fa-rotate-180%end; fa-fw mr-1" aria-hidden="true"></i>%if;(evar.m="D")[*descendants tree]%elseif;(evar.m="A")[*ascendants tree]%end;%nn;
  </a>
  <span class="sr-only">—</span>
  %let;cond2;%if;((evar.m="A" and evar.t!="H") or (evar.m="D" and evar.t="D"))1%end;%in;
  <a role="button" class="btn btn-link ml-1 my-0 px-0%if;(cond2!=1 and not has_children) disabled%end;"%sp;
    href="%prefix_base_password;%if;(evar.templ!="")&templ=%evar.templ;%end;&%access;%root;%nn;
          %if;(cond2=1)&m=A&t=H%nn;
          %else;&m=D&t=D%nn;
          %end;&v=%if;(evar.v="")1%else;%if;(cond2=1)%expr(evar.v+1)%else;%expr(evar.v-1);%end;%end;">%nn;
    <i class="fa fa-list fa-lg fa-fw mr-1" aria-hidden="true"></i>%nn;
    %if;(cond2=1)[*horizontal tree]%nn;
    %else;[*descendant tree view]%nn;
    %end;%nn;
  </a>
</div>
%define;size_btn(xxx,yyy)
    <a role="button" class="btn btn-link px-0%if;(e.csv=1 or e.t="Y" or e.im=0) disabled%end;"
      title="[*modify the size of images to] xxx px"
      href="%prefix_base_password;%nn;
             %foreach;env_binding;
               %if;(env.key!="px" and env.key!="")&%env.key=%env.val;%end;%nn;
             %end;&px=xxx">%nn;
      <i class="fa fa-image yyy" aria-hidden="true"></i>%nn;
    </a>
%end;
<div class="input-group ml-2">
  <div class="button-group" role="group" aria-label="nav buttons">
    %if;(istable=1)
      %( TODO allfn sur table/couple %)
      <a role="button" class="btn btn-link mx-0 px-0 mr-1 %if;(e.t="Y" or e.csv=1) disabled%end;"
        href="%if;(e.fn=1)%url_set.fn;%else;%url_set.fn.1;%end;" title="[*visualize/show/hide/summary]1 %if;(e.fn=1)[public name]%else;[first name/first names]1%end;">%nn;
        <i class="fas fa-address-%if;(e.fn=1)book%else;card%end; fa-fw fa-lg" aria-hidden="true"></i>%nn;
      </a>
      <a role="button" class="btn btn-link mx-0 px-0 mr-1 %if;(e.t="Y" or e.csv=1) disabled%end;%if;(e.tt=1) text-danger%end;"
        href="%if;(e.tt=1)%url_set.tt;%else;%url_set.tt.1;%end;" title="%if;(e.tt=0)[*visualize/show/hide/summary]2%else;[*visualize/show/hide/summary]1%end; [title/titles]1">%nn;
        <i class="fas fa-crown fa-fw fa-lg" aria-hidden="true"></i>%nn;
      </a>
      <a role="button" class="btn btn-link mx-0 px-0%if;(e.csv=1) disabled%end;%if;(e.im=0) text-danger%end;"
        href="%if;(e.im!=0)%url_set.im.0;%else;%url_set.im;%end;"
          title="%if;(e.im!=0)[*visualize/show/hide/summary]2%else;[*visualize/show/hide/summary]1%end; [image/images]1">%nn;
        <i class="fa fa-image fa-lg fa-fw" aria-hidden="true"></i>%nn;
      </a>
      <span class="sr-only">—</span>
      %apply;size_btn(60,"fa-sm")
      %apply;size_btn(90,"")
      %apply;size_btn(120,"fa-lg")
      %if;(e.templ="")
      <span class="sr-only">—</span>
      <a role="button" class="btn btn-link px-0%if;(e.ns=1) text-danger%end;%if;(e.t="Y" or e.csv=1) disabled%end;"
        title="%if;(e.ns=1)[*visualize/show/hide/summary]2%else;[*visualize/show/hide/summary]1%end; [note/notes]1 [and] [source/sources]1%if;(e.ns=""). [*colored corner]%end;"
        href="%if;(e.ns=1)%url_set.ns;%else;%url_set.ns.1;%end;">
        <i class="far fa-sticky-note fa-flip-vertical fa-lg fa-fw mb-1 mr-1" aria-hidden="true"></i>%nn;
        <span class="notecolor">[*note/notes]1</span> <span class="notesourcecolor">[and]</span> <span class="sourcecolor">[source/sources]1</span>%nn;
      </a>
      %end;
      %if;(e.m="D" and (e.marr="on" or e.marr_place="on" or e.marr_date="on"))
        <span class="sr-only">—</span>
        <a role="button" class="btn btn-link ml-1 px-0%if;(e.t!="I") text-danger%end;"
           href="%prefix_base_password;%nn;
                 %foreach;env_binding;
                   %if;(env.key="t")&t=%if;(e.t="H")I%elseif;(e.t="I")H%end;%nn;
                   %elseif;(env.key!="")&%env.key=%env.val;%end;%nn;
                 %end;"
           title="%if;(e.t="H")[*visualize/show/hide/summary]1%else;[*visualize/show/hide/summary]2%end; [spouses info]">%nn;
          <i class="fas fa-info fa-lg mr-1" aria-hidden="true"></i><i class="fa fa-male" aria-hidden="true"></i><i class="fa fa-female" aria-hidden="true"></i>
        </a>
      %end;
      <a role="button" class="btn btn-link px-0%if;(e.csv=1 or e.t="Y") disabled%else;%if;(e.hl=1) text-warning%end;%end;"
        href="%prefix_base_password;%nn;
              %foreach;env_binding;
                %if;(env.key!="hl" and env.key!="")&%env.key=%env.val;%end;
              %end;
              %if;(e.hl!=1)&hl=1%end;" title="%if;(e.hl=1)[*visualize/show/hide/summary]2 [highlight incomplete data]%else;[*highlight incomplete data]%end;">%nn;
        <i class="fas fa-highlighter fa-lg fa-fw" aria-hidden="true"></i>%nn;
      </a>
    %end;
    %if;((e.m="D" and (e.t="D" or e.t="I" or e.t="H")) or (e.m="A" and e.t="H" and e.same!=""))
      <a role="button" class="btn btn-link px-0"%sp;
        href="%if;(e.implx!="")%url_set.implx.on;%else;%url_set.implx;%end;"
         title="%if;(e.implx!="on")[*collapse implex]%else;[*display implex]%end;">%nn;
        <i class="fa fa-random fa-lg fa-fw"></i>%nn;
      </a>
    %end;
    <span class="sr-only">—</span>
    %if;(e.m="A" and e.t="Z")
      <span class="sr-only">—</span>
      <a role="button" class="btn btn-link px-0"
        href="%if;(e.csv!=1)%url_set.csv.1;%else;%url_set.csv;%end;"
        title="%if;(e.csv=1)[*visualize/show/hide/summary]2 CSV [and] [visualize/show/hide/summary]1 [table] [ancestor/ancestors]1%else;[*visualize/show/hide/summary]1 CSV%end;">%nn;
          <i class="fa fa-file-csv fa-lg fa-fw %if;(e.csv=1)text-danger%end;" aria-hidden="true"></i>%nn;
      </a>
    %end;
    <span class="sr-only">—</span>
    %if;(e.csv!="on" and e.m="A" and (e.t="Z" or e.t="Y"))
      <span class="sr-only">—</span>
      <a role="button" class="btn btn-link px-0"
        href="%prefix_base_password;%access;&m=A%nn;
                 %foreach;env_binding;
                   %if;(env.key="t")&t=%if;(e.t!="Y")Y%else;Z%end;%nn;
                   %elseif;(env.key="v" or env.key="maxv" or env.key="only" or env.key="im" or env.key="gen")&%env.key=%env.val;%end;%nn;
                 %end;%nn;
                 %( ajout des variables par défaut du tableau asc. pour sortir du tableau par couple qui n'en a quasi pas %)
                 %if;(e.t="Y")&num=on&birth=on&birth_place=on&marr=on&marr_date=on&marr_place=on&child=on&death=on&death_place=on&age=on&occu=on&repeat=on%end;"
        title="[*visualize/show/hide/summary]1 [table] %if;(e.t="Y")[ancestor/ancestors]1%else;[by couple]%end;">%nn;
          <i class="fa fa-restroom fa-lg fa-fw%if;(e.t="Y") text-danger%end;" aria-hidden="true"></i>
      </a>
    %end;
    <a role="button" class="btn btn-link px-0" title="[*cancel GeneWeb links]" href="%url_set.cgl.on;">%nn;
     <i class="fa fa-link fa-fw fa-lg" aria-hidden="true"></i>%nn;
    </a>
    %if;((e.m="A" and e.t="H") or (e.m="D" and e.t="D"))
      <button id="btnshowfilter" 
        type="button" class="btn btn-link ml-1 px-0">
        <i class="fas fa-filter ml-1" aria-hidden="true"></i>
        [*filter by::surname/surnames]0</button>
    %end;
  </div>
  <div class="input-group-append">
    <span class="input-group ml-1">
      %if;(e.v!="")
      <span class="sr-only">— [*generation/generations]0</span>
      <a role="button" class="btn btn-link ml-1 mr-0 px-0 mr-1
                              %if;(e.v<1) disabled text-muted%end;"
        title="[*delete] 1 [generation/generations]0"
        href="%apply;urlset%with;v%and;%expr(e.v-1)%end;">%nn;
        <i class="fa fa-minus fa-fw fa-lg" aria-hidden="true"></i>
        <span class="sr-only">-</span>
      </a>
      <span class="sr-only">/</span>
      <a role="button" class="btn btn-link mx-0 px-0 mr-1
                              %if;(e.m="D")%if;(e.v>=static_max_desc_level)disabled text-muted%end;
                              %elseif;(e.m="A")%if;(e.v>static_max_anc_level)disabled text-muted%end;%end;"
        title="[*add] 1 [generation/generations]0"
        href="%apply;urlset%with;v%and;%expr(e.v+1)%end;">%nn;
        <i class="fa fa-plus fa-fw fa-lg" aria-hidden="true"></i>%nn;
        <span class="sr-only">+</span>%nn;
      </a>
      <span class="sr-only"> —</span>
      %end;
      %if;(e.v!=0 and istable=1)
        <a role="button" class="btn btn-link my-0 px-0 pl-0"
          href="%if;(e.only!="on")%url_set.only.on;%else;%url_set.only;%end;"
          title="%if;(e.only!="on")[*visualize/show/hide/summary]1 [only the generation selected]
                 %else;[*visualize/show/hide/summary]1%sp;
                   %if;(e.m="D")
                     %apply;togend(e.v)
                   %elseif;(e.m="A")
                     %apply;togen(e.v)
                   %end;
                 %end;">%nn;
              <i class="fa fa-level-up-alt%if;(e.m="D") fa-flip-vertical%end; fa-fw fa-lg%if;(e.only!="on") text-danger%end;" aria-hidden="true"></i>%nn;
              %if;(e.m="D")
                %if;(e.only!="on")%if;(e.v!=0)[*only] %end;%apply;gend("v")
                %else;%apply;capitalize%with;%apply;togend%with;%if;(e.v="")0%else;%e.v;%end;%end;%end;
                %end;
              %elseif;(e.m="A")
                %if;(e.only!="on")[*only] %apply;gen("v")
                %else;%apply;capitalize%with;%apply;togena%with;%if;(e.v="")0%else;%e.v;%end;%end;%end;
                %end;
              %end;
         </a>
      %elseif;(e.v=0)
        <span class="btn disabled text-primary pl-0">[*specify::generation/generations]0</span>
      %end;
    </span>
  </div>
</div>