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

<div class="task-activity">
	<table class="table table-responsive">
		<thead>
			<tr>
				<th>
					<liferay-ui:message key="activity-description" />
				</th>
				<th>
					<liferay-ui:message key="date" />
				</th>
			</tr>
		</thead>

		<tbody>

			<%
			for (WorkflowLog workflowLog : workflowInstanceEditDisplayContext.getWorkflowLogs()) {
			%>

				<tr>
					<td>
						<div>
							<c:choose>
								<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_COMPLETION %>">
									<liferay-ui:message arguments="<%= workflowInstanceEditDisplayContext.getTaskCompletionMessageArguments(workflowLog) %>" key="x-completed-the-task-x" translateArguments="<%= false %>" />
								</c:when>
								<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_UPDATE %>">
									<liferay-ui:message arguments="<%= workflowInstanceEditDisplayContext.getTaskUpdateMessageArguments(workflowLog) %>" key="x-updated-the-due-date" />
								</c:when>
								<c:when test="<%= workflowLog.getType() == WorkflowLog.TRANSITION %>">
									<liferay-ui:message arguments="<%= workflowInstanceEditDisplayContext.getTransitionMessageArguments(workflowLog) %>" key="x-changed-the-state-from-x-to-x" translateArguments="<%= false %>" />
								</c:when>
								<c:when test="<%= workflowInstanceEditDisplayContext.isAuditUser(workflowLog) %>">
									<liferay-ui:message arguments="<%= workflowInstanceEditDisplayContext.getUserFullName(workflowLog) %>" key="<%= workflowInstanceEditDisplayContext.getAssignedTheTaskMessageKey(workflowLog) %>" translateArguments="<%= false %>" />
								</c:when>
								<c:when test="<%= workflowLog.getRoleId() == 0 %>">
									<liferay-ui:message arguments="<%= workflowInstanceEditDisplayContext.getAssignedTheTaskToMessageArguments(workflowLog) %>" key="x-assigned-the-task-to-x" translateArguments="<%= false %>" />

									<c:if test="<%= workflowLog.getPreviousUserId() != 0 %>">
										<liferay-ui:message arguments="<%= workflowInstanceEditDisplayContext.getPreviousAssigneeMessageArguments(workflowLog) %>" key="previous-assignee-was-x" translateArguments="<%= false %>" />
									</c:if>
								</c:when>
								<c:otherwise>
									<liferay-ui:message arguments="<%= workflowInstanceEditDisplayContext.getTaskInitiallyAssignedMessageArguments(workflowLog) %>" key="task-initially-assigned-to-the-x-role" translateArguments="<%= false %>" />
								</c:otherwise>
							</c:choose>

							<%= workflowInstanceEditDisplayContext.getWorkflowLogComment(workflowLog) %>
						</div>
					</td>
					<td>
						<div>
							<%= workflowInstanceEditDisplayContext.getWorkflowLogCreateDate(workflowLog) %>
						</div>
					</td>
				</tr>

			<%
			}
			%>

		</tbody>
	</table>
</div>