clean tag_table template.
--- a/web/hdabo/templates/partial/tag_table.html Fri Jun 24 03:40:26 2011 +0200
+++ b/web/hdabo/templates/partial/tag_table.html Fri Jun 24 10:34:24 2011 +0200
@@ -1,6 +1,6 @@
{% block tag_table %}
<table id="tag_table"><tr class="nodrop nodrag">
- <th>#</th>
+ {% if ordered_tags %}<th>#</th>{% endif %}
{% if valid != "2" and ordered_tags %}
<th><img src="{{STATIC_URL}}hdabo/img/arrow_up_down.png"/></th>
{% endif %}
@@ -10,9 +10,9 @@
<th class="text_centered">Lien W</th>
<th class="text_centered">Lien D</th>
<th>Catégorie</th>
- <th class="large_25 text_centered">Supprimer<br/>le lien W</th>
+ {% if ordered_tags %}<th class="large_25 text_centered">Supprimer<br/>le lien W</th>{% endif %}
<th>Alias</th>
- <th class="large_25 text_centered">Retirer le tag de la liste</th></tr>
+ {% if ordered_tags %}<th class="large_25 text_centered">Retirer le tag de la liste</th>{% endif %}</tr>
{% if ordered_tags %}
{# ordered_tags is a list of TaggedSheet #}
{% for t in ordered_tags %}
@@ -47,10 +47,6 @@
{# ds is a DataSheet #}
{% for t in ds.tags.all %}
<tr class="imageline {% cycle 'hdabooddline' 'hdaboevenline' %}">
- <td>{{forloop.counter}}</td>
- {% if valid != "2" and ordered_tags %}
- <td class="updown_td"><img src="{{STATIC_URL}}hdabo/img/arrow_up_down.png" class="up" alt="up" id="{{t.id}}" pos="{{forloop.counter0}}"></td>
- {% endif %}
<td>{{t.id}}</td>
<td class="{{t.url_status_text}}">{{t.label}}</td>
{% comment %}<td>{{t.original_label}}</td>{% endcomment %}
@@ -62,16 +58,14 @@
{% endif %}
</td>
<td class="text_centered">
- {% if t.tag.dbpedia_uri and t.tag.dbpedia_uri != "" %}
- <a href="{{t.tag.dbpedia_uri}}" target="_blank"><img src="{{STATIC_URL}}hdabo/img/arrow_green_right.png" ></a>
+ {% if t.dbpedia_uri and t.dbpedia_uri != "" %}
+ <a href="{{t.dbpedia_uri}}" target="_blank"><img src="{{STATIC_URL}}hdabo/img/arrow_green_right.png" ></a>
{% else %}
{% endif %}
</td>
<td>{% if t.category %}{{ t.category }}{% endif %}</td>
- <td class="text_centered"><img src="{{STATIC_URL}}hdabo/img/red_cross.png" class="remove_wp_link" id="{{t.id}}" /></td>
- <td>{{t.alias}}</td>
- <td class="text_centered"><img src="{{STATIC_URL}}hdabo/img/tag_remove.png" class="remove_tag_from_list" id="{{t.id}}" alt="{{t.label}}" /></td></tr>
+ <td>{% if t.alias %}{{ t.alias }}{% endif %}</td></tr>
{% endfor %}
{% endif %}
</table>