<!--!  Copyright (C) 2006-2014 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 http://trac.edgewall.com/license.html.

  This software consists of voluntary contributions made by many
  individuals. For the exact contribution history, see the revision
  history and logs, available at http://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>Prepare Diff</title>
    <script type="text/javascript">/*<![CDATA[*/
      jQuery(document).ready(function($) {
        $("#anydiff input[name$='_path']").autocomplete({
          source: window.location.pathname
        }).each(function() {
          $(this).data("ui-autocomplete")._renderItem = function(ul, item) {
            return $("<li>")
              .data("ui-autocomplete-item", item.value)
              .addClass(function() {
                return item.isdir ? "trac-autocomplete-dir" : "trac-autocomplete-file";
              })
              .append(item.label)
              .appendTo(ul);
          }
        })
      });
    /*]]>*/</script>
  </head>

  <body>
    <div id="content" class="changeset">
      <div id="title">
        <h1>Prepare Diff</h1>
      </div>

      <div id="anydiff">
        <form action="${href.changeset()}" method="get">
          <fieldset>
            <legend>Select the base and the target for the diff:</legend>
            <table>
              <tr>
                <th><label for="old_path">From:</label></th>
                <td>
                  <input type="text" id="old_path" name="old_path"
                         value="$old_path" size="44" />
                  <label>at revision:
                    <input type="text" name="old" value="$old_rev" size="4" />
                  </label>
                </td>
              </tr>
              <tr>
                <th><label for="new_path">To:</label></th>
                <td>
                  <input type="text" id="new_path" name="new_path"
                         value="$new_path" size="44" />
                  <label>at revision:
                    <input type="text" name="new" value="$new_rev" size="4" />
                  </label>
                </td>
              </tr>
            </table>
            <p class="hint">
              For either path, you can start typing the path and will be
              presented a list of existing directories and files to select
              from. Select an entry by clicking on it, or by using the
              up/down cursor keys and hitting tab.
            </p>
          </fieldset>
          <div class="buttons">
            <input type="submit" value="${_('View changes')}" />
          </div>
        </form>
      </div>
      <div id="help" i18n:msg="">
        <strong>Note:</strong> See
        <a href="${href.wiki('TracChangeset')}#ExaminingDifferencesBetweenBranches">TracChangeset</a>
        for help on using the diff feature.
      </div>
    </div>
  </body>
</html>

