Hide button to load more workouts when all workouts have been fetched
This commit is contained in:
2
app.py
2
app.py
@@ -290,7 +290,7 @@ def calendar_view(user_id):
|
||||
@ app.route("/user/<int:user_id>/workout/list", methods=['GET'])
|
||||
def workout_list(user_id):
|
||||
workouts = get_workouts_for_user(user_id)
|
||||
return render_template('partials/workouts_list_fragment.html', workouts=workouts, user_id=user_id)
|
||||
return render_template('partials/workouts_list_fragment.html', workouts=workouts, user_id=user_id, workouts_all_loaded=True)
|
||||
|
||||
|
||||
def render_users_and_workouts():
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
|
||||
</li>
|
||||
{% if loop.index == loop.length %}
|
||||
{% if loop.index == loop.length and loop.length > 0 and not workouts_all_loaded|default(false, true) %}
|
||||
|
||||
<div class="flex justify-center">
|
||||
<button type="button"
|
||||
|
||||
Reference in New Issue
Block a user