diff --git a/amt/api/routes/projects.py b/amt/api/routes/projects.py index 2ed05440..e4ec6823 100644 --- a/amt/api/routes/projects.py +++ b/amt/api/routes/projects.py @@ -26,7 +26,7 @@ async def get_root( if request.state.htmx: return templates.TemplateResponse( - request, "projects/_list.html.j2", {"projects": projects, "next": next, "search": search} + request, "projects/_list.html.j2", {"projects": projects, "next": next, "search": search, "limit": limit} ) return templates.TemplateResponse( diff --git a/amt/site/templates/projects/_list.html.j2 b/amt/site/templates/projects/_list.html.j2 index c1c29ee3..0940103b 100644 --- a/amt/site/templates/projects/_list.html.j2 +++ b/amt/site/templates/projects/_list.html.j2 @@ -1,6 +1,7 @@ {% for project in projects %} -
  • {{ project.name }}
  • + {% if loop.last and projects|length == limit %} +
  • {{ project.name }}
  • + {% else %} +
  • {{ project.name }}
  • + {% endif %} {% endfor %} -{% if projects|length > 0 %} -
  • More
  • -{% endif %} diff --git a/amt/site/templates/projects/index.html.j2 b/amt/site/templates/projects/index.html.j2 index c5e9db20..c4909e24 100644 --- a/amt/site/templates/projects/index.html.j2 +++ b/amt/site/templates/projects/index.html.j2 @@ -19,7 +19,15 @@ id="project-search-input" /> - +