Generally working version.
[wolnelektury.git] / src / catalogue / templates / catalogue / inline_tag_list.html
index 59b1acc..920b555 100755 (executable)
@@ -1,17 +1,37 @@
 {% load i18n %}
 {% load catalogue_tags %}
-{% if one_tag %}
-    {% trans "See full category" %} <a href="{% catalogue_url one_tag %}">{{ one_tag }}</a>
-{% else %}
-       <ul>
        {% if choices %}
+        {% if category_choices %}
+            <ul>
+            <li class="header">{% trans "Chosen" %}:</li>
+            {% for tag in category_choices %}
+                <li class="active">{{ tag }} <a href="{% if gallery %}{% catalogue_url_gallery choices -tag %}{% else %}{% catalogue_url choices -tag %}{% endif %}">X</a></li>
+            {% endfor %}
+            </ul>
+        {% endif %}
+        {% if tags %}
+        <ul>
+        <li class="header">{% trans "Available" %}:</li>
         {% for tag in tags %}
-            <li><a href="{% catalogue_url choices tag %}">{{ tag }}{% if tag.count %}&nbsp;({{ tag.count }}){% endif %}</a></li>
+            <li><a href="{% if gallery %}{% catalogue_url_gallery choices tag %}{% else %}{% catalogue_url choices tag %}{% endif %}">{{ tag }}{% if tag.count %}&nbsp;({{ tag.count }}){% endif %}</a></li>
         {% endfor %}
-        {% else %}
+        </ul>
+        {% endif %}
+    {% else %}
+        {% if tags %}
+        <ul>
+        <li class="header">{% trans "Available" %}:</li>
         {% for tag in tags %}
-            <li><a href="{{ tag.get_absolute_url }}">{% if tag.count %}&nbsp;({{ tag.count }}){% endif %}</a></li>
+            <li><a href="{% if gallery %}{{ tag.get_absolute_gallery_url }}{% else %}{{ tag.get_absolute_url }}{% endif %}">{{ tag }} {% if tag.count %}&nbsp;({{ tag.count }}){% endif %}</a></li>
         {% endfor %}
+        </ul>
+        {% endif %}
     {% endif %}
+    {% if other %}
+       <ul>
+        <li class="header">{% trans "Other" %}:</li>
+        {% for tag in other %}
+            <li class="other"><a href="{% if gallery %}{{ tag.get_absolute_gallery_url }}{% else %}{{ tag.get_absolute_url }}{% endif %}">{{ tag }}</a></li>
+        {% endfor %}
     </ul>
-{% endif %}
+    {% endif %}