<!--! Add diff option fields (to be used inside a form)
 
     `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"
    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">
    Show <input type="text" name="contextlines" id="contextlines" size="2"
          maxlength="3" value="${diff.options.contextlines &lt; 0 and 
                                 'all' or diff.options.contextlines}" />
    <label for="contextlines">lines around each change</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>
