Add author detail, idea detail, and gap-draft reverse link pages
- Author detail page (/authors/<person_id>): shows author info, all drafts with ratings, and co-authors with shared draft counts. Public route. - Idea detail page (/ideas/<idea_id>): shows idea metadata, source draft, and top-5 most similar ideas via embedding cosine similarity. Admin route. - Gap detail page: added "Related Drafts" section that finds drafts by extracting draft names from evidence text and searching by topic keywords. - Updated author links across templates to use /authors/<person_id> URLs. - Added DB methods: get_author_by_id, get_author_drafts, get_coauthors. - Extended top_authors to include person_id (5th tuple element). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,7 @@ from webui.data import (
|
||||
get_ask_search,
|
||||
get_citation_influence,
|
||||
get_bcp_analysis,
|
||||
get_author_detail,
|
||||
)
|
||||
|
||||
pages_bp = Blueprint("pages", __name__)
|
||||
@@ -144,6 +145,14 @@ def architecture():
|
||||
return render_template("architecture.html", arch=data)
|
||||
|
||||
|
||||
@pages_bp.route("/authors/<int:person_id>")
|
||||
def author_detail(person_id: int):
|
||||
detail = get_author_detail(db(), person_id)
|
||||
if not detail:
|
||||
abort(404)
|
||||
return render_template("author_detail.html", author=detail)
|
||||
|
||||
|
||||
@pages_bp.route("/authors")
|
||||
def authors():
|
||||
top = get_top_authors(db(), limit=50)
|
||||
|
||||
Reference in New Issue
Block a user