From 0d81e22ff1626bdf348044ffd70f258fe0f543da Mon Sep 17 00:00:00 2001 From: eric Date: Sun, 20 Oct 2013 14:18:17 -0400 Subject: [PATCH] add "reserve" to purchase page --- frontend/templates/book_panel.html | 4 ++-- frontend/templates/purchase.html | 12 ++++++++++-- frontend/templates/work.html | 4 +++- static/css/pledge.css | 2 +- static/less/pledge.less | 4 ++-- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/frontend/templates/book_panel.html b/frontend/templates/book_panel.html index 7a3272f3..6b70d082 100644 --- a/frontend/templates/book_panel.html +++ b/frontend/templates/book_panel.html @@ -112,7 +112,7 @@ Pledge {% else %} {% if in_library %} - Reserve It + Reserve It {% else %} Purchase {% endif %} @@ -273,7 +273,7 @@ {% else %}{% if borrowable %}
Borrow It
{% else %}{% if in_library %} -
Reserve It
+
Reserve It
{% else %}{% if status == 'ACTIVE' or status == 'SUCCESSFUL' %} {% if not library or not in_library %}
diff --git a/frontend/templates/purchase.html b/frontend/templates/purchase.html index 49f4b6e7..0f218a7d 100644 --- a/frontend/templates/purchase.html +++ b/frontend/templates/purchase.html @@ -1,5 +1,6 @@ {% extends "basepledge.html" %} {% load humanize %} +{% load lib_acqs %} {% block title %}Pledge{% endblock %} @@ -64,15 +65,22 @@
{% ifequal work.last_campaign.status "ACTIVE" %} +{% lib_acqs %}
-
+ {% if next_acq %} +
This ebook can be reserved from your library.
+
Available starting {{ next_acq.refreshes|date:"M j, Y"}} at {{ next_acq.user }}.
+
Reserve Now
+
+
If you'd rather not wait, consider one of the purchase options.
+ {% endif %} {% csrf_token %} {{ form.non_field_errors }} {% if work.offers.all|length > 1 %} -
Individual or Library License?
+
Purchase Options: Individual or Library?
diff --git a/frontend/templates/work.html b/frontend/templates/work.html index 84c616c9..0182fcfa 100644 --- a/frontend/templates/work.html +++ b/frontend/templates/work.html @@ -2,6 +2,7 @@ {% load comments %} {% load humanize %} {% load purchased %} +{% load lib_acqs %} {% block title %}— {% if work.first_ebook %} {{ work.title }} is a Free eBook @@ -60,6 +61,7 @@ {% block content %} {% purchased %} +{% lib_acqs %} {% with work.last_campaign_status as status %} {% with work.id as work_id %}
@@ -475,7 +477,7 @@ {% else %}{% if borrowable %}
{% else %} -
+
{% endif %}{% endif %} {% endif %} {% else %} diff --git a/static/css/pledge.css b/static/css/pledge.css index 267fec22..eaa4e665 100644 --- a/static/css/pledge.css +++ b/static/css/pledge.css @@ -1 +1 @@ -.header-text{height:36px;line-height:36px;display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;-moz-border-radius:32px;-webkit-border-radius:32px;border-radius:32px;color:white;cursor:pointer;font-size:13px;font-weight:bold;padding:0 15px;border:0;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#content-block .jsmod-content,.book-detail{float:left;width:auto}input[type="submit"]{float:right;font-size:19px;margin:10px 0 10px;cursor:pointer}.pledge_amount{padding:10px;font-size:19px;background:#edf3f4}.pledge_amount.premium_level{margin-top:3px}form.pledgeform{width:470px}#id_preapproval_amount{width:50%;line-height:30px;font-size:15px}ul.support li,ul.support li:hover{background-image:none}p{margin:7px auto}.jsmodule.pledge{margin:auto}.jsmodule.pledge .jsmod-content{float:right!important}.modify_notification{width:452px;margin-bottom:7px;border:solid 2px #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:7px}.modify_notification h4{margin:0 0 5px 0}.cancel_notice{width:470px;padding:5px;margin-top:10px}#fakepledgesubmit{background-color:#e35351;cursor:default;font-weight:bold;font-size:19px;display:none}span.menu-item-price{float:none!important}#mandatory_premiums{font-size:15px}#mandatory_premiums div{float:left}#mandatory_premiums div.ack_level{width:16%;margin-right:3%;height:100%;padding:1%}#mandatory_premiums div.ack_header{width:73%;padding:1%}#mandatory_premiums div.ack_active,#mandatory_premiums div.ack_inactive{width:100%;font-size:13px}#mandatory_premiums div.ack_active .ack_header,#mandatory_premiums div.ack_active .ack_level{border:solid #3d4e53;border-width:1%;background:white}#mandatory_premiums div.ack_inactive .ack_header,#mandatory_premiums div.ack_inactive .ack_level{border:solid #d6dde0;border-width:1%;background:#d6dde0}#mandatory_premiums div.ack_inactive input,#mandatory_premiums div.ack_inactive textarea{background:#d6dde0;border:dashed 1px #3d4e53}#mandatory_premiums>div{margin:7px 0}#mandatory_premiums input[type=text],#mandatory_premiums textarea{width:95%;font-size:15px;color:#3d4e53;margin:5px 0}#mandatory_premiums input[type=text]{height:19.5px;line-height:19.5px}#id_ack_link{border:0;cursor:default}.fund_options a.fakeinput{font-size:19px;margin:10px auto;float:left;line-height:normal}.fund_options input[type="submit"]{float:left}.fund_options div{width:50%;float:left}.fund_options div ul{background:#edf3f4}.fund_options div.highlight{color:#73a334}.fund_options div.highlight ul{border-color:#a7c1ca;background:white}.fund_options ul{padding:5px 10px 5px 15px;border:solid 1px #d6dde0;margin-right:15px;list-style-type:none}.fund_options ul li{margin:5px 0}.fund_options ul a{color:#6994a3}#authorize{border:3px solid #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin-top:10px;padding:10px}#authorize.off{display:none}#authorize div.innards input[type="text"],#authorize div.innards input[type="password"]{font-size:15px;line-height:22.5px;border-width:2px;padding:1% 1%;margin:1% 0;color:#3d4e53}#authorize div.innards input[type="text"]:disabled,#authorize div.innards input[type="password"]:disabled{border-color:white}#authorize div.innards input[type="text"].address,#authorize div.innards input[type="password"].address,#authorize div.innards input[type="text"]#card_Number,#authorize div.innards input[type="password"]#card_Number{width:61%}#authorize div.innards label{width:31%;float:left;line-height:22.5px;font-size:15px;border:solid white;border-width:2px 0;padding:1% 2% 1% 0;margin:1% 0;text-align:right}#authorize div.innards .form-row span{float:left;line-height:22.5px;font-size:15px;margin:1%;padding:1% 0}#authorize .cvc{position:relative;z-index:0}#authorize #cvc_help{font-style:italic;float:none;font-size:13px;color:#6994a3;cursor:pointer}#authorize #cvc_answer{display:none;z-index:100;border:2px solid #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:1% 0;padding:1%;width:46%;position:absolute;top:90%;right:0;opacity:1;background-color:white}#authorize #cvc_answer img{float:right;margin-left:5px}.payment-errors{display:none;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center;-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;width:auto;margin:auto}.payment-errors li{list-style:none;border:0}span.level2.menu.answer{border-left:solid 7px #edf3f4}span.level2.menu.answer a{font-size:15px}#anonbox{margin-top:10px;background:#edf3f4;float:left;width:48%;padding:1%} \ No newline at end of file +.header-text{height:36px;line-height:36px;display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;-moz-border-radius:32px;-webkit-border-radius:32px;border-radius:32px;color:white;cursor:pointer;font-size:13px;font-weight:bold;padding:0 15px;border:0;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#content-block .jsmod-content,.book-detail{float:left;width:auto}input[type="submit"],a.fakeinput{float:right;font-size:19px;margin:10px 0 10px;cursor:pointer}.pledge_amount{padding:10px;font-size:19px;background:#edf3f4}.pledge_amount.premium_level{margin-top:3px}form.pledgeform{width:470px}#id_preapproval_amount{width:50%;line-height:30px;font-size:15px}ul.support li,ul.support li:hover{background-image:none}p{margin:7px auto}.jsmodule.pledge{margin:auto}.jsmodule.pledge .jsmod-content{float:right!important}.modify_notification{width:452px;margin-bottom:7px;border:solid 2px #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:7px}.modify_notification h4{margin:0 0 5px 0}.cancel_notice{width:470px;padding:5px;margin-top:10px}#fakepledgesubmit{background-color:#e35351;cursor:default;font-weight:bold;font-size:19px;display:none}span.menu-item-price{float:none!important}#mandatory_premiums{font-size:15px}#mandatory_premiums div{float:left}#mandatory_premiums div.ack_level{width:16%;margin-right:3%;height:100%;padding:1%}#mandatory_premiums div.ack_header{width:73%;padding:1%}#mandatory_premiums div.ack_active,#mandatory_premiums div.ack_inactive{width:100%;font-size:13px}#mandatory_premiums div.ack_active .ack_header,#mandatory_premiums div.ack_active .ack_level{border:solid #3d4e53;border-width:1%;background:white}#mandatory_premiums div.ack_inactive .ack_header,#mandatory_premiums div.ack_inactive .ack_level{border:solid #d6dde0;border-width:1%;background:#d6dde0}#mandatory_premiums div.ack_inactive input,#mandatory_premiums div.ack_inactive textarea{background:#d6dde0;border:dashed 1px #3d4e53}#mandatory_premiums>div{margin:7px 0}#mandatory_premiums input[type=text],#mandatory_premiums textarea{width:95%;font-size:15px;color:#3d4e53;margin:5px 0}#mandatory_premiums input[type=text]{height:19.5px;line-height:19.5px}#id_ack_link{border:0;cursor:default}.fund_options a.fakeinput{font-size:19px;margin:10px auto;float:left;line-height:normal}.fund_options input[type="submit"]{float:left}.fund_options div{width:50%;float:left}.fund_options div ul{background:#edf3f4}.fund_options div.highlight{color:#73a334}.fund_options div.highlight ul{border-color:#a7c1ca;background:white}.fund_options ul{padding:5px 10px 5px 15px;border:solid 1px #d6dde0;margin-right:15px;list-style-type:none}.fund_options ul li{margin:5px 0}.fund_options ul a{color:#6994a3}#authorize{border:3px solid #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin-top:10px;padding:10px}#authorize.off{display:none}#authorize div.innards input[type="text"],#authorize div.innards input[type="password"]{font-size:15px;line-height:22.5px;border-width:2px;padding:1% 1%;margin:1% 0;color:#3d4e53}#authorize div.innards input[type="text"]:disabled,#authorize div.innards input[type="password"]:disabled{border-color:white}#authorize div.innards input[type="text"].address,#authorize div.innards input[type="password"].address,#authorize div.innards input[type="text"]#card_Number,#authorize div.innards input[type="password"]#card_Number{width:61%}#authorize div.innards label{width:31%;float:left;line-height:22.5px;font-size:15px;border:solid white;border-width:2px 0;padding:1% 2% 1% 0;margin:1% 0;text-align:right}#authorize div.innards .form-row span{float:left;line-height:22.5px;font-size:15px;margin:1%;padding:1% 0}#authorize .cvc{position:relative;z-index:0}#authorize #cvc_help{font-style:italic;float:none;font-size:13px;color:#6994a3;cursor:pointer}#authorize #cvc_answer{display:none;z-index:100;border:2px solid #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:1% 0;padding:1%;width:46%;position:absolute;top:90%;right:0;opacity:1;background-color:white}#authorize #cvc_answer img{float:right;margin-left:5px}.payment-errors{display:none;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center;-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;width:auto;margin:auto}.payment-errors li{list-style:none;border:0}span.level2.menu.answer{border-left:solid 7px #edf3f4}span.level2.menu.answer a{font-size:15px}#anonbox{margin-top:10px;background:#edf3f4;float:left;width:48%;padding:1%} \ No newline at end of file diff --git a/static/less/pledge.less b/static/less/pledge.less index 8305bca1..c206d45f 100644 --- a/static/less/pledge.less +++ b/static/less/pledge.less @@ -5,7 +5,7 @@ width: auto; } -input[type="submit"] { +input[type="submit"], a.fakeinput { float: right; font-size: @font-size-header; margin: 10px 0 10px; @@ -294,4 +294,4 @@ span.level2.menu.answer { float: left; width: 48%; padding: 1%; -} \ No newline at end of file +}