templates/task/view.html
author nishanth
Tue, 02 Mar 2010 15:03:48 +0530
changeset 176 13ceb76fd0a3
parent 171 8f31ed9817fa
child 185 f65e62255e47
permissions -rw-r--r--
now empty comments will not be accepted.
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 />
126
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
     8
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
     9
        {% if can_edit %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    10
            <a href="/task/edit/tid={{task.id}}">Edit task</a>
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    11
        {% endif %}
126
e5377fdaf110 added the functionality to close a task.
nishanth
parents: 114
diff changeset
    12
        
167
b61e45074ba1 implemented deleting of a task.
nishanth
parents: 164
diff changeset
    13
        {% if can_publish %}
b61e45074ba1 implemented deleting of a task.
nishanth
parents: 164
diff changeset
    14
            <a href="/task/publish/tid={{task.id}}">Publish task</a>
b61e45074ba1 implemented deleting of a task.
nishanth
parents: 164
diff changeset
    15
        {% endif %}
b61e45074ba1 implemented deleting of a task.
nishanth
parents: 164
diff changeset
    16
        
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    17
        {% if can_close %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    18
            <a href="/task/close/tid={{task.id}}">Close this task</a>
111
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    19
        {% endif %}
167
b61e45074ba1 implemented deleting of a task.
nishanth
parents: 164
diff changeset
    20
        
b61e45074ba1 implemented deleting of a task.
nishanth
parents: 164
diff changeset
    21
        {% if can_delete %}
b61e45074ba1 implemented deleting of a task.
nishanth
parents: 164
diff changeset
    22
            <a href="/task/delete/tid={{task.id}}">Delete task</a>
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    23
        {% endif %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    24
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    25
        <hr />created by <a href="/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a>
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    26
        on {{task.creation_datetime|date:"D d M Y"}} at {{task.creation_datetime|time:"H:i"}}<br />
111
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    27
        
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    28
        {% ifequal task.status "UP" %}
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    29
            Task can be viewed by:
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    30
        {% else %}
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    31
            Mentors:
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    32
        {% endifequal %}
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    33
        
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    34
        {% for mentor in mentors %}
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    35
            <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
    36
        {% endfor %}
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    37
        
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    38
        {% if can_mod_mentors %}
111
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    39
            <a href="/task/addmentor/tid={{task.id}}">
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    40
            {% ifequal task.status "UP" %}
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    41
                Request others to view/edit the task
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    42
            {% else %}
c272d4c601cd added the functionality to publish a task.
nishanth
parents: 96
diff changeset
    43
                Add another Mentor to this task
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    44
            {% endifequal %}</a>
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    45
        {% endif %}
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    46
        <br />
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    47
        
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    48
        <hr />
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    49
        <b>Description:</b><br />
164
bfe621e64a16 modified the look of browse_requests page task_view page and view_request page.
nishanth
parents: 159
diff changeset
    50
        {{ task.desc|linebreaksbr }}
171
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
    51
        <br /><br /><hr />
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
    52
        {% if task.tags.count %}
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
    53
            Tags: 
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
    54
            {% for tag in task.tags %}
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
    55
                tag
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
    56
            {% endfor %}
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
    57
            <hr />
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
    58
        {% endif %}
21
c28774fe7ffd implemented "add another mentor" functionality to a task.
nishanth
parents: 16
diff changeset
    59
72
9fc60a221016 modified claim_task view to suit the new design
nishanth
parents: 70
diff changeset
    60
        {% if deps %}
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    61
        
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    62
            <br />The task has following dependencies.<br />
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    63
            {% for dep in deps %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    64
                <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
    65
            {% endfor %}
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    66
            
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    67
            {% if can_mod_tasks %}
69
49532a0f5071 added user context variable in view_profile and edit_profile.
nishanth
parents: 66
diff changeset
    68
                <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
    69
                <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
    70
            {% endif %}
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    71
            
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    72
        {% else %}
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    73
        
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    74
            {% if subs %}
159
a74a32a5a3e1 finalised the look of all existing task views .
nishanth
parents: 156
diff changeset
    75
                The task has following sub tasks.<br />
89
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    76
                {% for sub in subs %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    77
                    <a href="/task/view/tid={{sub.id}}">{{sub.title}}</a><br />
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    78
                {% endfor %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    79
                
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    80
                {% if can_mod_tasks %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    81
                    <a href="/task/addtask/tid={{task.id}}">add more subtasks</a>
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    82
                    <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
    83
                {% endif %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    84
                
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    85
            {% else %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    86
            
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    87
                {% if can_mod_tasks %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    88
                    <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
    89
                {% endif %}
1cc03941ed5d added the capability of adding subtasks/dependencies .
nishanth
parents: 77
diff changeset
    90
                
72
9fc60a221016 modified claim_task view to suit the new design
nishanth
parents: 70
diff changeset
    91
            {% endif %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    92
        {% endif %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    93
        
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    94
        {% ifequal task.status "CD" %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    95
            Task has been closed by <a href="/user/view={{closing_notification.sent_from.id}}">{{closing_notification.sent_from.username}}</a>
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    96
            on {{closing_notification.sent_date|date:"D d M Y"}} at {{closing_notification.sent_date|time:"H:i"}}<br />
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    97
            <b>Reason: </b>{{closing_notification.remarks}}<br />
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
    98
        {% endifequal %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
    99
        
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   100
        {% ifequal task.status "CM" %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   101
            Task has been marked complete by <a href="/user/view={{completed_notification.sent_from.id}}">
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   102
            {{completed_notification.sent_from.username}}</a>
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   103
            on {{completed_notification.sent_date|date:"D d M Y"}} at {{completed_notification.sent_date|time:"H:i"}}<br />
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   104
        {% endifequal %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   105
            
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   106
        {% ifequal task.status "OP" %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   107
            <br />There are no users working on this task.<br />
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   108
        {% endifequal %}
171
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
   109
        
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
   110
        {% if subs %}
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
   111
            <br />This task cannot be claimed.. It exists only to show all of its sub tasks in one place.<br />
8f31ed9817fa now view_task page also shows tags for the task.
nishanth
parents: 167
diff changeset
   112
        {% endif %}
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   113
            
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   114
        {% if assigned_users %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   115
            Users working on this task:
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   116
            {% for user in assigned_users %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   117
                <a href="/user/view/uid={{user.id}}">{{user.username}}</a>
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   118
            {% endfor %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   119
            {% if is_mentor %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   120
                <a href="/task/remuser/tid={{task.id}}">Remove an existing user</a>
114
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   121
            {% endif %}
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   122
            <br />
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   123
        {% endif %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   124
        
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   125
        {% if can_assign_credits %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   126
            <a href="/task/assigncredits/tid={{task.id}}">View/Assign credits</a>
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   127
        {% endif %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   128
        
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   129
        {% if task_claimable %}
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   130
            <a href="/task/claim/tid={{task.id}}">View claims</a>
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   131
        {% endif %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   132
        
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   133
        {% if comments %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   134
            <hr />
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   135
            comments:<br /><br />
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   136
            {% for comment in comments %}
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   137
                <a href="/user/view/uid={{comment.created_by.id}}">{{ comment.created_by.username }}</a> 
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   138
                on {{ comment.creation_datetime|date:"D d M Y"}} at {{comment.creation_datetime|time:"H:i"}} wrote:<br />
176
13ceb76fd0a3 now empty comments will not be accepted.
nishanth
parents: 171
diff changeset
   139
            {{ comment.data|linebreaksbr }}<br /><br />
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   140
            {% endfor %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   141
        {% endif %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   142
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   143
        {% if not is_guest %}
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   144
        <hr />
176
13ceb76fd0a3 now empty comments will not be accepted.
nishanth
parents: 171
diff changeset
   145
        {% if error_msg %}
13ceb76fd0a3 now empty comments will not be accepted.
nishanth
parents: 171
diff changeset
   146
            {{error_msg}}<br />
13ceb76fd0a3 now empty comments will not be accepted.
nishanth
parents: 171
diff changeset
   147
        {% endif %}
114
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   148
            {% ifnotequal task.status "CM" %}
156
7cad1e92713d finalised the view_task page.
nishanth
parents: 134
diff changeset
   149
                Add comment:<br />
114
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   150
                <form action="" method="post">
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   151
                <!-- we might even want to use forms here -->
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   152
                <textarea  name="data"></textarea><br />
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   153
                <input type="submit" value="Submit">
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   154
                </form>
38793914921b mark task as complete functionality is added.
nishanth
parents: 111
diff changeset
   155
            {% endifnotequal %}
66
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   156
        {% endif %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   157
    {% else %}
f670de53402b modified view task template and view to suit new design.
nishanth
parents: 64
diff changeset
   158
        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
   159
    {% endif %}
a93eebabfeb1 created forms, views, templates, actions for home_page, browse_task.
nishanth
parents:
diff changeset
   160
{% endblock %}