Skip to content

Commit

Permalink
Adds ‘Create new segment’ option to dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jberghoef committed May 31, 2017
1 parent 2651eb0 commit c273580
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/wagtail_personalisation/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ def page_listing_more_buttons(page, page_perms, is_parent=False):
for segment in page.get_unused_segments():
yield Button(segment.name,
reverse('segment:copy_page', args=[page.pk, segment.pk]),
attrs={"title": _('Create this variant')})
attrs={"title": _('Create this variant')},
priority=100)

yield Button(_('Create a new segment'),
reverse('wagtail_personalisation_segment_modeladmin_create'),
attrs={"title": _('Create a new segment')},
priority=200)


class SegmentSummaryPanel(SummaryItem):
Expand Down

0 comments on commit c273580

Please sign in to comment.