pytask/templates/task/view.html
changeset 431 fcc87a3f0311
parent 417 b37e541bf950
child 435 1217d808d70f
equal deleted inserted replaced
430:a11a778fca54 431:fcc87a3f0311
     1 {% extends 'base.html' %}
     1 {% extends "base.html" %}
       
     2 
     2 {% block title %}
     3 {% block title %}
     3     {{task.title}}
     4   {{task.title}}
     4 {% endblock %}
     5 {% endblock %}
       
     6 
     5 {% block content %}
     7 {% block content %}
     6     <h3>{{ task.title }}</h3>
     8   <h3>{{ task.title }}</h3>
     7 
     9 
     8     {% if can_edit %}
    10   {% if can_edit %}
     9         <a href="{% url edit_task task.id %}">Edit task</a>
    11     <a href="{% url edit_task task.id %}">Edit task</a>
    10     {% endif %}
    12   {% endif %}
    11 
    13 
    12     {% if can_approve %}
    14   {% if can_approve %}
    13         <a href="{% url approve_task task.id %}">Approve task</a>
    15     <a href="{% url approve_task task.id %}">Approve task</a>
    14     {% endif %}
    16   {% endif %}
    15 
    17 
    16     {% if can_close %}
    18   {% if can_close %}
    17         <a href="{% url close_task task.id %}">Close task</a>
    19       <a href="{% url close_task task.id %}">Close task</a>
    18     {% endif %}
    20   {% endif %}
    19 
    21 
    20     <hr />created by <a href="{% url view_user_profile task.created_by.id %}">{{ task.created_by.username }}</a>
    22   <hr />created by
    21     on {{task.creation_datetime|date:"D d M Y"}} at {{task.creation_datetime|time:"H:i"}}<br />
    23   <a href="{% url view_user_profile task.created_by.id %}">
    22     
    24     {{ task.created_by.username }}
    23     {% if reviewers %}
    25   </a>
       
    26   on {{task.creation_datetime|date:"D d M Y"}} at 
       
    27   {{task.creation_datetime|time:"H:i"}}
       
    28   <br />
       
    29 
       
    30   {% if reviewers %}
    24     Reviewers:
    31     Reviewers:
    25 	    {% for reviewer in reviewers %}
    32     {% for reviewer in reviewers %}
    26 		<a href="{% url view_user_profile reviewer.id %}">{{reviewer.username}}</a>
    33       <a href="{% url view_user_profile reviewer.id %}">{{reviewer.username}}</a>
    27 	    {% endfor %}
    34     {% endfor %}
    28     {% endif %}
    35   {% endif %}
    29 
    36 
    30     {% if can_mod_reviewers %}
    37   {% if can_mod_reviewers %}
    31         <a href="{% url addreviewer_task task.id %}">
    38     <a href="{% url addreviewer_task task.id %}">
    32 		Add a Reviewer to this task</a>
    39     Add a Reviewer to this task</a>
    33     {% endif %}
    40   {% endif %}
    34     <br />
    41   <br />
    35     
       
    36     <hr />
       
    37     <b>Description:</b><br />
       
    38     {{ task.desc|linebreaksbr }}
       
    39     <br /><br /><hr />
       
    40     {% if task.tags.count %}
       
    41         Tags: 
       
    42         {% for tag in task.tags %}
       
    43             {{tag}}
       
    44         {% endfor %}
       
    45         <hr />
       
    46     {% endif %}
       
    47 
    42 
    48     {% if selected_users %}
    43   <hr />
    49         Users working on this task:
    44   <b>Description:</b><br />
    50         {% for user in selected_users %}
       
    51             <a href="{% url view_profile user.id %}">{{user.username}}</a>
       
    52         {% endfor %}
       
    53         <br />
       
    54     {% endif %}
       
    55     
       
    56     {% if task_claimable %}
       
    57   <a href="{% url claim_task task.id %}">View claims</a>
       
    58     {% endif %}
       
    59 
    45 
    60     <a href="{% url view_work task.id %}">View submitted work reports</a>
    46   {{ task.desc|linebreaksbr }}
       
    47   <br /><br /><hr />
    61 
    48 
    62         <hr />
    49   {% if task.tags.count %}
    63     {% if comments %}
    50 
    64         comments:<br /><br />
    51     Tags: 
    65         {% for comment in comments %}
    52     {% for tag in task.tags %}
    66             <a href="{% url view_profile comment.commented_by.id %}">{{ comment.commented_by.username }}</a> 
    53       {{tag}}
    67             on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:<br />
    54     {% endfor %}
    68         {{ comment.data|linebreaksbr }}<br />
       
    69         {% endfor %}
       
    70     {% endif %}
       
    71     <hr />
    55     <hr />
    72 
    56 
    73     {% if can_comment %}
    57   {% endif %}
       
    58 
       
    59   {% if selected_users %}
       
    60 
       
    61     Users working on this task:
       
    62     {% for user in selected_users %}
       
    63       <a href="{% url view_profile user.id %}">{{user.username}}</a>
       
    64     {% endfor %}
       
    65     <br />
       
    66 
       
    67   {% endif %}
       
    68 
       
    69   {% if task_claimable %}
       
    70     <a href="{% url claim_task task.id %}">View claims</a>
       
    71   {% endif %}
       
    72 
       
    73   <a href="{% url view_work task.id %}">View submitted work reports</a>
       
    74   <hr />
       
    75 
       
    76 
       
    77   {% if comments %}
       
    78 
       
    79     comments:<br /><br />
       
    80     {% for comment in comments %}
       
    81       <a href="{% url view_profile comment.commented_by.id %}">
       
    82         {{ comment.commented_by.username }}
       
    83       </a> 
       
    84       on {{ comment.comment_datetime|date:"D d M Y"}} at 
       
    85       {{comment.comment_datetime|time:"H:i"}} wrote:
       
    86       <br />
       
    87       {{ comment.data|linebreaksbr }}<br />
       
    88     {% endfor %}
       
    89 
       
    90   {% endif %}
       
    91   <hr />
       
    92 
       
    93   {% if can_comment %}
    74     Add comment:<br />
    94     Add comment:<br />
    75 	<form action="" method="post">
    95     {% as_div_form form "Comment Form" csrf_token "Submit" %}
    76 	    {% csrf_token %}
    96   {% endif %}
    77 	    {{form.as_p}}
       
    78 	<input type="submit" value="Submit">
       
    79 	</form>                
       
    80     {% endif %}
       
    81 
    97 
    82 {% endblock %}
    98 {% endblock %}