<%--
/**
 * 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.
 *
 *
 *
 */
--%>

<%@ include file="/init.jsp" %>

<%
SchedulerResponseDisplayContext schedulerResponseDisplayContext = (SchedulerResponseDisplayContext)request.getAttribute(WebKeys.PORTLET_DISPLAY_CONTEXT);

PortletURL portletURL = schedulerResponseDisplayContext.getPortletURL();

portletURL.setParameter("searchContainerId", "schedulerResponses");
portletURL.setParameter("tabs1", "scheduler-response");
%>

<clay:navigation-bar
	navigationItems="<%= schedulerResponseDisplayContext.getNavigationItems() %>"
/>

<div id="<portlet:namespace />scheduledTaskContainer">
	<div class="closed container" id="<portlet:namespace />infoPanelId">
		<liferay-ui:search-container
			id="schedulerResponses"
			searchContainer="<%= schedulerResponseDisplayContext.getSearchContainer() %>"
		>
			<liferay-ui:search-container-row
				className="com.liferay.portal.kernel.scheduler.messaging.SchedulerResponse"
				modelVar="schedulerResponse"
			>
				<liferay-ui:search-container-column-jsp
					cssClass="entry-action-column"
					path="/scheduler_response_action.jsp"
				/>

				<liferay-ui:search-container-column-text
					cssClass="important table-cell-expand"
					name="name"
				>
					<liferay-ui:message key="<%= schedulerResponseDisplayContext.getSimpleName(schedulerResponse.getJobName()) %>" />

					<liferay-ui:icon-help message="<%= schedulerResponse.getJobName() %>" />
				</liferay-ui:search-container-column-text>

				<liferay-ui:search-container-column-text
					name="system"
					value='<%= LanguageUtil.get(request, "yes") %>'
				/>

				<liferay-ui:search-container-column-text
					name="next-fire-date"
					value="<%= schedulerResponseDisplayContext.getNextFireDateString(schedulerResponse) %>"
				/>

				<liferay-ui:search-container-column-text
					cssClass="important table-cell-ws-nowrap"
					name="status"
				>

					<%
					TriggerState triggerState = schedulerResponseDisplayContext.getTriggerState(schedulerResponse);
					%>

					<h6 class="<%= (triggerState == TriggerState.NORMAL) ? "text-success" : "text-info" %>">
						<liferay-ui:message key="<%= triggerState.toString() %>" />
					</h6>
				</liferay-ui:search-container-column-text>

				<liferay-ui:search-container-column-jsp
					cssClass="table-cell-ws-nowrap"
					path="/scheduler_response_buttons.jsp"
				/>
			</liferay-ui:search-container-row>

			<liferay-ui:search-iterator
				displayStyle="list"
				markupView="lexicon"
			/>
		</liferay-ui:search-container>
	</div>
</div>