Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make the pledge to fight back better

  • Loading branch information...
commit 8b738f0b015463fdcddb64fb26af490ac4aeb956 1 parent 2678011
Justine Tunney authored
View
2  occupywallst/templates/occupywallst/base.html
@@ -26,6 +26,7 @@
</head>
<body class="{% block body_class %}{% endblock %}">
+{% block addthis %}
<div style="top:180px;left:50%;position:fixed;width:0pt;height:0pt">
<div class="addthis_bar addthis_bar_vertical addthis_bar_large" style="left:-560px;position:relative;height:275px;width:65px">
<div class="addthis_toolbox addthis_default_style">
@@ -37,6 +38,7 @@
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4f3871aa2b611a75"></script>
</div>
+{% endblock addthis %}
{% if DEBUG %}
<div id="devnotice">DEVELOPMENT MODE</div>
View
26 occupywallst/templates/occupywallst/fightback.html
@@ -17,34 +17,15 @@
input[type="submit"] { font-weight: bold; padding: 0.5em 1em; }
acronym { border-bottom: 1px dotted black; cursor: help; }
#pledges p { font-size: 12px; border-bottom: 1px solid #e9e9e9; padding: 0 0 0.5em 0; margin: 0 0 0.5em 0; }
+ #pledges p a { color: black; }
#pledges p:last-child { border-bottom: none; }
#pledges p small { font-size: 9px; color: #666; }
- .thankyou {
- line-height: 1.5;
- margin: 0 0 1em 0;
- text-align: center;
- font-size: 16px;
- font-weight: bold;
- padding: 1em;
- background-color: #DFF0D8;
- border-color: #D6E9C6;
- color: #468847;
- border: 1px solid #FBEED5;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
- }
- .thankyou big { font-size: 22px; }
+ #pledges .viewmore { font-weight: bold; font-size: 14px; }
</style>
<table id="funtable" width="100%">
<tr><td class="lefty">
- {% if thanks %}
- <p class="thankyou"><big>Thank you for signing the pledge!</big><br/> Please be sure to tell your friends</p>
- {% endif %}
-
<h1>Occupy's Pledge to FIGHT BACK</h1>
<h2>We Didn’t Start the Class War</h2>
<p>The 1% wreck our economy, kill our jobs, seize our homes, assault our rights, destroy the environment, and sentence us to lives of debt and war. For years, we have petitioned our governments for change without redress and have fought tirelessly to elect politicians who only betray us. In a world where the 1% have usurped democracy and politicians refuse to serve the people, the people have but one choice—<em>to fight back!</em></p>
@@ -93,8 +74,9 @@
<h3>{{ count }} people have signed the pledge</h3>
<div id="pledges">
{% for signature in signatures %}
- <p><strong>{{ signature.name }}</strong> pledged to {{ signature.describe_pledges }} <small>{{ signature.created|timesince_short }} ago</small></p>
+ <p><a href="/fightback/{{ signature.id }}/"><strong>{{ signature.name }}</strong> pledged to {{ signature.describe_pledges }} <small>{{ signature.created|timesince_short }} ago</small></a></p>
{% endfor %}
+ <a class="viewmore" href="/fightback/all/">View More</a>
</div>
</td></tr></table>
View
69 occupywallst/templates/occupywallst/fightback_sig.html
@@ -0,0 +1,69 @@
+{% extends base %}
+{% load ows i18n l10n %}
+{% block title %}{{ pledge.name }} Pledged to Fight Back{% endblock title %}
+{% block description %}I just signed &quot;Occupy's Pledge to FIGHT BACK&quot; against the class war waged against the 99%{% endblock description %}
+{% block addthis %}{% endblock addthis %}
+
+{% block content %}
+ <style>
+ .graphic { float: right; margin-left: 1em; }
+ h1 a { color: #333; }
+ h2.subby { margin-top: 0; color: #a33; }
+ .what strong { font-size: 25px; }
+ #pledges { width: 700px; }
+ #pledges p { font-size: 12px; margin: 5px; }
+ #pledges p small { font-size: 9px; color: #666; }
+ .thankyou {
+ line-height: 1.5;
+ margin: 0 0 1em 0;
+ text-align: center;
+ font-size: 16px;
+ font-weight: bold;
+ padding: 1em;
+ background-color: #DFF0D8;
+ border-color: #D6E9C6;
+ color: #468847;
+ border: 1px solid #FBEED5;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+ }
+ .thankyou big { font-size: 22px; }
+ </style>
+
+ {% if thanks %}
+ <p class="thankyou"><big>Thank you for signing the pledge!</big><br/> Let your friends know by clicking the social media buttons below</p>
+ {% endif %}
+
+ <div class="graphic"><a href=".."><img title="Doc Bloc at #N17 (Photo Credit: Erik R. McGregor)" alt="Doc Bloc at #N17 (Photo Credit: Erik R. McGregor)" src="http://i.imgur.com/UVMC9m.jpg" width="320" height="212"/></a></div>
+ <h1><a href="..">Occupy's Pledge to FIGHT BACK</a></h1>
+ <h2 class="subby">We Didn’t Start the Class War</h2>
+ <p class="what"><strong>{{ pledge.name }}</strong> pledged on <time>{{ pledge.created|date:"F j, Y" }} at {{ pledge.created|date:"g:i a e" }}</time> to fight back against the 1% by doing the following:</p>
+ <ol>
+ {% if pledge.streets %}<li>Come out in the streets when Occupy calls for a day of action.</li>{% endif %}
+ {% if pledge.meet %}<li>Attend at least one meeting with their local Occupy group.</li>{% endif %}
+ {% if pledge.social %}<li>Help promote #occupy news and actions via social media.</li>{% endif %}
+ {% if pledge.donate %}<li>Donate what they make in one hour to an Occupy-related project.</li>{% endif %}
+ {% if pledge.strike %}<li>Never go to work during a <a href="http://pink-scare.blogspot.com/2011/10/what-is-general-strike.html">general strike</a>.</li>{% endif %}
+ {% if pledge.organize %}<li>Help organize their co-workers to make demands.</li>{% endif %}
+ {% if pledge.train %}<li>Attend a direct action / civil disobedience training session.</li>{% endif %}
+ {% if pledge.bank %}<li>Dump their bank and join a credit union.</li>{% endif %}
+ {% if pledge.occupy %}<li>Start an <a href="http://en.wikipedia.org/wiki/Affinity_group">affinity group</a> to <em>occupy</em> something.</li>{% endif %}
+ </ol>
+
+
+<!-- AddThis Button BEGIN -->
+<div class="addthis_toolbox addthis_default_style ">
+<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
+<a class="addthis_button_tweet"></a>
+<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
+<a class="addthis_counter addthis_pill_style"></a>
+</div>
+<script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
+<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f3871aa2b611a75"></script>
+<!-- AddThis Button END -->
+
+<p><strong><a href="/fightback/all/">{{ count }} others</a> also signed the pledge.</strong> Will you pledge to fight back too? <a href="..">Click Here</a></p>
+
+{% endblock content %}
View
25 occupywallst/templates/occupywallst/fightback_sigs.html
@@ -0,0 +1,25 @@
+{% extends base %}
+{% load ows i18n l10n %}
+{% block title %}All Signatures | Occupy's Pledge to FIGHT BACK{% endblock title %}
+{% block description %}Full list of people who signed the pledge to fight back.{% endblock description %}
+
+{% block content %}
+ <style>
+ h1 a { color: black; }
+ h2 { margin-top: 0; color: #a00; }
+ #pledges { width: 700px; }
+ #pledges p { font-size: 12px; margin: 5px; }
+ #pledges p a { color: black; }
+ #pledges p small { font-size: 9px; color: #666; }
+ </style>
+
+ <h1><a href="..">Occupy's Pledge to FIGHT BACK</a></h1>
+ <h2>We Didn’t Start the Class War</h2>
+ <h3>{{ count }} People Signed the Pledge</h3>
+ <div id="pledges">
+ {% for signature in signatures %}
+ <p><a href="/fightback/{{ signature.id }}/"><strong>{{ signature.name }}</strong> pledged to {{ signature.describe_pledges }} <small>{{ signature.created|timesince_short }} ago</small></a></p>
+ {% endfor %}
+ </div>
+
+{% endblock content %}
View
2  occupywallst/urls.py
@@ -24,6 +24,8 @@
url(r'^(?P<prefix>forum/archive/)((?P<month>[A-Za-z]{3,})-((?P<day>[1-3]?\d)-)?(?P<year>\d{4})/)?(page-(?P<page>\d+)/)?$', 'occupywallst.views.archive', {'is_forum': True, 'per_page': 50}),
url(r'^article/(?P<slug>[-_\d\w]+)/$', 'occupywallst.views.article', name='article'),
url(r'^fightback/$', 'occupywallst.views.fightback', name='fightback'),
+ url(r'^fightback/(?P<pledgeid>\d+)/$', 'occupywallst.views.fightback_sig', name='fightback_sig'),
+ url(r'^fightback/all/$', 'occupywallst.views.fightback_sigs', name='fightback_sigs'),
url(r'^forum/$', 'occupywallst.views.forum', name='forum'),
url(r'^forum/search/$', 'occupywallst.views.forum_search', name='forum-search'),
url(r'^forum/comments/$', 'occupywallst.views.forum_comments', name='forum-comments'),
View
38 occupywallst/views.py
@@ -516,11 +516,6 @@ def confirm(request, token):
def fightback(request):
"""Occupy's Pledge to FIGHT BACK"""
- if 'thanks' in request.session:
- thanks = True
- del request.session['thanks']
- else:
- thanks = False
count = db.Pledge.objects.count()
signatures = (db.Pledge.objects
.filter(is_public=True)
@@ -532,12 +527,39 @@ def fightback(request):
pledge.ip = request.META['REMOTE_ADDR']
pledge.save()
request.session['thanks'] = 1
- return HttpResponseRedirect('.')
+ return HttpResponseRedirect('/fightback/%d/' % (pledge.id))
else:
form = forms.PledgeForm()
return render_to_response(
'occupywallst/fightback.html', {'form': form,
'count': count,
- 'signatures': signatures,
- 'thanks': thanks},
+ 'signatures': signatures},
+ context_instance=RequestContext(request))
+
+
+def fightback_sig(request, pledgeid):
+ """Show one fightback signature"""
+ if 'thanks' in request.session:
+ thanks = True
+ del request.session['thanks']
+ else:
+ thanks = False
+ count = db.Pledge.objects.count()
+ pledge = db.Pledge.objects.get(id=pledgeid)
+ return render_to_response(
+ 'occupywallst/fightback_sig.html', {"pledge": pledge,
+ "thanks": thanks,
+ "count": count},
+ context_instance=RequestContext(request))
+
+
+def fightback_sigs(request):
+ """List all fightback signatures"""
+ count = db.Pledge.objects.count()
+ signatures = (db.Pledge.objects
+ .filter(is_public=True)
+ .order_by('-created'))
+ return render_to_response(
+ 'occupywallst/fightback_sigs.html', {'signatures': signatures,
+ "count": count},
context_instance=RequestContext(request))
Please sign in to comment.
Something went wrong with that request. Please try again.