{% comment %}
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com> 

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions 
are met:

 * Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above
   copyright notice, this list of conditions and the following
   disclaimer in the documentation and/or other materials provided
   with the distribution.

 * Neither the name of the Nokia Corporation and/or its
   subsidiary(-ies) nor the names of its contributors may be used
   to endorse or promote products derived from this software
   without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% endcomment %}

{% load ballot_icon %}
{% load ietf_filters %}
<tr 
{% if user|in_group:"Area_Director" %}
{% if doc|my_position:user|equal:"Discuss" %}style="background:#ffa0a0;"{% endif %}
{% if doc|my_position:user|equal:"Abstain" %}style="background:#ffff00;"{% endif %}
{% if doc|my_position:user|equal:"Yes"  or  doc|my_position:user|slugify|equal:"no-objection" %}style="background:#a0ffa0;"{% endif %}
{% if doc|my_position:user|equal:"Recuse" %}style="background:#c0c0c0;"{% endif %}
{% endif %}
>
<td class="doc">
<div>{{ doc.displayname_with_link|safe }}</div>
{% if doc.ietf_process.iesg_ballot.was_deferred %}
<div><b title="deferred by {{ doc.ietf_process.iesg_ballot.deferred_by}}">(deferred on {{ doc.ietf_process.iesg_ballot.deferred_date }})</b></div>
{% endif %}
{% if user|in_group:"Secretariat" %}
<div class="reschedule"><label>Reschedule: {{ doc.reschedule_form.telechat_date }}</label></div> 
{% if doc.reschedule_form.show_clear %} 
<div class="clear-returning-item"><label>{{ doc.reschedule_form.clear_returning_item }} Clear returning item</label></div> 
{% endif %} 
{% endif %} 
</td>
<td class="title">{{ doc.title }}</td>
{% include "iesg/agenda_documents_row_status.html" %}
{% include "idrfc/ipr_column_with_label.html" %}
<td class="ad">{{ doc.ad_name|default:"" }}</td>
</tr>
