<!-- $Id: modules/arbre_hi_tools.txt v7.0 26/09/2023 04:30:23 $ -->
%( Boutons pour les arbres ascendats compacts %)
%let;evarv;%if;(e.v!="")%e.v;%else;5%end;%in;
%let;evarscl;%if;(e.scale!="")%e.scale;%else;100%end;%in;
%let;evarfs;%if;(e.fs!="")%e.fs;%else;17%end;%in;
%let;maxlev;%if;(e.cpl = "on")13%else;12%end;%nn;%in;
%(evarv;, %evarhi;, %evarim;, %evarso;, %evarma;<br>%)
%(minv %minv; < evarv %evarv; < maxv %maxv; (maxlev %maxlev;)%)
<div class="d-flex ml-2 mb-2">
  %if;not cancel_links;
    <div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
      <div class="btn-group mx-2">
        %if;(evarv>=4)
          <a href="%url_set.v;&v=%expr(evarv-1)" class="btn btn-outline-primary"
            title="(−1) [visualize/show/hide/summary]1 %expr(evarv-1) [generation/generations]1">−</a>
        %end;
        <span class="btn btn-outline-primary disabled border-top border-bottom"
          title="[generation/generations]1">%evarv; gen.</span>
        %if;(evarv<maxlev-1)
          <a href="%url_set.v;&v=%expr(evarv+1)" class="btn btn-outline-primary"
            title="(+1) [visualize/show/hide/summary]1 %expr(evarv+1) [generation/generations]1 (max %maxlev;)">+</a>
        %end;
      </div>
      %(TODO : improve translations, titles and add icons %)
      <div class="mx-2">
        <a href="%if;(e.hi="H")%url_set.hi.I;%else;%url_set.hi.H;%end;"
          class="btn btn-outline-primary">%if;(e.hi!="H")H%else;I%end;-tree</a>
        <a href="%if;(e.sosa!="on")%url_set.sosa.on;%else;%url_set.sosa;%end;" class="btn btn-outline-primary ml-1"
          title="[*visualize/show/hide/summary]1 %if;(e.sosa="on")ASCII%else;HTML%end;">
          %if;(e.sosa!="on")HTML%else;ASCII%end; box drawing</a>
        <a href="%if;(e.sms!="on")%url_set.sms.on;%else;%url_set.sms;%end;" class="btn btn-outline-primary ml-1"
          title="%if;(e.sms!="on")[*visualize/show/hide/summary]1%else;[*visualize/show/hide/summary]2%end; [missing %s:::Sosa]0">·</a>
        <a href="%if;(e.cpl!="on")%url_set.cpl.on;%else;%url_set.cpl;%end;" class="btn btn-outline-primary ml-1"
          title="[*visualize/show/hide/summary]1%if;(e.cpl!="on") [couples]%else;[individuals]%end;">
          %if;(e.cpl!="on")<i class="fa fa-user-plus" aria-hidden="true"></i>%end;<i class="fa fa-user" aria-hidden="true"></i></a>
        <a href="%if;(e.implx!="on")%url_set.implx.on;%else;%url_set.implx;%end;" class="btn btn-outline-primary ml-1"
          title="%if;(e.implx!="on")[*implex links]%else;[*do not] [implex links]%end;">
          <i class="fa fa-random fa-fw"></i></a>
      </div>
      %( TODO : disable if ASCII box drawings ? %)
      <div class="btn-group mx-2">
        %if;(evarscl>0)
          <a href="%if;(e.scale!="on")%url_setx.scale.fs;&scale=%expr(evarscl-20)&fs=%expr(evarfs-1)%end;"
            class="btn btn-outline-primary" title="[*reduce/increase]0 [size] (-20 %%)">−</a>
        %end;
        <span class="btn btn-outline-primary disabled border-top border-bottom">%evarscl; %%</span>
        %if;(evarscl<200)
          <a href="%if;(e.scale!="on")%url_setx.scale.fs;&scale=%expr(evarscl+20)&fs=%expr(evarfs+1);%end;"
            class="btn btn-outline-primary" title="[*reduce/increase]1 [size] (+20 %%)">+</a>
        %end;
      </div>
      <div class="btn-group mx-2">
        %if;(evarfs>5)
          <a href="%if;(e.fs!="on")%url_set.fs;&fs=%expr(evarfs-1)%end;" class="btn btn-outline-primary"
            title="[reduce/increase]0 [font size]">−</a>
        %end;
        <span class="btn btn-outline-primary disabled border-top border-bottom">Font %evarfs; px</span>
        %if;(evarfs<20)
          <a href="%if;(e.fs!="on")%url_set.fs;&fs=%expr(evarfs+1)%end;" class="btn btn-outline-primary"
            title="[reduce/increase]1 [font size]">+</a>
        %end;
      </div>
    </div>
  %end;
</div>
