templates/task/view.html
changeset 114 38793914921b
parent 111 c272d4c601cd
child 126 e5377fdaf110
equal deleted inserted replaced
113:ea962d5fe99e 114:38793914921b
     5 {% block content %}
     5 {% block content %}
     6     {% if task_viewable %}
     6     {% if task_viewable %}
     7         <h3>{{ task.title }}</h3><br />
     7         <h3>{{ task.title }}</h3><br />
     8         <!-- we have to write our own datetime.strftime filter and use in the next line -->
     8         <!-- we have to write our own datetime.strftime filter and use in the next line -->
     9         created by <a href="/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a> on {{ task.creation_datetime.ctime }}<br />
     9         created by <a href="/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a> on {{ task.creation_datetime.ctime }}<br />
       
    10         if task_editable ..<br />
    10         {% if is_mentor %}
    11         {% if is_mentor %}
    11             <a href="/task/edit/tid={{task.id}}">Edit task</a>
    12             <a href="/task/edit/tid={{task.id}}">Edit task</a>
    12             {% if can_publish %}|<a href="/task/publish/tid={{task.id}}">Publish task</a>{% endif %}
    13             {% if can_publish %}|<a href="/task/publish/tid={{task.id}}">Publish task</a>{% endif %}
    13             <br />
    14             <br />
    14         {% endif %}
    15         {% endif %}
    69         <hr>
    70         <hr>
    70         <br />Description:<br />
    71         <br />Description:<br />
    71         <br />{{ task.desc }}<br />
    72         <br />{{ task.desc }}<br />
    72         <hr>
    73         <hr>
    73         
    74         
    74         status of task is {{task.status}}<br />
    75         {% ifnotequal task.status "CM" %}
    75         {% if assigned_users %}
    76             {% if assigned_users %}
    76             Users working on this task:
    77                 Users working on this task:
    77             {% for user in assigned_users %}
    78                 {% for user in assigned_users %}
    78                 <a href="/user/view/uid={{user.id}}">{{user.username}}</a>|
    79                     <a href="/user/view/uid={{user.id}}">{{user.username}}</a>|
    79             {% endfor %}
    80                 {% endfor %}
    80             {% if is_mentor %}
    81                 {% if is_mentor %}
    81                 <a href="/task/remuser/tid={{task.id}}">Remove an existing user</a>
    82                     <a href="/task/remuser/tid={{task.id}}">Remove an existing user</a>
    82             <br />
    83                 <br />
       
    84                 {% endif %}
       
    85             {% else %}
       
    86                 There are no users currently working on this task.<br />
       
    87             {% endif %}
       
    88             {% if can_assign_credits %}
       
    89                 <a href="/task/assigncredits/tid={{task.id}}">Assign credits</a>
       
    90             {% endif %}
       
    91             {% if not is_guest and task_claimable %}
       
    92                 <a href="/task/claim/tid={{task.id}}">View claims for this task</a>.<br />
    83             {% endif %}
    93             {% endif %}
    84         {% else %}
    94         {% else %}
    85             There are no users currently working on this task.<br />
    95             {% ifequal task.status "CD" %}
    86         {% endif %}
    96                 The task has been closed by .. due to ..
    87         {% if can_assign_credits %}
    97             {% else %}
    88             <a href="/task/assigncredits/tid={{task.id}}">Assign credits</a>
    98                 The task is complete.
    89         {% endif %}
    99             {% endifequal %}
    90         {% if not is_guest and task_claimable %}
   100         {% endifnotequal %}
    91             <a href="/task/claim/tid={{task.id}}">View claims for this task</a>.<br />
       
    92         {% endif %}
       
    93         
   101         
    94         {% if comments %}
   102         {% if comments %}
    95             <hr />
   103             <hr />
    96             <br/>comments:<br />
   104             <br/>comments:<br />
    97             {% for comment in comments %}
   105             {% for comment in comments %}
    99             {{ comment.data }}<br />
   107             {{ comment.data }}<br />
   100             {% endfor %}
   108             {% endfor %}
   101         {% endif %}
   109         {% endif %}
   102 
   110 
   103         {% if not is_guest %}
   111         {% if not is_guest %}
   104             <br />Add comment:<br />
   112             {% ifnotequal task.status "CM" %}
   105             <form action="" method="post">
   113                 <br />Add comment:<br />
   106             <!-- we might even want to use forms here -->
   114                 <form action="" method="post">
   107             <textarea  name="data"></textarea><br />
   115                 <!-- we might even want to use forms here -->
   108             <input type="submit" value="Submit">
   116                 <textarea  name="data"></textarea><br />
   109             </form>
   117                 <input type="submit" value="Submit">
       
   118                 </form>
       
   119             {% endifnotequal %}
   110         {% endif %}
   120         {% endif %}
   111     {% else %}
   121     {% else %}
   112         You are not authorised to view this task. <a href="/task/browse/">click here</a> to return to browsing the tasks.
   122         You are not authorised to view this task. <a href="/task/browse/">click here</a> to return to browsing the tasks.
   113     {% endif %}
   123     {% endif %}
   114 {% endblock %}
   124 {% endblock %}