Salvatore La Manna
4 anni fa
20 ha cambiato i file con 1618 aggiunte e 1620 eliminazioni
@ -1,38 +1,37 @@ |
|||||||
|
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> |
||||||
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> |
<%@page import="java.io.Serializable"%> |
||||||
<%@page import="java.io.Serializable"%> |
<%@page import="java.util.Map.Entry"%> |
||||||
<%@page import="java.util.Map.Entry"%> |
<%@page import="java.util.ArrayList"%> |
||||||
<%@page import="java.util.ArrayList"%> |
|
||||||
|
<%@ include file="/html/portlet/workflow_instances/init.jsp" %> |
||||||
<%@ include file="/html/portlet/workflow_instances/init.jsp" %> |
|
||||||
|
<% |
||||||
<% |
|
||||||
|
Map<String, Serializable> parameters = (Map<String, Serializable>) renderRequest.getAttribute("parameters"); |
||||||
Map<String, Serializable> parameters = (Map<String, Serializable>) renderRequest.getAttribute("parameters"); |
|
||||||
|
%> |
||||||
%> |
|
||||||
|
<liferay-ui:search-container |
||||||
<liferay-ui:search-container |
emptyResultsMessage="label-portos-kaleo-there-are-no-results" > |
||||||
emptyResultsMessage="label-portos-kaleo-there-are-no-results" > |
|
||||||
|
<liferay-ui:search-container-results |
||||||
<liferay-ui:search-container-results |
results="<%= new ArrayList<Entry<String, Serializable>>(parameters.entrySet()) %>" |
||||||
results="<%= new ArrayList<Entry<String, Serializable>>(parameters.entrySet()) %>" |
total="<%= parameters.size() %>" /> |
||||||
total="<%= parameters.size() %>" /> |
|
||||||
|
<liferay-ui:search-container-row |
||||||
<liferay-ui:search-container-row |
className="java.util.Map.Entry" |
||||||
className="java.util.Map.Entry" |
modelVar="entry"> |
||||||
modelVar="entry"> |
|
||||||
|
<liferay-ui:search-container-column-text name="label-portos-kaleo-key"> |
||||||
<liferay-ui:search-container-column-text name="label-portos-kaleo-key"> |
<%=LanguageUtil.get(pageContext, (String)entry.getKey()) %> |
||||||
<%=LanguageUtil.get(pageContext, (String)entry.getKey()) %> |
</liferay-ui:search-container-column-text> |
||||||
</liferay-ui:search-container-column-text> |
|
||||||
|
<liferay-ui:search-container-column-text name="label-portos-kaleo-value"> |
||||||
<liferay-ui:search-container-column-text name="label-portos-kaleo-value"> |
<%= entry.getValue() %> |
||||||
<%= entry.getValue() %> |
</liferay-ui:search-container-column-text> |
||||||
</liferay-ui:search-container-column-text> |
|
||||||
|
</liferay-ui:search-container-row> |
||||||
</liferay-ui:search-container-row> |
|
||||||
|
<liferay-ui:search-iterator paginate="<%= false %>" /> |
||||||
<liferay-ui:search-iterator paginate="<%= false %>" /> |
|
||||||
|
|
||||||
</liferay-ui:search-container> |
</liferay-ui:search-container> |
@ -1,316 +1,316 @@ |
|||||||
<%-- |
<%-- |
||||||
/** |
/** |
||||||
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. |
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. |
||||||
* |
* |
||||||
* This library is free software; you can redistribute it and/or modify it under |
* This library is free software; you can redistribute it and/or modify it under |
||||||
* the terms of the GNU Lesser General Public License as published by the Free |
* the terms of the GNU Lesser General Public License as published by the Free |
||||||
* Software Foundation; either version 2.1 of the License, or (at your option) |
* Software Foundation; either version 2.1 of the License, or (at your option) |
||||||
* any later version. |
* any later version. |
||||||
* |
* |
||||||
* This library is distributed in the hope that it will be useful, but WITHOUT |
* This library is distributed in the hope that it will be useful, but WITHOUT |
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
||||||
* details. |
* details. |
||||||
*/ |
*/ |
||||||
--%> |
--%> |
||||||
|
|
||||||
|
|
||||||
<%@page import="com.liferay.portal.kernel.json.JSONException"%> |
<%@page import="com.liferay.portal.kernel.json.JSONException"%> |
||||||
<%@page import="com.liferay.portal.kernel.util.Validator"%> |
<%@page import="com.liferay.portal.kernel.util.Validator"%> |
||||||
<%@page import="com.liferay.portal.kernel.json.JSONFactoryUtil"%> |
<%@page import="com.liferay.portal.kernel.json.JSONFactoryUtil"%> |
||||||
<%@page import="com.liferay.portal.kernel.json.JSONObject"%> |
<%@page import="com.liferay.portal.kernel.json.JSONObject"%> |
||||||
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> |
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="table table-striped attivita-table" <%-- id="<portlet:namespace/>_<%= workflowLog.getType() %>" --%>> |
<table class="table table-striped attivita-table" <%-- id="<portlet:namespace/>_<%= workflowLog.getType() %>" --%>> |
||||||
<thead class="table-columns attivita-group__head"> |
<thead class="table-columns attivita-group__head"> |
||||||
<tr> |
<tr> |
||||||
<th class="head-date text-center">Data</th> |
<th class="head-date text-center">Data</th> |
||||||
<th class="head-description">Descrizione</th> |
<th class="head-description">Descrizione</th> |
||||||
<th class="head-activity text-center">Attività</th> |
<th class="head-activity text-center">Attività</th> |
||||||
<th class="head-comment text-center">Commento</th> |
<th class="head-comment text-center">Commento</th> |
||||||
</tr> |
</tr> |
||||||
</thead> |
</thead> |
||||||
<tbody class="attivita-group__body"> |
<tbody class="attivita-group__body"> |
||||||
<% |
<% |
||||||
|
|
||||||
//ADT: bug bo id=33 |
//ADT: bug bo id=33 |
||||||
Map<Long,String> historyWorkflowEsitiLogs = (Map<Long,String>)request.getAttribute("historyWorkflowEsitiLogs"); |
Map<Long,String> historyWorkflowEsitiLogs = (Map<Long,String>)request.getAttribute("historyWorkflowEsitiLogs"); |
||||||
|
|
||||||
for (WorkflowLog workflowLog : workflowLogs) { |
for (WorkflowLog workflowLog : workflowLogs) { |
||||||
Role curRole = null; |
Role curRole = null; |
||||||
User curUser = null; |
User curUser = null; |
||||||
String actorName = null; |
String actorName = null; |
||||||
|
|
||||||
if (workflowLog.getRoleId() != 0) { |
if (workflowLog.getRoleId() != 0) { |
||||||
curRole = RoleLocalServiceUtil.getRole(workflowLog.getRoleId()); |
curRole = RoleLocalServiceUtil.getRole(workflowLog.getRoleId()); |
||||||
actorName = curRole.getDescriptiveName(); |
actorName = curRole.getDescriptiveName(); |
||||||
} |
} |
||||||
else if (workflowLog.getUserId() != 0) { |
else if (workflowLog.getUserId() != 0) { |
||||||
curUser = UserLocalServiceUtil.getUser(workflowLog.getUserId()); |
curUser = UserLocalServiceUtil.getUser(workflowLog.getUserId()); |
||||||
actorName = curUser.getFullName(); |
actorName = curUser.getFullName(); |
||||||
} |
} |
||||||
String kaleoNodeName = null; |
String kaleoNodeName = null; |
||||||
String transitionName = null; |
String transitionName = null; |
||||||
|
|
||||||
try { |
try { |
||||||
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(workflowLog.getState()); |
JSONObject jsonObject = JSONFactoryUtil.createJSONObject(workflowLog.getState()); |
||||||
kaleoNodeName = jsonObject.getString("kaleoNodeName"); |
kaleoNodeName = jsonObject.getString("kaleoNodeName"); |
||||||
transitionName = jsonObject.getString("transitionName"); |
transitionName = jsonObject.getString("transitionName"); |
||||||
} catch (JSONException e) { |
} catch (JSONException e) { |
||||||
kaleoNodeName = workflowLog.getState(); |
kaleoNodeName = workflowLog.getState(); |
||||||
} |
} |
||||||
|
|
||||||
%> |
%> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr> |
<tr> |
||||||
<td class="text-center date-col"> |
<td class="text-center date-col"> |
||||||
<%= dateFormatDateTime.format(workflowLog.getCreateDate()) %> |
<%= dateFormatDateTime.format(workflowLog.getCreateDate()) %> |
||||||
</td> |
</td> |
||||||
<td class="description-col"> |
<td class="description-col"> |
||||||
<c:choose> |
<c:choose> |
||||||
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_COMPLETION %>"> |
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_COMPLETION %>"> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<c:choose> |
<c:choose> |
||||||
<c:when test="<%= Validator.isNull(transitionName) %>"> |
<c:when test="<%= Validator.isNull(transitionName) %>"> |
||||||
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" /> |
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" /> |
||||||
</c:when> |
</c:when> |
||||||
<c:otherwise> |
<c:otherwise> |
||||||
<c:if test='<%= "registra-esito".equalsIgnoreCase(transitionName) %>'> |
<c:if test='<%= "registra-esito".equalsIgnoreCase(transitionName) %>'> |
||||||
<% |
<% |
||||||
//ADT: bug bo id=33 |
//ADT: bug bo id=33 |
||||||
String esito = (String)request.getAttribute("registra-esito-value"); |
String esito = (String)request.getAttribute("registra-esito-value"); |
||||||
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){ |
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){ |
||||||
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId()); |
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId()); |
||||||
} |
} |
||||||
%> |
%> |
||||||
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, esito} %>" key="x-completed-the-task-y-z" /> |
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, esito} %>" key="x-completed-the-task-y-z" /> |
||||||
</c:if> |
</c:if> |
||||||
<c:if test='<%= "assegna".equalsIgnoreCase(transitionName) %>'> |
<c:if test='<%= "assegna".equalsIgnoreCase(transitionName) %>'> |
||||||
<% |
<% |
||||||
String assegna = (String)request.getAttribute("assegna-value"); |
String assegna = (String)request.getAttribute("assegna-value"); |
||||||
%> |
%> |
||||||
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, assegna} %>" key="x-completed-the-task-y-z" /> |
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName, assegna} %>" key="x-completed-the-task-y-z" /> |
||||||
</c:if> |
</c:if> |
||||||
<c:if test='<%= !"assegna".equalsIgnoreCase(transitionName) && !"registra-esito".equalsIgnoreCase(transitionName) %>'> |
<c:if test='<%= !"assegna".equalsIgnoreCase(transitionName) && !"registra-esito".equalsIgnoreCase(transitionName) %>'> |
||||||
|
|
||||||
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" /> |
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), kaleoNodeName} %>" key="x-completed-the-task-x" /> |
||||||
</c:if> |
</c:if> |
||||||
</c:otherwise> |
</c:otherwise> |
||||||
</c:choose> |
</c:choose> |
||||||
|
|
||||||
<portlet:renderURL var="historyFormTaskURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> |
<portlet:renderURL var="historyFormTaskURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/render_history_form_task" /> |
<portlet:param name="struts_action" value="/workflow_tasks/render_history_form_task" /> |
||||||
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowLog.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowLog.getWorkflowTaskId()) %>" /> |
||||||
</portlet:renderURL> |
</portlet:renderURL> |
||||||
|
|
||||||
<span> </span> |
<span> </span> |
||||||
|
|
||||||
<liferay-ui:icon |
<liferay-ui:icon |
||||||
image="history" |
image="history" |
||||||
url='<%=historyFormTaskURL %>' |
url='<%=historyFormTaskURL %>' |
||||||
useDialog='<%=true %>' |
useDialog='<%=true %>' |
||||||
/> |
/> |
||||||
|
|
||||||
</div> |
</div> |
||||||
</c:when> |
</c:when> |
||||||
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_UPDATE %>"> |
<c:when test="<%= workflowLog.getType() == WorkflowLog.TASK_UPDATE %>"> |
||||||
<div> |
<div> |
||||||
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="x-updated-the-due-date" /> |
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="x-updated-the-due-date" /> |
||||||
</div> |
</div> |
||||||
</c:when> |
</c:when> |
||||||
<c:when test="<%= workflowLog.getType() == WorkflowLog.TRANSITION %>"> |
<c:when test="<%= workflowLog.getType() == WorkflowLog.TRANSITION %>"> |
||||||
<div> |
<div> |
||||||
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), workflowLog.getState()} %>" key="x-sent-signal-x" /> |
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(actorName), workflowLog.getState()} %>" key="x-sent-signal-x" /> |
||||||
</div> |
</div> |
||||||
</c:when> |
</c:when> |
||||||
<c:otherwise> |
<c:otherwise> |
||||||
<c:choose> |
<c:choose> |
||||||
<c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser.getUserId()) %>"> |
<c:when test="<%= (curUser != null) && (workflowLog.getAuditUserId() == curUser.getUserId()) %>"> |
||||||
<div> |
<div> |
||||||
<liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>" key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself" : "x-assigned-the-task-to-herself" %>' /> |
<liferay-ui:message arguments="<%= HtmlUtil.escape(curUser.getFullName()) %>" key='<%= curUser.isMale() ? "x-assigned-the-task-to-himself" : "x-assigned-the-task-to-herself" %>' /> |
||||||
</div> |
</div> |
||||||
</c:when> |
</c:when> |
||||||
<c:otherwise> |
<c:otherwise> |
||||||
|
|
||||||
<% |
<% |
||||||
if (curRole == null) { |
if (curRole == null) { |
||||||
String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK); |
String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK); |
||||||
%> |
%> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName), HtmlUtil.escape(actorName)} %>" key="x-assigned-the-task-to-x" /> |
<liferay-ui:message arguments="<%= new Object[] {HtmlUtil.escape(assignerName), HtmlUtil.escape(actorName)} %>" key="x-assigned-the-task-to-x" /> |
||||||
|
|
||||||
<c:if test="<%= workflowLog.getPreviousUserId() != 0 %>"> |
<c:if test="<%= workflowLog.getPreviousUserId() != 0 %>"> |
||||||
<liferay-ui:message arguments="<%= PortalUtil.getUserName(workflowLog.getPreviousUserId(), StringPool.BLANK) %>" key="previous-assignee-was-x" /> |
<liferay-ui:message arguments="<%= PortalUtil.getUserName(workflowLog.getPreviousUserId(), StringPool.BLANK) %>" key="previous-assignee-was-x" /> |
||||||
</c:if> |
</c:if> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<% |
<% |
||||||
} |
} |
||||||
else { |
else { |
||||||
%> |
%> |
||||||
|
|
||||||
<div> |
<div> |
||||||
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="task-initially-assigned-to-the-x-role" /> |
<liferay-ui:message arguments="<%= HtmlUtil.escape(actorName) %>" key="task-initially-assigned-to-the-x-role" /> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<% |
<% |
||||||
} |
} |
||||||
%> |
%> |
||||||
|
|
||||||
</c:otherwise> |
</c:otherwise> |
||||||
</c:choose> |
</c:choose> |
||||||
</c:otherwise> |
</c:otherwise> |
||||||
</c:choose> |
</c:choose> |
||||||
</td> |
</td> |
||||||
<td class="text-center activity-col"> |
<td class="text-center activity-col"> |
||||||
<% |
<% |
||||||
if(Validator.isNotNull(kaleoNodeName)){ |
if(Validator.isNotNull(kaleoNodeName)){ |
||||||
out.print(kaleoNodeName); |
out.print(kaleoNodeName); |
||||||
if(Validator.isNotNull(transitionName)){ |
if(Validator.isNotNull(transitionName)){ |
||||||
if("registra-esito".equalsIgnoreCase(transitionName)){ |
if("registra-esito".equalsIgnoreCase(transitionName)){ |
||||||
//out.print(" ( " + (String)request.getAttribute("registra-esito-value") + " ) "); |
//out.print(" ( " + (String)request.getAttribute("registra-esito-value") + " ) "); |
||||||
//ADT BUG BO ID=33 |
//ADT BUG BO ID=33 |
||||||
String esito = (String)request.getAttribute("registra-esito-value"); |
String esito = (String)request.getAttribute("registra-esito-value"); |
||||||
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){ |
if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){ |
||||||
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId()); |
esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId()); |
||||||
} |
} |
||||||
out.print(" ( " + esito + " ) "); |
out.print(" ( " + esito + " ) "); |
||||||
|
|
||||||
|
|
||||||
} else if("assegna".equalsIgnoreCase(transitionName)){ |
} else if("assegna".equalsIgnoreCase(transitionName)){ |
||||||
out.print(" ( " + (String)request.getAttribute("assegna-value") + " ) "); |
out.print(" ( " + (String)request.getAttribute("assegna-value") + " ) "); |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
} |
} |
||||||
%> |
%> |
||||||
</td> |
</td> |
||||||
<td class="activity-note"> |
<td class="activity-note"> |
||||||
|
|
||||||
<c:if test='<%=Validator.isNotNull(workflowLog.getComment()) && !"Assigned initial task.".equals(workflowLog.getComment()) %>'> |
<c:if test='<%=Validator.isNotNull(workflowLog.getComment()) && !"Assigned initial task.".equals(workflowLog.getComment()) %>'> |
||||||
<div class="post-it-note"> |
<div class="post-it-note"> |
||||||
<div class="header-post-it"> |
<div class="header-post-it"> |
||||||
<p class="header-post-it_date"><%= dateFormatDateTime.format(workflowLog.getCreateDate()) %></p> |
<p class="header-post-it_date"><%= dateFormatDateTime.format(workflowLog.getCreateDate()) %></p> |
||||||
<p class="header-post-it_name"> |
<p class="header-post-it_name"> |
||||||
<c:if test="<%=Validator.isNotNull(curUser) %>"> |
<c:if test="<%=Validator.isNotNull(curUser) %>"> |
||||||
<%= curUser.getFullName() %> |
<%= curUser.getFullName() %> |
||||||
</c:if> |
</c:if> |
||||||
</p> |
</p> |
||||||
</div> |
</div> |
||||||
<div class="body-post-it"> |
<div class="body-post-it"> |
||||||
<%= HtmlUtil.escape(workflowLog.getComment()) %> |
<%= HtmlUtil.escape(workflowLog.getComment()) %> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</c:if> |
</c:if> |
||||||
|
|
||||||
</td> |
</td> |
||||||
|
|
||||||
</tr> |
</tr> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%-- <div class="task-activity task-type-<%= workflowLog.getType() %>"> |
<%-- <div class="task-activity task-type-<%= workflowLog.getType() %>"> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div> |
<div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
</div> --%> |
</div> --%> |
||||||
|
|
||||||
<% |
<% |
||||||
} |
} |
||||||
%> |
%> |
||||||
</tbody> |
</tbody> |
||||||
</table> |
</table> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style> |
<style> |
||||||
.head-date { |
.head-date { |
||||||
width: 120px; |
width: 120px; |
||||||
} |
} |
||||||
.head-description { |
.head-description { |
||||||
width: 60%; |
width: 60%; |
||||||
} |
} |
||||||
.head-activity { |
.head-activity { |
||||||
width: 150px; |
width: 150px; |
||||||
} |
} |
||||||
.head-comment { |
.head-comment { |
||||||
width: 40%; |
width: 40%; |
||||||
} |
} |
||||||
.attivita-table { |
.attivita-table { |
||||||
overflow: auto!important; |
overflow: auto!important; |
||||||
table-layout: fixed; |
table-layout: fixed; |
||||||
} |
} |
||||||
.attivita-table thead th { |
.attivita-table thead th { |
||||||
background-color: #812121!important; |
background-color: #812121!important; |
||||||
color: white; |
color: white; |
||||||
} |
} |
||||||
|
|
||||||
.attivita-table td { |
.attivita-table td { |
||||||
border: 1px solid #dddddd; |
border: 1px solid #dddddd; |
||||||
} |
} |
||||||
.activity-note { |
.activity-note { |
||||||
padding-bottom: 40px!important; |
padding-bottom: 40px!important; |
||||||
} |
} |
||||||
.post-it-note { |
.post-it-note { |
||||||
min-width: 13em; |
min-width: 13em; |
||||||
background: rgb(255,215,7); |
background: rgb(255,215,7); |
||||||
position: relative; |
position: relative; |
||||||
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */ |
/* box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); */ |
||||||
} |
} |
||||||
.post-it-note:after { |
.post-it-note:after { |
||||||
content: ""; |
content: ""; |
||||||
position: absolute; |
position: absolute; |
||||||
bottom: -2em; |
bottom: -2em; |
||||||
left: 0; |
left: 0; |
||||||
right: 2em; |
right: 2em; |
||||||
border-width: 1em; |
border-width: 1em; |
||||||
border-style: solid; |
border-style: solid; |
||||||
border-color: rgb(255,215,7); |
border-color: rgb(255,215,7); |
||||||
} |
} |
||||||
.post-it-note:before { |
.post-it-note:before { |
||||||
content: ""; |
content: ""; |
||||||
position: absolute; |
position: absolute; |
||||||
bottom: -2em; |
bottom: -2em; |
||||||
right: 0; |
right: 0; |
||||||
border-width: 2em 2em 0 0; |
border-width: 2em 2em 0 0; |
||||||
border-style: solid; |
border-style: solid; |
||||||
border-color: #d3b100 transparent; |
border-color: #d3b100 transparent; |
||||||
} |
} |
||||||
|
|
||||||
.header-post-it { |
.header-post-it { |
||||||
background-color: rgba(211, 177, 0, 0.30); |
background-color: rgba(211, 177, 0, 0.30); |
||||||
display: -webkit-box; |
display: -webkit-box; |
||||||
display: -ms-flexbox; |
display: -ms-flexbox; |
||||||
display: flex; |
display: flex; |
||||||
-webkit-box-align: center; |
-webkit-box-align: center; |
||||||
-ms-flex-align: center; |
-ms-flex-align: center; |
||||||
align-items: center; |
align-items: center; |
||||||
-webkit-box-pack: justify; |
-webkit-box-pack: justify; |
||||||
-ms-flex-pack: justify; |
-ms-flex-pack: justify; |
||||||
justify-content: space-between; |
justify-content: space-between; |
||||||
padding: 5px; |
padding: 5px; |
||||||
|
|
||||||
} |
} |
||||||
.header-post-it p { |
.header-post-it p { |
||||||
margin: 0; |
margin: 0; |
||||||
padding: 0; |
padding: 0; |
||||||
font-weight: bold; |
font-weight: bold; |
||||||
font-size: 12px; |
font-size: 12px; |
||||||
} |
} |
||||||
.body-post-it { |
.body-post-it { |
||||||
padding: 5px 10px 0px 10px; |
padding: 5px 10px 0px 10px; |
||||||
} |
} |
||||||
</style> |
</style> |
@ -1,259 +1,259 @@ |
|||||||
<%-- |
<%-- |
||||||
/** |
/** |
||||||
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. |
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. |
||||||
* |
* |
||||||
* This library is free software; you can redistribute it and/or modify it under |
* This library is free software; you can redistribute it and/or modify it under |
||||||
* the terms of the GNU Lesser General Public License as published by the Free |
* the terms of the GNU Lesser General Public License as published by the Free |
||||||
* Software Foundation; either version 2.1 of the License, or (at your option) |
* Software Foundation; either version 2.1 of the License, or (at your option) |
||||||
* any later version. |
* any later version. |
||||||
* |
* |
||||||
* This library is distributed in the hope that it will be useful, but WITHOUT |
* This library is distributed in the hope that it will be useful, but WITHOUT |
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
||||||
* details. |
* details. |
||||||
*/ |
*/ |
||||||
--%> |
--%> |
||||||
|
|
||||||
<%@ include file="/html/portlet/workflow_instances/init.jsp" %> |
<%@ include file="/html/portlet/workflow_instances/init.jsp" %> |
||||||
|
|
||||||
<% |
<% |
||||||
String randomId = StringUtil.randomId(); |
String randomId = StringUtil.randomId(); |
||||||
|
|
||||||
ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
||||||
|
|
||||||
WorkflowTask workflowTask = (WorkflowTask)row.getObject(); |
WorkflowTask workflowTask = (WorkflowTask)row.getObject(); |
||||||
%> |
%> |
||||||
|
|
||||||
<liferay-ui:icon-menu> |
<liferay-ui:icon-menu> |
||||||
<c:if test="<%= portletName.equals(PortletKeys.WORKFLOW_DEFINITIONS) && !workflowTask.isCompleted() && !_isAssignedToUser(workflowTask, user) %>"> |
<c:if test="<%= portletName.equals(PortletKeys.WORKFLOW_DEFINITIONS) && !workflowTask.isCompleted() && !_isAssignedToUser(workflowTask, user) %>"> |
||||||
<portlet:actionURL var="assignToMeURL"> |
<portlet:actionURL var="assignToMeURL"> |
||||||
<portlet:param name="struts_action" value="/workflow_instances/edit_workflow_instance_task" /> |
<portlet:param name="struts_action" value="/workflow_instances/edit_workflow_instance_task" /> |
||||||
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" /> |
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" /> |
||||||
<portlet:param name="redirect" value="<%= currentURL %>" /> |
<portlet:param name="redirect" value="<%= currentURL %>" /> |
||||||
<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
<portlet:param name="assigneeUserId" value="<%= String.valueOf(user.getUserId()) %>" /> |
<portlet:param name="assigneeUserId" value="<%= String.valueOf(user.getUserId()) %>" /> |
||||||
</portlet:actionURL> |
</portlet:actionURL> |
||||||
|
|
||||||
<liferay-ui:icon |
<liferay-ui:icon |
||||||
cssClass='<%= "workflow-task-" + randomId + " task-assign-to-me-link" %>' |
cssClass='<%= "workflow-task-" + randomId + " task-assign-to-me-link" %>' |
||||||
image="assign" |
image="assign" |
||||||
message="assign-to-me" |
message="assign-to-me" |
||||||
method="get" |
method="get" |
||||||
url="<%= assignToMeURL %>" |
url="<%= assignToMeURL %>" |
||||||
/> |
/> |
||||||
</c:if> |
</c:if> |
||||||
|
|
||||||
<c:if test="<%= !workflowTask.isCompleted() && _isAssignedToUser(workflowTask, user) %>"> |
<c:if test="<%= !workflowTask.isCompleted() && _isAssignedToUser(workflowTask, user) %>"> |
||||||
|
|
||||||
<% |
<% |
||||||
List<String> transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); |
List<String> transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); |
||||||
|
|
||||||
for (String transitionName : transitionNames) { |
for (String transitionName : transitionNames) { |
||||||
String message = "proceed"; |
String message = "proceed"; |
||||||
|
|
||||||
if (Validator.isNotNull(transitionName)) { |
if (Validator.isNotNull(transitionName)) { |
||||||
message = transitionName; |
message = transitionName; |
||||||
} |
} |
||||||
%> |
%> |
||||||
|
|
||||||
<portlet:actionURL var="editURL"> |
<portlet:actionURL var="editURL"> |
||||||
<portlet:param name="struts_action" value="/workflow_instances/edit_workflow_instance_task" /> |
<portlet:param name="struts_action" value="/workflow_instances/edit_workflow_instance_task" /> |
||||||
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SAVE %>" /> |
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SAVE %>" /> |
||||||
<portlet:param name="redirect" value="<%= currentURL %>" /> |
<portlet:param name="redirect" value="<%= currentURL %>" /> |
||||||
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
||||||
|
|
||||||
<c:if test="<%= transitionName != null %>"> |
<c:if test="<%= transitionName != null %>"> |
||||||
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
||||||
</c:if> |
</c:if> |
||||||
</portlet:actionURL> |
</portlet:actionURL> |
||||||
|
|
||||||
<portlet:renderURL var="renderFormURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> |
<portlet:renderURL var="renderFormURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/render_form_task" /> |
<portlet:param name="struts_action" value="/workflow_tasks/render_form_task" /> |
||||||
<portlet:param name="formName" value='<%= "fm_"+ randomId %>' /> |
<portlet:param name="formName" value='<%= "fm_"+ randomId %>' /> |
||||||
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
||||||
|
|
||||||
<c:if test="<%= transitionName != null %>"> |
<c:if test="<%= transitionName != null %>"> |
||||||
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
||||||
</c:if> |
</c:if> |
||||||
</portlet:renderURL> |
</portlet:renderURL> |
||||||
|
|
||||||
<portlet:resourceURL var="validationURL"> |
<portlet:resourceURL var="validationURL"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/render_form_task" /> |
<portlet:param name="struts_action" value="/workflow_tasks/render_form_task" /> |
||||||
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
||||||
|
|
||||||
<c:if test="<%= transitionName != null %>"> |
<c:if test="<%= transitionName != null %>"> |
||||||
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
||||||
</c:if> |
</c:if> |
||||||
</portlet:resourceURL> |
</portlet:resourceURL> |
||||||
|
|
||||||
<% |
<% |
||||||
Map<String, Object> data = new HashMap<String, Object>(); |
Map<String, Object> data = new HashMap<String, Object>(); |
||||||
|
|
||||||
data.put("href-validation", validationURL); |
data.put("href-validation", validationURL); |
||||||
data.put("href-render-form", renderFormURL); |
data.put("href-render-form", renderFormURL); |
||||||
%> |
%> |
||||||
|
|
||||||
<liferay-ui:icon |
<liferay-ui:icon |
||||||
cssClass='<%= "workflow-task-" + randomId + " task-change-status-link" %>' |
cssClass='<%= "workflow-task-" + randomId + " task-change-status-link" %>' |
||||||
image="../aui/random" |
image="../aui/random" |
||||||
message="<%= message %>" |
message="<%= message %>" |
||||||
method="get" |
method="get" |
||||||
url="<%= editURL %>" |
url="<%= editURL %>" |
||||||
data="<%= data %>" |
data="<%= data %>" |
||||||
/> |
/> |
||||||
|
|
||||||
<% |
<% |
||||||
} |
} |
||||||
%> |
%> |
||||||
|
|
||||||
</c:if> |
</c:if> |
||||||
</liferay-ui:icon-menu> |
</liferay-ui:icon-menu> |
||||||
<div class="hide" id="<%= randomId %>updateComments"> |
<div class="hide" id="<%= randomId %>updateComments"> |
||||||
<%-- hook tref-ekaleo --%> |
<%-- hook tref-ekaleo --%> |
||||||
<div id="<%= randomId %>formError"></div> |
<div id="<%= randomId %>formError"></div> |
||||||
<div id="<%= randomId %>form"></div> |
<div id="<%= randomId %>form"></div> |
||||||
<aui:input cols="105" name="comment" rows="10" type="textarea" /> |
<aui:input cols="105" name="comment" rows="10" type="textarea" /> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<aui:script use="aui-io-plugin-deprecated,liferay-util-window"> |
<aui:script use="aui-io-plugin-deprecated,liferay-util-window"> |
||||||
var showPopup = function(url, title, renderFormURL, validationURL) { |
var showPopup = function(url, title, renderFormURL, validationURL) { |
||||||
var form = A.Node.create('<form />'); |
var form = A.Node.create('<form />'); |
||||||
|
|
||||||
form.setAttribute('action', url); |
form.setAttribute('action', url); |
||||||
form.setAttribute('method', 'POST'); |
form.setAttribute('method', 'POST'); |
||||||
|
|
||||||
var comments = A.one('#<%= randomId %>updateComments'); |
var comments = A.one('#<%= randomId %>updateComments'); |
||||||
|
|
||||||
if (comments) { |
if (comments) { |
||||||
form.append(comments); |
form.append(comments); |
||||||
|
|
||||||
comments.show(); |
comments.show(); |
||||||
} |
} |
||||||
|
|
||||||
// reset |
// reset |
||||||
var formDiv = A.one('#<%= randomId %>form'); |
var formDiv = A.one('#<%= randomId %>form'); |
||||||
if (formDiv) { |
if (formDiv) { |
||||||
formDiv.empty(); |
formDiv.empty(); |
||||||
} |
} |
||||||
var formErrorDiv = A.one('#<%= randomId %>formError'); |
var formErrorDiv = A.one('#<%= randomId %>formError'); |
||||||
if (formErrorDiv) { |
if (formErrorDiv) { |
||||||
formErrorDiv.empty(); |
formErrorDiv.empty(); |
||||||
} |
} |
||||||
|
|
||||||
var dialog = Liferay.Util.Window.getWindow( |
var dialog = Liferay.Util.Window.getWindow( |
||||||
{ |
{ |
||||||
dialog: { |
dialog: { |
||||||
bodyContent: form, |
bodyContent: form, |
||||||
height: 620, |
height: 620, |
||||||
toolbars: { |
toolbars: { |
||||||
footer: [ |
footer: [ |
||||||
{ |
{ |
||||||
label: Liferay.Language.get('ok'), |
label: Liferay.Language.get('ok'), |
||||||
on: { |
on: { |
||||||
click: function() { |
click: function() { |
||||||
if (!validationURL) { |
if (!validationURL) { |
||||||
submitForm(form); |
submitForm(form); |
||||||
} else { |
} else { |
||||||
A.one('#<%= randomId %>formError').empty(); |
A.one('#<%= randomId %>formError').empty(); |
||||||
A.io.request(validationURL, { |
A.io.request(validationURL, { |
||||||
method: 'POST', |
method: 'POST', |
||||||
dataType: 'json', |
dataType: 'json', |
||||||
on: { |
on: { |
||||||
start: function() { |
start: function() { |
||||||
A.one('#<%= randomId %>updateComments').loadingmask.show(); |
A.one('#<%= randomId %>updateComments').loadingmask.show(); |
||||||
A.all('.modal-footer').each(function(item, index, collection) { |
A.all('.modal-footer').each(function(item, index, collection) { |
||||||
item.all('button').each(function(item, index, collection) { |
item.all('button').each(function(item, index, collection) { |
||||||
item.set('disabled', true); |
item.set('disabled', true); |
||||||
item.setStyle('opacity', 0.5); |
item.setStyle('opacity', 0.5); |
||||||
}); |
}); |
||||||
}); |
}); |
||||||
}, |
}, |
||||||
complete: function() { |
complete: function() { |
||||||
A.one('#<%= randomId %>updateComments').loadingmask.hide(); |
A.one('#<%= randomId %>updateComments').loadingmask.hide(); |
||||||
}, |
}, |
||||||
success: function() { |
success: function() { |
||||||
var responseData = this.get('responseData'); |
var responseData = this.get('responseData'); |
||||||
if (responseData.valid) { |
if (responseData.valid) { |
||||||
submitForm(form); |
submitForm(form); |
||||||
} else { |
} else { |
||||||
var message = "<div class='alert alert-error'>" + Liferay.Language.get(responseData.message) + "</div>"; |
var message = "<div class='alert alert-error'>" + Liferay.Language.get(responseData.message) + "</div>"; |
||||||
A.one('#<%= randomId %>formError').html(message); |
A.one('#<%= randomId %>formError').html(message); |
||||||
} |
} |
||||||
A.all('.modal-footer').each(function(item, index, collection) { |
A.all('.modal-footer').each(function(item, index, collection) { |
||||||
item.all('button').each(function(item, index, collection) { |
item.all('button').each(function(item, index, collection) { |
||||||
item.set('disabled', false); |
item.set('disabled', false); |
||||||
item.setStyle('opacity', 1); |
item.setStyle('opacity', 1); |
||||||
}); |
}); |
||||||
}); |
}); |
||||||
} |
} |
||||||
} |
} |
||||||
}); |
}); |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
label: Liferay.Language.get('cancel'), |
label: Liferay.Language.get('cancel'), |
||||||
on: { |
on: { |
||||||
click: function() { |
click: function() { |
||||||
dialog.hide(); |
dialog.hide(); |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
] |
] |
||||||
}, |
}, |
||||||
width: 550 |
width: 550 |
||||||
}, |
}, |
||||||
title: title |
title: title |
||||||
} |
} |
||||||
); |
); |
||||||
|
|
||||||
A.one('#<%= randomId %>updateComments').plug(A.LoadingMask, {}); |
A.one('#<%= randomId %>updateComments').plug(A.LoadingMask, {}); |
||||||
|
|
||||||
A.io.request(renderFormURL, { |
A.io.request(renderFormURL, { |
||||||
dataType: 'html', |
dataType: 'html', |
||||||
on: { |
on: { |
||||||
start: function() { |
start: function() { |
||||||
A.one('#<%= randomId %>updateComments').loadingmask.show(); |
A.one('#<%= randomId %>updateComments').loadingmask.show(); |
||||||
A.all('.modal-footer').each(function(item, index, collection) { |
A.all('.modal-footer').each(function(item, index, collection) { |
||||||
item.all('button').each(function(item, index, collection) { |
item.all('button').each(function(item, index, collection) { |
||||||
item.set('disabled', true); |
item.set('disabled', true); |
||||||
item.setStyle('opacity', 0.5); |
item.setStyle('opacity', 0.5); |
||||||
}); |
}); |
||||||
}); |
}); |
||||||
}, |
}, |
||||||
complete: function() { |
complete: function() { |
||||||
A.one('#<%= randomId %>updateComments').loadingmask.hide(); |
A.one('#<%= randomId %>updateComments').loadingmask.hide(); |
||||||
}, |
}, |
||||||
success: function() { |
success: function() { |
||||||
var contentNode = A.one('#<%= randomId %>form'); |
var contentNode = A.one('#<%= randomId %>form'); |
||||||
contentNode.html(this.get('responseData')); |
contentNode.html(this.get('responseData')); |
||||||
A.all('.modal-footer').each(function(item, index, collection) { |
A.all('.modal-footer').each(function(item, index, collection) { |
||||||
item.all('button').each(function(item, index, collection) { |
item.all('button').each(function(item, index, collection) { |
||||||
item.set('disabled', false); |
item.set('disabled', false); |
||||||
item.setStyle('opacity', 1); |
item.setStyle('opacity', 1); |
||||||
}); |
}); |
||||||
}); |
}); |
||||||
} |
} |
||||||
} |
} |
||||||
}); |
}); |
||||||
}; |
}; |
||||||
|
|
||||||
A.all('.workflow-task-<%= randomId %> a').on( |
A.all('.workflow-task-<%= randomId %> a').on( |
||||||
'click', |
'click', |
||||||
function(event) { |
function(event) { |
||||||
event.preventDefault(); |
event.preventDefault(); |
||||||
|
|
||||||
var icon = event.currentTarget; |
var icon = event.currentTarget; |
||||||
var title = icon.text(); |
var title = icon.text(); |
||||||
|
|
||||||
var renderFormURL = icon.attr('data-href-render-form'); |
var renderFormURL = icon.attr('data-href-render-form'); |
||||||
var validationURL = icon.attr('data-href-validation'); |
var validationURL = icon.attr('data-href-validation'); |
||||||
|
|
||||||
showPopup(icon.attr('href'), title, renderFormURL, validationURL); |
showPopup(icon.attr('href'), title, renderFormURL, validationURL); |
||||||
} |
} |
||||||
); |
); |
||||||
</aui:script> |
</aui:script> |
@ -1,350 +1,350 @@ |
|||||||
<%-- |
<%-- |
||||||
/** |
/** |
||||||
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. |
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. |
||||||
* |
* |
||||||
* This library is free software; you can redistribute it and/or modify it under |
* This library is free software; you can redistribute it and/or modify it under |
||||||
* the terms of the GNU Lesser General Public License as published by the Free |
* the terms of the GNU Lesser General Public License as published by the Free |
||||||
* Software Foundation; either version 2.1 of the License, or (at your option) |
* Software Foundation; either version 2.1 of the License, or (at your option) |
||||||
* any later version. |
* any later version. |
||||||
* |
* |
||||||
* This library is distributed in the hope that it will be useful, but WITHOUT |
* This library is distributed in the hope that it will be useful, but WITHOUT |
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
||||||
* details. |
* details. |
||||||
*/ |
*/ |
||||||
--%> |
--%> |
||||||
|
|
||||||
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> |
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> |
||||||
<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> |
<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> |
||||||
|
|
||||||
<% |
<% |
||||||
String randomId = StringUtil.randomId(); |
String randomId = StringUtil.randomId(); |
||||||
|
|
||||||
String redirect = ParamUtil.getString(request, "redirect"); |
String redirect = ParamUtil.getString(request, "redirect"); |
||||||
|
|
||||||
|
|
||||||
WorkflowTask workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_TASK); |
WorkflowTask workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_TASK); |
||||||
|
|
||||||
WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId()); |
WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId()); |
||||||
|
|
||||||
Map<String, Serializable> workflowContext = workflowInstance.getWorkflowContext(); |
Map<String, Serializable> workflowContext = workflowInstance.getWorkflowContext(); |
||||||
|
|
||||||
long companyId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_COMPANY_ID)); |
long companyId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_COMPANY_ID)); |
||||||
long groupId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_GROUP_ID)); |
long groupId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_GROUP_ID)); |
||||||
String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME); |
String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME); |
||||||
long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); |
long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); |
||||||
|
|
||||||
WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className); |
WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className); |
||||||
|
|
||||||
AssetRenderer assetRenderer = workflowHandler.getAssetRenderer(classPK); |
AssetRenderer assetRenderer = workflowHandler.getAssetRenderer(classPK); |
||||||
AssetRendererFactory assetRendererFactory = workflowHandler.getAssetRendererFactory(); |
AssetRendererFactory assetRendererFactory = workflowHandler.getAssetRendererFactory(); |
||||||
|
|
||||||
AssetEntry assetEntry = null; |
AssetEntry assetEntry = null; |
||||||
|
|
||||||
if (assetRenderer != null) { |
if (assetRenderer != null) { |
||||||
assetEntry = assetRendererFactory.getAssetEntry(assetRendererFactory.getClassName(), assetRenderer.getClassPK()); |
assetEntry = assetRendererFactory.getAssetEntry(assetRendererFactory.getClassName(), assetRenderer.getClassPK()); |
||||||
} |
} |
||||||
|
|
||||||
String headerTitle = LanguageUtil.get(pageContext, workflowTask.getName()); |
String headerTitle = LanguageUtil.get(pageContext, workflowTask.getName()); |
||||||
|
|
||||||
headerTitle = headerTitle.concat(StringPool.COLON + StringPool.SPACE + workflowHandler.getTitle(classPK, locale)); |
headerTitle = headerTitle.concat(StringPool.COLON + StringPool.SPACE + workflowHandler.getTitle(classPK, locale)); |
||||||
|
|
||||||
boolean showEditURL = false; |
boolean showEditURL = false; |
||||||
|
|
||||||
if ((workflowTask.getAssigneeUserId() == user.getUserId()) && !workflowTask.isCompleted()) { |
if ((workflowTask.getAssigneeUserId() == user.getUserId()) && !workflowTask.isCompleted()) { |
||||||
showEditURL = true; |
showEditURL = true; |
||||||
} |
} |
||||||
|
|
||||||
PortletURL editPortletURL = workflowHandler.getURLEdit(classPK, liferayPortletRequest, liferayPortletResponse); |
PortletURL editPortletURL = workflowHandler.getURLEdit(classPK, liferayPortletRequest, liferayPortletResponse); |
||||||
|
|
||||||
String viewFullContentURLString = null; |
String viewFullContentURLString = null; |
||||||
|
|
||||||
if (assetRenderer.isPreviewInContext()) { |
if (assetRenderer.isPreviewInContext()) { |
||||||
viewFullContentURLString = assetRenderer.getURLViewInContext((LiferayPortletRequest)renderRequest, (LiferayPortletResponse)renderResponse, null); |
viewFullContentURLString = assetRenderer.getURLViewInContext((LiferayPortletRequest)renderRequest, (LiferayPortletResponse)renderResponse, null); |
||||||
} |
} |
||||||
else { |
else { |
||||||
PortletURL viewFullContentURL = renderResponse.createRenderURL(); |
PortletURL viewFullContentURL = renderResponse.createRenderURL(); |
||||||
|
|
||||||
viewFullContentURL.setParameter("struts_action", "/workflow_tasks/view_content"); |
viewFullContentURL.setParameter("struts_action", "/workflow_tasks/view_content"); |
||||||
viewFullContentURL.setParameter("redirect", currentURL); |
viewFullContentURL.setParameter("redirect", currentURL); |
||||||
|
|
||||||
if (assetEntry != null) { |
if (assetEntry != null) { |
||||||
viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId())); |
viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId())); |
||||||
viewFullContentURL.setParameter("assetEntryVersionId", String.valueOf(classPK)); |
viewFullContentURL.setParameter("assetEntryVersionId", String.valueOf(classPK)); |
||||||
} |
} |
||||||
|
|
||||||
if (assetRendererFactory != null) { |
if (assetRendererFactory != null) { |
||||||
viewFullContentURL.setParameter("type", assetRendererFactory.getType()); |
viewFullContentURL.setParameter("type", assetRendererFactory.getType()); |
||||||
} |
} |
||||||
|
|
||||||
viewFullContentURL.setParameter("showEditURL", String.valueOf(showEditURL)); |
viewFullContentURL.setParameter("showEditURL", String.valueOf(showEditURL)); |
||||||
viewFullContentURL.setParameter("workflowAssetPreview", Boolean.TRUE.toString()); |
viewFullContentURL.setParameter("workflowAssetPreview", Boolean.TRUE.toString()); |
||||||
|
|
||||||
viewFullContentURLString = viewFullContentURL.toString(); |
viewFullContentURLString = viewFullContentURL.toString(); |
||||||
} |
} |
||||||
|
|
||||||
request.setAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW, Boolean.TRUE); |
request.setAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW, Boolean.TRUE); |
||||||
%> |
%> |
||||||
|
|
||||||
<%-- <portlet:renderURL var="backURL"> |
<%-- <portlet:renderURL var="backURL"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/view" /> |
<portlet:param name="struts_action" value="/workflow_tasks/view" /> |
||||||
</portlet:renderURL> |
</portlet:renderURL> |
||||||
|
|
||||||
<liferay-ui:header |
<liferay-ui:header |
||||||
backURL="<%= backURL.toString() %>" |
backURL="<%= backURL.toString() %>" |
||||||
localizeTitle="<%= false %>" |
localizeTitle="<%= false %>" |
||||||
title="<%= headerTitle %>" |
title="<%= headerTitle %>" |
||||||
/>--%> |
/>--%> |
||||||
|
|
||||||
<div class="container_gestione_attivita"> |
<div class="container_gestione_attivita"> |
||||||
<div class="container_gestione_attivita_header"> |
<div class="container_gestione_attivita_header"> |
||||||
<h2 class="container_gestione_attivita_header-title">Gestione Attività</h2> |
<h2 class="container_gestione_attivita_header-title">Gestione Attività</h2> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="container_gestione_attivita_body"> |
<div class="container_gestione_attivita_body"> |
||||||
<div class="container_gestione_attivita_body-left"> |
<div class="container_gestione_attivita_body-left"> |
||||||
|
|
||||||
|
|
||||||
<div class="container_gestione_attivita_body-left-dati"> |
<div class="container_gestione_attivita_body-left-dati"> |
||||||
|
|
||||||
<liferay-ui:error exception="<%= WorkflowTaskDueDateException.class %>" message="please-enter-a-valid-due-date" /> |
<liferay-ui:error exception="<%= WorkflowTaskDueDateException.class %>" message="please-enter-a-valid-due-date" /> |
||||||
|
|
||||||
<div class="lfr-asset-assigned attivita_header-item"> |
<div class="lfr-asset-assigned attivita_header-item"> |
||||||
<aui:field-wrapper label="assigned-to"> |
<aui:field-wrapper label="assigned-to"> |
||||||
<i class="icon-user"></i> |
<i class="icon-user"></i> |
||||||
<c:choose> |
<c:choose> |
||||||
<c:when test="<%= workflowTask.isAssignedToSingleUser() %>"> |
<c:when test="<%= workflowTask.isAssignedToSingleUser() %>"> |
||||||
<liferay-ui:input-resource url="<%= PortalUtil.getUserName(workflowTask.getAssigneeUserId(), StringPool.BLANK) %>" /> |
<liferay-ui:input-resource url="<%= PortalUtil.getUserName(workflowTask.getAssigneeUserId(), StringPool.BLANK) %>" /> |
||||||
</c:when> |
</c:when> |
||||||
<c:otherwise> |
<c:otherwise> |
||||||
<liferay-ui:input-resource url='<%= LanguageUtil.get(pageContext, "nobody") %>' /> |
<liferay-ui:input-resource url='<%= LanguageUtil.get(pageContext, "nobody") %>' /> |
||||||
</c:otherwise> |
</c:otherwise> |
||||||
</c:choose> |
</c:choose> |
||||||
</aui:field-wrapper> |
</aui:field-wrapper> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="lfr-asset-status attivita_header-item"> |
<div class="lfr-asset-status attivita_header-item"> |
||||||
|
|
||||||
<aui:field-wrapper label="state"> |
<aui:field-wrapper label="state"> |
||||||
<i class="icon-th-list"></i> |
<i class="icon-th-list"></i> |
||||||
<liferay-ui:input-resource url="<%= LanguageUtil.get(pageContext, WorkflowInstanceLinkLocalServiceUtil.getState(companyId, groupId, className, classPK)) %>" /> |
<liferay-ui:input-resource url="<%= LanguageUtil.get(pageContext, WorkflowInstanceLinkLocalServiceUtil.getState(companyId, groupId, className, classPK)) %>" /> |
||||||
</aui:field-wrapper> |
</aui:field-wrapper> |
||||||
</div> |
</div> |
||||||
<div class="lfr-asset-date attivita_header-item"> |
<div class="lfr-asset-date attivita_header-item"> |
||||||
<aui:field-wrapper label="create-date"> |
<aui:field-wrapper label="create-date"> |
||||||
<i class="icon-calendar"></i> |
<i class="icon-calendar"></i> |
||||||
<liferay-ui:input-resource url="<%= dateFormatDateTime.format(workflowTask.getCreateDate()) %>" /> |
<liferay-ui:input-resource url="<%= dateFormatDateTime.format(workflowTask.getCreateDate()) %>" /> |
||||||
</aui:field-wrapper> |
</aui:field-wrapper> |
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<c:if test="<%= Validator.isNotNull(workflowTask.getDescription()) %>"> |
<c:if test="<%= Validator.isNotNull(workflowTask.getDescription()) %>"> |
||||||
<div class="lfr-asset-field"> |
<div class="lfr-asset-field"> |
||||||
|
|
||||||
<aui:field-wrapper label="description"> |
<aui:field-wrapper label="description"> |
||||||
<%= workflowTask.getDescription() %> |
<%= workflowTask.getDescription() %> |
||||||
</aui:field-wrapper> |
</aui:field-wrapper> |
||||||
</div> |
</div> |
||||||
</c:if> |
</c:if> |
||||||
|
|
||||||
|
|
||||||
<c:if test="<%= assetRenderer != null %>"> |
<c:if test="<%= assetRenderer != null %>"> |
||||||
|
|
||||||
<% |
<% |
||||||
String path = workflowHandler.render(classPK, renderRequest, renderResponse, AssetRenderer.TEMPLATE_ABSTRACT); |
String path = workflowHandler.render(classPK, renderRequest, renderResponse, AssetRenderer.TEMPLATE_ABSTRACT); |
||||||
|
|
||||||
request.setAttribute(WebKeys.ASSET_RENDERER, assetRenderer); |
request.setAttribute(WebKeys.ASSET_RENDERER, assetRenderer); |
||||||
request.setAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH, 200); |
request.setAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH, 200); |
||||||
%> |
%> |
||||||
|
|
||||||
<c:choose> |
<c:choose> |
||||||
<c:when test="<%= path == null %>"> |
<c:when test="<%= path == null %>"> |
||||||
<%= workflowHandler.getSummary(classPK, locale) %> |
<%= workflowHandler.getSummary(classPK, locale) %> |
||||||
</c:when> |
</c:when> |
||||||
<c:otherwise> |
<c:otherwise> |
||||||
<liferay-util:include page="<%= path %>" portletId="<%= assetRendererFactory.getPortletId() %>" /> |
<liferay-util:include page="<%= path %>" portletId="<%= assetRendererFactory.getPortletId() %>" /> |
||||||
</c:otherwise> |
</c:otherwise> |
||||||
</c:choose> |
</c:choose> |
||||||
|
|
||||||
</c:if> |
</c:if> |
||||||
<liferay-ui:panel-container cssClass="task-panel-container" extended="<%= true %>"> |
<liferay-ui:panel-container cssClass="task-panel-container" extended="<%= true %>"> |
||||||
<liferay-ui:panel defaultState="closed" title="Attività e Commenti"> |
<liferay-ui:panel defaultState="closed" title="Attività e Commenti"> |
||||||
|
|
||||||
<% |
<% |
||||||
List<Integer> logTypes = new ArrayList<Integer>(); |
List<Integer> logTypes = new ArrayList<Integer>(); |
||||||
|
|
||||||
logTypes.add(WorkflowLog.TASK_ASSIGN); |
logTypes.add(WorkflowLog.TASK_ASSIGN); |
||||||
logTypes.add(WorkflowLog.TASK_COMPLETION); |
logTypes.add(WorkflowLog.TASK_COMPLETION); |
||||||
logTypes.add(WorkflowLog.TASK_UPDATE); |
logTypes.add(WorkflowLog.TASK_UPDATE); |
||||||
logTypes.add(WorkflowLog.TRANSITION); |
logTypes.add(WorkflowLog.TRANSITION); |
||||||
|
|
||||||
List<WorkflowLog> workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId(), logTypes, QueryUtil.ALL_POS, QueryUtil.ALL_POS, WorkflowComparatorFactoryUtil.getLogCreateDateComparator(true)); |
List<WorkflowLog> workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId(), logTypes, QueryUtil.ALL_POS, QueryUtil.ALL_POS, WorkflowComparatorFactoryUtil.getLogCreateDateComparator(true)); |
||||||
%> |
%> |
||||||
|
|
||||||
<%@ include file="/html/portlet/workflow_instances/workflow_logs.jspf" %> |
<%@ include file="/html/portlet/workflow_instances/workflow_logs.jspf" %> |
||||||
</liferay-ui:panel> |
</liferay-ui:panel> |
||||||
|
|
||||||
|
|
||||||
</liferay-ui:panel-container> |
</liferay-ui:panel-container> |
||||||
|
|
||||||
|
|
||||||
</div> |
</div> |
||||||
|
|
||||||
</div> |
</div> |
||||||
<div class="container_gestione_attivita_body-right"> |
<div class="container_gestione_attivita_body-right"> |
||||||
|
|
||||||
<div class="lfr-asset-summary"> |
<div class="lfr-asset-summary"> |
||||||
|
|
||||||
<h2 class="title-action">Azioni</h2> |
<h2 class="title-action">Azioni</h2> |
||||||
<div class="separator"></div> |
<div class="separator"></div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<% |
<% |
||||||
request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
||||||
%> |
%> |
||||||
|
|
||||||
<liferay-util:include page="/html/portlet/workflow_tasks/workflow_task_action.jsp"> |
<liferay-util:include page="/html/portlet/workflow_tasks/workflow_task_action.jsp"> |
||||||
<liferay-portlet:param name="viewFullContentURLString" value="<%= viewFullContentURLString %>"/> |
<liferay-portlet:param name="viewFullContentURLString" value="<%= viewFullContentURLString %>"/> |
||||||
<!-- ADT BUG BO ID= 27 --> |
<!-- ADT BUG BO ID= 27 --> |
||||||
<liferay-portlet:param name="classPkForCarichiLavoro" value="<%= String.valueOf(classPK) %>"/> |
<liferay-portlet:param name="classPkForCarichiLavoro" value="<%= String.valueOf(classPK) %>"/> |
||||||
</liferay-util:include> |
</liferay-util:include> |
||||||
|
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style> |
<style> |
||||||
html { |
html { |
||||||
padding: 0!important; |
padding: 0!important; |
||||||
} |
} |
||||||
.container_gestione_attivita_header { |
.container_gestione_attivita_header { |
||||||
display: -webkit-box; |
display: -webkit-box; |
||||||
display: -ms-flexbox; |
display: -ms-flexbox; |
||||||
display: flex; |
display: flex; |
||||||
border-bottom: 1px solid #ddd; |
border-bottom: 1px solid #ddd; |
||||||
padding-left: 15px; |
padding-left: 15px; |
||||||
padding-right: 15px; |
padding-right: 15px; |
||||||
background-color: #812121; |
background-color: #812121; |
||||||
} |
} |
||||||
.container_gestione_attivita_header-title { |
.container_gestione_attivita_header-title { |
||||||
color: #fff!important; |
color: #fff!important; |
||||||
} |
} |
||||||
|
|
||||||
.attivita_header-item .control-label { |
.attivita_header-item .control-label { |
||||||
padding-left: 18px; |
padding-left: 18px; |
||||||
} |
} |
||||||
.attivita_header-item { |
.attivita_header-item { |
||||||
padding-right: 40px; |
padding-right: 40px; |
||||||
} |
} |
||||||
|
|
||||||
.container_gestione_attivita_body { |
.container_gestione_attivita_body { |
||||||
display: -webkit-box; |
display: -webkit-box; |
||||||
display: -ms-flexbox; |
display: -ms-flexbox; |
||||||
display: flex; |
display: flex; |
||||||
-ms-flex-wrap: wrap; |
-ms-flex-wrap: wrap; |
||||||
flex-wrap: wrap; |
flex-wrap: wrap; |
||||||
} |
} |
||||||
.container_gestione_attivita_body-left { |
.container_gestione_attivita_body-left { |
||||||
-webkit-box-flex: 1; |
-webkit-box-flex: 1; |
||||||
-ms-flex: 1; |
-ms-flex: 1; |
||||||
flex: 1; |
flex: 1; |
||||||
} |
} |
||||||
.container_gestione_attivita_body-right { |
.container_gestione_attivita_body-right { |
||||||
width: 200px; |
width: 200px; |
||||||
} |
} |
||||||
.container_gestione_attivita_body-left, .container_gestione_attivita_body-right { |
.container_gestione_attivita_body-left, .container_gestione_attivita_body-right { |
||||||
padding: 15px; |
padding: 15px; |
||||||
} |
} |
||||||
.button_custom { |
.button_custom { |
||||||
border-radius: 4px; |
border-radius: 4px; |
||||||
width: 80%; |
width: 80%; |
||||||
} |
} |
||||||
.button_custom a, .button_custom a i, .button_custom a span, .button_custom a span:hover, .button_custom a i:hover, .button_custom a:hover { |
.button_custom a, .button_custom a i, .button_custom a span, .button_custom a span:hover, .button_custom a i:hover, .button_custom a:hover { |
||||||
color: #333!important; |
color: #333!important; |
||||||
} |
} |
||||||
.task-panel-header { |
.task-panel-header { |
||||||
display: -webkit-box; |
display: -webkit-box; |
||||||
display: -ms-flexbox; |
display: -ms-flexbox; |
||||||
display: flex; |
display: flex; |
||||||
-webkit-box-align: center; |
-webkit-box-align: center; |
||||||
-ms-flex-align: center; |
-ms-flex-align: center; |
||||||
align-items: center; |
align-items: center; |
||||||
} |
} |
||||||
.task-panel-header .task-content-title { |
.task-panel-header .task-content-title { |
||||||
color: rgb(85, 85, 85); |
color: rgb(85, 85, 85); |
||||||
} |
} |
||||||
.title-action { |
.title-action { |
||||||
margin: 0; |
margin: 0; |
||||||
} |
} |
||||||
.container_gestione_attivita_body-right { |
.container_gestione_attivita_body-right { |
||||||
border-left: 1px solid #ddd; |
border-left: 1px solid #ddd; |
||||||
} |
} |
||||||
|
|
||||||
.container_gestione_attivita_body-right .lfr-menu-list { |
.container_gestione_attivita_body-right .lfr-menu-list { |
||||||
margin-left: 0; |
margin-left: 0; |
||||||
} |
} |
||||||
.opens-new-window-accessible { |
.opens-new-window-accessible { |
||||||
display: none!important; |
display: none!important; |
||||||
} |
} |
||||||
.task-activity { |
.task-activity { |
||||||
padding-bottom: 15px; |
padding-bottom: 15px; |
||||||
} |
} |
||||||
.task-activity:first-child { |
.task-activity:first-child { |
||||||
padding-top: 15px; |
padding-top: 15px; |
||||||
} |
} |
||||||
.task-activity-date { |
.task-activity-date { |
||||||
font-weight: 600; |
font-weight: 600; |
||||||
font-size: 16px; |
font-size: 16px; |
||||||
} |
} |
||||||
|
|
||||||
.container_gestione_attivita_body-left-dati { |
.container_gestione_attivita_body-left-dati { |
||||||
display: -webkit-box; |
display: -webkit-box; |
||||||
display: -ms-flexbox; |
display: -ms-flexbox; |
||||||
display: flex; |
display: flex; |
||||||
-ms-flex-wrap: wrap; |
-ms-flex-wrap: wrap; |
||||||
flex-wrap: wrap; |
flex-wrap: wrap; |
||||||
border-bottom: 1px solid #ddd; |
border-bottom: 1px solid #ddd; |
||||||
} |
} |
||||||
|
|
||||||
.accordion .accordion-heading { |
.accordion .accordion-heading { |
||||||
background-color: #812121!important; |
background-color: #812121!important; |
||||||
} |
} |
||||||
|
|
||||||
.accordion .accordion-heading .title-text { |
.accordion .accordion-heading .title-text { |
||||||
color: #fff; |
color: #fff; |
||||||
} |
} |
||||||
.accordion .accordion-heading .accordion-toggle::before { |
.accordion .accordion-heading .accordion-toggle::before { |
||||||
color: #fff!important; |
color: #fff!important; |
||||||
opacity: 1!important; |
opacity: 1!important; |
||||||
} |
} |
||||||
#updateComments .columns-max .control-group.field-wrapper > .control-group select, |
#updateComments .columns-max .control-group.field-wrapper > .control-group select, |
||||||
#updateComments .control-group.field-wrapper textarea, |
#updateComments .control-group.field-wrapper textarea, |
||||||
#updateComments .control-group.field-wrapper label, |
#updateComments .control-group.field-wrapper label, |
||||||
#updateComments .columns-max .control-group.field-wrapper > .control-group label, |
#updateComments .columns-max .control-group.field-wrapper > .control-group label, |
||||||
#updateComments .control-group.field-wrapper span.control-label, |
#updateComments .control-group.field-wrapper span.control-label, |
||||||
#updateComments .control-group.input-text-wrapper textarea.field, |
#updateComments .control-group.input-text-wrapper textarea.field, |
||||||
.aui label.control-label{ |
.aui label.control-label{ |
||||||
color: black |
color: black |
||||||
} |
} |
||||||
</style> |
</style> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<aui:script use="liferay-workflow-tasks"> |
<aui:script use="liferay-workflow-tasks"> |
||||||
var onTaskClickFn = A.rbind('onTaskClick', Liferay.WorkflowTasks, ''); |
var onTaskClickFn = A.rbind('onTaskClick', Liferay.WorkflowTasks, ''); |
||||||
|
|
||||||
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignToMeLink', onTaskClickFn); |
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignToMeLink', onTaskClickFn); |
||||||
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignLink', onTaskClickFn); |
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignLink', onTaskClickFn); |
||||||
<%-- Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskDueDateLink', onTaskClickFn); --%> |
<%-- Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskDueDateLink', onTaskClickFn); --%> |
||||||
</aui:script> |
</aui:script> |
||||||
|
|
||||||
<% |
<% |
||||||
PortalUtil.addPortletBreadcrumbEntry(request, headerTitle, currentURL); |
PortalUtil.addPortletBreadcrumbEntry(request, headerTitle, currentURL); |
||||||
%> |
%> |
@ -1,342 +1,341 @@ |
|||||||
|
<%@page import="com.liferay.portal.kernel.util.MapUtil"%> |
||||||
<%@page import="com.liferay.portal.kernel.util.MapUtil"%> |
<%@page import="java.io.UnsupportedEncodingException"%> |
||||||
<%@page import="java.io.UnsupportedEncodingException"%> |
<%@page import="org.apache.commons.codec.binary.Hex"%> |
||||||
<%@page import="org.apache.commons.codec.binary.Hex"%> |
<%@page import="com.liferay.portal.kernel.util.UnicodeFormatter"%> |
||||||
<%@page import="com.liferay.portal.kernel.util.UnicodeFormatter"%> |
<%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%> |
||||||
<%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%> |
<%@page import="com.liferay.portal.kernel.util.StringUtil"%> |
||||||
<%@page import="com.liferay.portal.kernel.util.StringUtil"%> |
<%@page import="org.htmlparser.Node"%> |
||||||
<%@page import="org.htmlparser.Node"%> |
<%@page import="org.htmlparser.tags.OptionTag"%> |
||||||
<%@page import="org.htmlparser.tags.OptionTag"%> |
<%@page import="org.htmlparser.tags.TextareaTag"%> |
||||||
<%@page import="org.htmlparser.tags.TextareaTag"%> |
<%@page import="org.htmlparser.tags.InputTag"%> |
||||||
<%@page import="org.htmlparser.tags.InputTag"%> |
<%@page import="org.htmlparser.tags.SelectTag"%> |
||||||
<%@page import="org.htmlparser.tags.SelectTag"%> |
<%@page import="org.htmlparser.tags.Div" %> |
||||||
<%@page import="org.htmlparser.tags.Div" %> |
<%@page import="org.htmlparser.tags.LabelTag" %> |
||||||
<%@page import="org.htmlparser.tags.LabelTag" %> |
<%@page import="org.htmlparser.nodes.TagNode"%> |
||||||
<%@page import="org.htmlparser.nodes.TagNode"%> |
<%@page import="org.htmlparser.nodes.TextNode"%> |
||||||
<%@page import="org.htmlparser.nodes.TextNode"%> |
<%@page import="org.htmlparser.util.NodeList"%> |
||||||
<%@page import="org.htmlparser.util.NodeList"%> |
<%@page import="org.htmlparser.Parser"%> |
||||||
<%@page import="org.htmlparser.Parser"%> |
<%@page import="org.htmlparser.util.ParserException"%> |
||||||
<%@page import="org.htmlparser.util.ParserException"%> |
<%@page import="javax.portlet.RenderResponse"%> |
||||||
<%@page import="javax.portlet.RenderResponse"%> |
<%@page import="java.util.Iterator"%> |
||||||
<%@page import="java.util.Iterator"%> |
<%@page import="java.util.Map.Entry"%> |
||||||
<%@page import="java.util.Map.Entry"%> |
<%@page import="com.liferay.portal.kernel.util.LocaleUtil"%> |
||||||
<%@page import="com.liferay.portal.kernel.util.LocaleUtil"%> |
<%@page import="com.liferay.portal.kernel.util.Validator"%> |
||||||
<%@page import="com.liferay.portal.kernel.util.Validator"%> |
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> |
||||||
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> |
<%@page import="java.util.Set"%> |
||||||
<%@page import="java.util.Set"%> |
<%@page import="java.util.Locale"%> |
||||||
<%@page import="java.util.Locale"%> |
<%@page import="com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil"%> |
||||||
<%@page import="com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil"%> |
<%@page import="com.liferay.portlet.dynamicdatamapping.storage.Fields"%> |
||||||
<%@page import="com.liferay.portlet.dynamicdatamapping.storage.Fields"%> |
<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordSet"%> |
||||||
<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordSet"%> |
<%@page import="com.liferay.portlet.dynamicdatalists.service.DDLRecordSetServiceUtil"%> |
||||||
<%@page import="com.liferay.portlet.dynamicdatalists.service.DDLRecordSetServiceUtil"%> |
<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion"%> |
||||||
<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion"%> |
<%@page import="com.liferay.portal.kernel.bean.BeanParamUtil"%> |
||||||
<%@page import="com.liferay.portal.kernel.bean.BeanParamUtil"%> |
<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecord"%> |
||||||
<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecord"%> |
<%@page import="com.liferay.portal.kernel.util.StringPool"%> |
||||||
<%@page import="com.liferay.portal.kernel.util.StringPool"%> |
<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%> |
||||||
<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%> |
<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"%> |
||||||
<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"%> |
|
||||||
|
<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> |
||||||
<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> |
|
||||||
|
<!-- ADT BUG BO ID=27 --> |
||||||
<!-- ADT BUG BO ID=27 --> |
<% |
||||||
<% |
String classPkForCarichiLavoro = (String) renderRequest.getAttribute("classPkForCarichiLavoro"); |
||||||
String classPkForCarichiLavoro = (String) renderRequest.getAttribute("classPkForCarichiLavoro"); |
%> |
||||||
%> |
<c:if test="<%= Validator.isNotNull(classPkForCarichiLavoro) %>"> |
||||||
<c:if test="<%= Validator.isNotNull(classPkForCarichiLavoro) %>"> |
<div class="container_header_text_attivita"> |
||||||
<div class="container_header_text_attivita"> |
<liferay-portlet:renderURL portletName='9_WAR_portosboportlet' windowState="<%=LiferayWindowState.POP_UP.toString() %>" var="carichiDiLavoro"> |
||||||
<liferay-portlet:renderURL portletName='9_WAR_portosboportlet' windowState="<%=LiferayWindowState.POP_UP.toString() %>" var="carichiDiLavoro"> |
<liferay-portlet:param name="controlloPraticaId" value='<%= (String)renderRequest.getAttribute("classPkForCarichiLavoro") %>'/> |
||||||
<liferay-portlet:param name="controlloPraticaId" value='<%= (String)renderRequest.getAttribute("classPkForCarichiLavoro") %>'/> |
</liferay-portlet:renderURL> |
||||||
</liferay-portlet:renderURL> |
<liferay-ui:icon url="<%=carichiDiLavoro %>" useDialog="true" message="visualizza-carichi-di-lavoro" linkCssClass="btn btn-rounded" iconCssClass="icon-bar-chart"/> |
||||||
<liferay-ui:icon url="<%=carichiDiLavoro %>" useDialog="true" message="visualizza-carichi-di-lavoro" linkCssClass="btn btn-rounded" iconCssClass="icon-bar-chart"/> |
<span>Visualizza Carichi di Lavoro Istruttori</span> |
||||||
<span>Visualizza Carichi di Lavoro Istruttori</span> |
</div> |
||||||
</div> |
</c:if> |
||||||
</c:if> |
<!-- ************ --> |
||||||
<!-- ************ --> |
<% |
||||||
<% |
|
||||||
|
long ddmTemplateId = (Long) renderRequest.getAttribute("ddmTemplateId"); |
||||||
long ddmTemplateId = (Long) renderRequest.getAttribute("ddmTemplateId"); |
long ddmStructureId = (Long) renderRequest.getAttribute("ddmStructureId"); |
||||||
long ddmStructureId = (Long) renderRequest.getAttribute("ddmStructureId"); |
Map<String, Serializable> parameters = (Map<String, Serializable>) renderRequest.getAttribute("parameters"); |
||||||
Map<String, Serializable> parameters = (Map<String, Serializable>) renderRequest.getAttribute("parameters"); |
String prefix = (String) renderRequest.getAttribute("prefix"); |
||||||
String prefix = (String) renderRequest.getAttribute("prefix"); |
String suffix = (String) renderRequest.getAttribute("suffix"); |
||||||
String suffix = (String) renderRequest.getAttribute("suffix"); |
Map<String, List<Map<String, Serializable>>> fieldNameOptions |
||||||
Map<String, List<Map<String, Serializable>>> fieldNameOptions |
= (Map<String, List<Map<String, Serializable>>>) renderRequest.getAttribute("fieldNameOptions"); |
||||||
= (Map<String, List<Map<String, Serializable>>>) renderRequest.getAttribute("fieldNameOptions"); |
|
||||||
|
String redirect = StringPool.BLANK; |
||||||
String redirect = StringPool.BLANK; |
|
||||||
|
DDLRecord record = null; |
||||||
DDLRecord record = null; |
|
||||||
|
long recordId = BeanParamUtil.getLong(record, request, "recordId"); |
||||||
long recordId = BeanParamUtil.getLong(record, request, "recordId"); |
|
||||||
|
DDLRecordVersion recordVersion = null; |
||||||
DDLRecordVersion recordVersion = null; |
|
||||||
|
if (record != null) { |
||||||
if (record != null) { |
recordVersion = record.getLatestRecordVersion(); |
||||||
recordVersion = record.getLatestRecordVersion(); |
} |
||||||
} |
|
||||||
|
DDMStructure ddmStructure = DDMStructureLocalServiceUtil.getDDMStructure(ddmStructureId); |
||||||
DDMStructure ddmStructure = DDMStructureLocalServiceUtil.getDDMStructure(ddmStructureId); |
|
||||||
|
Fields fields = null; |
||||||
Fields fields = null; |
|
||||||
|
if (recordVersion != null) { |
||||||
if (recordVersion != null) { |
fields = StorageEngineUtil.getFields(recordVersion.getDDMStorageId()); |
||||||
fields = StorageEngineUtil.getFields(recordVersion.getDDMStorageId()); |
} |
||||||
} |
|
||||||
|
Locale[] availableLocales = new Locale[0]; |
||||||
Locale[] availableLocales = new Locale[0]; |
|
||||||
|
if (fields != null) { |
||||||
if (fields != null) { |
Set<Locale> availableLocalesSet = fields.getAvailableLocales(); |
||||||
Set<Locale> availableLocalesSet = fields.getAvailableLocales(); |
|
||||||
|
availableLocales = availableLocalesSet.toArray(new Locale[availableLocalesSet.size()]); |
||||||
availableLocales = availableLocalesSet.toArray(new Locale[availableLocalesSet.size()]); |
} |
||||||
} |
|
||||||
|
String defaultLanguageId = StringPool.BLANK; |
||||||
String defaultLanguageId = StringPool.BLANK; |
|
||||||
|
if (Validator.isNull(defaultLanguageId)) { |
||||||
if (Validator.isNull(defaultLanguageId)) { |
defaultLanguageId = themeDisplay.getLanguageId(); |
||||||
defaultLanguageId = themeDisplay.getLanguageId(); |
|
||||||
|
if (fields != null) { |
||||||
if (fields != null) { |
defaultLanguageId = LocaleUtil.toLanguageId(fields.getDefaultLocale()); |
||||||
defaultLanguageId = LocaleUtil.toLanguageId(fields.getDefaultLocale()); |
} |
||||||
} |
} |
||||||
} |
|
||||||
|
String languageId = defaultLanguageId; |
||||||
String languageId = defaultLanguageId; |
|
||||||
|
boolean translating = false; |
||||||
boolean translating = false; |
|
||||||
|
if (!defaultLanguageId.equals(languageId)) { |
||||||
if (!defaultLanguageId.equals(languageId)) { |
translating = true; |
||||||
translating = true; |
} |
||||||
} |
|
||||||
|
if (translating) { |
||||||
if (translating) { |
redirect = currentURL; |
||||||
redirect = currentURL; |
} |
||||||
} |
|
||||||
|
long classNameId = PortalUtil.getClassNameId(DDMStructure.class); |
||||||
long classNameId = PortalUtil.getClassNameId(DDMStructure.class); |
|
||||||
|
long classPK = ddmStructure.getStructureId(); |
||||||
long classPK = ddmStructure.getStructureId(); |
|
||||||
|
if (ddmTemplateId > 0) { |
||||||
if (ddmTemplateId > 0) { |
classNameId = PortalUtil.getClassNameId(DDMTemplate.class); |
||||||
classNameId = PortalUtil.getClassNameId(DDMTemplate.class); |
|
||||||
|
classPK = ddmTemplateId; |
||||||
classPK = ddmTemplateId; |
} |
||||||
} |
%> |
||||||
%> |
|
||||||
|
<liferay-util:buffer var="html"> |
||||||
<liferay-util:buffer var="html"> |
<liferay-ddm:html |
||||||
<liferay-ddm:html |
classNameId="<%= classNameId %>" |
||||||
classNameId="<%= classNameId %>" |
classPK="<%= classPK %>" |
||||||
classPK="<%= classPK %>" |
fields="<%= fields %>" |
||||||
fields="<%= fields %>" |
repeatable="<%= translating ? false : true %>" |
||||||
repeatable="<%= translating ? false : true %>" |
requestedLocale="<%= LocaleUtil.fromLanguageId(languageId) %>" |
||||||
requestedLocale="<%= LocaleUtil.fromLanguageId(languageId) %>" |
/> |
||||||
/> |
</liferay-util:buffer> |
||||||
</liferay-util:buffer> |
|
||||||
|
<%= normalize(html, parameters, fieldNameOptions, renderResponse, prefix, suffix) %> |
||||||
<%= normalize(html, parameters, fieldNameOptions, renderResponse, prefix, suffix) %> |
|
||||||
|
<%! |
||||||
<%! |
private String normalize(String html, Map<String, Serializable> parameters, |
||||||
private String normalize(String html, Map<String, Serializable> parameters, |
Map<String, List<Map<String, Serializable>>> fieldNameOptions, |
||||||
Map<String, List<Map<String, Serializable>>> fieldNameOptions, |
RenderResponse renderResponse, String prefix, String suffix) { |
||||||
RenderResponse renderResponse, String prefix, String suffix) { |
|
||||||
|
if (Validator.isNull(html)) { |
||||||
if (Validator.isNull(html)) { |
return StringPool.BLANK; |
||||||
return StringPool.BLANK; |
} |
||||||
} |
|
||||||
|
// replace portlet namespace + random namespace |
||||||
// replace portlet namespace + random namespace |
html = html.replaceAll("name=\"" + renderResponse.getNamespace(), "name=\""); |
||||||
html = html.replaceAll("name=\"" + renderResponse.getNamespace(), "name=\""); |
|
||||||
|
try { |
||||||
try { |
|
||||||
|
Parser parser = Parser.createParser(html, StringPool.UTF8); |
||||||
Parser parser = Parser.createParser(html, StringPool.UTF8); |
NodeList nodeList = (NodeList) parser.parse(null); |
||||||
NodeList nodeList = (NodeList) parser.parse(null); |
|
||||||
|
for (int i = 0; i < nodeList.size(); i++) { |
||||||
for (int i = 0; i < nodeList.size(); i++) { |
filter(nodeList.elementAt(i), parameters, fieldNameOptions, prefix, suffix); |
||||||
filter(nodeList.elementAt(i), parameters, fieldNameOptions, prefix, suffix); |
} |
||||||
} |
|
||||||
|
html = nodeList.toHtml(); |
||||||
html = nodeList.toHtml(); |
|
||||||
|
} catch (ParserException e) { |
||||||
} catch (ParserException e) { |
} |
||||||
} |
|
||||||
|
// add prefix + suffix |
||||||
// add prefix + suffix |
html = html.replaceAll("name=\"(.*?)\"", "name=\"" + prefix + "$1" + suffix + "\""); |
||||||
html = html.replaceAll("name=\"(.*?)\"", "name=\"" + prefix + "$1" + suffix + "\""); |
|
||||||
|
// ignore ddm fields display |
||||||
// ignore ddm fields display |
html = html.replaceAll("name=\"" + prefix + "_fieldsDisplay" + suffix, "name=\"_fieldsDisplay\""); |
||||||
html = html.replaceAll("name=\"" + prefix + "_fieldsDisplay" + suffix, "name=\"_fieldsDisplay\""); |
|
||||||
|
return html; |
||||||
return html; |
} |
||||||
} |
|
||||||
|
private void filter(Node node, Map<String, Serializable> parameters, |
||||||
private void filter(Node node, Map<String, Serializable> parameters, |
Map<String, List<Map<String, Serializable>>> fieldNameOptions, |
||||||
Map<String, List<Map<String, Serializable>>> fieldNameOptions, |
String prefix, String suffix) { |
||||||
String prefix, String suffix) { |
|
||||||
|
if (node != null) { |
||||||
if (node != null) { |
|
||||||
|
if (node instanceof SelectTag || node instanceof InputTag || node instanceof TextareaTag) { |
||||||
if (node instanceof SelectTag || node instanceof InputTag || node instanceof TextareaTag) { |
|
||||||
|
TagNode tag = (TagNode) node; |
||||||
TagNode tag = (TagNode) node; |
|
||||||
|
String name = tag.getAttribute("name"); |
||||||
String name = tag.getAttribute("name"); |
|
||||||
|
String namespace = getNamespace(node); |
||||||
String namespace = getNamespace(node); |
if (Validator.isNotNull(namespace)) { |
||||||
if (Validator.isNotNull(namespace)) { |
name = name.replaceAll(namespace, StringPool.BLANK); |
||||||
name = name.replaceAll(namespace, StringPool.BLANK); |
tag.setAttribute("name", name); |
||||||
tag.setAttribute("name", name); |
} |
||||||
} |
|
||||||
|
String value = null; |
||||||
String value = null; |
|
||||||
|
if (parameters.containsKey(name)) { |
||||||
if (parameters.containsKey(name)) { |
|
||||||
|
value = parameters.get(name).toString(); |
||||||
value = parameters.get(name).toString(); |
|
||||||
|
if (node instanceof TextareaTag) { |
||||||
if (node instanceof TextareaTag) { |
if (node.getChildren() != null && node.getChildren().size() > 0) { |
||||||
if (node.getChildren() != null && node.getChildren().size() > 0) { |
TextNode text = (TextNode) node.getChildren().elementAt(0); |
||||||
TextNode text = (TextNode) node.getChildren().elementAt(0); |
text.setText(value); |
||||||
text.setText(value); |
} else { |
||||||
} else { |
NodeList nodeList = new NodeList(); |
||||||
NodeList nodeList = new NodeList(); |
nodeList.add(new TextNode(value)); |
||||||
nodeList.add(new TextNode(value)); |
node.setChildren(nodeList); |
||||||
node.setChildren(nodeList); |
} |
||||||
} |
} else if (tag instanceof SelectTag) { |
||||||
} else if (tag instanceof SelectTag) { |
if (node.getChildren() != null && node.getChildren().size() > 0) { |
||||||
if (node.getChildren() != null && node.getChildren().size() > 0) { |
for (int i = 0; i < node.getChildren().size(); i++) { |
||||||
for (int i = 0; i < node.getChildren().size(); i++) { |
if (node.getChildren().elementAt(i) instanceof OptionTag) { |
||||||
if (node.getChildren().elementAt(i) instanceof OptionTag) { |
TagNode optionTag = (TagNode) node.getChildren().elementAt(i); |
||||||
TagNode optionTag = (TagNode) node.getChildren().elementAt(i); |
String optionValue = optionTag.getAttribute("value"); |
||||||
String optionValue = optionTag.getAttribute("value"); |
optionValue = replaceHex(optionValue); |
||||||
optionValue = replaceHex(optionValue); |
String[] values = StringUtil.split(value, StringPool.COMMA); |
||||||
String[] values = StringUtil.split(value, StringPool.COMMA); |
for (String v : values) { |
||||||
for (String v : values) { |
if (StringUtil.trim(v).equals(optionValue)) { |
||||||
if (StringUtil.trim(v).equals(optionValue)) { |
optionTag.setAttribute("selected", "selected"); |
||||||
optionTag.setAttribute("selected", "selected"); |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} else { |
||||||
} else { |
String type = tag.getAttribute("type"); |
||||||
String type = tag.getAttribute("type"); |
if (type.equals("checkbox")) { |
||||||
if (type.equals("checkbox")) { |
value = parameters.get( |
||||||
value = parameters.get( |
StringUtil.replace(name, "Checkbox", StringPool.BLANK)).toString(); |
||||||
StringUtil.replace(name, "Checkbox", StringPool.BLANK)).toString(); |
if (value.equalsIgnoreCase("true")) { |
||||||
if (value.equalsIgnoreCase("true")) { |
tag.setAttribute("checked", "checked"); |
||||||
tag.setAttribute("checked", "checked"); |
} |
||||||
} |
} else if (type.equals("radio")) { |
||||||
} else if (type.equals("radio")) { |
String valueInput = tag.getAttribute("value"); |
||||||
String valueInput = tag.getAttribute("value"); |
valueInput = replaceHex(valueInput); |
||||||
valueInput = replaceHex(valueInput); |
if (value.equals(valueInput)) { |
||||||
if (value.equals(valueInput)) { |
tag.setAttribute("checked", "checked"); |
||||||
tag.setAttribute("checked", "checked"); |
} |
||||||
} |
} else { |
||||||
} else { |
tag.setAttribute("value", value, '"'); |
||||||
tag.setAttribute("value", value, '"'); |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
|
||||||
|
// select singolo o multiplo senza opzioni fisse |
||||||
// select singolo o multiplo senza opzioni fisse |
if (tag instanceof SelectTag) { |
||||||
if (tag instanceof SelectTag) { |
List<Map<String, Serializable>> options = fieldNameOptions.get(name); |
||||||
List<Map<String, Serializable>> options = fieldNameOptions.get(name); |
if (options != null && !options.isEmpty()) { |
||||||
if (options != null && !options.isEmpty()) { |
NodeList optionsTag = new NodeList(); |
||||||
NodeList optionsTag = new NodeList(); |
for (Map<String, Serializable> option : options) { |
||||||
for (Map<String, Serializable> option : options) { |
String label = MapUtil.getString(option, "label"); |
||||||
String label = MapUtil.getString(option, "label"); |
String valueOption = MapUtil.getString(option, "value"); |
||||||
String valueOption = MapUtil.getString(option, "value"); |
boolean defaultValue = MapUtil.getBoolean(option, "default"); |
||||||
boolean defaultValue = MapUtil.getBoolean(option, "default"); |
// new option |
||||||
// new option |
OptionTag optionTag = new OptionTag(); |
||||||
OptionTag optionTag = new OptionTag(); |
optionTag.setAttribute("value", valueOption, '"'); |
||||||
optionTag.setAttribute("value", valueOption, '"'); |
if (defaultValue && !parameters.containsKey(name)) { |
||||||
if (defaultValue && !parameters.containsKey(name)) { |
optionTag.setAttribute("selected", "selected"); |
||||||
optionTag.setAttribute("selected", "selected"); |
} else if (Validator.isNotNull(value) && value.equals(valueOption)) { |
||||||
} else if (Validator.isNotNull(value) && value.equals(valueOption)) { |
optionTag.setAttribute("selected", "selected"); |
||||||
optionTag.setAttribute("selected", "selected"); |
} |
||||||
} |
TextNode textNode = new TextNode(label); |
||||||
TextNode textNode = new TextNode(label); |
NodeList nodeList = new NodeList(); |
||||||
NodeList nodeList = new NodeList(); |
nodeList.add(textNode); |
||||||
nodeList.add(textNode); |
optionTag.setChildren(nodeList); |
||||||
optionTag.setChildren(nodeList); |
optionsTag.add(optionTag); |
||||||
optionsTag.add(optionTag); |
} |
||||||
} |
tag.setChildren(optionsTag); |
||||||
tag.setChildren(optionsTag); |
} |
||||||
} |
} else if ("radio".equals(tag.getAttribute("type"))) { |
||||||
} else if ("radio".equals(tag.getAttribute("type"))) { |
List<Map<String, Serializable>> options = fieldNameOptions.get(name); |
||||||
List<Map<String, Serializable>> options = fieldNameOptions.get(name); |
if(options!=null){ |
||||||
if(options!=null){ |
for (Map<String, Serializable> option : options) { |
||||||
for (Map<String, Serializable> option : options) { |
String label = MapUtil.getString(option, "label"); |
||||||
String label = MapUtil.getString(option, "label"); |
String valueOption = MapUtil.getString(option, "value"); |
||||||
String valueOption = MapUtil.getString(option, "value"); |
boolean defaultValue = MapUtil.getBoolean(option, "default"); |
||||||
boolean defaultValue = MapUtil.getBoolean(option, "default"); |
if(tag.getAttribute("value").equals(valueOption)){ |
||||||
if(tag.getAttribute("value").equals(valueOption)){ |
tag.getNextSibling().setText(label); |
||||||
tag.getNextSibling().setText(label); |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
|
||||||
|
if (node.getChildren() != null) { |
||||||
if (node.getChildren() != null) { |
for (int i = 0; i < node.getChildren().size(); i++) { |
||||||
for (int i = 0; i < node.getChildren().size(); i++) { |
filter(node.getChildren().elementAt(i), parameters, fieldNameOptions, prefix, suffix); |
||||||
filter(node.getChildren().elementAt(i), parameters, fieldNameOptions, prefix, suffix); |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
|
||||||
|
private String getNamespace(Node node) { |
||||||
private String getNamespace(Node node) { |
|
||||||
|
String namespace = null; |
||||||
String namespace = null; |
boolean trovato = false; |
||||||
boolean trovato = false; |
Node parent = node.getParent(); |
||||||
Node parent = node.getParent(); |
|
||||||
|
while (!trovato && parent != null) { |
||||||
while (!trovato && parent != null) { |
if (parent instanceof TagNode) { |
||||||
if (parent instanceof TagNode) { |
TagNode tag = (TagNode) parent; |
||||||
TagNode tag = (TagNode) parent; |
String dataFieldNamespace = tag.getAttribute("data-fieldnamespace"); |
||||||
String dataFieldNamespace = tag.getAttribute("data-fieldnamespace"); |
if (Validator.isNotNull(dataFieldNamespace)) { |
||||||
if (Validator.isNotNull(dataFieldNamespace)) { |
trovato = true; |
||||||
trovato = true; |
namespace = dataFieldNamespace; |
||||||
namespace = dataFieldNamespace; |
} |
||||||
} |
} |
||||||
} |
if (!trovato) { |
||||||
if (!trovato) { |
parent = parent.getParent(); |
||||||
parent = parent.getParent(); |
} |
||||||
} |
} |
||||||
} |
|
||||||
|
return namespace; |
||||||
return namespace; |
} |
||||||
} |
|
||||||
|
private String replaceHex(String s) { |
||||||
private String replaceHex(String s) { |
|
||||||
|
final String prefix = "&#x"; |
||||||
final String prefix = "&#x"; |
final String suffix = ";"; |
||||||
final String suffix = ";"; |
|
||||||
|
int index = 0; |
||||||
int index = 0; |
|
||||||
|
while (true) { |
||||||
while (true) { |
int i = s.indexOf(prefix, index); |
||||||
int i = s.indexOf(prefix, index); |
if (i < 0) { |
||||||
if (i < 0) { |
break; |
||||||
break; |
} else { |
||||||
} else { |
int j = s.indexOf(suffix, i); |
||||||
int j = s.indexOf(suffix, i); |
if (j < 0) { |
||||||
if (j < 0) { |
break; |
||||||
break; |
} else { |
||||||
} else { |
String hexCode = s.substring(i, (j + 1)); |
||||||
String hexCode = s.substring(i, (j + 1)); |
String hex = hexCode.substring(prefix.length(), hexCode.length() - 1); |
||||||
String hex = hexCode.substring(prefix.length(), hexCode.length() - 1); |
try { |
||||||
try { |
s = StringUtil.replace(s, hexCode, |
||||||
s = StringUtil.replace(s, hexCode, |
new String(Hex.decodeHex(hex.toCharArray()), StringPool.UTF8)); |
||||||
new String(Hex.decodeHex(hex.toCharArray()), StringPool.UTF8)); |
} catch (Exception e) {} |
||||||
} catch (Exception e) {} |
index = i; |
||||||
index = i; |
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
|
||||||
|
return s; |
||||||
return s; |
} |
||||||
} |
|
||||||
%> |
%> |
@ -1,296 +1,296 @@ |
|||||||
<%-- |
<%-- |
||||||
/** |
/** |
||||||
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. |
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. |
||||||
* |
* |
||||||
* This library is free software; you can redistribute it and/or modify it under |
* This library is free software; you can redistribute it and/or modify it under |
||||||
* the terms of the GNU Lesser General Public License as published by the Free |
* the terms of the GNU Lesser General Public License as published by the Free |
||||||
* Software Foundation; eitheistrr version 2.1 of the License, or (at your option) |
* Software Foundation; eitheistrr version 2.1 of the License, or (at your option) |
||||||
* any later version. |
* any later version. |
||||||
* |
* |
||||||
* This library is distributed in the hope that it will be useful, but WITHOUT |
* This library is distributed in the hope that it will be useful, but WITHOUT |
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
||||||
* details. |
* details. |
||||||
*/ |
*/ |
||||||
--%> |
--%> |
||||||
|
|
||||||
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> |
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> |
||||||
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> |
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> |
||||||
|
|
||||||
<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> |
<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> |
||||||
|
|
||||||
<% |
<% |
||||||
String randomId = StringPool.BLANK; |
String randomId = StringPool.BLANK; |
||||||
|
|
||||||
String closeRedirect = ParamUtil.getString(request, "closeRedirect"); |
String closeRedirect = ParamUtil.getString(request, "closeRedirect"); |
||||||
|
|
||||||
//boolean canPortosAssegnatore = ParamUtil.getBoolean(request, "canPortosAssegnatore", false); |
//boolean canPortosAssegnatore = ParamUtil.getBoolean(request, "canPortosAssegnatore", false); |
||||||
//boolean canPortosApprovatore = ParamUtil.getBoolean(request, "canPortosApprovatore", false); |
//boolean canPortosApprovatore = ParamUtil.getBoolean(request, "canPortosApprovatore", false); |
||||||
//boolean canPortosIstruttore = ParamUtil.getBoolean(request, "canPortosIstruttore", false); |
//boolean canPortosIstruttore = ParamUtil.getBoolean(request, "canPortosIstruttore", false); |
||||||
boolean canPortosAssegnatore = (Boolean)request.getAttribute("canPortosAssegnatore"); |
boolean canPortosAssegnatore = (Boolean)request.getAttribute("canPortosAssegnatore"); |
||||||
boolean canPortosApprovatore = (Boolean)request.getAttribute("canPortosApprovatore"); |
boolean canPortosApprovatore = (Boolean)request.getAttribute("canPortosApprovatore"); |
||||||
boolean canPortosIstruttore = (Boolean)request.getAttribute("canPortosIstruttore"); |
boolean canPortosIstruttore = (Boolean)request.getAttribute("canPortosIstruttore"); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
||||||
|
|
||||||
String viewFullContentURLString = ParamUtil.getString(request, "viewFullContentURLString"); |
String viewFullContentURLString = ParamUtil.getString(request, "viewFullContentURLString"); |
||||||
|
|
||||||
// ADT BUG BO ID= 27 |
// ADT BUG BO ID= 27 |
||||||
String classPkForCarichiLavoro=ParamUtil.getString(request, "classPkForCarichiLavoro"); |
String classPkForCarichiLavoro=ParamUtil.getString(request, "classPkForCarichiLavoro"); |
||||||
|
|
||||||
WorkflowTask workflowTask = null; |
WorkflowTask workflowTask = null; |
||||||
|
|
||||||
if (row != null) { |
if (row != null) { |
||||||
randomId = StringUtil.randomId(); |
randomId = StringUtil.randomId(); |
||||||
|
|
||||||
workflowTask = (WorkflowTask)row.getParameter("workflowTask"); |
workflowTask = (WorkflowTask)row.getParameter("workflowTask"); |
||||||
} |
} |
||||||
else { |
else { |
||||||
workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_TASK); |
workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_TASK); |
||||||
} |
} |
||||||
|
|
||||||
long[] pooledActorsIds = WorkflowTaskManagerUtil.getPooledActorsIds(company.getCompanyId(), workflowTask.getWorkflowTaskId()); |
long[] pooledActorsIds = WorkflowTaskManagerUtil.getPooledActorsIds(company.getCompanyId(), workflowTask.getWorkflowTaskId()); |
||||||
%> |
%> |
||||||
|
|
||||||
<liferay-ui:icon-menu showExpanded="<%= (row == null) %>" showWhenSingleIcon="<%= (row == null) %>" cssClass="wrap-action"> |
<liferay-ui:icon-menu showExpanded="<%= (row == null) %>" showWhenSingleIcon="<%= (row == null) %>" cssClass="wrap-action"> |
||||||
|
|
||||||
<div class="task-content-actions"> |
<div class="task-content-actions"> |
||||||
<liferay-ui:icon-list> |
<liferay-ui:icon-list> |
||||||
<liferay-ui:icon iconCssClass="icon-eye-open" cssClass="btn btn-large button_custom" message="Visualizza" method="get" target="_blank" url="<%= viewFullContentURLString %>" /> |
<liferay-ui:icon iconCssClass="icon-eye-open" cssClass="btn btn-large button_custom" message="Visualizza" method="get" target="_blank" url="<%= viewFullContentURLString %>" /> |
||||||
</liferay-ui:icon-list> |
</liferay-ui:icon-list> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<c:if test="<%= !workflowTask.isCompleted() && _isAssignedToUser(workflowTask, user) %>"> |
<c:if test="<%= !workflowTask.isCompleted() && _isAssignedToUser(workflowTask, user) %>"> |
||||||
|
|
||||||
<% |
<% |
||||||
List<String> transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); |
List<String> transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); |
||||||
|
|
||||||
for (String transitionName : transitionNames) { |
for (String transitionName : transitionNames) { |
||||||
String message = "proceed"; |
String message = "proceed"; |
||||||
|
|
||||||
if (Validator.isNotNull(transitionName)) { |
if (Validator.isNotNull(transitionName)) { |
||||||
message = transitionName; |
message = transitionName; |
||||||
} |
} |
||||||
%> |
%> |
||||||
|
|
||||||
<% |
<% |
||||||
|
|
||||||
//Non fa nulla ma forse tornera comodo |
//Non fa nulla ma forse tornera comodo |
||||||
boolean canCose = true; |
boolean canCose = true; |
||||||
if(transitionName.equals("registra-esito") && !canPortosIstruttore){ |
if(transitionName.equals("registra-esito") && !canPortosIstruttore){ |
||||||
canCose = false; |
canCose = false; |
||||||
} else if(transitionName.equals("approva") && !canPortosApprovatore){ |
} else if(transitionName.equals("approva") && !canPortosApprovatore){ |
||||||
canCose = false; |
canCose = false; |
||||||
} |
} |
||||||
|
|
||||||
%> |
%> |
||||||
|
|
||||||
<portlet:actionURL var="editURL"> |
<portlet:actionURL var="editURL"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" /> |
<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" /> |
||||||
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SAVE %>" /> |
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.SAVE %>" /> |
||||||
<portlet:param name="redirect" value="<%= currentURL %>" /> |
<portlet:param name="redirect" value="<%= currentURL %>" /> |
||||||
<portlet:param name="closeRedirect" value="<%= closeRedirect %>" /> |
<portlet:param name="closeRedirect" value="<%= closeRedirect %>" /> |
||||||
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
||||||
|
|
||||||
<c:if test="<%= transitionName != null %>"> |
<c:if test="<%= transitionName != null %>"> |
||||||
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
||||||
</c:if> |
</c:if> |
||||||
</portlet:actionURL> |
</portlet:actionURL> |
||||||
|
|
||||||
<portlet:renderURL var="renderFormURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> |
<portlet:renderURL var="renderFormURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/render_form_task" /> |
<portlet:param name="struts_action" value="/workflow_tasks/render_form_task" /> |
||||||
<portlet:param name="formName" value='<%= "fm_"+ randomId %>' /> |
<portlet:param name="formName" value='<%= "fm_"+ randomId %>' /> |
||||||
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
||||||
|
|
||||||
<c:if test="<%= transitionName != null %>"> |
<c:if test="<%= transitionName != null %>"> |
||||||
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
||||||
</c:if> |
</c:if> |
||||||
</portlet:renderURL> |
</portlet:renderURL> |
||||||
|
|
||||||
<portlet:resourceURL var="validationURL"> |
<portlet:resourceURL var="validationURL"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/render_form_task" /> |
<portlet:param name="struts_action" value="/workflow_tasks/render_form_task" /> |
||||||
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
<portlet:param name="assigneeUserId" value="<%= StringUtil.valueOf(workflowTask.getAssigneeUserId()) %>" /> |
||||||
|
|
||||||
<c:if test="<%= transitionName != null %>"> |
<c:if test="<%= transitionName != null %>"> |
||||||
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
<portlet:param name="transitionName" value="<%= transitionName %>" /> |
||||||
</c:if> |
</c:if> |
||||||
</portlet:resourceURL> |
</portlet:resourceURL> |
||||||
|
|
||||||
<% |
<% |
||||||
Map<String, Object> data = new HashMap<String, Object>(); |
Map<String, Object> data = new HashMap<String, Object>(); |
||||||
|
|
||||||
data.put("href-validation", validationURL); |
data.put("href-validation", validationURL); |
||||||
data.put("href-render-form", renderFormURL); |
data.put("href-render-form", renderFormURL); |
||||||
%> |
%> |
||||||
|
|
||||||
<liferay-ui:icon |
<liferay-ui:icon |
||||||
iconCssClass="icon-random" |
iconCssClass="icon-random" |
||||||
linkCssClass='<%= "workflow-task-" + randomId + " task-change-status-link btn btn-large button_custom" %>' |
linkCssClass='<%= "workflow-task-" + randomId + " task-change-status-link btn btn-large button_custom" %>' |
||||||
id='<%= randomId + transitionName + "taskChangeStatusLink" %>' |
id='<%= randomId + transitionName + "taskChangeStatusLink" %>' |
||||||
message="<%= message %>" |
message="<%= message %>" |
||||||
method="get" |
method="get" |
||||||
url="<%= editURL %>" |
url="<%= editURL %>" |
||||||
data="<%= data %>" |
data="<%= data %>" |
||||||
/> |
/> |
||||||
|
|
||||||
<% |
<% |
||||||
} |
} |
||||||
%> |
%> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</c:if> |
</c:if> |
||||||
|
|
||||||
<c:if test='<%= !workflowTask.isCompleted() && !_isAssignedToUser(workflowTask, user) && !workflowTask.getName().equalsIgnoreCase("esito") && canPortosAssegnatore%>'> |
<c:if test='<%= !workflowTask.isCompleted() && !_isAssignedToUser(workflowTask, user) && !workflowTask.getName().equalsIgnoreCase("esito") && canPortosAssegnatore%>'> |
||||||
<portlet:actionURL var="assignToMeURL"> |
<portlet:actionURL var="assignToMeURL"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" /> |
<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" /> |
||||||
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" /> |
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" /> |
||||||
<portlet:param name="redirect" value="<%= currentURL %>" /> |
<portlet:param name="redirect" value="<%= currentURL %>" /> |
||||||
<portlet:param name="closeRedirect" value="<%= closeRedirect %>" /> |
<portlet:param name="closeRedirect" value="<%= closeRedirect %>" /> |
||||||
<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
<portlet:param name="assigneeUserId" value="<%= String.valueOf(user.getUserId()) %>" /> |
<portlet:param name="assigneeUserId" value="<%= String.valueOf(user.getUserId()) %>" /> |
||||||
</portlet:actionURL> |
</portlet:actionURL> |
||||||
|
|
||||||
<liferay-ui:icon |
<liferay-ui:icon |
||||||
iconCssClass="icon-reply" |
iconCssClass="icon-reply" |
||||||
linkCssClass='<%= "workflow-task-" + randomId + " task-assign-to-me-link btn btn-large button_custom btn-action" %>' |
linkCssClass='<%= "workflow-task-" + randomId + " task-assign-to-me-link btn btn-large button_custom btn-action" %>' |
||||||
id='<%= randomId + "taskAssignToMeLink" %>' |
id='<%= randomId + "taskAssignToMeLink" %>' |
||||||
message="assign-to-me" |
message="assign-to-me" |
||||||
method="get" |
method="get" |
||||||
url="<%= assignToMeURL %>" |
url="<%= assignToMeURL %>" |
||||||
/> |
/> |
||||||
</c:if> |
</c:if> |
||||||
|
|
||||||
<c:if test="<%= _hasOtherAssignees(pooledActorsIds, workflowTask, user) %>"> |
<c:if test="<%= _hasOtherAssignees(pooledActorsIds, workflowTask, user) %>"> |
||||||
<portlet:actionURL var="assignURL"> |
<portlet:actionURL var="assignURL"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" /> |
<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" /> |
||||||
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" /> |
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.ASSIGN %>" /> |
||||||
<portlet:param name="redirect" value="<%= currentURL %>" /> |
<portlet:param name="redirect" value="<%= currentURL %>" /> |
||||||
<portlet:param name="closeRedirect" value="<%= closeRedirect %>" /> |
<portlet:param name="closeRedirect" value="<%= closeRedirect %>" /> |
||||||
<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= String.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
<!-- ADT BUG BO id = 27 --> |
<!-- ADT BUG BO id = 27 --> |
||||||
<portlet:param name="classPkForCarichiLavoro" value="<%= classPkForCarichiLavoro %>" /> |
<portlet:param name="classPkForCarichiLavoro" value="<%= classPkForCarichiLavoro %>" /> |
||||||
|
|
||||||
</portlet:actionURL> |
</portlet:actionURL> |
||||||
|
|
||||||
<liferay-ui:icon |
<liferay-ui:icon |
||||||
iconCssClass="icon-share-alt" |
iconCssClass="icon-share-alt" |
||||||
linkCssClass='<%= "workflow-task-" + randomId + " task-assign-link btn btn-large button_custom" %>' |
linkCssClass='<%= "workflow-task-" + randomId + " task-assign-link btn btn-large button_custom" %>' |
||||||
id='<%= randomId + "taskAssignLink" %>' |
id='<%= randomId + "taskAssignLink" %>' |
||||||
message="assign-to-..." |
message="assign-to-..." |
||||||
method="get" |
method="get" |
||||||
url="<%= assignURL %>" |
url="<%= assignURL %>" |
||||||
/> |
/> |
||||||
</c:if> |
</c:if> |
||||||
|
|
||||||
<%-- <c:if test="<%= !workflowTask.isCompleted() %>"> |
<%-- <c:if test="<%= !workflowTask.isCompleted() %>"> |
||||||
<portlet:actionURL var="updateDueDateURL"> |
<portlet:actionURL var="updateDueDateURL"> |
||||||
<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" /> |
<portlet:param name="struts_action" value="/workflow_tasks/edit_workflow_task" /> |
||||||
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" /> |
<portlet:param name="<%= Constants.CMD %>" value="<%= Constants.UPDATE %>" /> |
||||||
<portlet:param name="redirect" value="<%= currentURL %>" /> |
<portlet:param name="redirect" value="<%= currentURL %>" /> |
||||||
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
<portlet:param name="workflowTaskId" value="<%= StringUtil.valueOf(workflowTask.getWorkflowTaskId()) %>" /> |
||||||
</portlet:actionURL> |
</portlet:actionURL> |
||||||
|
|
||||||
<liferay-ui:icon |
<liferay-ui:icon |
||||||
cssClass='<%= "workflow-task-" + randomId + " task-due-date-link" %>' |
cssClass='<%= "workflow-task-" + randomId + " task-due-date-link" %>' |
||||||
id='<%= randomId + "taskDueDateLink" %>' |
id='<%= randomId + "taskDueDateLink" %>' |
||||||
image="time" |
image="time" |
||||||
message="update-due-date" |
message="update-due-date" |
||||||
method="get" |
method="get" |
||||||
url="<%= updateDueDateURL %>" |
url="<%= updateDueDateURL %>" |
||||||
/> |
/> |
||||||
</c:if> --%> |
</c:if> --%> |
||||||
</liferay-ui:icon-menu> |
</liferay-ui:icon-menu> |
||||||
|
|
||||||
<%-- <div class="hide" id="<%= randomId %>updateAsignee"> |
<%-- <div class="hide" id="<%= randomId %>updateAsignee"> |
||||||
<c:if test="<%= _hasOtherAssignees(pooledActorsIds, workflowTask, user) %>"> |
<c:if test="<%= _hasOtherAssignees(pooledActorsIds, workflowTask, user) %>"> |
||||||
<aui:select label="assign-to" name="assigneeUserId"> |
<aui:select label="assign-to" name="assigneeUserId"> |
||||||
|
|
||||||
<% |
<% |
||||||
for (long pooledActorId : pooledActorsIds) { |
for (long pooledActorId : pooledActorsIds) { |
||||||
if (pooledActorId == user.getUserId()) { |
if (pooledActorId == user.getUserId()) { |
||||||
continue; |
continue; |
||||||
} |
} |
||||||
%> |
%> |
||||||
|
|
||||||
<aui:option label="<%= HtmlUtil.escape(PortalUtil.getUserName(pooledActorId, StringPool.BLANK)) %>" selected="<%= workflowTask.getAssigneeUserId() == pooledActorId %>" value="<%= String.valueOf(pooledActorId) %>" /> |
<aui:option label="<%= HtmlUtil.escape(PortalUtil.getUserName(pooledActorId, StringPool.BLANK)) %>" selected="<%= workflowTask.getAssigneeUserId() == pooledActorId %>" value="<%= String.valueOf(pooledActorId) %>" /> |
||||||
|
|
||||||
<% |
<% |
||||||
} |
} |
||||||
%> |
%> |
||||||
|
|
||||||
</aui:select> |
</aui:select> |
||||||
</c:if> |
</c:if> |
||||||
</div> --%> |
</div> --%> |
||||||
|
|
||||||
<div class="hide" id="<%= randomId %>updateAsigneeToMe"> |
<div class="hide" id="<%= randomId %>updateAsigneeToMe"> |
||||||
<aui:input name="asigneeUserId" type="hidden" value="<%= user.getUserId() %>" /> |
<aui:input name="asigneeUserId" type="hidden" value="<%= user.getUserId() %>" /> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<div class="hide" id="<%= randomId %>updateDueDate"> |
<div class="hide" id="<%= randomId %>updateDueDate"> |
||||||
<aui:input bean="<%= workflowTask %>" model="<%= WorkflowTask.class %>" name="dueDate" /> |
<aui:input bean="<%= workflowTask %>" model="<%= WorkflowTask.class %>" name="dueDate" /> |
||||||
</div> |
</div> |
||||||
<div class="hide" id="<%= randomId %>updateComments"> |
<div class="hide" id="<%= randomId %>updateComments"> |
||||||
<%-- hook tref-ekaleo --%> |
<%-- hook tref-ekaleo --%> |
||||||
<div id="<%= randomId %>formError"></div> |
<div id="<%= randomId %>formError"></div> |
||||||
<div id="<%= randomId %>form"></div> |
<div id="<%= randomId %>form"></div> |
||||||
<aui:input cols="105" name="comment" rows="10" type="textarea" required="true" /> |
<aui:input cols="105" name="comment" rows="10" type="textarea" required="true" /> |
||||||
</div> |
</div> |
||||||
|
|
||||||
<%-- hook tref-ekaleo --%> |
<%-- hook tref-ekaleo --%> |
||||||
<aui:script use="liferay-workflow-tasks,aui-io-plugin-deprecated"> |
<aui:script use="liferay-workflow-tasks,aui-io-plugin-deprecated"> |
||||||
var onTaskClickFn = A.rbind('onTaskClick', Liferay.WorkflowTasks, '<%= randomId %>'); |
var onTaskClickFn = A.rbind('onTaskClick', Liferay.WorkflowTasks, '<%= randomId %>'); |
||||||
|
|
||||||
<c:if test="<%= !workflowTask.isCompleted() && _isAssignedToUser(workflowTask, user) %>"> |
<c:if test="<%= !workflowTask.isCompleted() && _isAssignedToUser(workflowTask, user) %>"> |
||||||
|
|
||||||
var renderFormFn = A.rbind('renderForm', Liferay.WorkflowTasks, '<%= randomId %>'); |
var renderFormFn = A.rbind('renderForm', Liferay.WorkflowTasks, '<%= randomId %>'); |
||||||
|
|
||||||
<% |
<% |
||||||
List<String> transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); |
List<String> transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); |
||||||
|
|
||||||
for (String transitionName : transitionNames) { |
for (String transitionName : transitionNames) { |
||||||
String message = "proceed"; |
String message = "proceed"; |
||||||
|
|
||||||
if (Validator.isNotNull(transitionName)) { |
if (Validator.isNotNull(transitionName)) { |
||||||
message = transitionName; |
message = transitionName; |
||||||
} |
} |
||||||
%> |
%> |
||||||
|
|
||||||
Liferay.delegateClick('<portlet:namespace /><%= randomId + transitionName %>taskChangeStatusLink', renderFormFn); |
Liferay.delegateClick('<portlet:namespace /><%= randomId + transitionName %>taskChangeStatusLink', renderFormFn); |
||||||
|
|
||||||
<% |
<% |
||||||
} |
} |
||||||
%> |
%> |
||||||
|
|
||||||
</c:if> |
</c:if> |
||||||
|
|
||||||
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignToMeLink', onTaskClickFn); |
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignToMeLink', onTaskClickFn); |
||||||
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignLink', onTaskClickFn); |
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskAssignLink', onTaskClickFn); |
||||||
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskDueDateLink', onTaskClickFn); |
Liferay.delegateClick('<portlet:namespace /><%= randomId %>taskDueDateLink', onTaskClickFn); |
||||||
</aui:script> |
</aui:script> |
||||||
|
|
||||||
|
|
||||||
<style> |
<style> |
||||||
.wrap-action { |
.wrap-action { |
||||||
list-style: none; |
list-style: none; |
||||||
display: -webkit-box; |
display: -webkit-box; |
||||||
display: -ms-flexbox; |
display: -ms-flexbox; |
||||||
display: flex; |
display: flex; |
||||||
-webkit-box-align: center; |
-webkit-box-align: center; |
||||||
-ms-flex-align: center; |
-ms-flex-align: center; |
||||||
align-items: center; |
align-items: center; |
||||||
-ms-flex-wrap: wrap; |
-ms-flex-wrap: wrap; |
||||||
flex-wrap: wrap; |
flex-wrap: wrap; |
||||||
} |
} |
||||||
.wrap-action .btn { |
.wrap-action .btn { |
||||||
margin: 2px; |
margin: 2px; |
||||||
} |
} |
||||||
.button_custom { |
.button_custom { |
||||||
min-width: 140px!important; |
min-width: 140px!important; |
||||||
} |
} |
||||||
</style> |
</style> |
Caricamento…
Reference in new issue