pytask/templates/task/view_textbook.html
author Madhusudan.C.S <madhusudancs@gmail.com>
Sat, 05 Feb 2011 03:24:52 +0530
changeset 559 96e8e65a3738
parent 547 1bfa67f465b4
permissions -rw-r--r--
Display Pynts on task/textbook description page. Also make some style fixes.
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
500
42516ec56822 Fix styling issues.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 498
diff changeset
     3
435
1217d808d70f Use the new forms tags and fix the styling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 431
diff changeset
     4
{% load form_helpers %}
498
9f04b7bcc333 Add a new templatetag to render modified on and by line in documents.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 435
diff changeset
     5
{% load browse_helpers %}
9f04b7bcc333 Add a new templatetag to render modified on and by line in documents.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 435
diff changeset
     6
435
1217d808d70f Use the new forms tags and fix the styling.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 431
diff changeset
     7
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
     8
{% block title %}
501
b84d6a1d4603 Change all the queries to Textbook model to Tasks.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 500
diff changeset
     9
    {{ textbook.title }}
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    10
{% 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
    11
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    12
{% block content %}
498
9f04b7bcc333 Add a new templatetag to render modified on and by line in documents.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 435
diff changeset
    13
    {% as_modification_display "Created by" textbook.created_by textbook.creation_datetime %}
530
ab9b9e59de9d Display list of tasks related to a Textbook and allow coordinator to create them.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 501
diff changeset
    14
    <h2>{{ textbook.title }}</h2>
370
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_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
    17
        <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
    18
    {% endif %}
559
96e8e65a3738 Display Pynts on task/textbook description page.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 547
diff changeset
    19
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    20
    {% 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
    21
        <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
    22
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    23
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    24
    <hr />
559
96e8e65a3738 Display Pynts on task/textbook description page.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 547
diff changeset
    25
    <strong>Pynts: {{ textbook.pynts }}</strong><br/>
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    26
    {% if textbook.tags.count %}
559
96e8e65a3738 Display Pynts on task/textbook description page.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 547
diff changeset
    27
      <strong>Tags:</strong> {% as_tags textbook.tags %}<hr />
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    28
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    29
530
ab9b9e59de9d Display list of tasks related to a Textbook and allow coordinator to create them.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 501
diff changeset
    30
    <h3>
ab9b9e59de9d Display list of tasks related to a Textbook and allow coordinator to create them.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 501
diff changeset
    31
      Tasks:
ab9b9e59de9d Display list of tasks related to a Textbook and allow coordinator to create them.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 501
diff changeset
    32
      {% if can_create_chapters %}
ab9b9e59de9d Display list of tasks related to a Textbook and allow coordinator to create them.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 501
diff changeset
    33
        <a href="{% url create_chapter textbook.id %}">Create Tasks</a>
ab9b9e59de9d Display list of tasks related to a Textbook and allow coordinator to create them.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 501
diff changeset
    34
      {% endif %}
ab9b9e59de9d Display list of tasks related to a Textbook and allow coordinator to create them.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 501
diff changeset
    35
    </h3>
377
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    36
    {% if chapters %}
500
42516ec56822 Fix styling issues.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 498
diff changeset
    37
      <table>
42516ec56822 Fix styling issues.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 498
diff changeset
    38
      {% for chap in chapters %}
42516ec56822 Fix styling issues.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 498
diff changeset
    39
      <tr>
544
17c60a9c2439 The chapters link on view textbook page must use the new views.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 530
diff changeset
    40
        <td><a href="{% url view_chapter chap.parent.id chap.id %}">{{chap.title}}</a> </td>
500
42516ec56822 Fix styling issues.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 498
diff changeset
    41
      </tr>
42516ec56822 Fix styling issues.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 498
diff changeset
    42
      {% endfor %}
42516ec56822 Fix styling issues.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 498
diff changeset
    43
      </table>
377
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    44
    {% else %}
501
b84d6a1d4603 Change all the queries to Textbook model to Tasks.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 500
diff changeset
    45
      (Chapters are yet to be added by the Coordinator or T/A.)<br />
377
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    46
    {% endif %}
4f0cfd486d9b approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents: 370
diff changeset
    47
530
ab9b9e59de9d Display list of tasks related to a Textbook and allow coordinator to create them.
Madhusudan.C.S <madhusudancs@gmail.com>
parents: 501
diff changeset
    48
     <hr />
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    49
    {% if comments %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    50
        comments:<br /><br />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    51
        {% 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
    52
            <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
    53
            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
    54
        {{ comment.data|linebreaksbr }}<br />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    55
        {% endfor %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    56
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    57
    <hr />
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    58
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    59
    {% 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
    60
      {% as_div_form form "Comment Form" csrf_token "Submit" %}
370
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    61
    {% endif %}
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    62
1be4a3c09a47 view textbook works fine
Nishanth Amuluru <nishanth@fossee.in>
parents:
diff changeset
    63
{% endblock %}