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.

{% 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 %}
    <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 %}

  {% 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_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 %}