Skip to content
This repository has been archived by the owner on Feb 1, 2018. It is now read-only.

Commit

Permalink
dont show select drop downs on error pages fixes bug 801924
Browse files Browse the repository at this point in the history
  • Loading branch information
ossreleasefeed committed Oct 18, 2012
1 parent 3708bcf commit b073457
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crashstats/base/templates/404.html
Expand Up @@ -4,6 +4,8 @@
Page Not Found
{% endblock %}

{% block product_nav_filter %} {% endblock %}

{% block content %}
<div id="mainbody">
<div class="page-heading">
Expand Down
2 changes: 2 additions & 0 deletions crashstats/base/templates/500.html
Expand Up @@ -4,6 +4,8 @@
Internal Server Error
{% endblock %}

{% block product_nav_filter %}&nbsp;{% endblock %}

{% block content %}
<div id="mainbody">
<div class="panel">
Expand Down
3 changes: 2 additions & 1 deletion crashstats/base/templates/crashstats_base.html
Expand Up @@ -59,13 +59,13 @@ <h1>
</form>
</div>


<h1>Product Navigation</h1>

<div class="version-nav">
<input type="hidden" id="url_base" name="url_base" value="/products/{{ product }}" />
<input type="hidden" id="url_site" name="url_site" value="/" />

{% block product_nav_filter %}
<ul class="filter">
<li>
Product:
Expand Down Expand Up @@ -123,6 +123,7 @@ <h1>Product Navigation</h1>
</select>
</li>
</ul>
{% endblock %}

<div class="search">
<a href="{{ url('crashstats.query') }}#advanced">Advanced Search</a>
Expand Down
2 changes: 2 additions & 0 deletions crashstats/crashstats/tests/test_views.py
Expand Up @@ -130,12 +130,14 @@ def test_handler500(self, rget):
response = handler500(fake_request)
eq_(response.status_code, 500)
ok_('Internal Server Error' in response.content)
ok_('id="products_select"' not in response.content)

def test_handler404(self):
url = reverse('crashstats.home', args=('Unknown',))
response = self.client.get(url)
eq_(response.status_code, 404)
ok_('Page not Found' in response.content)
ok_('id="products_select"' not in response.content)

def test_homepage_redirect(self):
response = self.client.get('/')
Expand Down

0 comments on commit b073457

Please sign in to comment.