Mercurial > public > sg101
annotate gpp/templates/weblinks/link.html @ 505:a5d11471d031
Refactor the logic in the rate limiter decorator. Check to see if the request was ajax, as the ajax view always returns 200. Have to decode the JSON response to see if an error occurred or not.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 03 Dec 2011 19:13:38 +0000 |
parents | 3c48a555298d |
children |
rev | line source |
---|---|
bgneal@310 | 1 {% load url from future %} |
bgneal@492 | 2 {% load bio_tags %} |
gremmie@1 | 3 <dt> |
bgneal@209 | 4 <h4><a href="{{ link.url }}">{{ link.title }}</a></h4> |
gremmie@1 | 5 </dt> |
gremmie@1 | 6 <dd> |
gremmie@1 | 7 <p>{{ link.description }}</p> |
bgneal@310 | 8 <form action="{% url 'weblinks-visit' link.id %}" method="post">{% csrf_token %} |
gremmie@1 | 9 <table class="link-stats"> |
gremmie@1 | 10 <tr> |
bgneal@492 | 11 <th>Added by:</th><td>{% profile_link link.user.username %}</td> |
bgneal@310 | 12 <th>Category:</th><td><a href="{% url 'weblinks-view_links' slug=link.category.slug sort='date' %}">{{ link.category.title }}</a></td> |
bgneal@209 | 13 </tr> |
bgneal@209 | 14 <tr> |
bgneal@165 | 15 <th>Date Added:</th><td>{{ link.date_added|date:"M d, Y" }}</td> |
gremmie@1 | 16 <th>Hits:</th><td>{{ link.hits }}</td> |
bgneal@3 | 17 <td> |
bgneal@312 | 18 <a href="#" class="weblinks-broken" id="link-{{ link.id }}"><img src="{{ STATIC_URL }}icons/link_break.png" alt="Broken Link" title="Report this link as broken" /></a> |
bgneal@3 | 19 </td> |
gremmie@1 | 20 </tr> |
bgneal@165 | 21 <tr><td><input type="submit" value="Visit Site" /></td></tr> |
gremmie@1 | 22 </table> |
bgneal@165 | 23 </form> |
gremmie@1 | 24 <br /> |
gremmie@1 | 25 </dd> |