Skip to content

Commit

Permalink
Hard code link for return to all galleries
Browse files Browse the repository at this point in the history
  • Loading branch information
jessamynsmith committed Jun 1, 2019
1 parent e9c575b commit 9072eee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions roxy_photologue/templates/photologue/gallery_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2>{{ gallery.title }}</h2>

<br>
<div>
<a id="back_link" href=""
<a id="back_link" href="{% url 'photologue:gallery-list' %}"
class="btn btn-default">{% trans "Back to all galleries" %}</a>
</div>
</div>
Expand All @@ -47,8 +47,9 @@ <h2>{{ gallery.title }}</h2>
src="{% static 'lightslider/dist/js/lightslider.min.js' %}"></script>
<script type="text/javascript" src="{% static 'photologue/js/gallery_detail.js' %}"></script>
<script>
$(document).ready(function() {
$('#back_link').attr('href', document.referrer);
});
// This doesn't work consistently, so better to just send people back to the main gallery
//$(document).ready(function() {
// $('#back_link').attr('href', document.referrer);
//});
</script>
{% endblock %}

0 comments on commit 9072eee

Please sign in to comment.