templates/task/view.html
changeset 236 39f83b4cf557
parent 235 e338eaeccad7
equal deleted inserted replaced
235:e338eaeccad7 236:39f83b4cf557
     1 {% extends 'base.html' %}
       
     2 {% block title %}
       
     3     {{task.title}}
       
     4 {% endblock %}
       
     5 {% block content %}
       
     6     <h3>{{ task.title }}</h3>
       
     7 
       
     8     {% if can_edit %}
       
     9         <a href="/task/edit/tid={{task.id}}">Edit task</a>
       
    10     {% endif %}
       
    11     
       
    12     {% if can_publish %}
       
    13         <a href="/task/publish/tid={{task.id}}">Publish task</a>
       
    14     {% endif %}
       
    15     
       
    16     {% if can_close %}
       
    17         <a href="/task/close/tid={{task.id}}">Close this task</a>
       
    18     {% endif %}
       
    19     
       
    20     {% if can_delete %}
       
    21         <a href="/task/delete/tid={{task.id}}">Delete task</a>
       
    22     {% endif %}
       
    23 
       
    24     <hr />created by <a href="/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a>
       
    25     on {{task.creation_datetime|date:"D d M Y"}} at {{task.creation_datetime|time:"H:i"}}<br />
       
    26     
       
    27     {% ifequal task.status "UP" %}
       
    28         Task can be viewed by:
       
    29     {% else %}
       
    30         Reviewers:
       
    31     {% endifequal %}
       
    32     
       
    33     {% for reviewer in reviewers %}
       
    34         <a href="/user/view/uid={{reviewer.id}}">{{reviewer.username}}</a>
       
    35     {% endfor %}
       
    36     
       
    37     {% if can_mod_reviewers %}
       
    38         <a href="/task/addreviewer/tid={{task.id}}">
       
    39         {% ifequal task.status "UP" %}
       
    40             Request others to view/edit the task
       
    41         {% else %}
       
    42             Add another Reviewer to this task
       
    43         {% endifequal %}</a>
       
    44     {% endif %}
       
    45     <br />
       
    46     
       
    47     <hr />
       
    48     <b>Description:</b><br />
       
    49     {{ task.desc|linebreaksbr }}
       
    50     <br /><br /><hr />
       
    51     {% if task.tags.count %}
       
    52         Tags: 
       
    53         {% for tag in task.tags %}
       
    54             {{tag}}
       
    55         {% endfor %}
       
    56         <hr />
       
    57     {% endif %}
       
    58 
       
    59     {% if deps %}
       
    60     
       
    61         <br />The task has following dependencies.<ul>
       
    62         {% for dep in deps %}
       
    63             <li><a href="/task/view/tid={{dep.id}}">{{dep.title}}</a></li>
       
    64         {% endfor %}
       
    65         </ul>
       
    66         
       
    67         {% if can_mod_tasks %}
       
    68             <a href="/task/addtask/tid={{task.id}}">add more dependencies</a>
       
    69             <a href="/task/remtask/tid={{task.id}}">remove an existing dependency</a>
       
    70         {% endif %}
       
    71         
       
    72     {% else %}
       
    73     
       
    74         {% if subs %}
       
    75             The task has following sub tasks.<ul>
       
    76             {% for sub in subs %}
       
    77                 <li><a href="/task/view/tid={{sub.id}}">{{sub.title}}</a></li>
       
    78             {% endfor %}
       
    79             </ul>
       
    80             
       
    81             {% if can_mod_tasks %}
       
    82                 <a href="/task/addtask/tid={{task.id}}">add more subtasks</a>
       
    83                 <a href="/task/remtask/tid={{task.id}}">remove an existing subtask</a>
       
    84             {% endif %}
       
    85             
       
    86         {% else %}
       
    87         
       
    88             {% if can_mod_tasks %}
       
    89                 <a href="/task/addtask/tid={{task.id}}">add a subtask/dependency </a>
       
    90             {% endif %}
       
    91             
       
    92         {% endif %}
       
    93     {% endif %}
       
    94     
       
    95     {% ifequal task.status "CD" %}
       
    96         Task has been closed by <a href="/user/view={{closing_notification.sent_from.id}}">{{closing_notification.sent_from.username}}</a>
       
    97         on {{closing_notification.sent_date|date:"D d M Y"}} at {{closing_notification.sent_date|time:"H:i"}}<br />
       
    98         <b>Reason: </b>{{closing_notification.remarks}}<br />
       
    99     {% endifequal %}
       
   100     
       
   101     {% ifequal task.status "CM" %}
       
   102         Task has been marked complete by <a href="/user/view={{completed_notification.sent_from.id}}">
       
   103         {{completed_notification.sent_from.username}}</a>
       
   104         on {{completed_notification.sent_date|date:"D d M Y"}} at {{completed_notification.sent_date|time:"H:i"}}<br />
       
   105     {% endifequal %}
       
   106         
       
   107     {% ifequal task.status "OP" %}
       
   108         <br />There are no users working on this task.<br />
       
   109     {% endifequal %}
       
   110     
       
   111     {% if subs %}
       
   112         <br />This task cannot be claimed.. It exists only to show all of its sub tasks in one place.<br />
       
   113     {% endif %}
       
   114         
       
   115     {% if assigned_users %}
       
   116         Users working on this task:
       
   117         {% for user in assigned_users %}
       
   118             <a href="/user/view/uid={{user.id}}">{{user.username}}</a>
       
   119         {% endfor %}
       
   120         {% if is_reviewer %}
       
   121             <a href="/task/remuser/tid={{task.id}}">Remove an existing user</a>
       
   122         {% endif %}
       
   123         <br />
       
   124     {% endif %}
       
   125     
       
   126     {% if can_assign_pynts %}
       
   127         <a href="/task/assignpynts/tid={{task.id}}">View/Assign pynts</a>
       
   128     {% endif %}
       
   129     
       
   130     {% if task_claimable %}
       
   131         <a href="/task/claim/tid={{task.id}}">
       
   132         {% if is_reviewer %}
       
   133             View claims
       
   134         {% else %}
       
   135         <a href="/task/report/tid={{task.id}}">Submit Work</a>
       
   136             Claim the task
       
   137         {% endif %}</a>
       
   138     {% endif %}
       
   139     
       
   140     {% if comments %}
       
   141         <hr />
       
   142         comments:<br /><br />
       
   143         {% for comment in comments %}
       
   144             <a href="/user/view/uid={{comment.created_by.id}}">{{ comment.created_by.username }}</a> 
       
   145             on {{ comment.creation_datetime|date:"D d M Y"}} at {{comment.creation_datetime|time:"H:i"}} wrote:<br />
       
   146         {{ comment.data|linebreaksbr }}<br /><br />
       
   147         {% endfor %}
       
   148     {% endif %}
       
   149 
       
   150     {% if not is_guest %}
       
   151         <hr />
       
   152         {% if error_msg %}
       
   153             {{error_msg}}<br />
       
   154         {% endif %}
       
   155         {% ifnotequal task.status "UP" %}
       
   156             Add comment:<br />
       
   157             <form action="" method="post">
       
   158             <!-- we might even want to use forms here -->
       
   159             <textarea  name="data"></textarea><br />
       
   160             <input type="submit" value="Submit">
       
   161             </form>
       
   162         {% else %}
       
   163             {% if is_reviewer %}
       
   164             Add comment:<br />
       
   165                 <form action="" method="post">
       
   166                 <!-- we might even want to use forms here -->
       
   167                 <textarea  name="data"></textarea><br />
       
   168                 <input type="submit" value="Submit">
       
   169                 </form>                
       
   170             {% endif %}
       
   171         {% endifnotequal %}
       
   172     {% endif %}
       
   173 {% endblock %}