<!--!  Copyright (C) 2006-2019 Edgewall Software

  This software is licensed as described in the file COPYING, which
  you should have received as part of this distribution. The terms
  are also available at https://trac.edgewall.org/wiki/TracLicense.

  This software consists of voluntary contributions made by many
  individuals. For the exact contribution history, see the revision
  history and logs, available at https://trac.edgewall.org/.
-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:i18n="http://genshi.edgewall.org/i18n"
      xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="layout.html" />
  <head>
    <title>$title</title>
    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
  </head>

  <body>
    <div id="content" class="${resource.realm}">
      <h1 py:choose="">
        <py:when test="old_version"><i18n:msg params="old, new, name">Changes between
          <a href="${old_url or url_of(resource, version=old_version)}">Version $old_version</a> and
          <a href="${new_url or url_of(resource, version=new_version)}">Version $new_version</a> of
          <a href="${url or url_of(resource, version=None)}">${name or name_of(resource)}</a>
        </i18n:msg></py:when>
        <py:when test="old_version == 0"><i18n:msg params="new, name">Changes between
          <a href="${old_url or url_of(resource, version=0)}">Initial Version</a> and
          <a href="${new_url or url_of(resource, version=new_version)}">Version $new_version</a> of
          <a href="${url or url_of(resource, version=None)}">${name or name_of(resource)}</a>
        </i18n:msg></py:when>
        <py:otherwise><i18n:msg params="new, name">Changes from
          <a href="${new_url or url_of(resource, version=new_version)}">Version $new_version</a> of
          <a href="${url or url_of(resource, version=None)}">${name or name_of(resource)}</a>
        </i18n:msg></py:otherwise>
      </h1>
      <form method="post" id="prefs" action="${diff_url or url_of(resource)}">
        <div>
          <input type="hidden" name="action" value="${diff_action or 'diff'}" />
          <input py:for="k, v in diff_args or []" type="hidden" name="$k" value="$v"/>
          <input type="hidden" name="version" value="$new_version" />
          <input type="hidden" name="old_version" value="$old_version" />
          <xi:include href="diff_options.html" />
        </div>
      </form>
      <dl id="overview" py:with="multi = num_changes &gt; 1">
        <dt class="property time">Timestamp:</dt>
        <dd class="time" py:choose="">
          <em py:when="multi" class="multi">(multiple changes)</em>
          <py:when test="change.date">
            <i18n:msg params="date, duration">${format_datetime(change.date)} (${dateinfo(change.date)} ago)</i18n:msg>
          </py:when>
          <py:otherwise>--</py:otherwise>
        </dd>
        <dt class="property author">Author:</dt>
        <dd class="author" py:choose="">
          <em py:when="multi" class="multi">(multiple changes)</em>
          <py:otherwise>${authorinfo(change.author)}</py:otherwise>
        </dd>
        <dt class="property message">Comment:</dt>
        <dd class="message" py:choose="" xml:space="preserve">
          <em py:when="multi" class="multi">(multiple changes)</em>
          <py:otherwise>${wiki_to_html(context.child(resource), change.comment)}</py:otherwise>
        </dd>
      </dl>
      <div class="diff">
        <div class="legend" id="diff-legend">
          <h3>Legend:</h3>
          <dl>
            <dt class="unmod"></dt><dd>Unmodified</dd>
            <dt class="add"></dt><dd>Added</dd>
            <dt class="rem"></dt><dd>Removed</dd>
            <dt class="mod"></dt><dd>Modified</dd>
          </dl>
        </div>

        <xi:include href="diff_div.html" py:with="no_id=False"/>

      </div>
    </div>
  </body>
</html>
