Fix "Add to collection" button: remove icon, add text, add to collections.html
authorJef van Schendel <mail@jefvanschendel.nl>
Fri, 8 Feb 2013 21:54:16 +0000 (22:54 +0100)
committerJef van Schendel <mail@jefvanschendel.nl>
Fri, 8 Feb 2013 21:54:16 +0000 (22:54 +0100)
mediagoblin/static/images/icon_collect.png [deleted file]
mediagoblin/templates/mediagoblin/user_pages/media.html
mediagoblin/templates/mediagoblin/utils/collections.html

diff --git a/mediagoblin/static/images/icon_collect.png b/mediagoblin/static/images/icon_collect.png
deleted file mode 100644 (file)
index 2911af2..0000000
Binary files a/mediagoblin/static/images/icon_collect.png and /dev/null differ
index 1cc2a763c26f41f97a77b7907f1be096c0a85d19..7550c6c1dafa32ac185adddc1a37bf1029d7cc0e 100644 (file)
       {% include "mediagoblin/utils/tags.html" %}
     {% endif %}
 
-    {% if media.collections %}
-      {% include "mediagoblin/utils/collections.html" %}
-    {% endif %}
+    {% include "mediagoblin/utils/collections.html" %}
 
     {% include "mediagoblin/utils/license.html" %}
 
       </p>
     {% endif %}
 
-    {% if request.user %}
-      <p>
-        <a type="submit" href="{{ request.urlgen('mediagoblin.user_pages.media_collect', 
-                                    user=media.get_uploader.username,
-                                    media=media.id) }}"
-           class="button_action"
-           title="{% trans %}Add media to collection{% endtrans %}">
-          <img src="{{ request.staticdirect('/images/icon_collect.png') }}"
-               />
-       </a>
-      </p>
-    {% endif %}
-
     {% template_hook("media_sideinfo") %}
 
     {% block mediagoblin_sidebar %}
index 0afd9ed80353e42b561ad8f87cc7a320949f82e7..d9e4c8e4190dc610fd4a49f0396a8d6c90cb68e0 100644 (file)
 #}
 
 {% block collections_content -%}
-  <h3>{% trans collected=media.collected %}Collected in{% endtrans %}</h3>
-  <p>
-    {% for collection in media.collections %}
-      {% if loop.last %}
-        {# the 'and' should only appear if there is more than one collections #}
-        {% if media.collections|length > 1 %}
-          &middot;
+  {% if media.collections %}
+    <h3>{% trans collected=media.collected %}Collected in{% endtrans %}</h3>
+    <p>
+      {% for collection in media.collections %}
+        {% if loop.last %}
+          {# the 'and' should only appear if there is more than one collections #}
+          {% if media.collections|length > 1 %}
+            &middot;
+          {% endif %}
+          <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a>
+        {% elif loop.revindex == 2 %}
+          <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a>
+        {% else %}
+          <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> &middot;
         {% endif %}
-        <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a>
-      {% elif loop.revindex == 2 %}
-        <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a>
-      {% else %}
-        <a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> &middot;
-      {% endif %}
-    {% endfor %}
-  </p>
+      {% endfor %}
+    </p>
+  {% endif %}
+  {% if request.user %}
+    <p>
+      <a type="submit" href="{{ request.urlgen('mediagoblin.user_pages.media_collect', 
+                                  user=media.get_uploader.username,
+                                  media=media.id) }}"
+         class="button_action"
+         title="{% trans %}Add media to collection{% endtrans %}">
+        Add to a collection
+      </a>
+    </p>
+  {% endif %}
 {% endblock %}