Fix "Add to collection" button: remove icon, add text, add to collections.html

This commit is contained in:
Jef van Schendel 2013-02-08 22:54:16 +01:00
parent 252de2b857
commit 44004c17e3
3 changed files with 29 additions and 31 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 588 B

View File

@ -149,9 +149,7 @@
{% include "mediagoblin/utils/tags.html" %} {% include "mediagoblin/utils/tags.html" %}
{% endif %} {% endif %}
{% if media.collections %} {% include "mediagoblin/utils/collections.html" %}
{% include "mediagoblin/utils/collections.html" %}
{% endif %}
{% include "mediagoblin/utils/license.html" %} {% include "mediagoblin/utils/license.html" %}
@ -183,19 +181,6 @@
</p> </p>
{% endif %} {% 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") %} {% template_hook("media_sideinfo") %}
{% block mediagoblin_sidebar %} {% block mediagoblin_sidebar %}

View File

@ -17,20 +17,33 @@
#} #}
{% block collections_content -%} {% block collections_content -%}
<h3>{% trans collected=media.collected %}Collected in{% endtrans %}</h3> {% if media.collections %}
<p> <h3>{% trans collected=media.collected %}Collected in{% endtrans %}</h3>
{% for collection in media.collections %} <p>
{% if loop.last %} {% for collection in media.collections %}
{# the 'and' should only appear if there is more than one collections #} {% if loop.last %}
{% if media.collections|length > 1 %} {# the 'and' should only appear if there is more than one collections #}
&middot; {% 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 %} {% endif %}
<a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> {% endfor %}
{% elif loop.revindex == 2 %} </p>
<a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> {% endif %}
{% else %} {% if request.user %}
<a href="{{ collection.url_for_self(request.urlgen) }}">{{ collection['title'] }}</a> &middot; <p>
{% endif %} <a type="submit" href="{{ request.urlgen('mediagoblin.user_pages.media_collect',
{% endfor %} user=media.get_uploader.username,
</p> media=media.id) }}"
class="button_action"
title="{% trans %}Add media to collection{% endtrans %}">
Add to a collection
</a>
</p>
{% endif %}
{% endblock %} {% endblock %}