{% load i18n %}
{% load url from future %}
{% load load_helpdesk_settings %}
<table width='100%' class="left-labels">
    <tr class='row_columnheads'>
        <th>{% trans 'Status' as label %}{{ label|nbsp }}:</th>
        <td>{{ ticket.get_status }}</td>
    </tr>
	<tr class='{% cycle 'row_odd' 'row_even' as rowcolors %}'>
	    <th>{% trans 'Submitted On' as label %}{{ label|nbsp }}:</th>
	    <td>{{ ticket.created|date:"r" }} ({{ ticket.created|timesince }} ago)</td>
	</tr>
	<tr class='{% cycle rowcolors %}'>
	    <th>{% trans 'Assigned To' as label %}{{ label|nbsp }}:</th>
	    <td>{{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to _('Unassigned') %} <strong><a href='?take'><span class='button button_take'>{% trans "Take" %}</span></a></strong>{% endifequal %}</td>
	</tr>
	
	<tr class='{% cycle rowcolors %}'>
	    <th>{% trans 'Submitter E-Mail' as label %}{{ label|nbsp }}:</th>
	    <td>{{ ticket.submitter_email }}{% if user.is_superuser %} <strong><a href='{% url 'helpdesk_email_ignore_add' %}?email={{ ticket.submitter_email }}'>{% trans "Ignore" %}</a></strong>{% endif %}</td>
	</tr>
	
	<tr class='{% cycle rowcolors %}'>
	    <th>{% trans 'Priority' as label %}{{ label|nbsp }}:</th>
	    <td>{{ ticket.get_priority_display }}</td>
	</tr>
	
    {%comment%}
	<tr class='{% cycle rowcolors %}'>
	    <th>{% trans 'Copies To' as label %}{{ label|nbsp }}:</th>
	    <td>{{ ticketcc_string }}
	        <strong><a class='tooltip' href='{% url 'helpdesk_ticket_cc' ticket.id %}'>{% trans "Manage" %}</a></strong>
	        {% if SHOW_SUBSCRIBE %}, <strong><a class='tooltip' href='?subscribe'>{% trans "Subscribe" %}<span>
	        {% trans "Click here to subscribe yourself to this ticket, if you want to receive an e-mail whenever this ticket is updated." %}</span></a></strong>{% endif %}
	    </td>
	</tr>
	{%endcomment%}
	
	{% if tags_enabled %}
	<tr class='{% cycle rowcolors %}'>
	    <th>{% trans 'Tags' as label %}{{ label|nbsp }}</th>
	    <td>{{ ticket.tags }}</td>
	</tr>
	{% endif %}
	
	{%comment%}
	<tr class='{% cycle rowcolors %}'>
	    <th>{% trans 'Dependencies' as label %}{{ label|nbsp }}:</th>
	    <td>{% for dep in ticket.ticketdependency.all %}
	        {% if forloop.first %}<p>{% trans "This ticket cannot be resolved until the following ticket(s) are resolved" %}</p><ul>{% endif %}
	            <li><a href='{{ dep.depends_on.get_absolute_url }}'>{{ dep.depends_on.ticket }} {{ dep.depends_on.title }}</a> ({{ dep.depends_on.get_status_display }}) <a href='{% url 'helpdesk_ticket_dependency_del' ticket.id dep.id %}'>{% trans "Remove Dependency" %}</a></li>
	        {% if forloop.last %}</ul>{% endif %}
	        {% empty %}
	        <p>{% trans "This ticket has no dependencies." %}</p>
	        {% endfor %}
	        <p><a class='tooltip' href='{% url 'helpdesk_ticket_dependency_add' ticket.id %}'>{% trans "Add Dependency" %}</a></p>
	    </td>
	</tr>
	{%endcomment%}
	
	{% for customfield in ticket.ticketcustomfieldvalue_set.all %}
	<tr class='{% cycle rowcolors %}'>
	    <th>{{ customfield.field.label }}</th>
	    <td>{% ifequal customfield.field.data_type "url" %}<a href='{{ customfield.value }}'>{{ customfield.value }}</a>{% else %}{{ customfield.value }}{% endifequal %}</td>
	</tr>{% endfor %}
	
	<tr class='{% cycle rowcolors %}'>
	    <th colspan='2'>{% trans 'Description' as label %}{{ label|nbsp }}:</th>
	</tr>
	<tr class='{% cycle rowcolors %}'>
	    <td colspan='2'>{{ ticket.description|force_escape|urlizetrunc:50|linebreaksbr }}</td>
	</tr>
	
	{% if ticket.resolution %}<tr class='{% cycle rowcolors %}'>
	    <th colspan='2'>{% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} <a href='?close'><img src='{{ STATIC_URL }}helpdesk/buttons/accept.png' alt='{% trans "Accept" %}' title='{% trans "Accept and Close" %}' width='60' height='15' /></a>{% endifequal %}</th>
	</tr>
	<tr class='{% cycle rowcolors %}'>
	    <td colspan='2'>{{ ticket.resolution|force_escape|urlizetrunc:50|linebreaksbr }}</td>
	</tr>{% endif %}

</table>
