pytask/templates/task/view_textbook.html
changeset 370 1be4a3c09a47
child 377 4f0cfd486d9b
equal deleted inserted replaced
369:602a909e9e16 370:1be4a3c09a47
       
     1 {% extends 'base.html' %}
       
     2 {% block title %}
       
     3     {{textbook.name}}
       
     4 {% endblock %}
       
     5 {% block content %}
       
     6     <h3>{{ textbook.name }}</h3>
       
     7 
       
     8     {% if can_edit %}
       
     9         <a href="/task/textbook/edit/tid={{textbook.uniq_key}}">Edit Text book</a>
       
    10     {% endif %}
       
    11     
       
    12     {% if can_approve %}
       
    13         <a href="/task/textbook/approve/tid={{textbook.uniq_key}}">Approve Text book</a>
       
    14     {% endif %}
       
    15 
       
    16     <hr />created by <a href="/user/view/uid={{ textbook.created_by.id }}">{{ textbook.created_by.username }}</a>
       
    17     on {{textbook.creation_datetime|date:"D d M Y"}} at {{textbook.creation_datetime|time:"H:i"}}<br />
       
    18     <hr />
       
    19     
       
    20     {% if textbook.tags.count %}
       
    21         Tags: 
       
    22         {% for tag in textbook.tags %}
       
    23             {{tag}}
       
    24         {% endfor %}
       
    25         <hr />
       
    26     {% endif %}
       
    27 
       
    28     Chapters: <br />
       
    29     {% for chap in chapters %}
       
    30     <ul>
       
    31 	    <li><a href="/task/view/tid={{chap.uniq_key}}">{{chap.title}}</a> </li>
       
    32     </ul>
       
    33     {% endfor %}
       
    34 
       
    35     
       
    36     
       
    37         <hr />
       
    38     {% if comments %}
       
    39         comments:<br /><br />
       
    40         {% for comment in comments %}
       
    41             <a href="/user/view/uid={{comment.commented_by.id}}">{{ comment.commented_by.username }}</a> 
       
    42             on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:<br />
       
    43         {{ comment.data|linebreaksbr }}<br />
       
    44         {% endfor %}
       
    45     {% endif %}
       
    46     <hr />
       
    47 
       
    48     {% if can_comment %}
       
    49     Add comment:<br />
       
    50 	<form action="" method="post">
       
    51 	    {% csrf_token %}
       
    52 	    {{form.as_p}}
       
    53 	<input type="submit" value="Submit">
       
    54 	</form>                
       
    55     {% endif %}
       
    56 
       
    57 {% endblock %}