pytask/templates/task/view_textbook.html
author Madhusudan.C.S <madhusudancs@gmail.com>
Mon, 17 Jan 2011 02:53:11 +0530
changeset 435 1217d808d70f
parent 431 fcc87a3f0311
child 498 9f04b7bcc333
permissions -rw-r--r--
Use the new forms tags and fix the styling.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
     1
{% extends "base.html" %}
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
     2
435
1217d808d70f Use the new forms tags and fix the styling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 431
diff changeset
     3
{% load form_helpers %}
1217d808d70f Use the new forms tags and fix the styling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 431
diff changeset
     4
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     5
{% block title %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     6
    {{textbook.name}}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     7
{% endblock %}
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
     8
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     9
{% block content %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    10
    <h3>{{ textbook.name }}</h3>
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_edit %}
417
b37e541bf950 Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 379
diff changeset
    13
        <a href="{% url edit_textbook textbook.id %}">Edit Text book</a>
370
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
    
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    16
    {% if can_approve %}
417
b37e541bf950 Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 379
diff changeset
    17
        <a href="{% url approve_textbook textbook.id %}">Approve Text book</a>
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    18
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    19
417
b37e541bf950 Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 379
diff changeset
    20
    <hr />created by <a href="{% url view_textbook textbook.created_by.id %}">{{ textbook.created_by.username }}</a>
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    21
    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
    22
    <hr />
417
b37e541bf950 Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 379
diff changeset
    23
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    24
    {% if textbook.tags.count %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    25
        Tags: 
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    26
        {% for tag in textbook.tags %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    27
            {{tag}}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    28
        {% endfor %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    29
        <hr />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    30
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    31
377
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    32
    {% if chapters %}
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    33
    Chapters: <br />
377
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    34
    <table>
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    35
    {% for chap in chapters %}
377
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    36
    <tr>
417
b37e541bf950 Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 379
diff changeset
    37
	    <td><a href="{% url view_task chap.id %}">{{chap.title}}</a> </td>
377
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    38
	    <td> {{chap.status}} </td>
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    39
    </tr>
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    40
    {% endfor %}
377
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    41
    </table>
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    42
    {% else %}
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    43
    There are no chapters in this textbook as of now.<br />
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    44
    {% endif %}
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    45
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    46
        <hr />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    47
    {% if comments %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    48
        comments:<br /><br />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    49
        {% for comment in comments %}
417
b37e541bf950 Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 379
diff changeset
    50
            <a href="{% url view_profile comment.commented_by.id %}">{{ comment.commented_by.username }}</a> 
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    51
            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
    52
        {{ comment.data|linebreaksbr }}<br />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    53
        {% endfor %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    54
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    55
    <hr />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    56
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    57
    {% if can_comment %}
431
fcc87a3f0311 Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 417
diff changeset
    58
      {% as_div_form form "Comment Form" csrf_token "Submit" %}
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    59
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    60
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    61
{% endblock %}