Mercurial > public > sg101
annotate gpp/templates/weblinks/view_links.html @ 193:fa7d82bfb100
Implement #68: add a denormalized count field to weblinks Category model to reduce database queries.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 03 Apr 2010 02:15:04 +0000 |
parents | 952e05cb3d80 |
children | 2baadae33f2e |
rev | line source |
---|---|
gremmie@1 | 1 {% extends 'weblinks/base.html' %} |
gremmie@1 | 2 {% block title %}Web Links: {{ category.title }}{% endblock %} |
gremmie@1 | 3 {% block weblinks_css %} |
gremmie@1 | 4 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/tab-nav.css" /> |
gremmie@1 | 5 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pagination.css" /> |
gremmie@1 | 6 {% endblock %} |
bgneal@165 | 7 {% block weblinks_js %} |
bgneal@165 | 8 <script type="text/javascript" src="{{ MEDIA_URL }}js/weblinks.js"></script> |
bgneal@165 | 9 {% endblock %} |
gremmie@1 | 10 {% block weblinks_content %} |
gremmie@1 | 11 <h3>Category: {{ category.title }}</h3> |
gremmie@1 | 12 |
gremmie@1 | 13 {% if page.object_list %} |
gremmie@1 | 14 <ul class="tab-nav"> |
gremmie@1 | 15 <li><a href="{% url weblinks-view_links category=category.id,sort="title",page="1" %}" |
gremmie@1 | 16 {% ifequal s "title" %}class="active" {% endifequal %}>Title</a></li> |
gremmie@1 | 17 <li><a href="{% url weblinks-view_links category=category.id,sort="date",page="1" %}" |
gremmie@1 | 18 {% ifequal s "date" %}class="active"{% endifequal %}>Date</a></li> |
gremmie@1 | 19 <li><a href="{% url weblinks-view_links category=category.id,sort="hits",page="1" %}" |
gremmie@1 | 20 {% ifequal s "hits" %}class="active"{% endifequal %}>Hits</a></li> |
gremmie@1 | 21 </ul> |
gremmie@1 | 22 |
gremmie@1 | 23 {% include 'core/pagination.html' %} |
gremmie@1 | 24 |
gremmie@1 | 25 <dl> |
gremmie@1 | 26 {% for link in page.object_list %} |
gremmie@1 | 27 {% include 'weblinks/link.html' %} |
gremmie@1 | 28 {% endfor %} |
gremmie@1 | 29 </dl> |
gremmie@1 | 30 |
gremmie@1 | 31 {% include 'core/pagination.html' %} |
gremmie@1 | 32 {% endif %} |
gremmie@1 | 33 {% endblock %} |