aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJef van Schendel <mail@jefvanschendel.nl>2013-02-08 22:54:16 +0100
committerJef van Schendel <mail@jefvanschendel.nl>2013-02-08 22:54:16 +0100
commit44004c17e341019cf05050692a7058f72e377b45 (patch)
tree10a864c363f280c5a2fd8e987fd2bc41031e9062
parent252de2b8577a33563807cc349f17844caf2191ad (diff)
downloadmediagoblin-44004c17e341019cf05050692a7058f72e377b45.tar.lz
mediagoblin-44004c17e341019cf05050692a7058f72e377b45.tar.xz
mediagoblin-44004c17e341019cf05050692a7058f72e377b45.zip
Fix "Add to collection" button: remove icon, add text, add to collections.html
-rw-r--r--mediagoblin/static/images/icon_collect.pngbin588 -> 0 bytes
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html17
-rw-r--r--mediagoblin/templates/mediagoblin/utils/collections.html43
3 files changed, 29 insertions, 31 deletions
diff --git a/mediagoblin/static/images/icon_collect.png b/mediagoblin/static/images/icon_collect.png
deleted file mode 100644
index 2911af24..00000000
--- a/mediagoblin/static/images/icon_collect.png
+++ /dev/null
Binary files differ
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index 1cc2a763..7550c6c1 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -149,9 +149,7 @@
{% 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" %}
@@ -183,19 +181,6 @@
</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 %}
diff --git a/mediagoblin/templates/mediagoblin/utils/collections.html b/mediagoblin/templates/mediagoblin/utils/collections.html
index 0afd9ed8..d9e4c8e4 100644
--- a/mediagoblin/templates/mediagoblin/utils/collections.html
+++ b/mediagoblin/templates/mediagoblin/utils/collections.html
@@ -17,20 +17,33 @@
#}
{% 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 %}