added back a search box so at least we can search for books to add to a wishlist while logged in, until we know where the search box should go

pull/1/head
Ed Summers 2011-10-13 22:32:30 -04:00
parent ff5aea310c
commit 5138e3d817
2 changed files with 11 additions and 1 deletions

View File

@ -22,6 +22,16 @@
<div class="js-logo">
<a href="/"><img src="/static/images/logo.png" alt="unglue.it" title="unglue.it" /></a>
</div>
{% if not suppress_search_box %}
<div class="js-search" style="float: left; margin-left: 50px;">
<div class="js-search-inner">
<form action="{% url search %}" method="get">
<input type="text" placeholder="Search for a book..." size="30" class="inputbox" name="q" value="{{ q }}">
<input type="button" onclick="this.form.searchword.focus();" class="button" value="Search">
</form>
</div>
</div>
{% endif %}
<div class="js-topmenu">
<ul class="menu">
{% if user.is_authenticated %}

View File

@ -19,7 +19,7 @@ def home(request):
if request.user.is_authenticated():
return HttpResponseRedirect(reverse('supporter',
args=[request.user.username]))
return render(request, 'home.html')
return render(request, 'home.html', {'suppress_search_box': True})
def supporter(request, supporter_username):
supporter = get_object_or_404(User, username=supporter_username)