<mvc:View height="100%"
	controllerName="sap.m.sample.UploadCollection.Page"
	xmlns:core="sap.ui.core"
	xmlns:mvc="sap.ui.core.mvc"
	xmlns="sap.m">
	<Page showHeader="false">
		<content>
			<OverflowToolbar>
				<core:Icon
					class="sapUiSmallMarginBegin"
					visible="{=!${device>/browser/mobile}}"
					src="sap-icon://message-information" />
				<Text
					wrapping="false"
					visible="{=!${device>/browser/mobile}}"
					text="To add files, you can also use drag &amp; drop on your desktop or tablet." />
				<ToolbarSpacer />
				<Button icon="sap-icon://action-settings" tooltip="More settings" press="onOpenAppSettings" />
			</OverflowToolbar>
			<UploadCollection
				id="UploadCollection"
				maximumFilenameLength="{settings>/maximumFilenameLength}"
				maximumFileSize="{settings>/maximumFileSize}"
				multiple="true"
				change="onChange"
				fileDeleted="onFileDeleted"
				filenameLengthExceed="onFilenameLengthExceed"
				fileRenamed="onFileRenamed"
				fileSizeExceed="onFileSizeExceed"
				fileType="{fileTypes>/selected}"
				selectionChange="onSelectionChange"
				typeMissmatch="onTypeMissmatch"
				uploadComplete="onUploadComplete"
				beforeUploadStarts="onBeforeUploadStarts"
				uploadTerminated="onUploadTerminated"
				items="{
					path: '/items',
					templateShareable: false
				}"
				numberOfAttachmentsText="Uploaded (8)"
				showSeparators="{settings>/showSeparators}"
				uploadEnabled="{settings>/uploadEnabled}"
				uploadButtonInvisible="{=!${settings>/uploadButtonVisible}}"
				mode="{settings>/mode}">
				<toolbar>
					<OverflowToolbar id="myId">
						<Title id="attachmentTitle" />
						<ToolbarSpacer />
						<SearchField width="10rem" search="onSearch" />
						<Button
							id="deleteSelectedButton"
							text="Delete"
							press="onDeleteSelectedItems"
							enabled="false"
							visible="false"
							type="Transparent" />
						<ToggleButton
							id="selectAllButton"
							text="Select all"
							press="onSelectAllPress"
							enabled="false"
							visible="false"
							type="Transparent" />
						<UploadCollectionToolbarPlaceholder />
					</OverflowToolbar>
				</toolbar>
				<items>
					<UploadCollectionItem
						documentId="{documentId}"
						fileName="{fileName}"
						mimeType="{mimeType}"
						thumbnailUrl="{thumbnailUrl}"
						url="{url}"
						enableEdit="{settings>/enableEdit}"
						enableDelete="{settings>/enableDelete}"
						visibleDelete="{settings>/visibleDelete}"
						visibleEdit="{settings>/visibleEdit}"
						attributes="{path : 'attributes', templateShareable : false}"
						statuses="{path : 'statuses', templateShareable : false}"
						markers="{path : 'markers', factory: '.createObjectMarker'}"
						selected="{selected}">
						<attributes>
							<ObjectAttribute title="{title}"
								text="{path : 'text', formatter : '.formatAttribute'}"
								active="{active}"
								press="onAttributePress" />
						</attributes>
						<statuses>
							<ObjectStatus title="{title}"
								text="{text}"
								state="{state}" />
						</statuses>
					</UploadCollectionItem>
				</items>
			</UploadCollection>
		</content>
	</Page>
</mvc:View>
