Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't render ugly &p=None links if there isn't a page to go to
  • Loading branch information
mattrobenolt committed Feb 13, 2014
1 parent c5d835d commit af36bf6
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 50 deletions.
8 changes: 4 additions & 4 deletions src/sentry/templates/sentry/admin/projects/list.html
Expand Up @@ -15,8 +15,8 @@
<form class="btn-toolbar" method="GET" action="">
<input type="text" name="pquery" value="{% if project_query %}{{ project_query }}{% endif %}" placeholder="search by project name">
<div class="btn-group pull-right">
<a class="btn prev{% if not project_list.paginator.has_previous %} disabled{% endif %}" href="?{{ project_list.query_string|escape }}&amp;p={{ project_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not project_list.paginator.has_next %} disabled{% endif %}" href="?{{ project_list.query_string|escape }}&amp;p={{ project_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not project_list.paginator.has_previous %} disabled{% else %}" href="?{{ project_list.query_string|escape }}&amp;p={{ project_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not project_list.paginator.has_next %} disabled{% else %}" href="?{{ project_list.query_string|escape }}&amp;p={{ project_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</form>

Expand Down Expand Up @@ -78,8 +78,8 @@

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not project_list.paginator.has_previous %} disabled{% endif %}" href="?{{ project_list.query_string|escape }}&amp;p={{ project_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not project_list.paginator.has_next %} disabled{% endif %}" href="?{{ project_list.query_string|escape }}&amp;p={{ project_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not project_list.paginator.has_previous %} disabled{% else %}" href="?{{ project_list.query_string|escape }}&amp;p={{ project_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not project_list.paginator.has_next %} disabled{% else %}" href="?{{ project_list.query_string|escape }}&amp;p={{ project_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>
</section>
Expand Down
8 changes: 4 additions & 4 deletions src/sentry/templates/sentry/admin/teams/list.html
Expand Up @@ -15,8 +15,8 @@
<form class="btn-toolbar" method="GET" action="">
<input type="text" name="tquery" value="{% if team_query %}{{ team_query }}{% endif %}" placeholder="search by team name">
<div class="btn-group pull-right">
<a class="btn prev{% if not team_list.paginator.has_previous %} disabled{% endif %}" href="?{{ team_list.query_string|escape }}&amp;p={{ team_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not team_list.paginator.has_next %} disabled{% endif %}" href="?{{ team_list.query_string|escape }}&amp;p={{ team_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not team_list.paginator.has_previous %} disabled{% else %}" href="?{{ team_list.query_string|escape }}&amp;p={{ team_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not team_list.paginator.has_next %} disabled{% else %}" href="?{{ team_list.query_string|escape }}&amp;p={{ team_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</form>

Expand Down Expand Up @@ -70,8 +70,8 @@

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not team_list.paginator.has_previous %} disabled{% endif %}" href="?{{ team_list.query_string|escape }}&amp;p={{ team_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not team_list.paginator.has_next %} disabled{% endif %}" href="?{{ team_list.query_string|escape }}&amp;p={{ team_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not team_list.paginator.has_previous %} disabled{% else %}" href="?{{ team_list.query_string|escape }}&amp;p={{ team_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not team_list.paginator.has_next %} disabled{% else %}" href="?{{ team_list.query_string|escape }}&amp;p={{ team_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>
</section>
Expand Down
8 changes: 4 additions & 4 deletions src/sentry/templates/sentry/admin/users/list.html
Expand Up @@ -18,8 +18,8 @@
<form class="btn-toolbar" method="GET" action="">
<input type="text" name="uquery" value="{% if user_query %}{{ user_query }}{% endif %}" placeholder="search by email address">
<div class="btn-group pull-right">
<a class="btn prev{% if not user_list.paginator.has_previous %} disabled{% endif %}" href="?{{ user_list.query_string|escape }}&amp;p={{ user_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not user_list.paginator.has_next %} disabled{% endif %}" href="?{{ user_list.query_string|escape }}&amp;p={{ user_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not user_list.paginator.has_previous %} disabled{% else %}" href="?{{ user_list.query_string|escape }}&amp;p={{ user_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not user_list.paginator.has_next %} disabled{% else %}" href="?{{ user_list.query_string|escape }}&amp;p={{ user_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</form>

Expand Down Expand Up @@ -75,8 +75,8 @@

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not user_list.paginator.has_previous %} disabled{% endif %}" href="?{{ user_list.query_string|escape }}&amp;p={{ user_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not user_list.paginator.has_next %} disabled{% endif %}" href="?{{ user_list.query_string|escape }}&amp;p={{ user_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not user_list.paginator.has_previous %} disabled{% else %}" href="?{{ user_list.query_string|escape }}&amp;p={{ user_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not user_list.paginator.has_next %} disabled{% else %}" href="?{{ user_list.query_string|escape }}&amp;p={{ user_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions src/sentry/templates/sentry/events/event_list.html
Expand Up @@ -21,8 +21,8 @@ <h6>{% trans filter.label %}</h6>

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% endif %}" href="?{{ event_list.query_string|escape }}&amp;p={{ event_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% endif %}" href="?{{ event_list.query_string|escape }}&amp;p={{ event_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% else %}" href="?{{ event_list.query_string|escape }}&amp;p={{ event_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% else %}" href="?{{ event_list.query_string|escape }}&amp;p={{ event_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>

Expand All @@ -40,8 +40,8 @@ <h6>{% trans filter.label %}</h6>

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% endif %}" href="?{{ event_list.query_string|escape }}&amp;p={{ event_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% endif %}" href="?{{ event_list.query_string|escape }}&amp;p={{ event_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% else %}" href="?{{ event_list.query_string|escape }}&amp;p={{ event_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% else %}" href="?{{ event_list.query_string|escape }}&amp;p={{ event_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>
{% endblock %}
8 changes: 4 additions & 4 deletions src/sentry/templates/sentry/explore/code/list_tag.html
Expand Up @@ -27,8 +27,8 @@
</ul>
</div>
<div class="btn-group pull-right">
<a class="btn prev{% if not tag_list.paginator.has_previous %} disabled{% endif %}" href="?{{ tag_list.query_string|escape }}&amp;p={{ tag_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not tag_list.paginator.has_next %} disabled{% endif %}" href="?{{ tag_list.query_string|escape }}&amp;p={{ tag_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not tag_list.paginator.has_previous %} disabled{% else %}" href="?{{ tag_list.query_string|escape }}&amp;p={{ tag_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not tag_list.paginator.has_next %} disabled{% else %}" href="?{{ tag_list.query_string|escape }}&amp;p={{ tag_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>

Expand Down Expand Up @@ -65,8 +65,8 @@

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not tag_list.paginator.has_previous %} disabled{% endif %}" href="?{{ tag_list.query_string|escape }}&amp;p={{ tag_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not tag_list.paginator.has_next %} disabled{% endif %}" href="?{{ tag_list.query_string|escape }}&amp;p={{ tag_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not tag_list.paginator.has_previous %} disabled{% else %}" href="?{{ tag_list.query_string|escape }}&amp;p={{ tag_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not tag_list.paginator.has_next %} disabled{% else %}" href="?{{ tag_list.query_string|escape }}&amp;p={{ tag_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>
{% endif %}
Expand Down
8 changes: 4 additions & 4 deletions src/sentry/templates/sentry/explore/code/tag_details.html
Expand Up @@ -39,8 +39,8 @@ <h6>{% trans "Code Details" %}</h6>
<h2 style="line-height:1;">{{ tag.data.filename }}{% if selection == 'functions' %} <small>{{ tag.data.function }}</small>{% endif %}</h2>
</div>
<div class="btn-group pull-right">
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% endif %}" href="?p={{ event_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% endif %}" href="?p={{ event_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% else %}" href="?p={{ event_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% else %}" href="?p={{ event_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>

Expand All @@ -58,8 +58,8 @@ <h2 style="line-height:1;">{{ tag.data.filename }}{% if selection == 'functions'

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% endif %}" href="?p={{ event_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% endif %}" href="?p={{ event_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% else %}" href="?p={{ event_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% else %}" href="?p={{ event_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>
{% endblock %}
8 changes: 4 additions & 4 deletions src/sentry/templates/sentry/explore/tag_details.html
Expand Up @@ -32,8 +32,8 @@ <h2 style="line-height:1;">Explore by {{ tag.get_label }}
</h2>
</div>
<div class="btn-group pull-right">
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% endif %}" href="?p={{ event_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% endif %}" href="?p={{ event_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% else %}" href="?p={{ event_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% else %}" href="?p={{ event_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>

Expand All @@ -51,8 +51,8 @@ <h2 style="line-height:1;">Explore by {{ tag.get_label }}

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% endif %}" href="?p={{ event_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% endif %}" href="?p={{ event_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% else %}" href="?p={{ event_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% else %}" href="?p={{ event_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>
{% endblock %}
8 changes: 4 additions & 4 deletions src/sentry/templates/sentry/explore/tag_value_details.html
Expand Up @@ -34,8 +34,8 @@ <h2 style="line-height:1;">Explore by {{ tag_key.get_label }}
</h2>
</div>
<div class="btn-group pull-right">
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% endif %}" href="?p={{ event_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% endif %}" href="?p={{ event_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% else %}" href="?p={{ event_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% else %}" href="?p={{ event_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>

Expand All @@ -53,8 +53,8 @@ <h2 style="line-height:1;">Explore by {{ tag_key.get_label }}

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% endif %}" href="?p={{ event_list.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% endif %}" href="?p={{ event_list.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not event_list.paginator.has_previous %} disabled{% else %}" href="?p={{ event_list.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not event_list.paginator.has_next %} disabled{% else %}" href="?p={{ event_list.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>
{% endblock %}
8 changes: 4 additions & 4 deletions src/sentry/templates/sentry/explore/tag_value_list.html
Expand Up @@ -26,8 +26,8 @@ <h2>
</ul>
</div>
<div class="btn-group pull-right">
<a class="btn prev{% if not tag_values.paginator.has_previous %} disabled{% endif %}" href="?{{ tag_values.query_string|escape }}&amp;p={{ tag_values.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not tag_values.paginator.has_next %} disabled{% endif %}" href="?{{ tag_values.query_string|escape }}&amp;p={{ tag_values.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not tag_values.paginator.has_previous %} disabled{% else %}" href="?{{ tag_values.query_string|escape }}&amp;p={{ tag_values.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not tag_values.paginator.has_next %} disabled{% else %}" href="?{{ tag_values.query_string|escape }}&amp;p={{ tag_values.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>

Expand Down Expand Up @@ -60,8 +60,8 @@ <h2>

<div class="btn-toolbar">
<div class="btn-group pull-right">
<a class="btn prev{% if not tag_values.paginator.has_previous %} disabled{% endif %}" href="?{{ tag_values.query_string|escape }}&amp;p={{ tag_values.paginator.previous_page }}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not tag_values.paginator.has_next %} disabled{% endif %}" href="?{{ tag_values.query_string|escape }}&amp;p={{ tag_values.paginator.next_page }}"><span>{% trans "Next" %}</span></a>
<a class="btn prev{% if not tag_values.paginator.has_previous %} disabled{% else %}" href="?{{ tag_values.query_string|escape }}&amp;p={{ tag_values.paginator.previous_page }}{% endif %}"><span>{% trans "Previous" %}</span></a>
<a class="btn next{% if not tag_values.paginator.has_next %} disabled{% else %}" href="?{{ tag_values.query_string|escape }}&amp;p={{ tag_values.paginator.next_page }}{% endif %}"><span>{% trans "Next" %}</span></a>
</div>
</div>
{% endif %}
Expand Down

0 comments on commit af36bf6

Please sign in to comment.