<!--!  Copyright (C) 2009-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/.

Add diff option fields (to be used inside a form)

Arguments:
 - `diff` the datastructure which contains diff options
-->
<div xmlns="http://www.w3.org/1999/xhtml"
    xmlns:py="http://genshi.edgewall.org/"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:i18n="http://genshi.edgewall.org/i18n"
    py:strip="">
  <label for="style">View differences</label>
  <select id="style" name="style">
    <option selected="${diff.style == 'inline' or None}"
            value="inline">inline</option>
    <option selected="${diff.style == 'sidebyside' or None}"
            value="sidebyside">side by side</option>
  </select>
  <div class="field">
    <i18n:msg>
      <label><input type="radio" name="contextall" value="0"
                    checked="${not diff.options.contextall or None}"/>
             Show</label>
      <label><input type="text" name="contextlines" id="contextlines" size="2"
                    maxlength="3" value="${diff.options.contextlines &lt; 0 and
                                           'all' or diff.options.contextlines}"/>
             lines around each change</label>
    </i18n:msg><br/>
    <label><input type="radio" name="contextall" value="1"
                  checked="${diff.options.contextall or None}"/>
           Show the changes in full context</label>
  </div>
  <fieldset id="ignore" py:with="options = diff.options">
    <legend>Ignore:</legend>
    <div class="field">
      <input type="checkbox" id="ignoreblanklines" name="ignoreblanklines"
             checked="${options.ignoreblanklines or None}" />
      <label for="ignoreblanklines">Blank lines</label>
    </div>
    <div class="field">
      <input type="checkbox" id="ignorecase" name="ignorecase"
             checked="${options.ignorecase or None}" />
      <label for="ignorecase">Case changes</label>
    </div>
    <div class="field">
      <input type="checkbox" id="ignorewhitespace" name="ignorewhitespace"
             checked="${options.ignorewhitespace or None}" />
      <label for="ignorewhitespace">White space changes</label>
    </div>
  </fieldset>
  <div class="buttons">
    <input type="submit" name="update" value="${_('Update')}" />
  </div>
</div>
