Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
etch
nuages
Commits
0d5af33e
Commit
0d5af33e
authored
Oct 23, 2010
by
Christophe Siraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes and cleaning
parent
644ab41e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
83 deletions
+48
-83
sondage/models.py
sondage/models.py
+1
-1
static/css/nuages.css
static/css/nuages.css
+4
-3
templates/base.html
templates/base.html
+0
-1
templates/sondage/poll_detail.html
templates/sondage/poll_detail.html
+43
-78
No files found.
sondage/models.py
View file @
0d5af33e
...
...
@@ -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.
...
...
static/css/nuages.css
View file @
0d5af33e
...
...
@@ -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
8
px
11px
;
padding
:
9px
10px
7
px
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
{
...
...
templates/base.html
View file @
0d5af33e
...
...
@@ -53,7 +53,6 @@
<div
id=
"content"
>
{% block content %}{% endblock %}
{% block helper %}{% endblock %}
</div>
<div
class=
"menu"
>
...
...
templates/sondage/poll_detail.html
View file @
0d5af33e
...
...
@@ -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 %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment