<div class="file attachment" data-bind="draggable: $parent.__name !== 'CComposeViewModel',
		event: ($parent.__name === 'CComposeViewModel') ? null : { 'dragstart': eventDragStart },
		css: {'fail': uploadError(), 'success': !uploadError()}">
	<span class="attachment_content">
		<span class="cancel" data-bind="click: function () { $parent.onFileRemove( uploadUid() ); }, i18n: 'text'" data-i18n="COMMON/UPLOAD_CANCEL"></span> 

		<span class="image">
		<!-- ko if: thumb() -->
			<img class="thumb download" data-bind="attr: {'title': downloadTitle(), 'src': viewThumbnailLink()}, click: function () {downloadFile(App);}" />
		<!-- /ko -->
		<!-- ko if: !thumb() -->
			<span class="icon download" data-bind="attr: {'title': downloadTitle()}, click: function () {downloadFile(App);}, css: extension().toLowerCase()"></span>
		<!-- /ko -->
		</span>
		<span class="progress" data-bind="visible: visibleProgress()">
			<span data-bind="style: {'width': progressPercent() + '%'}"></span>
		</span>
		<span class="status_text" data-bind="text: statusText(), css: {'hide': !(statusText().length > 0), 'error': uploadError()}"></span>
		<span class="buttons" data-bind="css: {'hide': statusText().length > 0 || !uploaded()}">
			<a class="button download" href="javascript: void(0)"
			   data-bind="attr: {'title': downloadTitle()}, click: function () {downloadFile(App);}, i18n: 'text'"
			   data-i18n="MESSAGE/ATTACHMENT_DOWNLOAD"></a>
			<a class="button view" href="javascript: void(0)" 
			   data-bind="visible: visibleViewLink(), i18n: 'text', click: viewFile" 
			   data-i18n="MESSAGE/ATTACHMENT_VIEW"></a>
			<!--<a class="button view" href="javascript: void(0)" 
			   data-bind="visible: visibleExpandLink(), i18n: 'text', click: expandFile" 
			   data-i18n="MESSAGE/ATTACHMENT_EXPAND"></a>-->
		</span>
		
	</span>
	
	<span class="size" data-bind="text: friendlySize()"></span>
	
	<span class="title">
		<span class="name" data-bind="text: displayName()"></span><span class="ext" data-bind="text: '.' + extension()"></span>
	</span>
</div>
<!-- ko if: isMessageType() && messagePart() -->
	<!-- ko template: {name: 'Mail_PrintMessageViewModel', data: messagePart} --><!-- /ko -->
<!-- /ko -->
