Mercurial > public > sg101
annotate gpp/templates/weblinks/view_links.html @ 507:8631d32e6b16
Some users are still having problems with the pop-up login. I think they are actually getting 403s because of the CSRF protection. So I have modified the base template to always have a javascript variable called csrf_token available when they aren't logged in. The ajax_login.js script was then modified to send this value with the ajax post. Fingers crossed.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 04 Dec 2011 03:05:21 +0000 |
parents | 88b2b9cb8c1f |
children |
rev | line source |
---|---|
gremmie@1 | 1 {% extends 'weblinks/base.html' %} |
bgneal@310 | 2 {% load url from future %} |
gremmie@1 | 3 {% block title %}Web Links: {{ category.title }}{% endblock %} |
gremmie@1 | 4 {% block weblinks_css %} |
bgneal@312 | 5 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/tab-nav.css" /> |
bgneal@312 | 6 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/pagination.css" /> |
gremmie@1 | 7 {% endblock %} |
bgneal@165 | 8 {% block weblinks_js %} |
bgneal@312 | 9 <script type="text/javascript" src="{{ STATIC_URL }}js/weblinks.js"></script> |
bgneal@165 | 10 {% endblock %} |
gremmie@1 | 11 {% block weblinks_content %} |
gremmie@1 | 12 <h3>Category: {{ category.title }}</h3> |
gremmie@1 | 13 |
gremmie@1 | 14 {% if page.object_list %} |
gremmie@1 | 15 <ul class="tab-nav"> |
bgneal@310 | 16 <li><a href="{% url 'weblinks-view_links' slug=category.slug sort="title" %}" |
gremmie@1 | 17 {% ifequal s "title" %}class="active" {% endifequal %}>Title</a></li> |
bgneal@310 | 18 <li><a href="{% url 'weblinks-view_links' slug=category.slug sort="date" %}" |
gremmie@1 | 19 {% ifequal s "date" %}class="active"{% endifequal %}>Date</a></li> |
bgneal@310 | 20 <li><a href="{% url 'weblinks-view_links' slug=category.slug sort="hits" %}" |
gremmie@1 | 21 {% ifequal s "hits" %}class="active"{% endifequal %}>Hits</a></li> |
gremmie@1 | 22 </ul> |
gremmie@1 | 23 |
gremmie@1 | 24 {% include 'core/pagination.html' %} |
gremmie@1 | 25 |
gremmie@1 | 26 <dl> |
gremmie@1 | 27 {% for link in page.object_list %} |
gremmie@1 | 28 {% include 'weblinks/link.html' %} |
gremmie@1 | 29 {% endfor %} |
gremmie@1 | 30 </dl> |
gremmie@1 | 31 |
gremmie@1 | 32 {% include 'core/pagination.html' %} |
gremmie@1 | 33 {% endif %} |
gremmie@1 | 34 {% endblock %} |