<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * Subscription License ("License"). You may not use this file except in
 * compliance with the License. You can obtain a copy of the License by
 * contacting Liferay, Inc. See the License for the specific language governing
 * permissions and limitations under the License, including but not limited to
 * distribution rights of the Software.
 *
 *
 *
 */
--%>

<%
String thumbnailSrc = DLURLHelperUtil.getThumbnailSrc(fileEntry, themeDisplay);
%>

<c:choose>
	<c:when test='<%= displayStyle.equals("descriptive") %>'>
		<c:choose>
			<c:when test="<%= Validator.isNull(thumbnailSrc) %>">
				<liferay-ui:search-container-column-icon
					icon="documents-and-media"
				/>
			</c:when>
			<c:otherwise>
				<liferay-ui:search-container-column-image
					src="<%= thumbnailSrc %>"
				/>
			</c:otherwise>
		</c:choose>

		<liferay-ui:search-container-column-text
			colspan="<%= 2 %>"
		>

			<%
			Date createDate = fileEntry.getCreateDate();

			String createDateDescription = LanguageUtil.getTimeDescription(request, System.currentTimeMillis() - createDate.getTime(), true);
			%>

			<span class="text-default">
				<liferay-ui:message arguments="<%= new String[] {HtmlUtil.escape(fileEntry.getUserName()), createDateDescription} %>" key="x-created-x-ago" />
			</span>

			<h2 class="h5">
				<%= HtmlUtil.escape(fileEntry.getTitle()) %>
			</h2>
		</liferay-ui:search-container-column-text>

		<liferay-ui:search-container-column-text>

			<%
			BlogsEntryImageActionDropdownItemsProvider blogsEntryImageActionDropdownItemsProvider = new BlogsEntryImageActionDropdownItemsProvider(fileEntry, renderRequest, renderResponse);
			%>

			<clay:dropdown-actions
				dropdownItems="<%= blogsEntryImageActionDropdownItemsProvider.getActionDropdownItems() %>"
			/>
		</liferay-ui:search-container-column-text>
	</c:when>
	<c:when test='<%= displayStyle.equals("icon") %>'>

		<%
		row.setCssClass("entry-card lfr-asset-item");
		%>

		<liferay-ui:search-container-column-text>
			<clay:vertical-card
				verticalCard="<%= new BlogsEntryImageVerticalCard(fileEntry, renderRequest, renderResponse, searchContainer.getRowChecker()) %>"
			/>
		</liferay-ui:search-container-column-text>
	</c:when>
	<c:otherwise>
		<liferay-ui:search-container-column-text
			cssClass="table-cell-expand table-cell-minw-200 table-title"
			name="title"
		>
			<%= HtmlUtil.escape(fileEntry.getTitle()) %>
		</liferay-ui:search-container-column-text>

		<liferay-ui:search-container-column-text
			cssClass="table-cell-expand-smaller"
			name="size"
			value="<%= LanguageUtil.formatStorageSize(fileEntry.getSize(), locale) %>"
		/>

		<liferay-ui:search-container-column-text
			cssClass="table-cell-expand-smaller table-cell-minw-150"
			name="modified-date"
		>
			<liferay-ui:message arguments="<%= new String[] {LanguageUtil.getTimeDescription(locale, System.currentTimeMillis() - fileEntry.getModifiedDate().getTime(), true), HtmlUtil.escape(fileEntry.getUserName())} %>" key="x-ago-by-x" translateArguments="<%= false %>" />
		</liferay-ui:search-container-column-text>

		<liferay-ui:search-container-column-text>

			<%
			BlogsEntryImageActionDropdownItemsProvider blogsEntryImageActionDropdownItemsProvider = new BlogsEntryImageActionDropdownItemsProvider(fileEntry, renderRequest, renderResponse);
			%>

			<clay:dropdown-actions
				dropdownItems="<%= blogsEntryImageActionDropdownItemsProvider.getActionDropdownItems() %>"
			/>
		</liferay-ui:search-container-column-text>
	</c:otherwise>
</c:choose>