summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhusudan.C.S2011-01-17 02:53:11 +0530
committerMadhusudan.C.S2011-01-17 02:53:11 +0530
commitded7779cfe61925f03c6553c00b80891af190201 (patch)
tree9b3432e2cde11fbbbf5d749636d8563117d71242
parentba37079c98e6ede7da5db5db7d69d4d930ee7135 (diff)
downloadpytask-ded7779cfe61925f03c6553c00b80891af190201.tar.gz
pytask-ded7779cfe61925f03c6553c00b80891af190201.tar.bz2
pytask-ded7779cfe61925f03c6553c00b80891af190201.zip
Use the new forms tags and fix the styling.
-rw-r--r--pytask/templates/profile/browse_notifications.html37
-rw-r--r--pytask/templates/profile/edit.html11
-rw-r--r--pytask/templates/registration/activation_complete.html7
-rw-r--r--pytask/templates/registration/login.html14
-rw-r--r--pytask/templates/task/approved_textbook.html1
-rw-r--r--pytask/templates/task/browse.html66
-rw-r--r--pytask/templates/task/browse_textbooks.html54
-rw-r--r--pytask/templates/task/claim.html2
-rw-r--r--pytask/templates/task/confirm_approval.html4
-rw-r--r--pytask/templates/task/select_user.html2
-rw-r--r--pytask/templates/task/submit_report.html2
-rw-r--r--pytask/templates/task/view.html4
-rw-r--r--pytask/templates/task/view_textbook.html2
-rw-r--r--pytask/templates/templatetags/_as_div_form.html1
14 files changed, 134 insertions, 73 deletions
diff --git a/pytask/templates/profile/browse_notifications.html b/pytask/templates/profile/browse_notifications.html
index e9594cd..48da43f 100644
--- a/pytask/templates/profile/browse_notifications.html
+++ b/pytask/templates/profile/browse_notifications.html
@@ -1,14 +1,27 @@
-{% extends 'base.html' %}
+{% extends "base.html" %}
+
{% block content %}
-{% if not notifications %}
-You have no notifications.
-{% else %}
-Notifications: <br />
-{% for notification in notifications %}
-<a href="{% url view_notification notification.id %}">
-{% if not notification.is_read %} <b> {% endif %}
-{{notification.subject}}
-{% if not notification.is_read %} </b> {% endif %}</a><br />
-{% endfor %}
-{% endif %}
+ {% if not notifications %}
+ You have no notifications.
+ {% else %}
+
+ Notifications: <br />
+ {% for notification in notifications %}
+ <a href="{% url view_notification notification.id %}">
+
+ {% if not notification.is_read %}
+ <b>
+ {% endif %}
+
+ {{ notification.subject }}
+
+ {% if not notification.is_read %}
+ </b>
+ {% endif %}
+
+ </a>
+ <br />
+ {% endfor %}
+
+ {% endif %}
{% endblock %}
diff --git a/pytask/templates/profile/edit.html b/pytask/templates/profile/edit.html
index cc86461..1f13a92 100644
--- a/pytask/templates/profile/edit.html
+++ b/pytask/templates/profile/edit.html
@@ -1,8 +1,7 @@
-{% extends 'base.html' %}
+{% extends "base.html" %}
+
+{% load form_helpers %}
+
{% block content %}
-<form action='' method=post>
-{% csrf_token %}
-{{ form.as_p }}
-<input type=submit value=Update />
-</form>
+ {% as_div_form form "Edit Profile Form" csrf_token "Update" %}
{% endblock %}
diff --git a/pytask/templates/registration/activation_complete.html b/pytask/templates/registration/activation_complete.html
index e407b17..6a3e2d4 100644
--- a/pytask/templates/registration/activation_complete.html
+++ b/pytask/templates/registration/activation_complete.html
@@ -1,5 +1,6 @@
-{% extends 'base.html' %}
+{% extends "base.html" %}
+
{% block content %}
-Your account has been successfully activated.<br />
-Please proceed to login.
+ Your account has been successfully activated.<br />
+ Please proceed to login.
{% endblock %}
diff --git a/pytask/templates/registration/login.html b/pytask/templates/registration/login.html
index f392126..9063e64 100644
--- a/pytask/templates/registration/login.html
+++ b/pytask/templates/registration/login.html
@@ -1,9 +1,9 @@
-{% extends 'base.html' %}
+{% extends "base.html" %}
+
+{% load form_helpers %}
+
{% block content %}
-<form action="{% url auth_login %}" method="post">
-{% csrf_token %}
-{{ form.as_p }}
-<input type="submit" value="Login" />
-</form>
-<a href="{% url auth_password_reset %}">Forgot password?</a>
+ {% url auth_login as login_url %}
+ {% as_div_form form "Login Form" csrf_token "Login" login_url %}
+ <a href="{% url auth_password_reset %}">Forgot password?</a>
{% endblock %}
diff --git a/pytask/templates/task/approved_textbook.html b/pytask/templates/task/approved_textbook.html
index b3a118f..247bbea 100644
--- a/pytask/templates/task/approved_textbook.html
+++ b/pytask/templates/task/approved_textbook.html
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+
{% block content %}
The textbook <a href="{% url view_textbook textbook.id %}">
{{textbook.name}}</a> has been approved.
diff --git a/pytask/templates/task/browse.html b/pytask/templates/task/browse.html
index c8823f1..e17f498 100644
--- a/pytask/templates/task/browse.html
+++ b/pytask/templates/task/browse.html
@@ -2,39 +2,59 @@
{% block content %}
- {% if open_tasks %}
- Tasks that are open for contribution<ul>
- {% for task in open_tasks %}
- <li><a href="{% url view_task task.id %}">{{ task.title }}</a></li>
+ {% if open_tasks %}
+ Tasks that are open for contribution
+ <ul>
+ {% for task in open_tasks %}
+ <li>
+ <a href="{% url view_task task.id %}">
+ {{ task.title }}
+ </a>
+ </li>
{% endfor %}
</ul>
<br />
- {% endif %}
+ {% endif %}
- {% if working_tasks %}
- Tasks that are being worked on<ul>
- {% for task in working_tasks %}
- <li><a href="{% url view_task task.id %}">{{ task.title }}</a></li>
- {% endfor %}
+ {% if working_tasks %}
+ Tasks that are being worked on
+ <ul>
+ {% for task in working_tasks %}
+ <li>
+ <a href="{% url view_task task.id %}">
+ {{ task.title }}
+ </a>
+ </li>
+ {% endfor %}
</ul>
<br />
- {% endif %}
+ {% endif %}
- {% if comp_tasks %}
- Tasks that were completed recently<ul>
- {% for task in comp_tasks %}
- <li><a href="{% url view_task task.id %}">{{ task.title }}</a></li>
- {% endfor %}
+ {% if comp_tasks %}
+ Tasks that were completed recently
+ <ul>
+ {% for task in comp_tasks %}
+ <li>
+ <a href="{% url view_task task.id %}">
+ {{ task.title }}
+ </a>
+ </li>
+ {% endfor %}
</ul>
<br />
- {% endif %}
+ {% endif %}
- {% if unpub_tasks %}
- Tasks that need approval<ul>
- {% for task in unpub_tasks %}
- <li><a href="{% url view_task task.id %}">{{ task.title }}</a></li>
- {% endfor %}
+ {% if unpub_tasks %}
+ Tasks that need approval
+ <ul>
+ {% for task in unpub_tasks %}
+ <li>
+ <a href="{% url view_task task.id %}">
+ {{ task.title }}
+ </a>
+ </li>
+ {% endfor %}
</ul>
<br />
- {% endif %}
+ {% endif %}
{% endblock %}
diff --git a/pytask/templates/task/browse_textbooks.html b/pytask/templates/task/browse_textbooks.html
index 1e5cbb0..7797c2a 100644
--- a/pytask/templates/task/browse_textbooks.html
+++ b/pytask/templates/task/browse_textbooks.html
@@ -1,30 +1,46 @@
{% extends "base.html" %}
{% block content %}
- {% if comp_textbooks %}
- Textbooks that were completed recently<ul>
- {% for textbook in comp_textbooks %}
- <li><a href="{% url view_textbook textbook.id %}">{{ textbook.name }}</a></li>
- {% endfor %}
+ {% if comp_textbooks %}
+ Textbooks that were completed recently
+ <ul>
+ {% for textbook in comp_textbooks %}
+ <li>
+ <a href="{% url view_textbook textbook.id %}">
+ {{ textbook.name }}
+ </a>
+ </li>
+ {% endfor %}
</ul>
<br />
- {% endif %}
+ {% endif %}
- {% if open_textbooks %}
- Textbooks that are open for contribution<ul>
- {% for textbook in open_textbooks %}
- <li><a href="{% url view_textbook textbook.id %}">{{ textbook.name }}</a></li>
- {% endfor %}
+ {% if open_textbooks %}
+ Textbooks that are open for contribution
+ <ul>
+ {% for textbook in open_textbooks %}
+ <li>
+ <a href="{% url view_textbook textbook.id %}">
+ {{ textbook.name }}
+ </a>
+ </li>
+ {% endfor %}
</ul>
<br />
- {% endif %}
+ {% endif %}
- {% if unpub_textbooks %}
- Textbooks that need approval<ul>
- {% for textbook in unpub_textbooks %}
- <li><a href="{% url view_textbook textbook.id %}">{{ textbook.name }}</a></li>
- {% endfor %}
+ {% if unpub_textbooks %}
+ Textbooks that need approval
+ <ul>
+ {% for textbook in unpub_textbooks %}
+ <li>
+ <a href="{% url view_textbook textbook.id %}">
+ {{ textbook.name }}
+ </a>
+ </li>
+ {% endfor %}
</ul>
- <br />
- {% endif %}
+ <br />
+ {% endif %}
+
{% endblock %}
diff --git a/pytask/templates/task/claim.html b/pytask/templates/task/claim.html
index e64a864..4dcfa75 100644
--- a/pytask/templates/task/claim.html
+++ b/pytask/templates/task/claim.html
@@ -1,5 +1,7 @@
{% extends "base.html" %}
+{% load form_helpers %}
+
{% block content %}
{% if can_claim %}
Propose a claim to work on this task.<br />
diff --git a/pytask/templates/task/confirm_approval.html b/pytask/templates/task/confirm_approval.html
index c72554d..55b47c6 100644
--- a/pytask/templates/task/confirm_approval.html
+++ b/pytask/templates/task/confirm_approval.html
@@ -7,6 +7,8 @@
This action cannot be undone. Please confirm
<br /><br />
+<!-- <button class="green" type="submit" onclick="location.href='{% url approve_task task.id %}'">Approve</button>-->
+
<a href="{% url approve_task task.id %}">
Yes, I approve the task
</a>
@@ -17,4 +19,4 @@
</a>
<br />
-{% endblock %}
+{% endblock %} \ No newline at end of file
diff --git a/pytask/templates/task/select_user.html b/pytask/templates/task/select_user.html
index 4e64fac..5d950ba 100644
--- a/pytask/templates/task/select_user.html
+++ b/pytask/templates/task/select_user.html
@@ -1,5 +1,7 @@
{% extends "base.html" %}
+{% load form_helpers %}
+
{% block content %}
<a href="{% url claim_task task.id %}">
Click here
diff --git a/pytask/templates/task/submit_report.html b/pytask/templates/task/submit_report.html
index c056705..80e8503 100644
--- a/pytask/templates/task/submit_report.html
+++ b/pytask/templates/task/submit_report.html
@@ -1,5 +1,7 @@
{% extends "base.html" %}
+{% load form_helpers %}
+
{% block title %}
{{task.title}}
{% endblock %}
diff --git a/pytask/templates/task/view.html b/pytask/templates/task/view.html
index 5eb1bd3..4e4190c 100644
--- a/pytask/templates/task/view.html
+++ b/pytask/templates/task/view.html
@@ -1,5 +1,7 @@
{% extends "base.html" %}
+{% load form_helpers %}
+
{% block title %}
{{task.title}}
{% endblock %}
@@ -16,7 +18,7 @@
{% endif %}
{% if can_close %}
- <a href="{% url close_task task.id %}">Close task</a>
+ <a href="{% url close_task task.id %}">Close task</a>
{% endif %}
<hr />created by
diff --git a/pytask/templates/task/view_textbook.html b/pytask/templates/task/view_textbook.html
index f7e90a8..b98570f 100644
--- a/pytask/templates/task/view_textbook.html
+++ b/pytask/templates/task/view_textbook.html
@@ -1,5 +1,7 @@
{% extends "base.html" %}
+{% load form_helpers %}
+
{% block title %}
{{textbook.name}}
{% endblock %}
diff --git a/pytask/templates/templatetags/_as_div_form.html b/pytask/templates/templatetags/_as_div_form.html
index e381dd0..d7e571f 100644
--- a/pytask/templates/templatetags/_as_div_form.html
+++ b/pytask/templates/templatetags/_as_div_form.html
@@ -14,4 +14,3 @@
<p class="submit"><button type="submit">{{ button_label }}</button></p>
</div>
</form>
-