Mercurial > public > sg101
annotate gpp/templates/shoutbox/view.html @ 6:b6263ac72052
Use DRY principle to manage third party javascript libraries. Created script_tags template tags to generate the correct link and script tags for 3rd party libraries. The settings.py file is the only place where the full path name is specified.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 11 Apr 2009 22:50:56 +0000 |
parents | dbd703f7d63a |
children | f408971657b9 |
rev | line source |
---|---|
gremmie@1 | 1 {% extends 'base.html' %} |
gremmie@1 | 2 {% load avatar_tags %} |
gremmie@1 | 3 {% load smiley_tags %} |
bgneal@6 | 4 {% load script_tags %} |
gremmie@1 | 5 {% block custom_css %} |
gremmie@1 | 6 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/shoutbox_app.css" /> |
gremmie@1 | 7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pagination.css" /> |
gremmie@1 | 8 {% endblock %} |
gremmie@1 | 9 {% block custom_js %} |
bgneal@6 | 10 {% script_tags "jquery" %} |
bgneal@6 | 11 {% script_tags "jquery-jeditable" %} |
gremmie@1 | 12 <script type="text/javascript" src="{{ MEDIA_URL }}js/shoutbox_app.js"></script> |
gremmie@1 | 13 {% endblock %} |
gremmie@1 | 14 {% block title %}Shout History{% endblock %} |
gremmie@1 | 15 {% block content %} |
gremmie@1 | 16 <h2>Shout History</h2> |
gremmie@1 | 17 {% if page.object_list %} |
gremmie@1 | 18 {% include 'core/pagination.html' %} |
gremmie@1 | 19 |
gremmie@1 | 20 <div class="shoutbox-history"> |
gremmie@1 | 21 <table> |
gremmie@1 | 22 {% for shout in page.object_list %} |
gremmie@1 | 23 <tr> |
gremmie@1 | 24 <th> |
gremmie@1 | 25 <a href="{% url bio-view_profile username=shout.user.username %}">{% avatar shout.user %}</a> |
gremmie@1 | 26 <a href="{% url bio-view_profile username=shout.user.username %}">{{ shout.user.username }}</a> |
gremmie@1 | 27 </th> |
gremmie@1 | 28 <td> |
gremmie@1 | 29 <div {% ifequal user shout.user %}class="edit" id="shout-{{ shout.id }}"{% endifequal %}>{{ shout.shout|smilify|urlize }}</div> |
gremmie@1 | 30 </div> |
gremmie@1 | 31 <br /> |
gremmie@1 | 32 <span class="date">{{ shout.shout_date|date:"D M d Y H:i:s" }}</span> |
gremmie@1 | 33 {% ifequal user shout.user %} |
gremmie@1 | 34 | <a href="#" class="shout-del" id="shout-del-{{ shout.id }}">Delete</a> |
gremmie@1 | 35 {% endifequal %} |
gremmie@1 | 36 </td> |
gremmie@1 | 37 </tr> |
gremmie@1 | 38 {% endfor %} |
gremmie@1 | 39 </table> |
gremmie@1 | 40 </div> |
gremmie@1 | 41 |
gremmie@1 | 42 {% include 'core/pagination.html' %} |
gremmie@1 | 43 {% else %} |
gremmie@1 | 44 <p>No shouts at this time.</p> |
gremmie@1 | 45 {% endif %} |
gremmie@1 | 46 {% endblock %} |