diff --git a/src/adhocracy_mercator/adhocracy_mercator/evolution/__init__.py b/src/adhocracy_mercator/adhocracy_mercator/evolution/__init__.py index eda039ab4..b200ef8f1 100644 --- a/src/adhocracy_mercator/adhocracy_mercator/evolution/__init__.py +++ b/src/adhocracy_mercator/adhocracy_mercator/evolution/__init__.py @@ -179,6 +179,13 @@ def reindex_requested_funding(root, registry): catalogs.reindex_index(proposal, 'mercator_requested_funding') +@log_migration +def add_haslogbookpool_sheet_to_mecator2(root, registry): + """Add badgeable sheet to proposals versions.""" + from adhocracy_mercator.resources.mercator2 import IMercatorProposal + migrate_new_sheet(root, IMercatorProposal, IHasLogbookPool) + + def includeme(config): """Register evolution utilities and add evolution steps.""" config.add_evolution_step(evolve1_add_ititle_sheet_to_proposals) @@ -194,3 +201,4 @@ def includeme(config): config.add_evolution_step(remove_mercator_workflow_assignment_sheet) config.add_evolution_step(make_mercator_proposals_badgeable) config.add_evolution_step(reindex_requested_funding) + config.add_evolution_step(add_haslogbookpool_sheet_to_mecator2) diff --git a/src/adhocracy_mercator/adhocracy_mercator/resources/mercator2.py b/src/adhocracy_mercator/adhocracy_mercator/resources/mercator2.py index 3eb5179e3..764c52397 100644 --- a/src/adhocracy_mercator/adhocracy_mercator/resources/mercator2.py +++ b/src/adhocracy_mercator/adhocracy_mercator/resources/mercator2.py @@ -15,6 +15,7 @@ from adhocracy_core.sheets.rate import ILikeable from adhocracy_core.sheets.title import ITitle from adhocracy_core.sheets.image import IImageReference +from adhocracy_core.sheets.logbook import IHasLogbookPool from adhocracy_core.resources.comment import add_commentsservice from adhocracy_core.resources.rate import add_ratesservice from adhocracy_core.resources.badge import add_badge_assignments_service @@ -236,6 +237,7 @@ class IMercatorProposal(IProposal): ICommentable, ILikeable, IImageReference, + IHasLogbookPool, adhocracy_mercator.sheets.mercator2.IMercatorSubResources, adhocracy_mercator.sheets.mercator2.IUserInfo, adhocracy_mercator.sheets.mercator2.IOrganizationInfo, diff --git a/src/adhocracy_mercator/adhocracy_mercator/resources/test_mercator2.py b/src/adhocracy_mercator/adhocracy_mercator/resources/test_mercator2.py index 8042c7067..31b74fee4 100644 --- a/src/adhocracy_mercator/adhocracy_mercator/resources/test_mercator2.py +++ b/src/adhocracy_mercator/adhocracy_mercator/resources/test_mercator2.py @@ -351,6 +351,7 @@ def test_meta(self, meta): adhocracy_core.sheets.comment.ICommentable, adhocracy_core.sheets.rate.ILikeable, adhocracy_core.sheets.image.IImageReference, + adhocracy_core.sheets.logbook.IHasLogbookPool, adhocracy_mercator.sheets.mercator2.IMercatorSubResources, adhocracy_mercator.sheets.mercator2.IUserInfo, adhocracy_mercator.sheets.mercator2.IOrganizationInfo, diff --git a/src/mercator/mercator/static/js/Packages/Mercator/2016/Proposal/Detail.html b/src/mercator/mercator/static/js/Packages/Mercator/2016/Proposal/Detail.html index f9877cbbb..94e3499ed 100644 --- a/src/mercator/mercator/static/js/Packages/Mercator/2016/Proposal/Detail.html +++ b/src/mercator/mercator/static/js/Packages/Mercator/2016/Proposal/Detail.html @@ -47,7 +47,22 @@