templates/task/assigncredits.html
changeset 135 0ede6b2c5cd1
parent 114 38793914921b
child 136 8632a44b743d
equal deleted inserted replaced
134:3a49a7e23442 135:0ede6b2c5cd1
     1 {% extends 'base.html' %}
     1 {% extends 'base.html' %}
     2 {% block title %}
     2 {% block title %}
     3     {{task.title}}
     3     {{task.title}}
     4 {% endblock %}
     4 {% endblock %}
     5 {% block content %}
     5 {% block content %}
     6         <a href="/task/view/tid={{task.id}}">Click here</a> to return to the task.
     6         <a href="/task/view/tid={{task.id}}">Click here</a> to return to the task.<br />
     7         {% if prev_credits %}
       
     8             <hr />
       
     9             <br/>Previous credits:<br />
       
    10             {% for credit in prev_credits %}
       
    11                 {{credit.points}} pynts were given by <a href="/user/view/uid={{credit.given_by.id}}">{{credit.given_by.username}}</a> to
       
    12                 <a href="/user/view/uid={{credit.given_to.id}}">{{credit.given_to.username}}</a> at {{credit.given_time.ctime}}<br />
       
    13             {% endfor %}
       
    14             <a href="/task/complete/tid={{task.id}}">Mark task as complete.</a>
       
    15         {% endif %}
       
    16 
     7 
    17         <form action="" method="post">
     8         <form action="" method="post">
    18         {{form.as_p}}
     9         {{form.as_p}}
    19         <input type="submit" value="Submit">
    10         <input type="submit" value="Submit">
    20         </form>
    11         </form>
       
    12         {% if prev_credits %}
       
    13             <a href="/task/complete/tid={{task.id}}">Mark task as complete.</a>
       
    14             <hr />
       
    15             <br/>Previous credits:<br />
       
    16             {% for req in credit_requests %}
       
    17             <hr />
       
    18                 <a href="/user/view/uid={{req.sent_by.id}}">{{req.sent_by.username}}</a> requested assigning of {{req.pynts}} pynts to
       
    19                 <a href="/user/view/uid={{req.receiving_user.id}}">{{req.receiving_user.username}}</a>
       
    20                 on {{req.creation_date|date:"D d M Y"}} at {{req.creation_date|time:"H:i"}}<br />
       
    21                 {% if req.is_replied %}
       
    22                     status: 
       
    23                     {% if req.reply %}
       
    24                         Approved by <a href="/user/view/uid={{req.replied_by.id}}">{{req.replied_by.username}}</a>
       
    25                         on {{req.reply_date|date:"D d M Y"}} at {{req.reply_date|time:"H:i"}}<br />
       
    26                     {% else %}
       
    27                         Rejected by <a href="/user/view/uid={{req.replied_by.id}}">{{req.replied_by.username}}</a>
       
    28                         on {{req.reply_date|date:"D d M Y"}} at {{req.reply_date|time:"H:i"}}<br />
       
    29                         {% if req.remarks %}
       
    30                             Reason: {{req.remarks}}
       
    31                         {% endif %}
       
    32                     {% endif %}
       
    33                 {% else %}
       
    34                     status: Request pending
       
    35                 {% endif %}
       
    36             {% endfor %}
       
    37         {% endif %}
    21 {% endblock %}
    38 {% endblock %}