[pirate-politics] r541 committed - fixes for some issues, font changed back

2 views
Skip to first unread message

pirate-...@googlecode.com

unread,
Feb 8, 2011, 10:29:01 PM2/8/11
to pirate-poli...@googlegroups.com
Revision: 541
Author: fragro
Date: Tue Feb 8 19:28:28 2011
Log: fixes for some issues, font changed back
http://code.google.com/p/pirate-politics/source/detail?r=541

Modified:
/trunk/pirate-politics/new_templates/_commentform.html
/trunk/pirate-politics/new_templates/_issue.html
/trunk/pirate-politics/new_templates/_solution.html
/trunk/pirate-politics/new_templates/_sourcetags.html
/trunk/pirate-politics/new_templates/_tutorial.html
/trunk/pirate-politics/new_templates/argument_detail.html
/trunk/pirate-politics/new_templates/issue_detail.html
/trunk/pirate-politics/new_templates/issues.html
/trunk/pirate-politics/new_templates/solution_detail.html
/trunk/pirate-politics/new_templates/solutions.html
/trunk/pirate-politics/new_templates/submit_nay_argument.html
/trunk/pirate-politics/new_templates/submit_solution.html
/trunk/pirate-politics/new_templates/submit_yea_argument.html
/trunk/pirate-politics/new_templates/topics.html
/trunk/pirate-politics/new_templates/welcome.html
/trunk/pirate-politics/pirate_core/templatetags/tag_helpers.py
/trunk/pirate-politics/pirate_deliberation/models.py
/trunk/pirate-politics/pirate_deliberation/templatetags/argumenttags.py
/trunk/pirate-politics/static/style.css

=======================================
--- /trunk/pirate-politics/new_templates/_commentform.html Mon Jan 31
19:55:57 2011
+++ /trunk/pirate-politics/new_templates/_commentform.html Tue Feb 8
19:28:28 2011
@@ -4,22 +4,20 @@


{% if request.user.is_authenticated %}
-<div class = "comments">
<a href="javascript:;" onmousedown="toggleSlide('add_comment');"><h3>add
comment</h3></a>
-<div id="add_comment" style="display:none; overflow:hidden; height:180px;">
- {% pp_comment_form POST=request.POST path=request.path
user=request.user object=request.object%}
- {{ pp_comment.form.errors }}
- <form method="post" action="">
- {{ pp_comment.form.text}}
- {{ pp_comment.form.parent}}
- {{pp_comment.form.form_id}}
- {% csrf_token %}
- <input type="submit" class='button green' value="Submit
Comment">
- </form>
- {% endpp_comment_form %}
-</div>
-</div>
+ <div id="add_comment" style="display:none; overflow:hidden;
height:180px;">
+ {% pp_comment_form POST=request.POST path=request.path
user=request.user object=request.object%}
+ <div class="errors">{{ pp_comment.form.errors }}</div>
+ <form method="post" action="">
+ {{ pp_comment.form.text}}
+ {{ pp_comment.form.parent}}
+ {{pp_comment.form.form_id}}
+ {% csrf_token %}
+ <input type="submit" class='button green' value="Submit
Comment">
+ </form>
+ {% endpp_comment_form %}
+ </div>

{% else %}
-<a href="/register.html"><h3>add_comment</h3></a>
+<a href="/register.html"><h3>add comment</h3></a>
{% endif %}
=======================================
--- /trunk/pirate-politics/new_templates/_issue.html Sun Feb 6 23:05:17
2011
+++ /trunk/pirate-politics/new_templates/_issue.html Tue Feb 8 19:28:28
2011
@@ -14,15 +14,11 @@
<div class="issue">
<div class="bullet">
{% if request.user.is_authenticated %}
- {% pp_consensus_get
object=iss_obj.content_object.id user=request.user %}
- <h1> {{ pp_consensus.interest|floatformat:0 }}
+ <h1> {{ iss_obj.interest|floatformat:0 }}
</h1>
- {% endpp_consensus_get %}
{% else %}
- {% pp_consensus_get
object=iss_obj.content_object.id %}
- <h1> {{ pp_consensus.interest|floatformat:0 }}
+ <h1> {{ iss_obj.interest|floatformat:0 }}
</h1>
- {% endpp_consensus_get %}
{% endif %}
<!-- <div class="bullet_daylight"></div>
<div class="bullet_verdict"></div> -->
@@ -41,7 +37,7 @@

</div>
<div class="iss_col2">
- <a href="{% pp_url
template='solutions.html' object=iss_obj.content_object
dimension=request.dimension %}" class="button blue">see {{
iss_obj.content_object.solutions}} solution{{
iss_obj.content_object.solutions|pluralize }}</a>
+ <a href="{% pp_url
template='solutions.html' object=iss_obj.content_object
dimension=request.dimension start=0 end=20 %}" class="button blue">see_{{
iss_obj.content_object.solutions}}_solution{{
iss_obj.content_object.solutions|pluralize }}</a>

</div>
<div class="isstags">
=======================================
--- /trunk/pirate-politics/new_templates/_solution.html Sun Feb 6 23:05:17
2011
+++ /trunk/pirate-politics/new_templates/_solution.html Tue Feb 8 19:28:28
2011
@@ -12,15 +12,11 @@
<div class="issue">
<div class="bullet">
{% if request.user.is_authenticated %}
- {% pp_consensus_get
object=iss_obj.content_object.id user=request.user %}
- <h1> {{ pp_consensus.interest|floatformat:0 }}
+ <h1> {{ iss_obj.interest|floatformat:0 }}
</h1>
- {% endpp_consensus_get %}
{% else %}
- {% pp_consensus_get
object=iss_obj.content_object.id %}
- <h1> {{ pp_consensus.interest|floatformat:0 }}
+ <h1> {{ iss_obj.interest|floatformat:0 }}
</h1>
- {% endpp_consensus_get %}
{% endif %}
<!-- <div class="bullet_daylight"></div>
<div class="bullet_verdict"></div> -->
=======================================
--- /trunk/pirate-politics/new_templates/_sourcetags.html Sun Feb 6
23:05:17 2011
+++ /trunk/pirate-politics/new_templates/_sourcetags.html Tue Feb 8
19:28:28 2011
@@ -17,12 +17,26 @@
{% comment %}<a href="javascript:;"
onmousedown="toggleSlide('mydiv2');">+image</a>
{% endcomment %}
{% endifequal %}
+
+ {% pp_get_sources object=request.object %}
+ <ul>
+ {% for urlsource in pp_source.urlsource_list %}
+ <li>
+ {% ifequal request.user request.object.user %}
+ <a href="{{urlsource.url}}">{{urlsource.url}}</a> <a
href="/sourcedelete/{{urlsource.id}}/" class="small button red">-</a>
+ {% else %}
+ <a href="{{urlsource.url}}">{{urlsource.url}}</a>
+ {% endifequal %}
+ </li>
+ {% endfor %}
+ {% endpp_get_sources %}
+ </ul>
+
{% ifequal request.user request.object.user %}

<div id="mydiv" style="display:none; overflow:hidden;
height:30px;">

{% pp_urlsource_form POST=request.POST
object=request.object user=request.user %}
- <div id = "add">
{{ pp_source.form.errors }}
<form method="post" action="">
{{ pp_source.urlform.url}}
@@ -30,27 +44,12 @@
{% csrf_token %}
<input type="submit" class="button green"
value="Submit URL">
</form>
- </div>
{% endpp_urlsource_form %}
</div>

{% endifequal %}
-
- {% pp_get_sources object=request.object %}
- <ul>
- {% for urlsource in pp_source.urlsource_list %}
- <li>
- {% ifequal request.user request.object.user %}
- <a href="{{urlsource.url}}">{{urlsource.url}}</a> <a
href="/sourcedelete/{{urlsource.id}}/" class="small button red">-</a>
- {% else %}
- <a href="{{urlsource.url}}">{{urlsource.url}}</a>
- {% endifequal %}
- </li>
- {% empty %}
- No Sources
- {% endfor %}
- {% endpp_get_sources %}
- </ul>
+
+

</div>
{% if request.object.taggable %}
=======================================
--- /trunk/pirate-politics/new_templates/_tutorial.html Thu Jan 27 20:02:47
2011
+++ /trunk/pirate-politics/new_templates/_tutorial.html Tue Feb 8 19:28:28
2011
@@ -5,6 +5,7 @@
<tr><th>Typing this</th><th>Results in this</th></tr>
<tr><td>Header<br>----</td><td><h2>Header</h2></td></tr>
<tr><td>*italicize*</td><td><i>italicize</i></td></tr>
+ <tr><td>[link](http://openassembly.org)</td><td><a
href="http://openassembly.com">link</a></td></tr>
<tr><td>Horizontal line<br><br>---</td><td>Horizontal line<hr></td></tr>
<tr><td>>Block<br>>quotes<br></td><td><blockquote>Block
quote</blockquote></td</tr>
</table>
=======================================
--- /trunk/pirate-politics/new_templates/argument_detail.html Sun Feb 6
23:05:17 2011
+++ /trunk/pirate-politics/new_templates/argument_detail.html Tue Feb 8
19:28:28 2011
@@ -6,6 +6,10 @@
{% load tag_helpers %}
{% load commenttags %}
{% load markup %}
+
+{% block browser_bar %}
+
+{% endblock %}

{% block content %}
<div class="stage">
@@ -18,7 +22,6 @@

<div class="issuebound">

-
<div class="issue">

{% pp_consensus_get object=request.object.id user=request.user %}
=======================================
--- /trunk/pirate-politics/new_templates/issue_detail.html Sun Feb 6
23:05:17 2011
+++ /trunk/pirate-politics/new_templates/issue_detail.html Tue Feb 8
19:28:28 2011
@@ -43,19 +43,26 @@

<div class="header">{{pp_issue.issue.name}}</div>

-<div class="userinfo">submitted by <a href="{% pp_url
template='user_profile.html'
object=pp_issue.issue.user%}">{{pp_issue.issue.user.username}}</a>
+<div class="userinfo">
+
+<div class="info">
+
+submitted by <a href="{% pp_url template='user_profile.html'
object=pp_issue.issue.user%}">{{pp_issue.issue.user.username}}</a>

{% pp_comment_count object=pp_issue.issue.id %}
-
-{{pp_issue.issue.submit_date|date:"(d/m/Y h:sA)"}} | {{ pp_comment.count
}} comment{{ pp_comment.count|pluralize}} |
{{pp_consensus.consensus.interest|floatformat:0 }} interest
-
+
+{{pp_issue.issue.submit_date|date:"(d/m/Y h:sA)"}} | {{ pp_comment.count
}} comment{{ pp_comment.count|pluralize}} |
{{pp_consensus.consensus.interest|floatformat:0 }} interest
+</div>
+<div class="buttons">
{% ifequal pp_issue.issue.user request.user %}

- <a href="{% pp_url
template='submit_issue.html' object=pp_issue.issue %}" class='button
blue'>edit</a>
+ <a href="{% pp_url
template='submit_issue.html' object=pp_issue.issue %}" class="button
blue">edit</a>
{% endifequal %}

-<a href="{% pp_url template='solutions.html' object=pp_issue.issue
dimension=request.dimension %}" class="button blue">see {{
pp_issue.issue.solutions}} solution{{ pp_issue.issue.solutions|pluralize
}}</a>
- </div>
+<a href="{% pp_url template='solutions.html' object=pp_issue.issue
dimension=request.dimension start=0 end=20 %}" class="button blue">see_{{
pp_issue.issue.solutions}}_solution{{ pp_issue.issue.solutions|pluralize
}}</a>
+</div>
+
+</div>

{% endpp_comment_count %}

=======================================
--- /trunk/pirate-politics/new_templates/issues.html Sun Feb 6 23:05:17
2011
+++ /trunk/pirate-politics/new_templates/issues.html Tue Feb 8 19:28:28
2011
@@ -43,17 +43,19 @@
There doesn't seem to be anything here yet.
</div>
{% endfor %}
-
+ {% if pp_solution.count > 20 %}
<div class="pagination">
- <p>({{pp_issue.count}})<
+ <br> <p><
{% for s,e,n in request.rangelist %}
{% if not s > pp_issue.count %}
<a href="{% pp_url template='issues.html'
dimension=request.dimension object=request.object start=s end=e %}">{%
ifequal s request.start %}<b>{{n}}</b>{% else %}{{n}}{% endifequal %}</a>
{% endif %}
{% endfor %}
></p>
- {% endpp_get_issue_list %}
</div>
+ {% endif %}
+ {% endpp_get_issue_list %}
+

</div>

=======================================
--- /trunk/pirate-politics/new_templates/solution_detail.html Sun Feb 6
23:05:17 2011
+++ /trunk/pirate-politics/new_templates/solution_detail.html Tue Feb 8
19:28:28 2011
@@ -74,67 +74,57 @@


<div class="yea_argument">
- <h1>Yea Arguments
+ <h2>Yea Arguments
{% if request.user.is_authenticated %}
-<a href="{% pp_url template='submit_yea_argument.html'
object=pp_solution.solution %}">+</a>
-{% endif %}</h1>
+<a href="{% pp_url template='submit_yea_argument.html'
object=pp_solution.solution %}">add new</a>
+{% endif %}</h2>

<ul>

{% pp_get_argument_list object=pp_solution.solution
arg_type="yea" %}

{% for arg in pp_argumentation.argument_list %}
-
- {% if request.user.is_authenticated %}
+ <div class="argitr">
{% pp_consensus_get object=arg.id
user=request.user %}
- <li> {{pp_consensus.interest}} : <a
href="{% pp_url template='argument_detail.html'
object=arg %}">{{arg.name}}</a> </li>
+ <li> <b>{{pp_consensus.interest}}</b> <a
href="{% pp_url template='argument_detail.html'
object=arg %}">{{arg.name}}</a> </li>
{% endpp_consensus_get %}
- {% else %}
- {% pp_consensus_get object=arg.id %}
- <li> {{pp_consensus.interest}} : <a
href="{% pp_url template='argument_detail.html'
object=arg %}">{{arg.name}}</a> </li>
- {% endpp_consensus_get %}
-
- {% endif %}
-
-
- {% empty %} None yet!
+
+ </div>
+
+ {% empty %} None at the moment.
{% endfor %}
-
-

{% endpp_get_argument_list %}
-
-

</ul>

</div>

<div class="nay_argument">
- <h1>Nay Arguments
+ <h2>Nay Arguments
{% if request.user.is_authenticated %}
-<a href="{% pp_url template='submit_nay_argument.html'
object=pp_solution.solution %}">+</a>
-{% endif %}</h1>
+<a href="{% pp_url template='submit_nay_argument.html'
object=pp_solution.solution %}">add new</a>
+{% endif %}</h2>
<ul>

{% pp_get_argument_list object=pp_solution.solution
arg_type="nay" %}

{% for arg in pp_argumentation.argument_list %}
-
+ <div class="argitr">
{% pp_consensus_get object=arg.id
user=request.user %}
- <li> {{pp_consensus.interest}} : <a
href="{% pp_url template='argument_detail.html'
object=arg %}">{{arg.name}}</a> </li>
+ <li> <b>{{pp_consensus.interest}}</b><a
href="{% pp_url template='argument_detail.html'
object=arg %}">{{arg.name}}</a> </li>
{% endpp_consensus_get %}
-
-
- {% empty %} None yet!
+ </div>
+
+ {% empty %} None at the moment.
{% endfor %}

{% endpp_get_argument_list %}
</ul>
{% endpp_consensus_get %}

- </div>
-
+ </div> </div>
+ <div class="comments">
{% include '_commentform.html' %}

<div class="commentstructure">
@@ -147,8 +137,8 @@
{% endpp_comment_list_get%}
{% endpp_get_solution %}
</div>
-
- </div></div>
+ </div>
+ </div>
<div class="rightcol">

{% include "_rightcol.html" %}
=======================================
--- /trunk/pirate-politics/new_templates/solutions.html Sun Feb 6 23:05:17
2011
+++ /trunk/pirate-politics/new_templates/solutions.html Tue Feb 8 19:28:28
2011
@@ -11,9 +11,9 @@

{% block browser_bar %}
<ul>
- <li><a STYLE="text-decoration:none" href="{% pp_url
template='solutions.html' dimension='hot' object=request.object %}">{%
ifequal "hot" request.dimension %}<b>hot</b>{% else %}hot{%
endifequal %}</a></li> |
- <li><a STYLE="text-decoration:none" href="{% pp_url
template='solutions.html' dimension='cont' object=request.object %}">{%
ifequal "cont" request.dimension %}<b>controversial</b>{%
else %}controversial{% endifequal %}</a></li> |
- <li><a STYLE="text-decoration:none" href="{% pp_url
template='solutions.html' dimension='new' object=request.object %}">{%
ifequal "new" request.dimension %}<b>new</b>{% else %}new{%
endifequal %}</a></li>
+ <li><a STYLE="text-decoration:none" href="{% pp_url
template='solutions.html' dimension='hot' object=request.object
start=request.start end=request.end %}">{% ifequal "hot"
request.dimension %}<b>hot</b>{% else %}hot{% endifequal %}</a></li> |
+ <li><a STYLE="text-decoration:none" href="{% pp_url
template='solutions.html' dimension='cont' object=request.object
start=request.start end=request.end %}">{% ifequal "cont"
request.dimension %}<b>controversial</b>{% else %}controversial{%
endifequal %}</a></li> |
+ <li><a STYLE="text-decoration:none" href="{% pp_url
template='solutions.html' dimension='new' object=request.object
start=request.start end=request.end %}">{% ifequal "new"
request.dimension %}<b>new</b>{% else %}new{% endifequal %}</a></li>
</ul>
{% endblock %}

@@ -41,17 +41,23 @@
No solutions yet! Add a solution.

{% endfor %}
-
+
+ {% if pp_solution.count > 20 %}
<div class="pagination">
+ <br>
<p><
{% for s,e,n in request.rangelist %}
+
{% if not s > pp_solution.count %}
- <a href="{% pp_url template='issues.html'
dimension=request.dimension object=request.object start=s end=e %}">{%
ifequal s request.start %}<b>{{n}}</b>{% else %}{{n}}{% endifequal %}</a>
+ <a href="{% pp_url template='solutions.html'
dimension=request.dimension object=request.object start=s end=e %}">{%
ifequal s request.start %}<b>{{n}}</b>{% else %}{{n}}{% endifequal %}</a>
{% endif %}
+
{% endfor %}
></p>
- {% endpp_get_solution_list %}
</div>
+ {% endif %}
+ {% endpp_get_solution_list %}
+

</div>
<div class="rightcol">
=======================================
--- /trunk/pirate-politics/new_templates/submit_nay_argument.html Sun Feb
6 23:05:17 2011
+++ /trunk/pirate-politics/new_templates/submit_nay_argument.html Tue Feb
8 19:28:28 2011
@@ -14,7 +14,7 @@
{% pp_argument_form POST=request.POST path=request.path
object=request.object request=request arg_type='nay' %}
<div class="add">
<h2>Submit a new Nay argument for <br>{{request.object.name}}</h2>
- {{ pp_argumentation.form.errors }}
+ <div class="errors">{{ pp_argumentation.form.errors }}</div>
<form method="post" action="">
Name:<br>{{ pp_argumentation.form.name }}<br>
Argument:<br> {{ pp_argumentation.form.text }}
=======================================
--- /trunk/pirate-politics/new_templates/submit_solution.html Sun Feb 6
23:05:17 2011
+++ /trunk/pirate-politics/new_templates/submit_solution.html Tue Feb 8
19:28:28 2011
@@ -15,7 +15,7 @@
{% pp_solution_form POST=request.POST path=request.path
object=request.object request=request %}
<div class="add">
<h2>Submit a new solution for: <br>{{request.object.name}}</h2>
- {{ pp_solution.form.errors }}
+ <div class="errors">{{ pp_solution.form.errors }}</div>
<form method="post" action="">
Name: <br>{{ pp_solution.form.name }}<br>
Text: <br>{{ pp_solution.form.text }}
=======================================
--- /trunk/pirate-politics/new_templates/submit_yea_argument.html Sun Feb
6 23:05:17 2011
+++ /trunk/pirate-politics/new_templates/submit_yea_argument.html Tue Feb
8 19:28:28 2011
@@ -14,7 +14,7 @@
<h2>Submit a new Yea argument for: <br>{{request.object.name}}</h2>
{% pp_argument_form POST=request.POST path=request.path
object=request.object request=request arg_type='yea' %}
<div class="add">
- {{ pp_argumentation.form.errors }}
+ <div class="errors">{{ pp_argumentation.form.errors }}</div>
<form method="post" action="">
Name: <br>{{ pp_argumentation.form.name }}<br>
Argument: <br>{{ pp_argumentation.form.text }}<br>
=======================================
--- /trunk/pirate-politics/new_templates/topics.html Sun Feb 6 23:05:17
2011
+++ /trunk/pirate-politics/new_templates/topics.html Tue Feb 8 19:28:28
2011
@@ -22,8 +22,8 @@
{% if pp_topic.topic_list %}
<ul>
{% for topic in pp_topic.topic_list %}
- <div class="topic"?
- <li> <a href="{% pp_url template='issues.html'
object=topic dimension='hot' start=0 end=20 %}">{{ topic.text }}</a>
+ <div class="topic">
+ <li> <b><a href="{% pp_url template='issues.html'
object=topic dimension='hot' start=0 end=20 %}">{{ topic.text }}</a> </b>
<div
class="topicdescription">{{topic.description}}</div>
</div>
</li>
=======================================
--- /trunk/pirate-politics/new_templates/welcome.html Sun Feb 6 23:05:17
2011
+++ /trunk/pirate-politics/new_templates/welcome.html Tue Feb 8 19:28:28
2011
@@ -20,7 +20,7 @@
<div class="issuebound">

<div class="welcome">
- <p> OpenAssembly is a problem/solution website
built for user driven political discussion. The objective of this
discussion is the development of rational and innovative ideas that improve
our democracy, government, and society. OpenAssembly is an alpha, meaning
that it is still in it's infancy, and in the future will host new features
such as an event system, support for issue/geographical subgroups,
electioneering systems, and a intelligent online representative for each
user. </p>
+ <p> OpenAssembly is a problem/solution website
built for user-driven political discussion. The objective of this
discussion is the development of non-partisan, well cited, and innovative
ideas that improve our democracy, government, and society. OpenAssembly is
an alpha, meaning that it is still in it's infancy, and in the future will
host new features such as an event system, support for issue/geographical
subgroups, electioneering systems, and a intelligent online representative
for each user. </p>

<p>The intelligent representative is an Artificial Intelligence (AI) that
will bring interesting new discussions to your attention, allow you to form
dynamic coalitions with other users, aid in your evaluation of other users,
engage in proxy voting if authorized, and much more. This features will
give you access to information you could not have found otherwise by
learning your political preferences. Once it has learned those preferences
the representative will ensure your opinion is considered, even if you are
not online. The intelligent representatives will work together to bridge
the gaps between communities and allow for the formation of dynamic voting
blocs. They will also allow users to compare their own political interests
with others like never before. Perhaps some will even discover we are not
so different after all.</p>

=======================================
--- /trunk/pirate-politics/pirate_core/templatetags/tag_helpers.py Sun Feb
6 23:05:17 2011
+++ /trunk/pirate-politics/pirate_core/templatetags/tag_helpers.py Tue Feb
8 19:28:28 2011
@@ -142,20 +142,20 @@
try: tags = Tag.objects.get_for_object(obj)
except: tags = []

- if str(ContentType.objects.get_for_model(obj.__class__)) ==
u'solution':
- tags1 = Tag.objects.get_for_object(obj.issue)
- tags2 = []
-
- elif str(ContentType.objects.get_for_model(obj.__class__)) ==
u'argument':
- tags1 = Tag.objects.get_for_object(obj.parent.issue)
- tags2 = Tag.objects.get_for_object(obj.parent)
- else:
- tags1 = []
- tags2 = []
+ #if str(ContentType.objects.get_for_model(obj.__class__)) ==
u'solution':
+ # tags1 = Tag.objects.get_for_object(obj.issue)
+ # tags2 = []
+
+ #elif str(ContentType.objects.get_for_model(obj.__class__)) ==
u'argument':
+ # tags1 = Tag.objects.get_for_object(obj.parent.issue)
+ # tags2 = Tag.objects.get_for_object(obj.parent)
+ #else:
+ # tags1 = []
+ # tags2 = []

namespace['tags'] = list(tags)
- namespace['tags'].extend(tags1)
- namespace['tags'].extend(tags2)
+ #namespace['tags'].extend(tags1)
+ #namespace['tags'].extend(tags2)
output = nodelist.render(context)
context.pop()
return output
=======================================
--- /trunk/pirate-politics/pirate_deliberation/models.py Fri Jan 28
02:56:45 2011
+++ /trunk/pirate-politics/pirate_deliberation/models.py Tue Feb 8
19:28:28 2011
@@ -17,7 +17,7 @@
# An argument of {arg_type} that is attached to an Issue
#This should be a pirate-wikipage instance
class Argument(models.Model):
- name = models.CharField(max_length=32)
+ name = models.CharField(max_length=64)
pub_date = models.DateTimeField('date_published', blank=True,null=True)
parent = models.ForeignKey(Solution) #Issue
user = models.ForeignKey(User, related_name='arg_author')
=======================================
--- /trunk/pirate-politics/pirate_deliberation/templatetags/argumenttags.py
Fri Jan 28 02:56:45 2011
+++ /trunk/pirate-politics/pirate_deliberation/templatetags/argumenttags.py
Tue Feb 8 19:28:28 2011
@@ -120,29 +120,31 @@
else: arg, solution = (None, None)

if POST and POST.get("form_id") == "pp_argument_form":
- form = ArgumentForm(POST) if arg is None else ArgumentForm(POST,
instance=arg)
- new_arg = form.save(commit=False)
- new_arg.pub_date = datetime.datetime.now()
- new_arg.parent = solution
- new_arg.user = request.user
- new_arg.text = clean_html(new_arg.text)
- new_arg.name = clean_html(new_arg.name)
- new_arg.arg_type = arg_type
- new_arg.save()
- contype = ContentType.objects.get_for_model(Argument)
- obj_pk = new_arg.pk
- cons, is_new =
Consensus.objects.get_or_create(content_type=contype,
- object_pk=obj_pk)
-
- if is_new: #if this is a new issue/consensus, send signal for
reputation
- aso_rep_event.send(sender=new_arg,event_score=4,
user=new_arg.user,
dimension=ReputationDimension.objects.get('add_argument'))
-
notification_send.send(sender=new_arg.user,obj=new_arg,reply_to=new_arg.parent)
- new_arg.parent.arguments += 1
- new_arg.parent.issue.arguments +=1
- new_arg.parent.issue.save()
- new_arg.parent.save()
-
- raise
HttpRedirectException(HttpResponseRedirect(new_arg.get_absolute_url()))
+ form = ArgumentForm(POST) if arg is None else ArgumentForm(POST,
instance=arg)
+ if form.is_valid():
+ new_arg = form.save(commit=False)
+ new_arg.pub_date = datetime.datetime.now()
+ new_arg.parent = solution
+ new_arg.user = request.user
+ new_arg.text = clean_html(new_arg.text)
+ new_arg.name = clean_html(new_arg.name)
+ new_arg.arg_type = arg_type
+ new_arg.save()
+ contype = ContentType.objects.get_for_model(Argument)
+ obj_pk = new_arg.pk
+ cons, is_new =
Consensus.objects.get_or_create(content_type=contype,
+
object_pk=obj_pk,parent_pk=new_arg.parent.id)
+
+ if is_new: #if this is a new issue/consensus, send signal for
reputation
+ aso_rep_event.send(sender=new_arg,event_score=4,
user=new_arg.user,
dimension=ReputationDimension.objects.get('add_argument'))
+
notification_send.send(sender=new_arg.user,obj=new_arg,reply_to=new_arg.parent)
+ new_arg.parent.arguments += 1
+ new_arg.parent.issue.arguments +=1
+ new_arg.parent.issue.save()
+ new_arg.parent.save()
+
+ raise
HttpRedirectException(HttpResponseRedirect(new_arg.get_absolute_url()))
+ else: namespace['errors'] = form.errors
else:
form = ArgumentForm() if arg is None else
ArgumentForm(instance=arg)

@@ -165,7 +167,7 @@

form_id = forms.CharField(widget=forms.HiddenInput(),
initial="pp_argument_form")
text = forms.CharField(widget=forms.Textarea)
- name = forms.CharField(label="name", max_length=32,
+ name = forms.CharField(label="name", max_length=64,
widget=forms.TextInput(
attrs={'size':'50', 'class':'inputText'}))

=======================================
--- /trunk/pirate-politics/static/style.css Sun Feb 6 23:07:36 2011
+++ /trunk/pirate-politics/static/style.css Tue Feb 8 19:28:28 2011
@@ -1,6 +1,15 @@
+@font-face {
+font-family: GentiumPlus;
+src: url("/static/GentiumPlus-R-designsource.otf") format("opentype");
+}
+
+#header { font-family: GentiumPlus, sans-serif; font-size:105%;}
+
+body {font-family: Helvetica, sans-serif; }
+
+
html, body { margin: 0; padding: 0; }
body{
- font-family: sans-serif;
background:#eee;
}
a { text-decoration: none; color: #194466; }
@@ -8,12 +17,11 @@

pre { background: #fff; width: 460px; padding: 10px 20px; border-left: 5px
solid #ccc; margin: 0 0 20px; }
input { margin: 0; padding: 0; }
-

hr {
border: none;
height: 2px;
- background: black;
+ background: #989898;
width: 95%;
-border-radius: 1px;
}
@@ -82,6 +90,9 @@
}

.comments {
+ width:100%;
+ position:relative;
+ float:left;
padding-left: 5px;
}

@@ -204,7 +215,7 @@
.tutorial {
font-size:80%;
width:35%;
- margin-left: 5%;
+ margin-left:5%;
}

.tutorial th {
@@ -332,24 +343,58 @@
padding-right: 2px;
}

+.argument {
+ width:100%;
+}

.argument ul{
list-style-type:none;
}

-.yea_argument h1 {
- font-size:140%; /* width of whole page */
+.yea_argument h2 {
+ text-align:center;
font-weight:bold;
color:#006633;
padding-top:10px;
}

-.nay_argument h1 {
- font-size:140%; /* width of whole page */
+.nay_argument h2 {
+ text-align:center;
font-weight:bold;
color:#990000;
padding-top:10px;
}
+
+.nay_argument h2 a, .yea_argument h2 a {
+ font-size:70%;
+}
+
+.argitr {
+ background-color:#B2C2C0;
+ border:10px solid #B2C2C0;
+ border-radius: 10px; /*css3 only*/
+ -moz-border-radius: 10px; /*firefox specific code*/
+ /*-moz-box-shadow: 5px 5px 2px #888;
+ -webkit-box-shadow: 5px 5px 2px #888;
+ box-shadow: 5px 5px 2px #888;*/
+ overflow:visible;
+ border-bottom:10px solid #B2C2C0;
+ margin: 2px 0px 0px 0px;
+}
+
+.argitr b {
+ position:relative;
+ background-color:#C77954;
+ /*background: url('/static/Bullet.png') no-repeat scroll;*/
+ color:black;
+ margin-top:-2px;
+ margin-left:-4px;
+ margin-right:2px;
+ padding:2px;
+ overflow:visible;
+ border-radius: 5px;
+ -moz-border-radius:5px;
+}

.argument .yea_argument {
position:relative;
@@ -436,6 +481,16 @@
margin-top:8px;
}

+.userinfo .info {
+ width:69%;
+ float:left;
+}
+
+.userinfo .buttons {
+ width:30%;
+ float:right;
+}
+

.username {
width: 200px;
@@ -465,7 +520,7 @@
}

.username, .reputation, .dateOfBirth, .memberSince {
- height: 30px;
+ height: 40px;
}

.bio {
@@ -636,7 +691,8 @@
.details {
position:relative;
max-width:90%;
- margin-top:10%;
+ margin-top:12.5%;
+ margin-bottom:2.5%;
margin-left:2.5%;
}

@@ -705,6 +761,7 @@
.iss_col2 {
font-size:60%;
width:19%;
+ margin-top:10px;
float:right;
}

@@ -765,6 +822,7 @@
}

.pagination {
+ width:100%;
text-align:center;
font-size:150%;
}
@@ -774,21 +832,20 @@
}

.mailbutton {
- padding: 1px 8px;
+ padding: 0px 8px;
margin-right:4px;
background: url(mail.png) repeat-x bottom;
}


.nomailbutton {
- padding: 1px 8px;
+ padding: 0px 8px;
margin-right:4px;
background: url(no-mail.png) repeat-x bottom;
}

.button, .issueback .iss_col2 .button, .issueback2 .userinfo .button {
padding: 5px 10px;
- display: inline;
background: #777 url(button.png) repeat-x bottom;
border: none;
color: #fff;
@@ -798,6 +855,7 @@
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
text-shadow: 1px 1px #666;
+ overflow:visible;
}

.button:hover, .issueback .iss_col2 .button:hover, .issueback2 .userinfo .button:hover
{

Reply all
Reply to author
Forward
0 new messages