<mvc:View
	controllerName="sap.m.sample.PlanningCalendarDnD.Page"
	xmlns:mvc="sap.ui.core.mvc"
	xmlns:core="sap.ui.core"
	xmlns:unified="sap.ui.unified"
	xmlns="sap.m">
	<VBox class="sapUiSmallMargin">
		<PlanningCalendar
				id="PC1"
				startDate="{path: '/startDate'}"
				rows="{path: '/people'}"
				appointmentsVisualization="Filled">
			<toolbarContent>
				<Title text="Title" titleStyle="H4"/>
				<Label text="Logged in as" />
				<Select
						id="userRole"
						change="handleRoleChange"
						selectedKey="admin"
						width="230px">
					<items>
						<core:Item key="admin" text="Admin" />
						<core:Item key="manager" text="Manager" />
						<core:Item key="donna" text="Donna Moore" />
					</items>
				</Select>
			</toolbarContent>
			<rows>
				<PlanningCalendarRow
						icon="{pic}"
						title="{name}"
						text="{role}"
						enableAppointmentsDragAndDrop="{path:'name', formatter:'.canModifyAppointments'}"
						enableAppointmentsResize="{path:'name', formatter:'.canModifyAppointments'}"
						enableAppointmentsCreate="{path:'name', formatter:'.canModifyAppointments'}"
						appointmentDrop="handleAppointmentDrop"
						appointmentDragEnter="handleAppointmentDragEnter"
						appointmentResize="handleAppointmentResize"
						appointmentCreate="handleAppointmentCreate"
						appointments="{path : 'appointments', templateShareable: false}">
					<appointments>
						<unified:CalendarAppointment
								startDate="{start}"
								endDate="{end}"
								icon="{pic}"
								title="{title}"
								text="{info}"
								type="{type}"
								tentative="{tentative}">
						</unified:CalendarAppointment>
					</appointments>
				</PlanningCalendarRow>
			</rows>
		</PlanningCalendar>
	</VBox>
</mvc:View>