mirror of https://github.com/JohnHammond/CTFd.git
Don't make current page id a link on Teams page
parent
baca032aec
commit
2b8f5c25cb
|
@ -35,7 +35,11 @@
|
||||||
<div class="text-center">Page
|
<div class="text-center">Page
|
||||||
<br>
|
<br>
|
||||||
{% for page in range(1, team_pages + 1) %}
|
{% 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 %}
|
{% endfor %}
|
||||||
<a href="">
|
<a href="">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -136,7 +136,7 @@ def teams(page):
|
||||||
count = db.session.query(db.func.count(Teams.id)).first()[0]
|
count = db.session.query(db.func.count(Teams.id)).first()[0]
|
||||||
print(count)
|
print(count)
|
||||||
pages = int(count / results_per_page) + (count % results_per_page > 0)
|
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'])
|
@views.route('/team/<teamid>', methods=['GET', 'POST'])
|
||||||
def team(teamid):
|
def team(teamid):
|
||||||
|
|
Loading…
Reference in New Issue