def test_icon_property(question): action = Action( verb=Verbs.ADD.value, obj=question, ) assert action.icon == 'star' configure_type( 'thing', (question._meta.app_label, question._meta.model_name) ) assert action.icon == 'star' configure_icon('plus', verb=Verbs.ADD) assert action.icon == 'plus' other_action = Action( verb=Verbs.CREATE.value, obj=question ) assert other_action.icon == 'star' configure_icon('circle', type='thing') assert action.icon == 'plus' assert other_action.icon == 'circle'
def ready(self): from adhocracy4.actions.models import configure_icon, configure_type configure_type('project', ('a4projects', 'project')) configure_type('phase', ('a4phases', 'phase')) configure_type( 'comment', ('a4comments', 'comment'), ('civic_europe_ideas', 'idea'), ) configure_type('rating', ('a4ratings', 'rating')) configure_type( 'idea', ('civic_europe_ideas', 'idea'), ) configure_type('blog', ('cms_blog', 'blogpage')) configure_type('journey entry', ('civic_europe_journeys', 'journeyentry')) configure_type('follows', ('civic_europe_ideas', 'ideafollow')) configure_icon('comment', type='comment') configure_icon('lightbulb-o', type='item') configure_icon('plus', verb=Verbs.ADD) configure_icon('pencil', verb=Verbs.UPDATE) configure_icon('flag', verb=Verbs.START) configure_icon('clock-o', verb=Verbs.SCHEDULE)
def ready(self): from adhocracy4.actions.models import configure_icon from adhocracy4.actions.models import configure_type from adhocracy4.actions.verbs import Verbs configure_type( 'project', ('a4projects', 'project') ) configure_type( 'phase', ('a4phases', 'phase') ) configure_type( 'comment', ('a4comments', 'comment') ) configure_type( 'rating', ('a4ratings', 'rating') ) configure_type( 'item', ('a4_candy_budgeting', 'proposal'), ('a4_candy_ideas', 'idea'), ('a4_candy_mapideas', 'mapidea') ) configure_type( 'offlineevent', ('a4_candy_offlineevents', 'offlineevent') ) configure_icon('far fa-comment', type='comment') configure_icon('far fa-lightbulb', type='item') configure_icon('fas fa-plus', verb=Verbs.ADD) configure_icon('fas fa-pencil', verb=Verbs.UPDATE) configure_icon('fas fa-flag', verb=Verbs.START) configure_icon('fas fa-clock', verb=Verbs.SCHEDULE)
def ready(self): from adhocracy4.actions.models import configure_icon from adhocracy4.actions.models import configure_type from adhocracy4.actions.verbs import Verbs configure_type('project', ('a4projects', 'project'), ('meinberlin_bplan', 'bplan'), ('meinberlin_externalproject', 'externalproject')) configure_type('phase', ('a4phases', 'phase')) configure_type('comment', ('a4comments', 'comment')) configure_type('rating', ('a4ratings', 'rating')) configure_type('item', ('meinberlin_budgeting', 'proposal'), ('meinberlin_ideas', 'idea'), ('meinberlin_kiezkasse', 'proposal'), ('meinberlin_mapideas', 'mapidea')) configure_icon('far fa-comment', type='comment') configure_icon('far fa-lightbulb', type='item') configure_icon('fas fa-plus', verb=Verbs.ADD) configure_icon('fas fa-pencil-alt', verb=Verbs.UPDATE) configure_icon('fas fa-flag', verb=Verbs.START) configure_icon('far fa-clock', verb=Verbs.SCHEDULE)