<!-- $Id: copyr.txt v7.1 15/08/2023 17:58:58 $ -->
%define;language(x)
  %apply;nth%with;
    /af/bg/br/ca/co/cs/da/de/en/eo/es/et/fi/fr/he/is/it/lt/lv/nl/no/oc/pl/pt/pt-br/ro/ru/sk/sl/sv/tr/zh/
  %and;x%end;
%end;
%define;set_lang(l1)
  %if;(b.default_lang!="l1")%url_set2.lang.file.l1;%else;%url_setx.lang.file;%end;
%end;
%define;language_link()
  %for;i;1;31;
    %let;l1;%apply;language(i)%in;
    %if;(lang!=l1)
      <a class="dropdown-item%if;(l1=b.default_lang) bg-warning%end;" id="lang_%l1;" 
        href="%apply;set_lang(l1)" title="%if;(l1=b.default_lang)default %end;lang %l1;">%nn;
       <code>%if;(l1!="pt-br")%l1;&nbsp;&nbsp;&nbsp;%else;%l1;%end;%sp;</code>%nn;
       %apply;capitalize%with;%apply;language_name(l1)%end;</a>
    %end;
  %end;
%end;
%define;compil(xx,yy)
  [compiled on %s from commit %s:::xx:yy]
%end;
%if;(not cancel_links)
  <div class="d-flex ml-auto  justify-content-end m-2" id="copyr">
    %if;(e.templ="")
      <div class="btn-group dropup align-self-center">
        <button class="btn btn-link dropdown-toggle" type="button" id="dropdownMenu1"
          data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
          title="%if;(e.lang!="")%apply;capitalize%with;%apply;language_name(e.lang)%end;%end;">%nn;
          <span class="sr-only">lang</span>%nn;
          <span class="text-uppercase" title="[*select lang] %apply;language_name(lang)">%lang;</span>%nn;
          <span class="sr-only">, [select lang]</span>%nn;
        </button>
        %if;(not is_printed_by_template)
          <div class="dropdown-menu scrollable-lang short" aria-labelledby="dropdownMenu1">
            <a class="dropdown-item" href="%url_set2.lang.file.af;">af</a>
            <a class="dropdown-item" href="%url_set2.lang.file.bg;">bg</a>
            <a class="dropdown-item" href="%url_set2.lang.file.br;">br</a>
            <a class="dropdown-item" href="%url_set2.lang.file.ca;">ca</a>
            <a class="dropdown-item" href="%url_set2.lang.file.co;">co</a>
            <a class="dropdown-item" href="%url_set2.lang.file.cs;">cs</a>
            <a class="dropdown-item" href="%url_set2.lang.file.da;">da</a>
            <a class="dropdown-item" href="%url_set2.lang.file.de;">de</a>
            <a class="dropdown-item" href="%url_set2.lang.file.en;">en</a>
            <a class="dropdown-item" href="%url_set2.lang.file.eo;">eo</a>
            <a class="dropdown-item" href="%url_set2.lang.file.es;">es</a>
            <a class="dropdown-item" href="%url_set2.lang.file.et;">et</a>
            <a class="dropdown-item" href="%url_set2.lang.file.fi;">fi</a>
            <a class="dropdown-item" href="%url_set2.lang.file.fr;">fr</a>
            <a class="dropdown-item" href="%url_set2.lang.file.he;">he</a>
            <a class="dropdown-item" href="%url_set2.lang.file.is;">is</a>
            <a class="dropdown-item" href="%url_set2.lang.file.it;">it</a>
            <a class="dropdown-item" href="%url_set2.lang.file.lt;">lt</a>
            <a class="dropdown-item" href="%url_set2.lang.file.lv;">lv</a>
            <a class="dropdown-item" href="%url_set2.lang.file.nl;">nl</a>
            <a class="dropdown-item" href="%url_set2.lang.file.no;">no</a>
            <a class="dropdown-item" href="%url_set2.lang.file.oc;">oc</a>
            <a class="dropdown-item" href="%url_set2.lang.file.pl;">pl</a>
            <a class="dropdown-item" href="%url_set2.lang.file.pt;">pt</a>
            <a class="dropdown-item" href="%url_set2.lang.file.pt-br;">pt-br</a>
            <a class="dropdown-item" href="%url_set2.lang.file.ro;">ro</a>
            <a class="dropdown-item" href="%url_set2.lang.file.ru;">ru</a>
            <a class="dropdown-item" href="%url_set2.lang.file.sk;">sk</a>
            <a class="dropdown-item" href="%url_set2.lang.file.sl;">sl</a>
            <a class="dropdown-item" href="%url_set2.lang.file.sv;">sv</a>
            <a class="dropdown-item" href="%url_set2.lang.file.tr;">tr</a>
            <a class="dropdown-item" href="%url_set2.lang.file.zh;">zh</a>
          </div>
        %else;
          <div class="dropdown-menu scrollable-lang" aria-labelledby="dropdownMenu1">
            %apply;language_link()
          </div>
        %end;
      </div>
    %end;
    %if;(connections.total!="")
      <div class="d-flex flex-column align-self-center align-items-center ml-2 small">
        %if;(connections.friends!="" and connections.friends>0)<span>%connections.friends; %nn;
          %if;(connections.friends=1)[wizard/wizards/friend/friends/exterior]2
          %else;[wizard/wizards/friend/friends/exterior]3
          %end;</span>
        %end;
        %if;(connections.wizards!="" and connections.wizards>0)
          %if;(wizard)
            <a href="%prefix;m=CONN_WIZ">%connections.wizards;%nn;
          %else;%connections.wizards;%nn;
          %end; %nn;
          %if;(connections.wizards=1)[wizard/wizards/friend/friends/exterior]0
          %else;[wizard/wizards/friend/friends/exterior]1
          %end;
            <span class="sr-only">switch to %if;(e.templ!="templm")templm%else;default template%end;</span>%nn;
          %if;(wizard)</a>%end;
        %end;
        %if;(connections.total>0)<span>%connections.total; %nn;
          %if;(connections.total=1)[connection/connections]0
          %else;[connection/connections]1
          %end;</span>
        %end;
      </div>
    %end;
    <div class="d-inline-flex flex-column justify-content-end align-self-center ml-3">
      <div class="ml-auto">
        <a role="button" class="mr-1"
          %( button to switch only between default and templm templates %)
          href="%if;(e.templ!="templm")%url_set2.templ.file.templm;%end;"
          title="%if;(e.templ!="templm")templm%else;default template%end;">%nn;
          <i class="fab fa-markdown" aria-hidden="true"></i>%nn;
          <span class="sr-only">switch to %if;(e.templ!="templm")templm%else;default template%end;</span>%nn;
        </a>%include;version
      </div>
      <div class="btn-group">
        <span>&copy; <a href="https://www.inria.fr" target="_blank" rel="noreferrer, noopener">INRIA</a> 1998-2007</span>
        <a href="https://geneweb.tuxfamily.org/wiki/GeneWeb%if;(lang="fr" or lang="de" or lang="nl" or lang="ru" or lang="sv")/%lang;%end;" class="ml-1"
          target="_blank" rel="noreferrer, noopener" title="Documentation GeneWeb">%nn;
          <i class="fab fa-wikipedia-w"></i></a>%nn;
        <a href="https://github.com/geneweb/geneweb" class="ml-1"
          target="_blank" rel="noreferrer, noopener" title="GeneWeb on Github">%nn;
          <i class="fab fa-github"></i></a>
      </div>
    </div>
  </div>
%end;
