mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Don't make current page id a link on Teams page
This commit is contained in:
@@ -35,7 +35,11 @@
|
||||
<div class="text-center">Page
|
||||
<br>
|
||||
{% for page in range(1, team_pages + 1) %}
|
||||
<a href="/teams/{{ page }}">{{ page }}</a>
|
||||
{% if curr_page != page %}
|
||||
<a href="/teams/{{ page }}">{{ page }}</a>
|
||||
{% else %}
|
||||
<b>{{page}}</b>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<a href="">
|
||||
</div>
|
||||
|
||||
@@ -136,7 +136,7 @@ def teams(page):
|
||||
count = db.session.query(db.func.count(Teams.id)).first()[0]
|
||||
print(count)
|
||||
pages = int(count / results_per_page) + (count % results_per_page > 0)
|
||||
return render_template('teams.html', teams=teams, team_pages=pages)
|
||||
return render_template('teams.html', teams=teams, team_pages=pages, curr_page=page)
|
||||
|
||||
@views.route('/team/<teamid>', methods=['GET', 'POST'])
|
||||
def team(teamid):
|
||||
|
||||
Reference in New Issue
Block a user