{# Copyright The IETF Trust 2007, All Rights Reserved #}
{% extends "ipr/search_result.html" %}
{% load ietf_filters %}
{% block search_result %}
	    <table cellpadding="1" cellspacing="0" border="0">

		  <tr><td colspan="3">Total number of IPR disclosures found: {{ iprs|length }} </td></tr>
		  {% for ipr in iprs|dictsort:"submitted_date" %}
		  <tr valign="top" bgcolor="#dadada">
		     <td width="100">{{ ipr.submitted_date }}</td>
		     <td width="90"><li>ID # {{ ipr.ipr_id }}</li></td>
		     <td><a href="{% url ietf.ipr.views.show ipr_id=ipr.ipr_id %}">"{{ ipr.title|escape }}"</a></td>
		  </tr>
		  {% endfor %}

		  <tr><td colspan="3"><hr>Total number of documents searched: {{ docs|length}}</td></tr>
		  {% for doc in docs %}
		  <tbody bgcolor="#{% cycle dadada,eaeaea as bgcolor %}">
		     <tr >
			<td colspan="3">
			   Search result on {{ doc|rfcspace|lstrip:"0"|rfcnospace }}, "{{ doc.title|escape }}"{% ifnotequal doc first %}{% if doc.related %}, {{ doc.relation }} {{ doc.related|rfcspace|lstrip:"0"|rfcnospace  }}, "{{ doc.related.title }}"{% endif %}
			   {% endifnotequal %}
			</td>
		     </tr>
		     {% if doc.iprs %}
			{% for ipr in doc.iprs %}
			   <tr valign="top">
			      <td width="100">{{ ipr.submitted_date }}</td>
			      <td width="90"><li>ID # {{ ipr.ipr_id }}</li></td>
			      <td><a href="{% url ietf.ipr.views.show ipr_id=ipr.ipr_id %}">"{{ ipr.title|escape }}"</a></td>
			   </tr>
			{% endfor %}
		     {% else %}
		     <tr>
			<td></td>
			<td colspan="2">
			      No IPR disclosures have been submitted directly on <i>{{ doc|rfcspace|lstrip:"0" }}</i>{% if iprs %},
			      but there are disclosures on {% ifequal docs|length 2 %}a related document{% else %}related documents{% endifequal %}, listed on this page{% endif %}.
			   </b>
			</td>
		     </tr>
		     {% endif %}
		  </tbody>
		  {% endfor %}

	    </table>
{% endblock %}
