add "reserve" to purchase page

pull/1/head
eric 2013-10-20 14:18:17 -04:00
parent 53d9f2c8be
commit 0d81e22ff1
5 changed files with 18 additions and 8 deletions

View File

@ -112,7 +112,7 @@
<a href="{% url pledge work_id=workid %}"><span class="read_itbutton pledge button_text"><span>Pledge</span></span></a> <a href="{% url pledge work_id=workid %}"><span class="read_itbutton pledge button_text"><span>Pledge</span></span></a>
{% else %} {% else %}
{% if in_library %} {% if in_library %}
<a href="{% url reserve workid %}"><span class="read_itbutton pledge button_text"><span>Reserve It</span></span></a> <a href="{% url purchase work_id=workid %}"><span class="read_itbutton pledge button_text"><span>Reserve It</span></span></a>
{% else %} {% else %}
<a href="{% url purchase work_id=workid %}"><span class="read_itbutton pledge button_text"><span>Purchase</span></span></a> <a href="{% url purchase work_id=workid %}"><span class="read_itbutton pledge button_text"><span>Purchase</span></span></a>
{% endif %} {% endif %}
@ -273,7 +273,7 @@
{% else %}{% if borrowable %} {% else %}{% if borrowable %}
<a href="{% url borrow workid %}?library={{library}}" class="hijax" title="Borrow this work"><div class="read_itbutton"><span>Borrow It</span></div></a> <a href="{% url borrow workid %}?library={{library}}" class="hijax" title="Borrow this work"><div class="read_itbutton"><span>Borrow It</span></div></a>
{% else %}{% if in_library %} {% else %}{% if in_library %}
<a href="{% url reserve workid %}?library={{library}}" title="Reserve or buy this work"><div class="read_itbutton"><span>Reserve It</span></div></a> <a href="{% url purchase work_id=workid %}" title="Reserve or buy this work"><div class="read_itbutton"><span>Reserve It</span></div></a>
{% else %}{% if status == 'ACTIVE' or status == 'SUCCESSFUL' %} {% else %}{% if status == 'ACTIVE' or status == 'SUCCESSFUL' %}
{% if not library or not in_library %} {% if not library or not in_library %}
<div class="booklist-status-img"> <div class="booklist-status-img">

View File

@ -1,5 +1,6 @@
{% extends "basepledge.html" %} {% extends "basepledge.html" %}
{% load humanize %} {% load humanize %}
{% load lib_acqs %}
{% block title %}Pledge{% endblock %} {% block title %}Pledge{% endblock %}
@ -64,15 +65,22 @@
</div> </div>
</div> </div>
{% ifequal work.last_campaign.status "ACTIVE" %} {% ifequal work.last_campaign.status "ACTIVE" %}
{% lib_acqs %}
<div class="jsmodule rounded clearfix"> <div class="jsmodule rounded clearfix">
<div class="jsmod-content"> <div class="jsmod-content">
<form class="pledgeform" method="POST" action="#"> <form class="pledgeform" method="POST" action="#">
{% if next_acq %}
<div class="pledge_amount">This ebook can be reserved from your library.</div>
<div class="bigger" style="margin:20px">Available starting {{ next_acq.refreshes|date:"M j, Y"}} at {{ next_acq.user }}.</div>
<div><a href="{% url reserve work.id%}?library={{ next_acq.user }}" class="fakeinput">Reserve Now</a> </div>
<div style="height:30px;"></div>
<div class="bigger" style="height:30px;clear:both;margin:20px">If you'd rather not wait, consider one of the purchase options.</div>
{% endif %}
{% csrf_token %} {% csrf_token %}
{{ form.non_field_errors }} {{ form.non_field_errors }}
{% if work.offers.all|length > 1 %} {% if work.offers.all|length > 1 %}
<div class="pledge_amount premium_level">Individual or Library License?</div> <div class="pledge_amount premium_level">Purchase Options: Individual or Library?</div>
<div style="height:10px;"></div> <div style="height:10px;"></div>

View File

@ -2,6 +2,7 @@
{% load comments %} {% load comments %}
{% load humanize %} {% load humanize %}
{% load purchased %} {% load purchased %}
{% load lib_acqs %}
{% block title %}&#151; {% block title %}&#151;
{% if work.first_ebook %} {% if work.first_ebook %}
{{ work.title }} is a Free eBook {{ work.title }} is a Free eBook
@ -60,6 +61,7 @@
{% block content %} {% block content %}
{% purchased %} {% purchased %}
{% lib_acqs %}
{% with work.last_campaign_status as status %} {% with work.last_campaign_status as status %}
{% with work.id as work_id %} {% with work.id as work_id %}
<div id="main-container"> <div id="main-container">
@ -475,7 +477,7 @@
{% else %}{% if borrowable %} {% else %}{% if borrowable %}
<div class="btn_support"><form action="{% url borrow work_id %}" method="get"><input type="submit" value="Borrow" /></form></div> <div class="btn_support"><form action="{% url borrow work_id %}" method="get"><input type="submit" value="Borrow" /></form></div>
{% else %} {% else %}
<div class="btn_support"><form action="{% url purchase work_id %}" method="get"><input type="submit" value="Purchase" /></form></div> <div class="btn_support"><form action="{% url purchase work_id %}" method="get"><input type="submit" value="{% if next_acq %}Reserve{% else %}Purchase{% endif %}" /></form></div>
{% endif %}{% endif %} {% endif %}{% endif %}
{% endif %} {% endif %}
{% else %} {% else %}

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
width: auto; width: auto;
} }
input[type="submit"] { input[type="submit"], a.fakeinput {
float: right; float: right;
font-size: @font-size-header; font-size: @font-size-header;
margin: 10px 0 10px; margin: 10px 0 10px;