Mercurial > public > sg101
diff gpp/templates/weblinks/link.html @ 165:952e05cb3d80
Implement #49; use POST for updating link hit counts. Also refactored a bit and use javascript to report broken links.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 03 Jan 2010 04:15:14 +0000 |
parents | 33f73b7bd305 |
children | 6a5549c2efb5 |
line wrap: on
line diff
--- a/gpp/templates/weblinks/link.html Mon Dec 28 16:52:42 2009 +0000 +++ b/gpp/templates/weblinks/link.html Sun Jan 03 04:15:14 2010 +0000 @@ -1,17 +1,19 @@ <dt> -<a href="{% url weblinks.views.visit link.id %}" target="_blank">{{ link.title }}</a> +<h4>{{ link.title }}</h4> </dt> <dd> <p>{{ link.description }}</p> +<form action="{% url weblinks-visit link.id %}" method="post"> <table class="link-stats"> <tr> - <th>Date:</th><td>{{ link.date_added|date:"M d, Y" }}</td> + <th>Date Added:</th><td>{{ link.date_added|date:"M d, Y" }}</td> <th>Hits:</th><td>{{ link.hits }}</td> <td> -<a href="{% url weblinks.views.report_link link.id %}"><img src="{{ MEDIA_URL }}icons/link_break.png" alt="Broken Link" - title="Report broken link" /></a> + <a href="#" class="weblinks-broken" id="link-{{ link.id }}"><img src="{{ MEDIA_URL }}icons/link_break.png" alt="Broken Link" title="Report this link as broken" /></a> </td> </tr> + <tr><td><input type="submit" value="Visit Site" /></td></tr> </table> +</form> <br /> </dd>