templates/task/view.html
author nishanth
Sat, 27 Feb 2010 00:48:50 +0530
changeset 126 e5377fdaf110
parent 114 38793914921b
child 134 3a49a7e23442
permissions -rw-r--r--
added the functionality to close a task.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12
a93eebabfeb1 created forms, views, templates, actions for home_page, browse_task.
nishanth
parents:
diff changeset
     1
{% extends 'base.html' %}
a93eebabfeb1 created forms, views, templates, actions for home_page, browse_task.
nishanth
parents:
diff changeset
     2
{% block title %}
a93eebabfeb1 created forms, views, templates, actions for home_page, browse_task.
nishanth
parents:
diff changeset
     3
    {{task.title}}
a93eebabfeb1 created forms, views, templates, actions for home_page, browse_task.
nishanth
parents:
diff changeset
     4
{% endblock %}
a93eebabfeb1 created forms, views, templates, actions for home_page, browse_task.
nishanth
parents:
diff changeset
     5
{% block content %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
     6
    {% if task_viewable %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
     7
        <h3>{{ task.title }}</h3><br />
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
     8
        <!-- we have to write our own datetime.strftime filter and use in the next line -->
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
     9
        created by <a href="/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a> on {{ task.creation_datetime.ctime }}<br />
126
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    10
111
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    11
        {% if is_mentor %}
126
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    12
        
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    13
            {% ifequal task.status "UP" %}
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    14
                <a href="/task/edit/tid={{task.id}}">Edit task</a>
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    15
            {% else %}
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    16
                <a href="/task/close/tid={{task.id}}">Close this task</a>
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    17
            {% endifequal %}
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    18
            
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    19
            {% if can_publish %}
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    20
                <a href="/task/publish/tid={{task.id}}">Publish task</a>
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    21
            {% endif %}
111
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    22
            <br />
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    23
        {% endif %}
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    24
        
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    25
        {% ifequal task.status "UP" %}
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    26
            Task can be viewed by:
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    27
        {% else %}
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    28
            Mentors:
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    29
        {% endifequal %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    30
        {% for mentor in mentors %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    31
            <a href="/user/view/uid={{mentor.id}}">{{mentor.username}}|</a>
12
a93eebabfeb1 created forms, views, templates, actions for home_page, browse_task.
nishanth
parents:
diff changeset
    32
        {% endfor %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    33
        {% if can_mod_mentors %}
111
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    34
            <a href="/task/addmentor/tid={{task.id}}">
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    35
            {% ifequal task.status "UP" %}
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    36
                Request others to view/edit the task
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    37
            {% else %}
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    38
                Add another Mentor to this task
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    39
            {% endifequal %}</a><br />
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    40
        {% endif %}
21
c28774fe7ffd implemented "add another mentor" functionality to a task.
nishanth
parents: 16
diff changeset
    41
72
9fc60a221016 modified claim_task view to suit the new design
nishanth
parents: 70
diff changeset
    42
        {% if deps %}
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    43
        
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    44
            <br />The task has following dependencies.<br />
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    45
            {% for dep in deps %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    46
                <a href="/task/view/tid={{dep.id}}">{{dep.title}}</a><br />
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    47
            {% endfor %}
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    48
            
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    49
            {% if can_mod_tasks %}
69
49532a0f5071 added user context variable in view_profile and edit_profile.
nishanth
parents: 66
diff changeset
    50
                <a href="/task/addtask/tid={{task.id}}">add more dependencies</a>
49532a0f5071 added user context variable in view_profile and edit_profile.
nishanth
parents: 66
diff changeset
    51
                <a href="/task/remtask/tid={{task.id}}">remove an existing dependency</a>
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    52
            {% endif %}
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    53
            
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    54
        {% else %}
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    55
        
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    56
            {% if subs %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    57
            
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    58
                <br />The task has following sub tasks.<br />
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    59
                {% for sub in subs %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    60
                    <a href="/task/view/tid={{sub.id}}">{{sub.title}}</a><br />
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    61
                {% endfor %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    62
                
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    63
                {% if can_mod_tasks %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    64
                    <a href="/task/addtask/tid={{task.id}}">add more subtasks</a>
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    65
                    <a href="/task/remtask/tid={{task.id}}">remove an existing subtask</a>
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    66
                {% endif %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    67
                
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    68
            {% else %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    69
            
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    70
                {% if can_mod_tasks %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    71
                    <a href="/task/addtask/tid={{task.id}}">add a subtask/dependency </a>
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    72
                {% endif %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    73
                
72
9fc60a221016 modified claim_task view to suit the new design
nishanth
parents: 70
diff changeset
    74
            {% endif %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    75
        {% endif %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    76
        
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    77
        
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    78
        <hr>
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    79
        <br />Description:<br />
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    80
        <br />{{ task.desc }}<br />
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    81
        <hr>
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    82
        
114
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    83
        {% ifnotequal task.status "CM" %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    84
            {% if assigned_users %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    85
                Users working on this task:
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    86
                {% for user in assigned_users %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    87
                    <a href="/user/view/uid={{user.id}}">{{user.username}}</a>|
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    88
                {% endfor %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    89
                {% if is_mentor %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    90
                    <a href="/task/remuser/tid={{task.id}}">Remove an existing user</a>
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    91
                <br />
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    92
                {% endif %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    93
            {% else %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    94
                There are no users currently working on this task.<br />
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    95
            {% endif %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    96
            {% if can_assign_credits %}
126
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    97
                <a href="/task/assigncredits/tid={{task.id}}">View/Assign credits</a>
114
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    98
            {% endif %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
    99
            {% if not is_guest and task_claimable %}
126
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
   100
                <a href="/task/claim/tid={{task.id}}">View claims</a><br />
72
9fc60a221016 modified claim_task view to suit the new design
nishanth
parents: 70
diff changeset
   101
            {% endif %}
94
d1f59bbc2685 added capability to remove an assigned user.
nishanth
parents: 89
diff changeset
   102
        {% else %}
114
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   103
            {% ifequal task.status "CD" %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   104
                The task has been closed by .. due to ..
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   105
            {% else %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   106
                The task is complete.
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   107
            {% endifequal %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   108
        {% endifnotequal %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   109
        
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   110
        {% if comments %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   111
            <hr />
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   112
            <br/>comments:<br />
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   113
            {% for comment in comments %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   114
                <br /><a href="/user/view/uid={{comment.created_by.id}}">{{ comment.created_by.username }}</a> at {{ comment.creation_datetime.ctime }} wrote:<br />
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   115
            {{ comment.data }}<br />
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   116
            {% endfor %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   117
        {% endif %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   118
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   119
        {% if not is_guest %}
114
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   120
            {% ifnotequal task.status "CM" %}
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   121
                <br />Add comment:<br />
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   122
                <form action="" method="post">
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   123
                <!-- we might even want to use forms here -->
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   124
                <textarea  name="data"></textarea><br />
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   125
                <input type="submit" value="Submit">
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   126
                </form>
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   127
            {% endifnotequal %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   128
        {% endif %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   129
    {% else %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   130
        You are not authorised to view this task. <a href="/task/browse/">click here</a> to return to browsing the tasks.
12
a93eebabfeb1 created forms, views, templates, actions for home_page, browse_task.
nishanth
parents:
diff changeset
   131
    {% endif %}
a93eebabfeb1 created forms, views, templates, actions for home_page, browse_task.
nishanth
parents:
diff changeset
   132
{% endblock %}