From 9a6ea26266bbacb27fd408e98646dcb2c02349e5 Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Sun, 13 May 2012 15:23:04 -0400 Subject: [PATCH] check to see if people have pledged and if so direct them to pledge_modify from sidebar rather than spawning new pledge --- frontend/templates/pledge.html | 17 ++++++----- frontend/templates/work.html | 55 +++++++++++++++++++++------------- static/css/pledge.css | 12 ++++++++ static/less/pledge.less | 12 ++++++++ 4 files changed, 69 insertions(+), 27 deletions(-) diff --git a/frontend/templates/pledge.html b/frontend/templates/pledge.html index 4e334717..b9fd1acf 100644 --- a/frontend/templates/pledge.html +++ b/frontend/templates/pledge.html @@ -45,14 +45,17 @@ -
+
{% if faqmenu == 'modify' %} -
You've already pledged to this campaign.
- Amount: ${{preapproval_amount}}.
- Your premium: {% if premium_description %}{{ premium_description }}{% else %}You did not request a premium for this campaign.{% endif %}
- If you would like to modify your pledge, please use the following form.
+

You've already pledged to this campaign:

+
+ Amount: ${{preapproval_amount}}.
+ Your premium: {% if premium_description %}{{ premium_description }}{% else %}You did not request a premium for this campaign.{% endif %}
+
+
You can modify your pledge below. +
{% endif %} {% comment %} @@ -89,8 +92,8 @@
- -{% if faqmenu == 'modify' %}
We hope you won't, but of course you're also free to cancel your pledge.
{% endif %} +
+{% if faqmenu == 'modify' %}
We hope you won't, but of course you're also free to cancel your pledge.
{% endif %} {% endblock %} diff --git a/frontend/templates/work.html b/frontend/templates/work.html index 2235a250..d907d3c5 100644 --- a/frontend/templates/work.html +++ b/frontend/templates/work.html @@ -51,6 +51,7 @@ $j(document).ready(function(){ {% block content %} {% with work.last_campaign_status as status %} +{% with work.id as work_id %}
@@ -122,9 +123,9 @@ $j(document).ready(function(){
{% if status == 'ACTIVE' %} {% if pledged %} -
+
{% else %} -
+
{% endif %} {% endif %}
@@ -159,13 +160,13 @@ $j(document).ready(function(){ {% if work.googlebooks_id %} Find on Google Books {% endif %} - Find on OpenLibrary + Find on OpenLibrary {% if not request.user.is_anonymous %} {% if request.user.profile.goodreads_user_link %} - Find on GoodReads + Find on GoodReads {% endif %} {% if request.user.profile.librarything_id %} - Find on LibraryThing + Find on LibraryThing {% endif %} {% endif %}
@@ -197,7 +198,7 @@ $j(document).ready(function(){
{% if request.user.is_anonymous %} {% else %}{% if request.user.id in work.last_campaign.supporters %}
@@ -205,11 +206,11 @@ $j(document).ready(function(){
{% else %}{% if work in request.user.wishlist.works.all %}
- Remove This + Remove This
{% else %}
- Add to Wishlist + Add to Wishlist
{% endif %}{% endif %}{% endif %}
@@ -321,7 +322,7 @@ $j(document).ready(function(){

Editions

{% if user.is_staff %} -
Create a new edition for this work

+
Create a new edition for this work

{% endif %} {% if alert %}
Ebook Contribution:
{{ alert }}
{% endif %} @@ -336,7 +337,7 @@ $j(document).ready(function(){ OCLC: {{ edition.oclc }}
{% endif %} {% if user.is_staff %} - Edit this edition
+ Edit this edition
{% endif %} {% if edition.googlebooks_id %} See this edition on Google Books @@ -391,16 +392,29 @@ $j(document).ready(function(){

Support

@@ -410,4 +424,5 @@ $j(document).ready(function(){ {% endwith %} +{% endwith %} {% endblock %} diff --git a/static/css/pledge.css b/static/css/pledge.css index f271b11a..eb8371bf 100644 --- a/static/css/pledge.css +++ b/static/css/pledge.css @@ -124,3 +124,15 @@ p { .jsmodule.pledge .jsmod-content { float: right !important; } +.modify_notification { + width: 452px; + margin-bottom: 7px; + border: solid 2px #8dc63f; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + padding: 7px; +} +.modify_notification h4 { + margin: 0 0 5px 0; +} diff --git a/static/less/pledge.less b/static/less/pledge.less index 34209128..e7951e93 100644 --- a/static/less/pledge.less +++ b/static/less/pledge.less @@ -42,4 +42,16 @@ p { .jsmod-content { float: right !important; } +} + +.modify_notification { + width: 452px; + margin-bottom: 7px; + border: solid 2px @call-to-action; + .one-border-radius(5px); + padding: 7px; + + h4 { + margin: 0 0 5px 0; + } } \ No newline at end of file