django-poll-system / poll / templates / polls.html

{% load i18n %}
{% load polls_tags %}

{% if poll %}
<style type="text/css">
	{% include "_polls_style.css" %}
</style>
<script type="text/javascript">
	{% include "_polls_script.js" %}
</script>

<div id="poll_content_{{ poll.pk }}">
	<p id="poll_warning_message">
		<noscript>		
			{% trans "WARNING: JavaScript is disabled in your browser. Please, turn it on to vote." %}
		</noscript>
	</p>
	<form method="post">
		{% csrf_token %}
		<h1><span id="poll_title">{% trans "Poll" %}:</span> {{ poll.title }}</h1>
		{% if user.is_authenticated %}
		<div id="poll_userspace">
			{% trans "User" %}: {{ user }}
		</div>
		{% endif %} 
		<div id="poll_body">
			{% if poll.get_cookie_name in request.COOKIES %}
				<p>{% trans "You already voted" %}.</p>
				<p><a id="showresults_{{ poll.pk }}" href="javascript:void(0);">{% trans "Show results" %}</a></p>
			{% else %}
				{% render_items poll items %}
				<p><input id="sendvote_{{ poll.pk }}" type="button" value="{% trans "Vote" %}" /></p>
			{% endif %}
		</div>
	</form>
	<script type="text/javascript">
		if(!navigator.cookieEnabled) {
			$('#poll_content_{{ poll.pk }} #poll_warning_message').append('{% trans "WARNING: Cookies are disabled in your browser. Please, turn it on to vote." %}');
			$('#sendvote_{{ poll.pk }}').attr('disabled', '');
		}
	</script>
</div>
{% endif %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.