Commit 0d5af33e authored by chris's avatar chris

Fixes and cleaning

parent 644ab41e
......@@ -43,7 +43,7 @@ class Vote(models.Model):
comment = models.CharField(max_length=80,blank=True)
def __unicode__(self):
return self.voice
return str(self.voice)
"""
# First, define the Manager subclass.
......
......@@ -105,6 +105,7 @@ input:focus, textarea:focus {
.bigtable td {
text-align: center;
/* border: 1px solid #efefef; */
height: 22px;
}
.da {
......@@ -126,16 +127,16 @@ input:focus, textarea:focus {
position: relative;
display: none;
text-align: left;
-moz-border-radius: 9px;
-webkit-border-radius: 9px;
background-color: #fff;
color: #332;
padding: 9px 10px 8px 11px;
padding: 9px 10px 7px 11px;
border: 1px solid #bbf;
font-family:"Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif;
line-height: 16px;
font-size: 12px;
max-width: 190px;
-moz-border-radius: 9px;
-webkit-border-radius: 9px;
}
.msg {
......
......@@ -53,7 +53,6 @@
<div id="content">
{% block content %}{% endblock %}
{% block helper %}{% endblock %}
</div>
<div class="menu">
......
......@@ -18,70 +18,56 @@
{% endblock %}
{% block content %}
{% if object %}
<table class="bigtable">
<tr><td class='names'></td>
<table class="bigtable">
<tr>
<td class='names'></td>
{% for choice in object.choice_set.all %}
<td> {{ choice.choice|date:"d/m" }} <span class="tooltip"><b> {{ choice.choice|date:"l d F"}} </b> <br /><font class="blue">{{ choice.details }}</font></span><div class="subl"><!-- --></div></td>
{% endfor %}
</tr>
<td> {{ choice.choice|date:"d/m" }} <span class="tooltip"><b> {{ choice.choice|date:"l d F"}} </b> <br /><font class="blue">{{ choice.details }}</font></span><div class="subl"><!-- --></div></td>
{% endfor %}
</tr>
{% for bulletin in object.bulletin_set.all %}
<tr ><td class='names'>{{ bulletin.voter }}</td>
{% for vote in bulletin.vote_set.all|dictsort:'choice.choice' %}
<td class='cell'><div class="{{ vote.voice }}">{% if vote.comment %} <div class="msg"><!-- --></div><span class="tooltip"><font class="white">{{ vote.comment }}</font></span>{% endif %}</div></td>
{% endfor %}
</tr>
{% for bulletin in object.bulletin_set.all %}
<tr >
<td class='names'>{{ bulletin.voter }}</td>
{% for vote in bulletin.vote_set.all|dictsort:'choice.choice' %}
<td class='cell'><div class="{{ vote.voice }}">{% if vote.comment %} <div class="msg"><!-- --></div><span class="tooltip"><font class="white">{{ vote.comment }}</font></span>{% endif %}</div></td>
{% endfor %}
</tr>
{% endfor %}
<tr><td class='names'></td>
<tr>
<td class='names'></td>
{% for choice in object.choice_set.all %}
<td class='cell' title=" {{ choice }} "> {{ choice.votecount }} </td>
{% endfor %}
</tr>
<tr>
<form action="/{{ object.id }}/vote/" method="post">
<td class='cell' title=" {{ choice }} "> {{ choice.votecount }} </td>
{% endfor %}
</tr>
<td class='names' title=" Fill in your name ">
<div class="blue">{% trans "Your name:" %}</div>
{{ form.as_p }}
</td>
<tr>
<form action="/{{ object.id }}/vote/" method="post">
<td class='names' title=" Fill in your name ">
<div class="blue">{% trans "Your name:" %}</div>
{{ form.as_p }}
</td>
{% for forms in vforms %}
{{ vforms.management_form }}
{{ vforms.management_form }}
{% for form in forms %}
<td class='cell' title='{% trans " Check the little boxes to add positive answers " %}' />
{{ form.voice }} <br />
{{ form.comment }}
<div class="hide">
{{ form.choice }}
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
</div>
{{ field.errors }}
</td>
{% endfor %}
{% endfor %}
<td class='cell' title='{% trans " Check the little boxes to add positive answers " %}' />
{{ form.voice }} <br />
{{ form.comment }}
<div class="hide">
{{ form.choice }}
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
</div>
{{ field.errors }}
</td>
{% endfor %}
{% endfor %}
</tr>
</table>
<br />
<h3>Instructions</h3>
<table class="instructions">
<tr>
......@@ -91,35 +77,8 @@
</tr>
</table>
</form>
<script type="text/javascript">
<!--
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
//-->
</script>
{% else %}
<p>Poll not available.</p>
{% endif %}
</form>
<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
<![endif]-->
{% endblock %}
{% block helper %}
<br />
<h3>Details</h3>
{% for choice in object.choice_set.all %}
......@@ -138,4 +97,10 @@
</p>
{% endfor %}
<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
<![endif]-->
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment