pytask/templates/task/view.html
author Madhusudan.C.S <madhusudancs@gmail.com>
Fri, 21 Jan 2011 02:12:25 +0530
changeset 508 438afe31fffd
parent 506 db2edf922849
child 543 57b0f8f80ebf
permissions -rw-r--r--
Make the created by line use the new templatetag in tasks view page.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
     1
{% extends "base.html" %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
     2
506
db2edf922849 Fix styling issues.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 488
diff changeset
     3
435
1217d808d70f Use the new forms tags and fix the styling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 431
diff changeset
     4
{% load form_helpers %}
508
438afe31fffd Make the created by line use the new templatetag in tasks view page.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 506
diff changeset
     5
{% load browse_helpers %}
438afe31fffd Make the created by line use the new templatetag in tasks view page.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 506
diff changeset
     6
435
1217d808d70f Use the new forms tags and fix the styling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 431
diff changeset
     7
349
1cc8d0b2eefb commenting on a task works as of now and there is a lot to do with view task
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     8
{% block title %}
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
     9
  {{task.title}}
349
1cc8d0b2eefb commenting on a task works as of now and there is a lot to do with view task
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    10
{% endblock %}
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    11
349
1cc8d0b2eefb commenting on a task works as of now and there is a lot to do with view task
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    12
{% block content %}
508
438afe31fffd Make the created by line use the new templatetag in tasks view page.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 506
diff changeset
    13
  {% as_modification_display "Created by" task.created_by task.creation_datetime %}
438afe31fffd Make the created by line use the new templatetag in tasks view page.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 506
diff changeset
    14
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    15
  <h3>{{ task.title }}</h3>
417
b37e541bf950 Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 382
diff changeset
    16
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    17
  {% if can_edit %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    18
    <a href="{% url edit_task task.id %}">Edit task</a>
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    19
  {% endif %}
349
1cc8d0b2eefb commenting on a task works as of now and there is a lot to do with view task
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    20
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    21
  {% if can_approve %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    22
    <a href="{% url approve_task task.id %}">Approve task</a>
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    23
  {% endif %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    24
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    25
  {% if can_close %}
435
1217d808d70f Use the new forms tags and fix the styling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 431
diff changeset
    26
    <a href="{% url close_task task.id %}">Close task</a>
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    27
  {% endif %}
350
4cc40503bf3c view task is now in some shape atleast
Nishanth Amuluru <nishanth@fossee.in>
parents: 349
diff changeset
    28
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    29
  {% if reviewers %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    30
    Reviewers:
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    31
    {% for reviewer in reviewers %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    32
      <a href="{% url view_user_profile reviewer.id %}">{{reviewer.username}}</a>
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    33
    {% endfor %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    34
  {% endif %}
349
1cc8d0b2eefb commenting on a task works as of now and there is a lot to do with view task
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    35
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    36
  {% if can_mod_reviewers %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    37
    <a href="{% url addreviewer_task task.id %}">
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    38
    Add a Reviewer to this task</a>
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    39
  {% endif %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    40
  <br />
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    41
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    42
  <hr />
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    43
  <b>Description:</b><br />
350
4cc40503bf3c view task is now in some shape atleast
Nishanth Amuluru <nishanth@fossee.in>
parents: 349
diff changeset
    44
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    45
  {{ task.desc|linebreaksbr }}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    46
  <br /><br /><hr />
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    47
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    48
  {% if task.tags.count %}
417
b37e541bf950 Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 382
diff changeset
    49
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    50
    Tags: 
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    51
    {% for tag in task.tags %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    52
      {{tag}}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    53
    {% endfor %}
365
32457bce3437 prettified a few pages
Nishanth Amuluru <nishanth@fossee.in>
parents: 356
diff changeset
    54
    <hr />
349
1cc8d0b2eefb commenting on a task works as of now and there is a lot to do with view task
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    55
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    56
  {% endif %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    57
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    58
  {% if selected_users %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    59
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    60
    Users working on this task:
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    61
    {% for user in selected_users %}
488
c4e9771a274b Use the right url reverse name for profile views.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 435
diff changeset
    62
      <a href="{% url view_user_profile user.id %}">{{user.username}}</a>
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    63
    {% endfor %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    64
    <br />
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    65
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    66
  {% endif %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    67
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    68
  {% if task_claimable %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    69
    <a href="{% url claim_task task.id %}">View claims</a>
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    70
  {% endif %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    71
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    72
  <a href="{% url view_work task.id %}">View submitted work reports</a>
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    73
  <hr />
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    74
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    75
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    76
  {% if comments %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    77
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    78
    comments:<br /><br />
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    79
    {% for comment in comments %}
488
c4e9771a274b Use the right url reverse name for profile views.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 435
diff changeset
    80
      <a href="{% url view_user_profile comment.commented_by.id %}">
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    81
        {{ comment.commented_by.username }}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    82
      </a> 
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    83
      on {{ comment.comment_datetime|date:"D d M Y"}} at 
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    84
      {{comment.comment_datetime|time:"H:i"}} wrote:
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    85
      <br />
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    86
      {{ comment.data|linebreaksbr }}<br />
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    87
    {% endfor %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    88
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    89
  {% endif %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    90
  <hr />
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    91
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    92
  {% if can_comment %}
350
4cc40503bf3c view task is now in some shape atleast
Nishanth Amuluru <nishanth@fossee.in>
parents: 349
diff changeset
    93
    Add comment:<br />
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    94
    {% as_div_form form "Comment Form" csrf_token "Submit" %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    95
  {% endif %}
350
4cc40503bf3c view task is now in some shape atleast
Nishanth Amuluru <nishanth@fossee.in>
parents: 349
diff changeset
    96
349
1cc8d0b2eefb commenting on a task works as of now and there is a lot to do with view task
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    97
{% endblock %}