<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    i18n_domain="plone.app.event">

    <browser:resourceDirectory
        name="plone.app.event"
        directory="resources"
        permission="zope.Public"
        layer="..interfaces.IBrowserLayer"
        />

    <!-- Control panel -->
    <browser:page
        name="event-settings"
        for="Products.CMFPlone.interfaces.IPloneSiteRoot"
        class=".controlpanel.EventControlPanel"
        template="controlpanel.pt"
        permission="cmf.ManagePortal"
        layer="..interfaces.IBrowserLayer"
        />


    <!-- Event listing -->
    <browser:page
        for="*"
        name="event_listing"
        class=".event_listing.EventListing"
        template="event_listing.pt"
        permission="zope2.View"
        layer="..interfaces.IBrowserLayer"
        />
    <browser:page
        for="*"
        name="event_listing_ical"
        class=".event_listing.EventListingIcal"
        permission="zope2.View"
        layer="..interfaces.IBrowserLayer"
        />
    <adapter factory=".event_listing.EventListingSettings"/>
    <browser:page
        name="event_listing_settings"
        for="*"
        permission="zope2.View"
        class=".event_listing.EventListingSettingsFormView"
        layer="..interfaces.IBrowserLayer"
        />


    <!-- Event view -->
    <browser:page
        for="plone.event.interfaces.IEvent"
        name="event_view"
        class=".event_view.EventView"
        template="event_view.pt"
        permission="zope2.View"
        layer="..interfaces.IBrowserLayer"
        />

    <browser:page
        for="plone.event.interfaces.IOccurrence"
        name="index_html"
        class=".event_view.EventView"
        template="event_view.pt"
        permission="zope2.View"
        layer="..interfaces.IBrowserLayer"
        />
    <browser:defaultView
        for="plone.event.interfaces.IOccurrence"
        name="index_html"
        layer="..interfaces.IBrowserLayer"
        />

    <adapter
        name="formatted_date"
        provides="zope.contentprovider.interfaces.IContentProvider"
        for="zope.interface.Interface
             zope.publisher.interfaces.browser.IBrowserRequest
             zope.publisher.interfaces.browser.IBrowserView"
        factory=".formatted_date.FormattedDateProvider"
        />

    <adapter
        name="formatted_date"
        provides="zope.contentprovider.interfaces.IContentProvider"
        for="zope.interface.Interface
             zope.publisher.interfaces.browser.IBrowserRequest
             plone.portlets.interfaces.IPortletRenderer"
        factory=".formatted_date.FormattedStartDateProvider"
        />

</configure>
