<!--!  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 i18n:msg="name">Delete Milestone ${milestone.name}</title>
  </head>

  <body>
    <div id="content" class="milestone">
      <h1 i18n:msg="name">Delete Milestone ${milestone.name}</h1>

    <form id="delete-confirm" action="" method="post">
      <div>
        <input type="hidden" name="action" value="delete" />
        <p><strong>Are you sure you want to delete this milestone?</strong></p>
        <py:if test="num_tickets != 0">
          <label for="target">Retarget associated tickets to milestone</label>
          <select name="target" id="target">
            <option value="">None</option>
            <optgroup py:for="(label, milestones) in milestone_groups"
                      py:if="milestones" label="${label}">
              <option py:for="milestone in milestones"
                      selected="${retarget_to == milestone.name or None}"
                      value="${milestone.name}" py:content="milestone.name"></option>
            </optgroup>
          </select>
        </py:if>
        <p py:if="num_tickets == 0" class="help">
          There are no tickets associated with this milestone.
        </p>
        <py:if test="attachments">
          <p>The following attachments will also be deleted:</p>
          <ul>
            <li py:for="attachment in attachments">
              <a href="${url_of(attachment.resource)}" title="View attachment">$attachment.filename</a>
            </li>
          </ul>
        </py:if>
        <p><strong>This is an irreversible operation.</strong></p>
      </div>
      <div class="buttons">
        <input type="submit" id="delete" class="trac-disable-on-submit" value="${_('Delete milestone')}" />
        <input type="submit" name="cancel" value="${_('Cancel')}" />
      </div>
    </form>

    <div id="help" i18n:msg=""><strong>Note:</strong> See
      <a href="${href.wiki('TracRoadmap')}">TracRoadmap</a> for help on using
      the roadmap.
    </div>

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