# HG changeset patch # User Madhusudan.C.S # Date 1295106709 -19800 # Node ID b37e541bf950b826c4bc17ee72efdb75ce5b144c # Parent 265dbd81c451a9717a9db5427f5bece2a1e28bdc Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs. diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/base.html --- a/pytask/templates/base.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/base.html Sat Jan 15 21:21:49 2011 +0530 @@ -8,26 +8,26 @@
@@ -35,9 +35,6 @@ {% block content %}This is the default content{% endblock %}
diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/index.html --- a/pytask/templates/index.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/index.html Sat Jan 15 21:21:49 2011 +0530 @@ -9,15 +9,15 @@ {% endif %} {% if can_create_task %} - Add a new textbook
- Create a task
+ Add a new textbook
+ Create a task

{% endif %} {% if unpublished_tasks %} Tasks created by you that need approval:
@@ -26,7 +26,7 @@ {% if reviewing_tasks %} Tasks you are reviewering:
@@ -35,7 +35,7 @@ {% if selected_tasks %} Tasks that have been assigned to you:
@@ -44,7 +44,7 @@ {% if claimed_tasks %} Tasks claimed but still not assigned to you:
diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/profile/browse_notifications.html --- a/pytask/templates/profile/browse_notifications.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/profile/browse_notifications.html Sat Jan 15 21:21:49 2011 +0530 @@ -5,7 +5,7 @@ {% else %} Notifications:
{% for notification in notifications %} - + {% if not notification.is_read %} {% endif %} {{notification.subject}} {% if not notification.is_read %} {% endif %}
diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/profile/view.html --- a/pytask/templates/profile/view.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/profile/view.html Sat Jan 15 21:21:49 2011 +0530 @@ -10,5 +10,5 @@ Address: {{profile.address|linebreaksbr}}

Phone Number: {{profile.phonenum}}
-Edit profile +Edit profile {% endblock %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/profile/view_notification.html --- a/pytask/templates/profile/view_notification.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/profile/view_notification.html Sat Jan 15 21:21:49 2011 +0530 @@ -1,25 +1,25 @@ {% extends 'base.html' %} {% block content %} {% if newest %} -<<newest +<<newest {% endif %} {% if newer %} -<newer +<newer {% endif %} {% if older %} -older> +older> {% endif %} {% if oldest %} -oldest>> +oldest>> {% endif %}

-sent on {{notification.sent_date|date:"D d M Y"}} at {{notification.sent_date|time:"H:i"}}
+Sent on {{notification.sent_date|date:"D d M Y"}} at {{notification.sent_date|time:"H:i"}}
Sub: {{notification.subject}}

{{notification.message|safe}}
-Delete -Keep Unread +Delete +Keep Unread {% endblock %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/profile/view_user.html --- a/pytask/templates/profile/view_user.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/profile/view_user.html Sat Jan 15 21:21:49 2011 +0530 @@ -17,7 +17,7 @@ Tasks completed by {{viewing_profile.full_name}}: {% endif %} @@ -26,7 +26,7 @@ Tasks {{viewing_profile.full_name}} is currently working on: {% endif %} @@ -35,7 +35,7 @@ Tasks reviewed by {{viewing_profile.full_name}}: {% endif %} @@ -43,7 +43,7 @@ {% if claimed_tasks and can_view_info %} {% endif %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/registration/login.html --- a/pytask/templates/registration/login.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/registration/login.html Sat Jan 15 21:21:49 2011 +0530 @@ -1,9 +1,9 @@ {% extends 'base.html' %} {% block content %} -
+ {% csrf_token %} {{ form.as_p }}
-Forgot password? +Forgot password? {% endblock %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/show_msg.html --- a/pytask/templates/show_msg.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/show_msg.html Sat Jan 15 21:21:49 2011 +0530 @@ -17,11 +17,4 @@ {{message}}
{% endif %} You will be redirected to {{url_desc}} page in 5 seconds - {% endblock %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/approved_task.html --- a/pytask/templates/task/approved_task.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/approved_task.html Sat Jan 15 21:21:49 2011 +0530 @@ -1,5 +1,5 @@ {% extends 'base.html' %} {% block content %} -The task {{task.title}} has been approved.
+The task {{task.title}} has been approved.
The task will be public. Now users can claim the task and work on it. {% endblock %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/approved_textbook.html --- a/pytask/templates/task/approved_textbook.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/approved_textbook.html Sat Jan 15 21:21:49 2011 +0530 @@ -1,5 +1,5 @@ {% extends 'base.html' %} {% block content %} -The textbook {{textbook.name}} has been approved.
+The textbook {{textbook.name}} has been approved.
The textbook will now be public. {% endblock %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/browse.html --- a/pytask/templates/task/browse.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/browse.html Sat Jan 15 21:21:49 2011 +0530 @@ -4,7 +4,7 @@ {% if open_tasks %} Tasks that are open for contribution
@@ -13,7 +13,7 @@ {% if working_tasks %} Tasks that are being worked on
@@ -22,7 +22,7 @@ {% if comp_tasks %} Tasks that were completed recently
@@ -31,7 +31,7 @@ {% if unpub_tasks %} Tasks that need approval
diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/browse_textbooks.html --- a/pytask/templates/task/browse_textbooks.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/browse_textbooks.html Sat Jan 15 21:21:49 2011 +0530 @@ -3,7 +3,7 @@ {% if comp_textbooks %} Textbooks that were completed recently
@@ -12,7 +12,7 @@ {% if open_textbooks %} Textbooks that are open for contribution
@@ -21,7 +21,7 @@ {% if unpub_textbooks %} Textbooks that need approval
diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/claim.html --- a/pytask/templates/task/claim.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/claim.html Sat Jan 15 21:21:49 2011 +0530 @@ -4,10 +4,10 @@ Propose a claim to work on this task.
{% endif %} {% if old_claims %} - List of all the claims for the task {{task.title}}
+ List of all the claims for the task {{task.title}}
{% for claim in old_claims %}
- {{claim.claimed_by.username}} + {{claim.claimed_by.username}} on {{claim.claim_datetime|date:"D d M Y"}} at {{claim.claim_datetime|time:"H:i"}} wrote:
{{claim.proposal|linebreaksbr}}
{% endfor %} @@ -23,7 +23,7 @@ {% endif %} {% if old_claims and is_creator %}
- Select a user to assign the work + Select a user to assign the work {% endif %} {% if can_claim %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/confirm_approval.html --- a/pytask/templates/task/confirm_approval.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/confirm_approval.html Sat Jan 15 21:21:49 2011 +0530 @@ -1,8 +1,8 @@ {% extends 'base.html' %} {% block content %} -You are about to approve the task {{task.title}}
+You are about to approve the task {{task.title}}
This action cannot be undone. Please confirm

-Yes, I approve the task
-No, take me back to the task
+Yes, I approve the task
+No, take me back to the task
{% endblock %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/confirm_textbook_approval.html --- a/pytask/templates/task/confirm_textbook_approval.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/confirm_textbook_approval.html Sat Jan 15 21:21:49 2011 +0530 @@ -1,8 +1,8 @@ {% extends 'base.html' %} {% block content %} -You are about to approve the textbook {{textbook.name}}
+You are about to approve the textbook {{textbook.name}}
This action cannot be undone. Please confirm

-Yes, I approve the textbook
-No, take me back to the textbook
+Yes, I approve the textbook
+No, take me back to the textbook
{% endblock %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/select_user.html --- a/pytask/templates/task/select_user.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/select_user.html Sat Jan 15 21:21:49 2011 +0530 @@ -1,6 +1,6 @@ {% extends 'base.html' %} {% block content %} - click here to return to the claims page.

+ click here to return to the claims page.

Select a user to assign this task.
{% csrf_token %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/view.html --- a/pytask/templates/task/view.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/view.html Sat Jan 15 21:21:49 2011 +0530 @@ -6,36 +6,29 @@

{{ task.title }}

{% if can_edit %} - Edit task + Edit task {% endif %} - + {% if can_approve %} - Approve task + Approve task {% endif %} - + {% if can_close %} - Close task + Close task {% endif %} - - -
created by {{ task.created_by.username }} +
created by {{ task.created_by.username }} on {{task.creation_datetime|date:"D d M Y"}} at {{task.creation_datetime|time:"H:i"}}
{% if reviewers %} - Reviewers: + Reviewers: {% for reviewer in reviewers %} - {{reviewer.username}} + {{reviewer.username}} {% endfor %} {% endif %} - {% if can_mod_reviewers %} - + Add a Reviewer to this task {% endif %}
@@ -52,48 +45,25 @@
{% endif %} - - - {% if selected_users %} Users working on this task: {% for user in selected_users %} - {{user.username}} + {{user.username}} {% endfor %}
{% endif %} {% if task_claimable %} - View claims + View claims {% endif %} - View submitted work reports - + View submitted work reports +
{% if comments %} comments:

{% for comment in comments %} - {{ comment.commented_by.username }} + {{ comment.commented_by.username }} on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:
{{ comment.data|linebreaksbr }}
{% endfor %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/view_textbook.html --- a/pytask/templates/task/view_textbook.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/view_textbook.html Sat Jan 15 21:21:49 2011 +0530 @@ -6,17 +6,17 @@

{{ textbook.name }}

{% if can_edit %} - Edit Text book + Edit Text book {% endif %} {% if can_approve %} - Approve Text book + Approve Text book {% endif %} -
created by {{ textbook.created_by.username }} +
created by {{ textbook.created_by.username }} on {{textbook.creation_datetime|date:"D d M Y"}} at {{textbook.creation_datetime|time:"H:i"}}

- + {% if textbook.tags.count %} Tags: {% for tag in textbook.tags %} @@ -30,7 +30,7 @@ {% for chap in chapters %} - + {% endfor %} @@ -39,14 +39,11 @@ There are no chapters in this textbook as of now.
{% endif %} - - -
{% if comments %} comments:

{% for comment in comments %} - {{ comment.commented_by.username }} + {{ comment.commented_by.username }} on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:
{{ comment.data|linebreaksbr }}
{% endfor %} diff -r 265dbd81c451 -r b37e541bf950 pytask/templates/task/view_work.html --- a/pytask/templates/task/view_work.html Sat Jan 15 21:21:19 2011 +0530 +++ b/pytask/templates/task/view_work.html Sat Jan 15 21:21:49 2011 +0530 @@ -10,14 +10,14 @@ {% for rep in old_reports %} - + {% endfor %}
{{chap.title}} {{chap.title}} {{chap.status}}
{{rep.submitted_by}}{{rep.data}}{{rep.data}} {{rep.attachment.name}}
{% endif %} {% if is_working %} -Submit report +Submit report
{% endif %} {% endblock %}