%doctype;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <!-- $Id: updhist.txt,v 5.12 2007-07-25 13:15:19 ddr Exp $ -->
  <!-- Copyright (c) 1998-2007 INRIA -->
  <title>[*history of updates]</title>
  <meta name="robots" content="none"%/>
  <meta http-equiv="Content-Type" content="text/html; charset=%charset;"%/>
  <meta http-equiv="Content-Style-Type" content="text/css"%/>
  <link rel="shortcut icon" href="%image_prefix;/favicon_gwd.png"%/>
%include.css;
%base_header;
</head>
<body %body_prop;>

%message_to_wizard;

%define;search_form(xxx)
  %if;(wizard or friend)
    <form method="get" action="%action;">
      <p>
        %hidden;
        <input type="hidden" name="m" value="HIST_SEARCH"%/>
        <input type="hidden" name="k" value="%evar.k;"%/>
        %if;(evar.m = "HIST_SEARCH" and found)
          <input type="hidden" name="pos" value="%if;found;%pos;%else;0%end;"%/>
        %end;
        <input name="s" size="30" maxlength="40" value="%evar.s.ns;"%/><br%/>
        <label>
        <input type="checkbox" name="c" value="on"%nn;
         %if;("main" != "true" and evar.c = "on") checked="checked"%end;
         %/>[search/case sensitive]1
        </label>
        <input type="submit" value="[*search/case sensitive]0"%/>
      </p>
    </form>
  %end;
%end;

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

<h1>[*history of updates]</h1>

%if;(not cancel_links and (evar.m != "HIST_SEARCH" or not found))
  %apply;search_form("")
%end;

%define;update_text(uu)
  %if;(uu = "ap")[add::person/persons]0%nn;
  %elseif;(uu = "mp")[modify::person/persons]0%nn;
  %elseif;(uu = "dp")[delete::person/persons]0%nn;
  %elseif;(uu = "fp")[merge::person/persons]1%nn;
  %elseif;(uu = "si")[send::image/images]0%nn;
  %elseif;(uu = "di")[delete::image/images]0%nn;
  %elseif;(uu = "af")[add::family/families]0%nn;
  %elseif;(uu = "mf")[modify::family/families]0%nn;
  %elseif;(uu = "df")[delete::family/families]0%nn;
  %elseif;(uu = "if")[invert::family/families]1%nn;
  %elseif;(uu = "ff")[merge::family/families]1%nn;
  %elseif;(uu = "cn")[change children's names]%nn;
  %elseif;(uu = "aa")[add::parents]%nn;
  %elseif;(uu = "mn")[modify::note/notes]1%nn;
  %elseif;(uu = "cp")[modify::place]%nn;
  %elseif;(uu = "cs")[modify::source/sources]0%nn;
  %elseif;(uu = "co")[modify::occupation/occupations]0%nn;
  %else;%appy;interp(uu) %nn;
  %end;
%end;

<table cellpadding="4px;" class="updhist_table">
  <tr class="updhist_table_header">
    %if;(bvar.history_diff = "yes")<th>[history]</th>%end
    <th>[*date/dates]0</th>
    <th>[*person/persons]0</th>
    <th>[*wizard/wizards/friend/friends/exterior]0</th>
    <th>[*update]</th>
  </tr>
  %let;kk;%if;(evar.k = "")3%else;%evar.k%end;%in;
  %let;wiz;%if;(evar.wiz != "" and evar.n = "")%evar.wiz;%end;%in;
  %foreach;history_line(kk, evar.pos, wiz)
    <tr>
      %if;(bvar.history_diff = "yes")
        <td>
          %if;(first_name != "" and person.has_history)
            <a href="%prefix;m=HIST_DIFF;t=SUM;f=%person.history_file;">[history]</a>
          %else;
            &nbsp;
          %end;
        </td>
      %end;
      <td>%time;</td>
      <td>
        %if;(first_name != "")
          <!--%first_name;/%occ;/%surname;-->
          <a href="%prefix;%person.access;">%person;</a>%person.title;
          %person.dates;
          %if;(bvar.show_invisible = "on" and wizard and person.is_invisible)
            <img src="%image_prefix;/restricted.png"%wid_hei;restricted.png; alt=" (x)"%/>%nn;
          %end;
        %elseif;is_note;
          - <a href="%prefix;m=NOTES%if;(note.page != "");f=%note.page.v;%end;
          %if;(note.part != "");v=%note.part;%end;">
          <i>%if;(note.page = "")[note/notes]1%else;%[%note.page;%]%end;
          </i></a>
          %if;(note.part != "")- <span style="font-size:50%%">#%note.part;
            </span>%nn;
          %end;
        %else;
          %key;
        %end;
      </td>
      <td>
        %if;(user != "")
          <i>
            %if;(wiz = "")
              <a href="%prefix;m=HIST;k=%kk;;wiz=%user.v;">%user;</a>%nn;
            %else;
              %user;
            %end;
          </i>
        %end;
      </td>
      <td>%apply;update_text(update.var)</td>
    </tr>
  %end;
</table>

%if;(pos != "")
  <form method="get" action="%action;">
    <p>
      %hidden;
      <input type="hidden" name="m" value="HIST"%/>
      <input name="k" size="3" value="%kk;"%/>
      <input type="hidden" name="pos" value="%pos;"%/>
      %if;(wiz != "")
        <input type="hidden" name="wiz" value="%wiz;"%/>(%wiz;)
      %end;
      <input type="submit" value="&gt;&gt;"%/>
      %if;(wiz != "")
        <input type="submit" name="n" value="&gt;&gt;"%/>
      %end;
    </p>
  </form>
%end;

%if;(evar.m = "HIST_SEARCH" and found)%apply;search_form("left")%end;

%base_trailer;
%copyright;
</body>
</html>
