annotate bns_website/templates/reviews/review_list.html @ 41:9ce9f77d6cde

I added a get_absolute_url() to the news model so I can use that in the news template tag to create a link to the correct anchor on the news list page. The link works, but for some reason it goes to the beginning of the article content and not to the title. I've played around with the article tag and making an aside tag with an id and for whatever reason it always goes to the article content.
author Bob Mourlam <bob.mourlam@gmail.com>
date Sun, 06 Nov 2011 22:13:27 -0600
parents 37d9b6b1a097
children 2598bc18b6fb
rev   line source
ckridgway@16 1 {% extends 'base.html' %}
ckridgway@16 2 {% load core_tags %}
ckridgway@16 3 {% block title %}Reviews{% endblock %}
ckridgway@16 4
ckridgway@16 5 {% block custom_css %}
ckridgway@16 6 <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css">
ckridgway@16 7 {% endblock %}
ckridgway@16 8 {% block custom_js %}
ckridgway@16 9 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
ckridgway@16 10 <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
ckridgway@16 11 {% endblock %}
ckridgway@16 12
ckridgway@16 13 {% block content %}
ckridgway@16 14 {% navbar 'reviews' %}
ckridgway@16 15 <h1>Reviews</h1>
ckridgway@16 16
ckridgway@28 17 <div class="reviews">
ckridgway@34 18 {% if object_list %}
ckridgway@34 19 <ul class="review-list">
ckridgway@34 20 {% for review in object_list %}
ckridgway@34 21 <li class="review-list-item">
ckridgway@34 22 <blockquote>
ckridgway@34 23 <p>{{ review.review|safe }}</p>
ckridgway@34 24 <small>
ckridgway@34 25 {{ review.reviewer }}
ckridgway@34 26 {% if review.review_url %}
ckridgway@34 27 - <a href="{{ review.review_url }}"><em>{% if review.review_site %}{{ review.review_site }}{% else %}{{ review.review_url }}{% endif %}</em></a>
ckridgway@34 28 {% else %}{% if review.review_site %}
ckridgway@34 29 - <em>{{ review.review_site }}</em>
ckridgway@34 30 {% endif %}{% endif %}
ckridgway@34 31 </small>
ckridgway@34 32 </blockquote>
ckridgway@34 33 </li>
ckridgway@34 34 {% endfor %}
ckridgway@34 35 </ul>
ckridgway@34 36 {% else %}
ckridgway@34 37 Coming soon...
ckridgway@34 38 {% endif %}
ckridgway@16 39 {% endblock %}