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
|
||||
<br>
|
||||
{% for page in range(1, team_pages + 1) %}
|
||||
{% 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):
|
||||
|
|
Loading…
Reference in New Issue