pytask/templates/task/view.html
changeset 112 4cc40503bf3c
parent 111 1cc8d0b2eefb
child 118 f88135529c74
equal deleted inserted replaced
111:1cc8d0b2eefb 112:4cc40503bf3c
     7 
     7 
     8     {% if can_edit %}
     8     {% if can_edit %}
     9         <a href="/task/edit/tid={{task.uniq_key}}">Edit task</a>
     9         <a href="/task/edit/tid={{task.uniq_key}}">Edit task</a>
    10     {% endif %}
    10     {% endif %}
    11     
    11     
    12     {% if can_publish %}
    12     {% if can_approve %}
    13         <a href="/task/approve/tid={{task.uniq_key}}">Approve task</a>
    13         <a href="/task/approve/tid={{task.uniq_key}}">Approve task</a>
    14     {% endif %}
    14     {% endif %}
    15     
    15     
    16     {% if can_close %}
    16     {% if can_close %}
    17         <a href="/task/close/tid={{task.uniq_key}}">Close task</a>
    17         <a href="/task/close/tid={{task.uniq_key}}">Close task</a>
    22     {% endif %}
    22     {% endif %}
    23 
    23 
    24     <hr />created by <a href="/user/view/uid={{ task.created_by.uniq_key }}">{{ task.created_by.username }}</a>
    24     <hr />created by <a href="/user/view/uid={{ task.created_by.uniq_key }}">{{ task.created_by.username }}</a>
    25     on {{task.creation_datetime|date:"D d M Y"}} at {{task.creation_datetime|time:"H:i"}}<br />
    25     on {{task.creation_datetime|date:"D d M Y"}} at {{task.creation_datetime|time:"H:i"}}<br />
    26     
    26     
    27     {% ifequal task.status "UP" %}
    27     {% if reviewers %}
    28         Task can be viewed by:
    28 	    {% ifequal task.status "UP" %}
    29     {% else %}
    29 		Task can be viewed by:
    30         Reviewers:
    30 	    {% else %}
    31     {% endifequal %}
    31 		Reviewers:
    32     
    32 	    {% endifequal %}
    33     {% for reviewer in reviewers %}
    33 	    
    34         <a href="/user/view/uid={{reviewer.id}}">{{reviewer.username}}</a>
    34 	    {% for reviewer in reviewers %}
    35     {% endfor %}
    35 		<a href="/user/view/uid={{reviewer.id}}">{{reviewer.username}}</a>
       
    36 	    {% endfor %}
       
    37     {% endif %}
       
    38 
    36     
    39     
    37     {% if can_mod_reviewers %}
    40     {% if can_mod_reviewers %}
    38         <a href="/task/addreviewer/tid={{task.uniq_key}}">
    41         <a href="/task/addreviewer/tid={{task.uniq_key}}">
    39         {% ifequal task.status "UP" %}
    42         {% ifequal task.status "UP" %}
    40             Request others to view/edit the task
    43             Request others to view/edit the task
    55         {% endfor %}
    58         {% endfor %}
    56         <hr />
    59         <hr />
    57     {% endif %}
    60     {% endif %}
    58 
    61 
    59     
    62     
       
    63     <!--
    60     {% ifequal task.status "CD" %}
    64     {% ifequal task.status "CD" %}
    61         Task has been closed by <a href="/user/view={{closing_notification.sent_from.id}}">{{closing_notification.sent_from.username}}</a>
    65         Task has been closed by <a href="/user/view={{closing_notification.sent_from.id}}">{{closing_notification.sent_from.username}}</a>
    62         on {{closing_notification.sent_date|date:"D d M Y"}} at {{closing_notification.sent_date|time:"H:i"}}<br />
    66         on {{closing_notification.sent_date|date:"D d M Y"}} at {{closing_notification.sent_date|time:"H:i"}}<br />
    63         <b>Reason: </b>{{closing_notification.remarks}}<br />
    67         <b>Reason: </b>{{closing_notification.remarks}}<br />
    64     {% endifequal %}
    68     {% endifequal %}
    74     {% endifequal %}
    78     {% endifequal %}
    75     
    79     
    76     {% if subs %}
    80     {% if subs %}
    77         <br />This task cannot be claimed.. It exists only to show all of its sub tasks in one place.<br />
    81         <br />This task cannot be claimed.. It exists only to show all of its sub tasks in one place.<br />
    78     {% endif %}
    82     {% endif %}
       
    83     -->
    79         
    84         
    80     {% if assigned_users %}
    85     {% if selected_users %}
    81         Users working on this task:
    86         Users working on this task:
    82         {% for user in assigned_users %}
    87         {% for user in assigned_users %}
    83             <a href="/user/view/uid={{user.id}}">{{user.username}}</a>
    88             <a href="/user/view/uid={{user.id}}">{{user.username}}</a>
    84         {% endfor %}
    89         {% endfor %}
    85         {% if is_reviewer %}
    90         {% if is_reviewer %}
    86             <a href="/task/remuser/tid={{task.uniq_key}}">Remove an existing user</a>
    91             <a href="/task/remuser/tid={{task.uniq_key}}">Remove an existing user</a>
    87         {% endif %}
    92         {% endif %}
    88         <br />
    93         <br />
    89     {% endif %}
    94     {% endif %}
    90     
    95     
       
    96     {% if task_claimable %}
       
    97 	<a href="/task/claim/tid={{task.uniq_key}}">View claims</a>
       
    98     {% endif %}
       
    99 
    91     {% if can_assign_pynts %}
   100     {% if can_assign_pynts %}
    92         <a href="/task/assignpynts/tid={{task.uniq_key}}">View/Assign pynts</a>
   101         <a href="/task/assignpynts/tid={{task.uniq_key}}">Request assign pynts and mark the task as complete</a>
    93     {% endif %}
   102     {% endif %}
    94     
   103     
    95     {% if task_claimable %}
   104 
    96         <a href="/task/claim/tid={{task.uniq_key}}">
   105     {% if is_selected %}
    97         {% if is_reviewer %}
       
    98             View claims
       
    99         {% else %}
       
   100         <a href="/task/report/tid={{task.uniq_key}}">Submit Work</a>
   106         <a href="/task/report/tid={{task.uniq_key}}">Submit Work</a>
   101             Claim the task
       
   102         {% endif %}</a>
       
   103     {% endif %}
   107     {% endif %}
   104     
   108     
   105     {% if comments %}
   109     {% if comments %}
   106         <hr />
   110         <hr />
   107         comments:<br /><br />
   111         comments:<br /><br />
   108         {% for comment in comments %}
   112         {% for comment in comments %}
   109             <a href="/user/view/uid={{comment.created_by.uniq_key}}">{{ comment.created_by.username }}</a> 
   113             <a href="/user/view/uid={{comment.commented_by.uniq_key}}">{{ comment.commented_by.username }}</a> 
   110             on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:<br />
   114             on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:<br />
   111         {{ comment.data|linebreaksbr }}<br /><br />
   115         {{ comment.data|linebreaksbr }}<br /><br />
   112         {% endfor %}
   116         {% endfor %}
   113     {% endif %}
   117     {% endif %}
   114 
   118 
   115     {% if not is_guest %}
   119     {% if can_comment %}
   116         <hr />
   120     Add comment:<br />
   117         {% if error_msg %}
   121 	<form action="" method="post">
   118             {{error_msg}}<br />
   122 	    {% csrf_token %}
   119         {% endif %}
   123 	    {{form.as_p}}
   120         {% ifnotequal task.status "UP" %}
   124 	<input type="submit" value="Submit">
   121             Add comment:<br />
   125 	</form>                
   122             <form action="" method="post">
       
   123 		    {% csrf_token %}
       
   124 		    {{form.as_p}}
       
   125             <input type="submit" value="Submit">
       
   126             </form>
       
   127         {% else %}
       
   128             {% if is_reviewer %}
       
   129             Add comment:<br />
       
   130                 <form action="" method="post">
       
   131 		    {% csrf_token %}
       
   132 		    {{form.as_p}}
       
   133                 <input type="submit" value="Submit">
       
   134                 </form>                
       
   135             {% endif %}
       
   136         {% endifnotequal %}
       
   137     {% endif %}
   126     {% endif %}
       
   127 
   138 {% endblock %}
   128 {% endblock %}