diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-12-25 15:20:58 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-12-25 15:20:58 +0000 |
| commit | b0a5980833c0f4bded04f0b6500a1713652ca552 (patch) | |
| tree | 133dd4816b4b3d4c291f6e1a747cfa2d2e611a2a /app/templates/todo | |
| parent | 1eaed55bc6d0942f8428a9c015b00503e33aa0cd (diff) | |
| download | cheatdb-b0a5980833c0f4bded04f0b6500a1713652ca552.tar.xz | |
Add unlimited results toggle in topics list
Diffstat (limited to 'app/templates/todo')
| -rw-r--r-- | app/templates/todo/topics.html | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/app/templates/todo/topics.html b/app/templates/todo/topics.html index bec0f42..2156e8d 100644 --- a/app/templates/todo/topics.html +++ b/app/templates/todo/topics.html @@ -5,15 +5,30 @@ Topics to be Added {% endblock %} {% block content %} - <a class="btn btn-primary float-right" href="{{ url_for('todo_topics_page', q=query, show_discarded=not show_discarded) }}"> - {% if not show_discarded %} - Show - {% else %} - Hide + <div class="float-right btn-group"> + {% if current_user.rank.atLeast(current_user.rank.EDITOR) %} + {% if n >= 10000 %} + <a class="btn btn-primary" + href="{{ url_for('todo_topics_page', q=query, show_discarded=show_discarded, n=100) }}"> + Paginiated List + </a> + {% else %} + <a class="btn btn-primary" + href="{{ url_for('todo_topics_page', q=query, show_discarded=show_discarded, n=10000) }}"> + Unlimited List + </a> + {% endif %} {% endif %} + <a class="btn btn-primary" href="{{ url_for('todo_topics_page', q=query, show_discarded=not show_discarded) }}"> + {% if not show_discarded %} + Show + {% else %} + Hide + {% endif %} - Discarded Topics - </a> + Discarded Topics + </a> + </div> <h1>Topics to be Added</h1> |
