Change button in partner_detail to go back to My Library if authenticated
{% block content %}
<h1>{{ object }}</h1>
- {% comment %}Translators: This text is located on individual partner pages, and when clicked takes users back to the list of publishers. {% endcomment %}
- <a href="{% url 'partners:filter' %}" class="btn btn-default">{% trans "Back to partners" %}</a><br><br>
+ {% if user.is_authenticated %}
+ {% comment %}Translators: This text is located on individual partner pages, and when clicked takes authenticated users back to My Library. {% endcomment %}
+ <a href="{% url 'users:my_library' %}" class="btn btn-default">
+ {% trans "Back to My Library" %}
+ </a>
+ {% else %}
+ {% comment %}Translators: This text is located on individual partner pages, and when clicked takes unauthenticated users back to the list of publishers. {% endcomment %}
+ <a href="{% url 'partners:filter' %}" class="btn btn-default">
+ {% trans "Back to partners" %}
+ </a>
+ {% endif %}
+ <br><br>
{% if not object.authorization_method == object.BUNDLE %}
{% url 'applications:apply_single' object.pk as app_url %}
{% url 'about' as about %}
