diff --git a/apps/cfp_review/base.py b/apps/cfp_review/base.py index 2e89d97ac..b699f7bb9 100644 --- a/apps/cfp_review/base.py +++ b/apps/cfp_review/base.py @@ -24,6 +24,7 @@ from models.permission import Permission from sqlalchemy import func, exists, select from sqlalchemy.orm import joinedload, undefer +from sqlalchemy_continuum.utils import version_class from main import db, external_url from .estimation import get_cfp_estimate @@ -668,6 +669,17 @@ def message_proposer(proposal_id): ) +@cfp_review.route("/proposals/versions") +@admin_required +def proposal_versions(): + size = int(request.args.get("size", "100")) + version_cls = version_class(Proposal) + versions = version_cls.query.order_by(version_cls.modified.desc()) + paged_versions = db.paginate(versions, per_page=size, error_out=False) + + return render_template("cfp_review/proposal_versions.html", versions=paged_versions) + + @cfp_review.route("/proposals//versions") @admin_required def proposal_latest_version(proposal_id): diff --git a/templates/cfp_review/_nav.html b/templates/cfp_review/_nav.html index 778e47055..814f21260 100644 --- a/templates/cfp_review/_nav.html +++ b/templates/cfp_review/_nav.html @@ -33,6 +33,7 @@ {{ menuitem('Manual Review', ".proposals", proposal_counts['manual-review'], state='manual-review')}} {{ menuitem('Summary', ".proposals_summary")}} + {{ menuitem('Changelog', ".proposal_versions" )}}