templates/task/view.html
author nishanth
Wed, 24 Feb 2010 11:04:11 +0530
changeset 64 e743fe1f0f99
parent 25 c0e4fc8b8b5b
child 66 f670de53402b
permissions -rw-r--r--
updated view task in views to suit the new design .

{% extends 'base.html' %}
{% block title %}
    {{task.title}}
{% endblock %}
{% block content %}
    <a href="/task/browse/">Browse tasks</a>
    <h3>{{ task.title }}</h3><br />
    <!-- we have to write our own datetime.strftime filter and use in the next line -->
    created by <a href="/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a> on {{ task.creation_datetime.ctime }}<br />
    Mentors:
    {% for mentor in mentors %}
        <a href="/user/view/uid={{mentor.id}}">{{mentor.username}}|</a>
    {% endfor %}
    {% if is_mentor %}
        <br /><a href="/task/addmentor/tid={{task.id}}">Add another Mentor to this task</a><br />
        edit task goes here and it should contain all those add subs and add deps depending on availability<br />
    {% endif %}
    <hr>
    <br />Description:<br />
    <br />{{ task.desc }}<br />
    <hr>
    status of task is {{task.status}}<br />
	{% if assigned_users %}
		Users working on this task:
		{% for user in assigned_users %}
			<a href="/user/view/uid={{user.id}}">{{user.username}}</a>|
		{% endfor %}
		<br />
    {% endif %}
    {% if not is_guest %}
        <a href="/task/claim/tid={{task.id}}">View claims</a><br />
    {% endif %}
    
    {% if comments %}
        <hr />
        <br/>comments:<br />
        {% for comment in comments %}
            <br /><a href="/user/view/uid={{comment.created_by.id}}">{{ comment.created_by.username }}</a> at {{ comment.creation_datetime.ctime }} wrote:<br />
        {{ comment.data }}<br />
        {% endfor %}
    {% endif %}

    {% if not is_guest %}
        <br />Add comment:<br />
        <form action="" method="post">
        <!-- we might even want to use forms here -->
        <textarea  name="data"></textarea><br />
        <input type="submit" value="Submit">
        </form>
    {% endif %}
{% endblock %}