The xhtml validator caught a few cases where empty data generated
some invalid html because some table or list bodies were missing. I
thought it reasonable to include a message that nothing was found
instead of leaving the table blank.
<li property="libns:affiliation" content="{{individual.name}}">
{{ individual.name }} ( {{ individual.contact }} )
</li>
+ {% empty %}
+ <li>None</li>
{% endfor %}
</ul>
{% if lib.libraryaccession_set %}
<td>Comment</td>
</tr>
</thead>
- {% if lib.lane_set.all %}
<tbody>
{% for lane in lib.lane_set.all %}
<tr rel="libns:has_lane"
</a></td>
<td>{{ lane.comment }}</td>
</tr>
- {% endfor %}
+ {% empty %}
+ <tr><td colspan="0">No data</td></tr>
+ {% endfor %}
</tbody>
- {% endif %}
</table>
<br/>
<hr/>
<td ></td>
{% endif %}
</tr>
+ {% empty %}
+ <tr><td colspan="0">No results found</td></tr>
{% endfor %}
</tbody>
</table>