Mercurial > public > sg101
comparison 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 |
comparison
equal
deleted
inserted
replaced
164:f7a6b8fe4556 | 165:952e05cb3d80 |
---|---|
1 <dt> | 1 <dt> |
2 <a href="{% url weblinks.views.visit link.id %}" target="_blank">{{ link.title }}</a> | 2 <h4>{{ link.title }}</h4> |
3 </dt> | 3 </dt> |
4 <dd> | 4 <dd> |
5 <p>{{ link.description }}</p> | 5 <p>{{ link.description }}</p> |
6 <form action="{% url weblinks-visit link.id %}" method="post"> | |
6 <table class="link-stats"> | 7 <table class="link-stats"> |
7 <tr> | 8 <tr> |
8 <th>Date:</th><td>{{ link.date_added|date:"M d, Y" }}</td> | 9 <th>Date Added:</th><td>{{ link.date_added|date:"M d, Y" }}</td> |
9 <th>Hits:</th><td>{{ link.hits }}</td> | 10 <th>Hits:</th><td>{{ link.hits }}</td> |
10 <td> | 11 <td> |
11 <a href="{% url weblinks.views.report_link link.id %}"><img src="{{ MEDIA_URL }}icons/link_break.png" alt="Broken Link" | 12 <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> |
12 title="Report broken link" /></a> | |
13 </td> | 13 </td> |
14 </tr> | 14 </tr> |
15 <tr><td><input type="submit" value="Visit Site" /></td></tr> | |
15 </table> | 16 </table> |
17 </form> | |
16 <br /> | 18 <br /> |
17 </dd> | 19 </dd> |