{% extends g.theme.master %}

{% do g.register_app_css('css/tracker.css') %}

{% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / {{field.label}} {{milestone.name}}{% endblock %}

{% block header %}{{field.label}} {{milestone.name}}{% endblock %}

{% block actions %}
{% if allow_edit %}
  <a href="{{tg.url(c.app.url+'edit/', dict(q=q, limit=limit, sort=sort, page=page))}}" title="Bulk Edit"><b data-icon="{{g.icons['pencil'].char}}" class="ico {{g.icons['pencil'].css}}"></b></a>
{% endif %}
{% endblock %}

{% block edit_box %}
<div class="editbox">
    <div class="grid-6">
      <label>Status:</label> {{milestone.closed and 'Closed' or 'Open'}}
    </div>
    <div class="grid-6">
      <label>Due Date:</label> {{milestone.due_date or 'N/A'}}
    </div>
    <div class="grid-6">
      <label>Progress:</label> {{closed}} / {{total}}
    </div>
</div>
{% endblock %}

{% block content %}
  {% if help_msg %}
    <div id="search-ticket-help-msg" class="grid-19 info">{{g.markdown.convert(help_msg)}}</div>
  {% endif %}
  {% if milestone.description %}
    <p>{{milestone.description}}</p>
  {% endif %}
  {{c.ticket_search_results.display(solr_error=solr_error,
    count=count,
    limit=limit,
    query=q,
    tickets=tickets,
    sortable_custom_fields=sortable_custom_fields,
    columns=columns,
    page=page,
    sort=sort)}}
{% endblock %}
