pytask/templates/task/view.html
author Madhusudan.C.S <madhusudancs@gmail.com>
Mon, 17 Jan 2011 02:53:11 +0530
changeset 435 1217d808d70f
parent 431 fcc87a3f0311
child 488 c4e9771a274b
permissions -rw-r--r--
Use the new forms tags and fix the styling.

{% extends "base.html" %}

{% load form_helpers %}

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

{% block content %}
  <h3>{{ task.title }}</h3>

  {% if can_edit %}
    <a href="{% url edit_task task.id %}">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 %}

  <hr />created by
  <a href="{% url view_user_profile task.created_by.id %}">
    {{ task.created_by.username }}
  </a>
  on {{task.creation_datetime|date:"D d M Y"}} at 
  {{task.creation_datetime|time:"H:i"}}
  <br />

  {% 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: 
    {% for tag in task.tags %}
      {{tag}}
    {% endfor %}
    <hr />

  {% endif %}

  {% if selected_users %}

    Users working on this task:
    {% for user in selected_users %}
      <a href="{% url view_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_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 %}