pytask/templates/task/view.html
author Madhusudan.C.S <madhusudancs@gmail.com>
Fri, 04 Feb 2011 16:38:21 +0530
changeset 558 fd3e6f5f01bd
parent 547 1bfa67f465b4
permissions -rw-r--r--
Use the form helpers templatetag module in the addreviewer template.

{% extends "base.html" %}


{% load form_helpers %}
{% load browse_helpers %}


{% block title %}
  {{task.title}}
{% endblock %}

{% block content %}
  {% as_modification_display "Created by" task.created_by task.creation_datetime %}

  <h3>{{ task.title }}</h3>

  {% if can_edit %}
    {% if edit_url %}
      <a href="{{ edit_url }}">
    {% else %}
      <a href="{% url edit_task task.id %}">
    {% endif %}
      Edit task
    </a>
  {% endif %}

  {% if can_approve %}
    <a href="{% url approve_task task.id %}">Approve task</a>
  {% endif %}

  {% if can_close %}
    <a href="{% url close_task task.id %}">Close task</a>
  {% endif %}

  {% if reviewers %}
    Reviewers:
    {% for reviewer in reviewers %}
      <a href="{% url view_user_profile reviewer.id %}">{{reviewer.username}}</a>
    {% endfor %}
  {% endif %}

  {% if can_mod_reviewers %}
    <a href="{% url addreviewer_task task.id %}">
    Add a Reviewer to this task</a>
  {% endif %}
  <br />

  <hr />
  <b>Description:</b><br />

  {{ task.desc|linebreaksbr }}
  <br /><br /><hr />

  {% if task.tags.count %}
    Tags: {% as_tags task.tags %}<hr />
  {% endif %}

  {% if selected_users %}

    Users working on this task:
    {% for user in selected_users %}
      <a href="{% url view_user_profile user.id %}">{{user.username}}</a>
    {% endfor %}
    <br />

  {% endif %}

  {% if task_claimable %}
    <a href="{% url claim_task task.id %}">View claims</a>
  {% endif %}

  <a href="{% url view_work task.id %}">View submitted work reports</a>
  <hr />


  {% if comments %}

    comments:<br /><br />
    {% for comment in comments %}
      <a href="{% url view_user_profile comment.commented_by.id %}">
        {{ comment.commented_by.username }}
      </a> 
      on {{ comment.comment_datetime|date:"D d M Y"}} at 
      {{comment.comment_datetime|time:"H:i"}} wrote:
      <br />
      {{ comment.data|linebreaksbr }}<br />
    {% endfor %}

  {% endif %}
  <hr />

  {% if can_comment %}
    Add comment:<br />
    {% as_div_form form "Comment Form" csrf_token "Submit" %}
  {% endif %}

{% endblock %}