Mercurial > public > sg101
changeset 26:db40c2754580
Added logos to the downloads and weblinks navigation templates.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 19 Apr 2009 22:21:34 +0000 |
parents | 81e2449a5932 |
children | 03144b0d470d |
files | gpp/downloads/templatetags/downloads_tags.py gpp/templates/downloads/navigation.html gpp/templates/weblinks/navigation.html gpp/weblinks/templatetags/weblinks_tags.py media/css/base.css media/icons/downloads-logo.jpg media/icons/weblinks-logo.jpg |
diffstat | 7 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gpp/downloads/templatetags/downloads_tags.py Sun Apr 19 21:58:47 2009 +0000 +++ b/gpp/downloads/templatetags/downloads_tags.py Sun Apr 19 22:21:34 2009 +0000 @@ -9,9 +9,12 @@ register = template.Library() -@register.inclusion_tag('downloads/navigation.html') -def downloads_navigation(): - return {'search_form': SearchForm()} +@register.inclusion_tag('downloads/navigation.html', takes_context=True) +def downloads_navigation(context): + return { + 'search_form': SearchForm(), + 'MEDIA_URL': context['MEDIA_URL'], + } @register.inclusion_tag('downloads/latest_tag.html') def latest_downloads():
--- a/gpp/templates/downloads/navigation.html Sun Apr 19 21:58:47 2009 +0000 +++ b/gpp/templates/downloads/navigation.html Sun Apr 19 22:21:34 2009 +0000 @@ -1,3 +1,6 @@ +<div class="app-logo"> +<img src="{{ MEDIA_URL }}icons/downloads-logo.jpg" alt="Downloads Logo" title="Downloads" /> +</div> <form id="downloads-search" action="{% url downloads-search page=1 %}" method="post"> <p>{{ search_form.text }} <input type="submit" value="Search" /></p> </form>
--- a/gpp/templates/weblinks/navigation.html Sun Apr 19 21:58:47 2009 +0000 +++ b/gpp/templates/weblinks/navigation.html Sun Apr 19 22:21:34 2009 +0000 @@ -1,3 +1,6 @@ +<div class="app-logo"> +<img src="{{ MEDIA_URL }}icons/weblinks-logo.jpg" alt="Links Logo" title="Links" /> +</div> <div class="weblinks-search"> <form action="{% url weblinks-search page=1 %}" method="post"> <p>{{ search_form.text }} <input type="submit" value="Search" /></p>
--- a/gpp/weblinks/templatetags/weblinks_tags.py Sun Apr 19 21:58:47 2009 +0000 +++ b/gpp/weblinks/templatetags/weblinks_tags.py Sun Apr 19 22:21:34 2009 +0000 @@ -14,6 +14,7 @@ return { 'search_form': SearchForm(), 'user': context['user'], + 'MEDIA_URL': context['MEDIA_URL'], }