when a user is not logged in, clicking add to wishlist now ends them at the work page
...where we need to have the add functionalitypull/1/head
parent
a94c04b890
commit
7dba126848
|
@ -35,7 +35,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% else %}{% if request.user.is_anonymous %}
|
{% else %}{% if request.user.is_anonymous %}
|
||||||
<div class="moreinfo create-account">
|
<div class="moreinfo create-account">
|
||||||
<a href="#">Add to Wishlist</a>
|
<span title="{% url work work.id %}">Add to Wishlist</span>
|
||||||
</div>
|
</div>
|
||||||
{% else %}{% if work in request.user.wishlist.works.all %}
|
{% else %}{% if work in request.user.wishlist.works.all %}
|
||||||
<div class="moreinfo on-wishlist">
|
<div class="moreinfo on-wishlist">
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% else %}{% if request.user.is_anonymous %}
|
{% else %}{% if request.user.is_anonymous %}
|
||||||
<div class="listview panelfront side1 create-account">
|
<div class="listview panelfront side1 create-account">
|
||||||
<span>Add to Wishlist</span>
|
<span title="{% url work work.id %}">Add to Wishlist</span>
|
||||||
</div>
|
</div>
|
||||||
{% else %}{% if work in request.user.wishlist.works.all %}
|
{% else %}{% if work in request.user.wishlist.works.all %}
|
||||||
<div class="listview panelfront side1 on-wishlist">
|
<div class="listview panelfront side1 on-wishlist">
|
||||||
|
|
|
@ -28,7 +28,9 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$(".create-account").each(function (index, element) {
|
$(".create-account").each(function (index, element) {
|
||||||
$(element).click(function() {
|
$(element).click(function() {
|
||||||
window.location = "/accounts/login/?next=" + $(location).attr('href');
|
var span = $(element).find("span");
|
||||||
|
var work_url = span.attr('title')
|
||||||
|
window.location = "/accounts/login/?next=" + work_url;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue