pytask/templates/task/view_textbook.html
author Nishanth Amuluru <nishanth@fossee.in>
Tue, 11 Jan 2011 12:36:55 +0530
changeset 141 ed2dadfc829a
parent 139 4f0cfd486d9b
permissions -rw-r--r--
corrected the user view url
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
132
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     1
{% extends 'base.html' %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     2
{% block title %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     3
    {{textbook.name}}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     4
{% endblock %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     5
{% block content %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     6
    <h3>{{ textbook.name }}</h3>
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     7
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     8
    {% if can_edit %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     9
        <a href="/task/textbook/edit/tid={{textbook.uniq_key}}">Edit Text book</a>
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    10
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    11
    
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    12
    {% if can_approve %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    13
        <a href="/task/textbook/approve/tid={{textbook.uniq_key}}">Approve Text book</a>
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    14
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    15
141
ed2dadfc829a corrected the user view url
Nishanth Amuluru <nishanth@fossee.in>
parents: 139
diff changeset
    16
    <hr />created by <a href="/profile/user/view/uid={{ textbook.created_by.id }}">{{ textbook.created_by.username }}</a>
132
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    17
    on {{textbook.creation_datetime|date:"D d M Y"}} at {{textbook.creation_datetime|time:"H:i"}}<br />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    18
    <hr />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    19
    
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    20
    {% if textbook.tags.count %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    21
        Tags: 
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    22
        {% for tag in textbook.tags %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    23
            {{tag}}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    24
        {% endfor %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    25
        <hr />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    26
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    27
139
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    28
    {% if chapters %}
132
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    29
    Chapters: <br />
139
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    30
    <table>
132
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    31
    {% for chap in chapters %}
139
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    32
    <tr>
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    33
	    <td><a href="/task/view/tid={{chap.uniq_key}}">{{chap.title}}</a> </td>
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    34
	    <td> {{chap.status}} </td>
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    35
    </tr>
132
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    36
    {% endfor %}
139
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    37
    </table>
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    38
    {% else %}
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    39
    There are no chapters in this textbook as of now.<br />
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    40
    {% endif %}
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 132
diff changeset
    41
132
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    42
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    43
    
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    44
    
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    45
        <hr />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    46
    {% if comments %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    47
        comments:<br /><br />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    48
        {% for comment in comments %}
141
ed2dadfc829a corrected the user view url
Nishanth Amuluru <nishanth@fossee.in>
parents: 139
diff changeset
    49
            <a href="/profile/user/view/uid={{comment.commented_by.id}}">{{ comment.commented_by.username }}</a> 
132
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    50
            on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:<br />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    51
        {{ comment.data|linebreaksbr }}<br />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    52
        {% endfor %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    53
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    54
    <hr />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    55
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    56
    {% if can_comment %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    57
    Add comment:<br />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    58
	<form action="" method="post">
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    59
	    {% csrf_token %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    60
	    {{form.as_p}}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    61
	<input type="submit" value="Submit">
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    62
	</form>                
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    63
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    64
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    65
{% endblock %}