Skip to content

feat: show listing of terms added in Book or page #588 - #704

Open
marcomachado wants to merge 1 commit into
LuteOrg:developfrom
marcomachado:feature-588-new-terms-in-book
Open

feat: show listing of terms added in Book or page #588#704
marcomachado wants to merge 1 commit into
LuteOrg:developfrom
marcomachado:feature-588-new-terms-in-book

Conversation

@marcomachado

Copy link
Copy Markdown
Contributor

This PR implements a feature allowing users to view, search, and filter terms matching specific books and pages in the Term Index listing.

It satisfies the requirement to filter terms in 3 distinct modes:

  1. Generic View (Terms -> Terms menu link): Opens with reset filters, hiding book scope controls;
  2. Reading Page -> Term List: Opens showing terms from the current page, displaying book scope and page selectors;
  3. Book Action List -> Terms: Opens with the current book selected;

Fixes #588

Changes

1. Backend Controllers & API

routes.py

  • Updated /term/index to fetch all books, page counts, and current pages, serializing it to the template as books_json.
  • Added a POST route /term/mark_current_page/<int:bookid>/<int:pagenum> to update a book's current page position.

2. Query Optimization

datatables.py

  • Implemented book and page queries inside get_data_tables_list
  • Refactored logic into helper functions to resolve pylint warnings (too many local variables, too many statements/branches).

3. UI Template

index.html

  • Added Book, Page Scope, and Page number controls in the filter panels.
  • Added Javascript logic to dynamically update options, keep state variables clean, and toggle scope visibility depending on URL parameters.

tablelisting.html

  • Added a direct "Terms" link to the book listing actions dropdown.

@marcomachado
marcomachado force-pushed the feature-588-new-terms-in-book branch from 2a90b30 to 839d014 Compare July 14, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create way to show listing of new terms added in Book

1 participant