from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register
from .models import Survey
from surveys.admin import SurveyAdminLinkMixin


class SurveyAdmin(ModelAdmin, SurveyAdminLinkMixin):
    model = Survey
    menu_label = 'Surveys'
    list_display = ('title', 'module', 'link')
    search_fields = ('title', 'module__meta_title')
    menu_icon = 'help'


modeladmin_register(SurveyAdmin)

