diff options
| author | etienne <etienne@07715635-78ed-41b0-aaf1-0afda6c37f35> | 2010-03-27 17:06:03 +0000 |
|---|---|---|
| committer | etienne <etienne@07715635-78ed-41b0-aaf1-0afda6c37f35> | 2010-03-27 17:06:03 +0000 |
| commit | 95729368a48257b110ea33dfb005785f8ed6734f (patch) | |
| tree | 8b99b375a4b4a2e121a9192910af15485ea2b7c3 /templates | |
| parent | 8ded76ae513b38d14773449e46543b54cf48ef49 (diff) | |
| download | Papillon-95729368a48257b110ea33dfb005785f8ed6734f.tar.bz2 Papillon-95729368a48257b110ea33dfb005785f8ed6734f.zip | |
Rearrange directories - include documentation
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 27 | ||||
| -rw-r--r-- | templates/category.html | 16 | ||||
| -rw-r--r-- | templates/create.html | 33 | ||||
| -rw-r--r-- | templates/edit.html | 62 | ||||
| -rw-r--r-- | templates/editChoices.html | 19 | ||||
| -rw-r--r-- | templates/editChoicesAdmin.html | 44 | ||||
| -rw-r--r-- | templates/editChoicesUser.html | 27 | ||||
| -rw-r--r-- | templates/feeds/poll_description.html | 8 | ||||
| -rw-r--r-- | templates/main.html | 22 | ||||
| -rw-r--r-- | templates/vote.html | 148 |
10 files changed, 0 insertions, 406 deletions
diff --git a/templates/base.html b/templates/base.html deleted file mode 100644 index b673f24..0000000 --- a/templates/base.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <link rel="stylesheet" href="{{root_url}}static/styles.css" /> - <title>{% block title %}Papillon{% endblock %}</title> - {% block fullscript %}{% endblock %} -</head> - -<body> -<div id="main"> -<div id="header"> -<span id='languages'>{% for language in languages%}<a href='?language={{language.0}}'>{{language.1}}</a>{% endfor %}</span> -</div> -<div id="top"> - <h1><a href='{{root_url}}'>Papillon</a></h1> -</div> -<div id="content"> -{% block content %}{% endblock %} -</div> -<div id="footer"> -<a href='http://blog.peacefrogs.net/nim/papillon/'>Papillon</a> - <a href='http://www.gnu.org/licenses/gpl.html'>Copyright</a> © 2008 <a href='http://redmine.peacefrogs.net/projects/show/papillon'>Papillon project</a> -</div> -</div> -</body> -</html> - diff --git a/templates/category.html b/templates/category.html deleted file mode 100644 index 55aa084..0000000 --- a/templates/category.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block content %} -<h2>{{category.name}}</h2> -<p>{{category.description}}</p> - -{% if polls %}<h2>{%trans "Polls"%}</h2>{%endif%} -{% for poll in polls %} -<div class='poll-description'> - <p><a href='{{root_url}}poll/{{poll.base_url}}'>{{poll.name}}</a></p> - <p>{{poll.description|safe}}</p> -</div> -{% endfor %} - -{% endblock %} diff --git a/templates/create.html b/templates/create.html deleted file mode 100644 index 7c3d2b3..0000000 --- a/templates/create.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load markup %} - -{% block fullscript %} - {{ form.media }} -{% endblock %} - - -{% block content %} - <h2>{% trans "New poll" %}</h2> -<form action="" method="post"> -<table class='new_poll'> - {% for field in form %} - {% if field.is_hidden %} - {{field}} - {% else %} - <tr><td colspan='3'>{{field.errors}}</td></tr> - <tr> - <td>{{field.label_tag}}</td> - <td>{{field}}</td> - <td class='form_description'>{{field.help_text|markdown}}</td> - </tr> - {% endif %} - {% endfor %} - <tr> - <td></td> - <td><input type='submit' value='{% trans "Create" %}' class='submit'/></td> - </tr> -</table> -</form> - -{% endblock %} diff --git a/templates/edit.html b/templates/edit.html deleted file mode 100644 index 7ef4f14..0000000 --- a/templates/edit.html +++ /dev/null @@ -1,62 +0,0 @@ -{% extends "base.html" %} -{% load markup %} -{% load i18n %} - -{% block fullscript %} -<script type="text/javascript" src="{{root_url}}admin/jsi18n/"></script> -<script type="text/javascript" src="{{root_url}}media/js/core.js"></script> -<script type="text/javascript" src="{{root_url}}media/js/admin/RelatedObjectLookups.js"></script> -{{ form.media }} -{% endblock %} - -{% block content %} - <h2>{% trans "Edit poll" %}</h2> -<form action="" method="post"> -<table class='new_poll'> - <tr> - <td><label>{% trans "Poll url" %}</label></td> - <td> -<a href='{{root_url}}poll/{{poll.base_url}}'>{{root_url}}poll/{{poll.base_url}}</a> - </td> - <td class='form_description'><p> -{% trans "Copy this address and send it to voters who want to participate to this poll" %} - </p></td> - </tr> - <tr> - <td><label>{% trans "Administration url" %}</label></td> - <td> -<a href='{{root_url}}edit/{{poll.admin_url}}'>{{root_url}}edit/{{poll.admin_url}}</a> - </td> - <td class='form_description'><p> - {% trans "Address to modify the current poll" %} - </p></td> - </tr> - <tr> - <td><label>{% trans "Choices administration url" %}</label></td> - <td> -<a href='{{root_url}}editChoicesAdmin/{{poll.admin_url}}'>{{root_url}}editChoicesAdmin/{{poll.admin_url}}</a> - </td> - <td class='form_description'><p> - {% trans "Address to modify choices of the current poll." %} - </p></td> - </tr> - {% for field in form %} - {% if field.is_hidden %} - {{field}} - {% else %} - <tr><td colspan='3'>{{field.errors}}</td></tr> - <tr> - <td>{{field.label_tag}}</td> - <td>{{field}}</td> - {% if field.help_text %}<td class='form_description'>{{field.help_text|markdown}}</td>{%endif%} - </tr> - {% endif %} - {% endfor %} - <tr> - <td></td> - <td><input type='submit' value='{% trans "Edit" %}' class='submit'/></td> - </tr> -</table> -</form> - -{% endblock %} diff --git a/templates/editChoices.html b/templates/editChoices.html deleted file mode 100644 index 1082d30..0000000 --- a/templates/editChoices.html +++ /dev/null @@ -1,19 +0,0 @@ -{% load markup %} -{% load i18n %} - -<h2>{% trans "New choice" %}</h2> -{%if form_new_choice.errors %} <p class='error'>{{form_new_choice.errors}}</p>{%endif%} -<form action="{{admin_url}}" method="post"> -{{form_new_choice.poll}} -{{form_new_choice.order}} -<table class='new_poll'> - <tr> - <td class='form_description' colspan='3'><p>{% trans "Setting a new choice. Optionally you can set a limit of vote for this choice. This limit is usefull for limited resources allocation." %}</p></td> - </tr> - <tr> - <td>{{form_new_choice.name}}</td> - <td>{%trans "Limited to"%} {{form_new_choice.limit}} {%trans "vote(s)"%}</td> - <td><input type='hidden' name='add' value='1'/> <input type='submit' value='{% trans "Add" %}' class='submit'/></td> - </tr> -</table> -</form> diff --git a/templates/editChoicesAdmin.html b/templates/editChoicesAdmin.html deleted file mode 100644 index a7798bf..0000000 --- a/templates/editChoicesAdmin.html +++ /dev/null @@ -1,44 +0,0 @@ -{% extends "base.html" %} -{% load markup %} -{% load i18n %} - -{% block fullscript %} -<script type="text/javascript" src="{{root_url}}admin/jsi18n/"></script> -<script type="text/javascript" src="{{root_url}}media/js/core.js"></script> -<script type="text/javascript" src="{{root_url}}media/js/admin/RelatedObjectLookups.js"></script> -{{ form_new_choice.media }} -{% endblock %} - -{% block content %} -{% if not choices %}<p class='error'> -{% blocktrans %}As long as no options were added to the poll, it will not be available.{% endblocktrans %} -</p>{% else %} -<h2>{% trans "Complete/Finalise the poll" %}</h2> -<p><a href='{{root_url}}edit/{{poll.admin_url}}'><button>{% trans "Next"%}</button></p> -{% endif %} -{% include 'editChoices.html' %} -{% if choices %} -<h2>{% trans "Available choices" %}</h2> -<table class='new_poll'> - <tr> - {%if not poll.dated_choices%}<th>{% trans "Up/down" %}</th>{%endif%} - <th>{% trans "Label" %}</th> - <th>{% trans "Limit" %}</th> - <th>{% trans "Delete?"%}</th> - </tr> - {% for choice in choices %} - <form action="" method="post"> - {{choice.form.poll}}{{choice.form.order}}<tr> - {%if not poll.dated_choices%}<td><a href='?up_choice={{choice.id}}' class='arrow'>+</a> - / <a href='?down_choice={{choice.id}}' class='arrow'>-</a></td>{%endif%} - <td>{{choice.form.name}}</td> - <td>{% trans "Limited to"%} {{choice.form.limit}} {% trans "vote(s)" %}</td> - <td><input type='checkbox' name='delete_{{choice.id}}'/></td> - <td><input type='hidden' name='edit' value='{{choice.id}}'/></td> - <td><input type='submit' value='{% trans "Edit" %}' class='submit'/></td> - </tr> - </form>{% endfor %} -</table> -{% endif %} - -{% endblock %} diff --git a/templates/editChoicesUser.html b/templates/editChoicesUser.html deleted file mode 100644 index 0d2b2c1..0000000 --- a/templates/editChoicesUser.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "base.html" %} -{% load markup %} -{% load i18n %} - -{% block fullscript %} -<script type="text/javascript" src="{{root_url}}admin/jsi18n/"></script> -<script type="text/javascript" src="{{root_url}}media/js/core.js"></script> -<script type="text/javascript" src="{{root_url}}media/js/admin/RelatedObjectLookups.js"></script> -{{ form_new_choice.media }} -{% endblock %} - -{% block content %} - <p><a href="{{root_url}}poll/{{poll.base_url}}/">{%trans "Return to the poll"%}</a></p> -<h2>{% trans "Choices" %}</h2> -{% if choices %}<table class='new_poll'> - <tr> - <th>{% trans "Label" %}</th> - <th>{% trans "Limit" %}</th> - </tr> - {% for choice in choices %}<tr> - <td>{%if poll.dated_choices%}{{choice.date|date:_("DATETIME_FORMAT")}}{%else%}{{choice.name}}{%endif%}</td> - <td>{% if choice.limit %}{% trans "Limited to"%} {{choice.limit}} {% trans "vote(s)" %}{% endif %}</td> - </tr>{% endfor %} -</table> -{% endif %} -{% include 'editChoices.html' %} -{% endblock %} diff --git a/templates/feeds/poll_description.html b/templates/feeds/poll_description.html deleted file mode 100644 index 7522a5a..0000000 --- a/templates/feeds/poll_description.html +++ /dev/null @@ -1,8 +0,0 @@ -{% load i18n %} -<p>{% blocktrans with obj.user.name as voter_name %}{{ voter_name }} has added/modified a vote.{%endblocktrans%}</p> -<p>{% trans "Current results:" %}</p> -<ul> -{% for choice in obj.poll.getChoices %} - <li><strong>{{choice.name}}</strong>{% blocktrans count choice.getSum as sum %}: {{sum}} vote{%plural%}: {{sum}} votes{%endblocktrans%}</li> -{% endfor %} -</ul>
\ No newline at end of file diff --git a/templates/main.html b/templates/main.html deleted file mode 100644 index 8a09830..0000000 --- a/templates/main.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} - -{% block content %} -{% if error %}<p class='error'>{{error}}</p>{%endif%} -<h2><a href='create'>{%trans "Create a poll"%}</a></h2> -<p>{% trans "Create a new sondage for take a decision, find a date for a meeting, etc." %} <a href='create'>{% trans "It's here!" %}</a></p> - -{% if polls %}<h2>{%trans "Public polls"%}</h2>{%endif%} -{% for poll in polls %} -<div class='poll-description'> - <p><a href='poll/{{poll.base_url}}'>{{poll.name}}</a></p> - <p>{{poll.description}}</p> -</div> -{% endfor %} - -{% if categories %}<h2>{%trans "Categories"%}</h2>{% endif %} -{% for category in categories %} -<h3><a href='category/{{category.id}}'>{{category.name}}</a></h3> -{% endfor %} - -{% endblock %} diff --git a/templates/vote.html b/templates/vote.html deleted file mode 100644 index eb1ae21..0000000 --- a/templates/vote.html +++ /dev/null @@ -1,148 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load get_range %} - -{% block fullscript %} -<script type="text/javascript" src="{{root_url}}admin/jsi18n/"></script> -<script type="text/javascript" src="{{root_url}}media/js/core.js"></script> -<script type="text/javascript" src="{{root_url}}media/js/admin/RelatedObjectLookups.js"></script> -{{ form_comment.media }} -{% endblock %} - -{% block content %} - <h2>{%if poll.category %}{{poll.category.name}} - {%endif%}{{poll.name}}</h2> -{% if error %}<p class='alert'>{{ error }}</p>{% endif %} -{% if not poll.open %}<p class='alert'>{% trans "The current poll is closed."%}</p>{% endif %} - <p>{{ poll.description|safe }}</p> - <form method='post' action='{{base_url}}'> - <div id='poll_table'> - <table id='poll'> - <tr> - <td class='simple'></td> - <td class='simple'></td> - {% for choice in choices %}<th>{%if poll.dated_choices%}{{choice.date|date:_("DATETIME_FORMAT")}}{%else%}{{choice.name}}{%endif%}{% if choice.limit %} ({% trans "max" %} {{choice.limit}}){%endif%}</th> - {% endfor %}</tr> - {% if not hide_vote %} - {% for voter in voters %}<tr{% if voter.highlight %} class='highlighted_voter'{% endif %}> -{% ifequal current_voter_id voter.id %} - <input type='hidden' name='voter' value='{{voter.id}}'/> - <td class='simple'></td> - <td><input type='text' name='author_name' value='{{voter.user.name}}'/></td> - {% for vote in voter.votes %}<td> - {% if vote.choice.available or vote.value %} - {% ifequal poll.type 'P' %} - <input type='checkbox' name='vote_{{vote.id}}'{%ifequal vote.value 1%} checked='checked'{%endifequal%}/> - {% endifequal %} - {% ifequal poll.type 'O' %} - <input type='radio' name='vote' value='{{vote.id}}' {%ifequal vote.value 1%} checked='checked'{%endifequal%}/> - {% endifequal %} - {% ifequal poll.type 'B' %} - <select name='vote_{{vote.id}}'> - {% for vote_choice in VOTE %} - <option value='{{vote_choice.0}}'{%ifequal vote.value vote_choice.0%} selected='selected'{%endifequal%}>{{vote_choice.1.1}}</option> - {% endfor %} - </select> - {% endifequal %} - {% ifequal poll.type 'V' %} - <select name='vote_{{vote.id}}'> - {% for vote_choice in 10|get_range %} - <option value='{{vote_choice}}'{%ifequal vote.value vote_choice%} selected='selected'{%endifequal%}>{{vote_choice}}</option> - {% endfor %} - </select> - {% endifequal %} - {% else %} - {% trans "Limit reached" %} - {% endif %} - </td> - {%endfor%} -{%else%} - <td class='simple'>{% if poll.open %}<a href='?voter={{voter.id}}'>{% trans "Edit" %}</a>{%else%} {%endif%}</td> - <td>{{voter.user.name}}</td> - {% for vote in voter.votes %} - {% ifequal poll.type 'V' %} - <td class='{%ifequal vote.value 9%}OK{%else%}{%ifequal vote.value 0%}KO{%else%}OKO{%endifequal%}{%endifequal%}'> - {%if vote.value%}{{vote.value}}{%else%}0{%endif%}</td> - {% else %} - <td class='{%ifequal vote.value 1%}OK{%else%}{%ifequal vote.value 0%}OKO{%else%}KO{%endifequal%}{%endifequal%}'> - {%ifequal poll.type 'B'%} - {%for VOT in VOTE%} - {%ifequal VOT.0 vote.value%}{{VOT.1.1}}{%endifequal%}{%endfor%} - {%else%} - {%for VOT in VOTE%} - {%ifequal VOT.0 vote.value%}{{VOT.1.0}}{%endifequal%}{%endfor%} - {%endifequal%} - </td> - {% endifequal %} - {%endfor%} - {%endifequal%} - </tr>{%endfor%} - {%endif%} - {%if not current_voter_id%}{% if poll.open %} - <tr> - <td class='simple'></td> - <td><input type='text' name='author_name'/></td> - {%for choice in choices%}<td> - {% if choice.available %} - {% ifequal poll.type 'P' %} - <input type='checkbox' name='choice_{{choice.id}}'/>{% endifequal %} - {% ifequal poll.type 'O' %} - <input type='radio' name='choice' value='{{choice.id}}'/>{% endifequal %} - {% ifequal poll.type 'B' %} - <select name='choice_{{choice.id}}'>{% for vote_choice in VOTE %} - <option value='{{vote_choice.0}}'{%ifequal vote_choice.0 0%} selected='selected'{%endifequal%}>{{vote_choice.1.1}}</option>{% endfor %} - </select> - {% endifequal %} - {% ifequal poll.type 'V' %} - <select name='choice_{{choice.id}}'> - {% for vote_choice in 10|get_range %} - <option value='{{vote_choice}}'>{{vote_choice}}</option> - {% endfor %} - </select> - {% endifequal %} - {% else %} - {% trans "Limit reached" %} - {% endif %} - </td>{%endfor%} - </tr> - {%endif%}{%endif%} - {% if not hide_vote %}<tr id='sum'> - <td class='simple'></td><th>{% trans "Sum" %}</th> - {% for choice in choices %}<td{%if choice.highlight %} class='highlight'{%endif%}>{{choice.getSum}}</td> - {% endfor %} - </tr>{%endif%} - {% if poll.open %} - <td class='simple'></td> - <td class='simple'><input type='submit' value='{%if current_voter_id%}{% trans "Edit" %}{%else%}{% trans "Participate" %}{%endif%}' class='submit'/></td> - {% endif %} - </table> - </div> - <hr class='spacer'/> - </form> - {%if poll.opened_admin%} - <p><a href="{{root_url}}editChoicesUser/{{poll.base_url}}/">{%trans "Add a new choice to this poll?"%}</a></p>{%endif%} - <div class='footnote'> - {%if hide_vote%}<p>{% trans "You have already vote? You are enough wise not to be influenced by other votes? You can display result by clicking" %} <a href='?display_result=1'>{% trans "here" %}</a>.</p>{%else%} - <p>{% trans "Remain informed of poll evolution:" %} <a href="{{root_url}}feeds/poll/{{poll.base_url}}/">{%trans "syndication"%}</a></p>{%endif%} - </div> -{%if not hide_vote%} -<h3>{%trans "Comments"%}</h3> -<div class='comments'> - {%if poll.open%}<form method='post' action='{{base_url}}'> - <table class='comment'> - <tr> - <td><label for='comment_author'>{% trans "Author name" %}</label></td> - <td><input type='text' id='comment_author' name='comment_author'/></td> - </tr> - <tr> - <td><label for='comment'>{% trans "Comment"%}</label></td> - <td><textarea id='comment' name='comment' cols='' rows=''></textarea></td> - </tr> - <tr><td colspan='2' id='tdsubmit'><input type='submit' class='submit' value='{% trans "Send" %}'/></td></tr> - </table> -</form>{%endif%} - <ul>{%for comment in comments%} - <li><p class='author'>{{comment.author_name}}, {{comment.date|date:_("DATETIME_FORMAT")}} :</p> - {{comment.text|safe}}</li>{%endfor%} - </ul> -</div>{%endif%} -{% endblock %} |
