diff --git a/CTFd/admin.py b/CTFd/admin.py index 2d434462..504f232a 100644 --- a/CTFd/admin.py +++ b/CTFd/admin.py @@ -332,7 +332,7 @@ def admin_teams(page): teams = Teams.query.slice(page_start, page_end).all() count = db.session.query(db.func.count(Teams.id)).first()[0] pages = int(count / results_per_page) + (count % results_per_page > 0) - return render_template('admin/teams.html', teams=teams, pages=pages) + return render_template('admin/teams.html', teams=teams, pages=pages, curr_page=page) @admin.route('/admin/team/', methods=['GET', 'POST']) diff --git a/CTFd/static/css/main-style.css b/CTFd/static/css/style.css similarity index 100% rename from CTFd/static/css/main-style.css rename to CTFd/static/css/style.css diff --git a/CTFd/templates/admin/base.html b/CTFd/templates/admin/base.html index 2a82c5b3..8a798871 100644 --- a/CTFd/templates/admin/base.html +++ b/CTFd/templates/admin/base.html @@ -8,7 +8,7 @@ - + diff --git a/CTFd/templates/admin/teams.html b/CTFd/templates/admin/teams.html index 19601e7d..fc543b6d 100644 --- a/CTFd/templates/admin/teams.html +++ b/CTFd/templates/admin/teams.html @@ -149,10 +149,15 @@ input[type="checkbox"] { margin: 0px !important; position: relative; top: 5px; } {% if pages > 1 %}
Page
+ {% if curr_page != 1 %}<<<{% endif %} {% for page in range(1, pages + 1) %} - {{ page }} + {% if curr_page != page %} + {{ page }} + {% else %} + {{ page }} + {% endif %} {% endfor %} - + {% if curr_page != pages %}>>>{% endif %}
{% endif %} diff --git a/CTFd/templates/base.html b/CTFd/templates/base.html index c34bca79..604d13c0 100644 --- a/CTFd/templates/base.html +++ b/CTFd/templates/base.html @@ -7,7 +7,7 @@ - + diff --git a/CTFd/templates/teams.html b/CTFd/templates/teams.html index a2f50c84..377b55a0 100644 --- a/CTFd/templates/teams.html +++ b/CTFd/templates/teams.html @@ -34,6 +34,7 @@ {% if team_pages > 1 %}
Page
+ {% if curr_page != 1 %}<<<{% endif %} {% for page in range(1, team_pages + 1) %} {% if curr_page != page %} {{ page }} @@ -41,6 +42,7 @@ {{page}} {% endif %} {% endfor %} + {% if curr_page != pages %}>>>{% endif %}
{% endif %}