Sfoglia il codice sorgente

Permessi file allegati manuali

Salvatore La Manna 4 anni fa
parent
commit
68e67d8bd1
  1. BIN
      liferay-plugins-sdk-6.2/.ivy/ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar
  2. 8
      liferay-plugins-sdk-6.2/build.properties
  3. 11
      liferay-plugins-sdk-6.2/ivy-settings.xml
  4. 28
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java
  5. 83
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java
  6. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java
  7. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java
  8. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java
  9. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocAggiuntivaLocalServiceImpl.java
  10. 186
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java
  11. 3
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java
  12. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java
  13. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java
  14. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  15. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp
  16. 4
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/service.properties
  17. 2
      liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp
  18. 126
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view_accordion.jsp
  19. 2
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_fascicolo.jsp
  20. 458
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/common/save_actions.jspf

BIN
liferay-plugins-sdk-6.2/.ivy/ivy-2.4.0.jar → liferay-plugins-sdk-6.2/.ivy/ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar

File binario non mostrato.

8
liferay-plugins-sdk-6.2/build.properties

@ -337,8 +337,8 @@
ivy.custom.settings.file=${sdk.dir}/ivy-settings.xml ivy.custom.settings.file=${sdk.dir}/ivy-settings.xml
ivy.home=${sdk.dir}/.ivy ivy.home=${sdk.dir}/.ivy
ivy.jar.url=http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar #ivy.jar.url=http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar
#ivy.jar.url=http://cdn.repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar ivy.jar.url=https://cdn.lfrs.sl/repository.liferay.com/nexus/content/repositories/liferay-public-snapshots/com/liferay/org.apache.ivy/${ivy.version}/org.apache.ivy-${ivy.version}.jar
ivy.log.level=quiet ivy.log.level=quiet
ivy.pom.developer.name=Brian Wing Shun Chan ivy.pom.developer.name=Brian Wing Shun Chan
@ -352,8 +352,8 @@
ivy.resolve.transitive.dependencies=true ivy.resolve.transitive.dependencies=true
ivy.resolve.transitive.dependencies.test=true ivy.resolve.transitive.dependencies.test=true
ivy.version=2.4.0 #ivy.version=2.4.0
#ivy.version=2.4.0.LIFERAY-PATCHED-1-SNAPSHOT ivy.version=2.4.0.LIFERAY-PATCHED-1-SNAPSHOT
## ##
## JMX ## JMX

11
liferay-plugins-sdk-6.2/ivy-settings.xml

@ -2,13 +2,20 @@
<settings defaultResolver="default" /> <settings defaultResolver="default" />
<resolvers> <resolvers>
<ibiblio m2compatible="true" name="liferay-public" root="http://repository.liferay.com/nexus/content/groups/public" /> <ibiblio m2compatible="true" name="liferay-public" root="https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public" />
<ibiblio m2compatible="true" name="local-m2" root="file://${user.home}/.m2/repository" /> <ibiblio m2compatible="true" name="local-m2" root="file://${user.home}/.m2/repository" />
<ibiblio m2compatible="true" name="io.spring.repo.maven.release" root="http://repo.spring.io/release/"/>
<chain dual="true" name="default"> <chain dual="true" name="default">
<resolver ref="local-m2" /> <resolver ref="local-m2" />
<resolver ref="liferay-public" /> <resolver ref="liferay-public" />
<resolver ref="io.spring.repo.maven.release" />
</chain> </chain>
</resolvers> </resolvers>
<repositories>
<repository>
<id>org.opensaml</id>
<url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
</repository>
</repositories>
</ivysettings> </ivysettings>

28
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java

@ -46,8 +46,8 @@ public class AllegatiManualiPortlet extends MVCPortlet {
private Log _log = LogFactoryUtil.getLog(AllegatiManualiPortlet.class); private Log _log = LogFactoryUtil.getLog(AllegatiManualiPortlet.class);
public void uploadAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException, public void uploadAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse)
SystemException { throws PortalException, SystemException {
try { try {
UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest); UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest); ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest);
@ -72,9 +72,9 @@ public class AllegatiManualiPortlet extends MVCPortlet {
if (Validator.isNotNull(intPraticaId) && Validator.isNotNull(dettPraticaId)) { if (Validator.isNotNull(intPraticaId) && Validator.isNotNull(dettPraticaId)) {
byte[] content = FileUtil.getBytes(file); byte[] content = FileUtil.getBytes(file);
AllegatoManuale allegatoManuale = AllegatoManualeLocalServiceUtil
AllegatoManualeLocalServiceUtil.addAllegatoManuale(serviceContext.getUserId(), intPraticaId, .addAllegatoManuale(serviceContext.getUserId(), intPraticaId, dettPraticaId,
dettPraticaId, descrizione, content, sourceFileName, serviceContext); descrizione, content, sourceFileName, serviceContext);
} }
} }
@ -87,14 +87,15 @@ public class AllegatiManualiPortlet extends MVCPortlet {
} }
public void deleteAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { public void deleteAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
long allegatoManualeId = ParamUtil.getLong(actionRequest, "allegatoManualeId"); long allegatoManualeId = ParamUtil.getLong(actionRequest, "allegatoManualeId");
AllegatoManualeServiceUtil.deleteAllegatoManuale(allegatoManualeId); AllegatoManualeServiceUtil.deleteAllegatoManuale(allegatoManualeId);
} }
@Override @Override
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException, public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse)
PortletException { throws IOException, PortletException {
String id = resourceRequest.getResourceID(); String id = resourceRequest.getResourceID();
@ -110,8 +111,8 @@ public class AllegatiManualiPortlet extends MVCPortlet {
InputStream inputStream = null; InputStream inputStream = null;
try { try {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId()); FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId());
inputStream = inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), fileEntry.getVersion(), false); fileEntry.getVersion(), false);
String name = fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension(); String name = fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension();
zipWriter.addEntry(name, inputStream); zipWriter.addEntry(name, inputStream);
@ -127,8 +128,8 @@ public class AllegatiManualiPortlet extends MVCPortlet {
resourceResponse.setContentType(ContentTypes.APPLICATION_ZIP); resourceResponse.setContentType(ContentTypes.APPLICATION_ZIP);
resourceResponse.addProperty(HttpHeaders.CACHE_CONTROL, "max-age=3600, must-revalidate"); resourceResponse.addProperty(HttpHeaders.CACHE_CONTROL, "max-age=3600, must-revalidate");
resourceResponse resourceResponse.addProperty(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\""
.addProperty(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\""); + file.getName() + "\"");
resourceResponse.setContentLength(data.length); resourceResponse.setContentLength(data.length);
resourceResponse.getPortletOutputStream().write(data); resourceResponse.getPortletOutputStream().write(data);
@ -143,8 +144,7 @@ public class AllegatiManualiPortlet extends MVCPortlet {
FilesImporter.importaFile(classPk, className); FilesImporter.importaFile(classPk, className);
PortletResponseUtil PortletResponseUtil
.write( .write(resourceResponse,
resourceResponse,
"<p style='margin-bottom:20px'><strong>Completato</strong></p><a href='#' class='btn btn-success' onclick=\"Liferay.Portlet.refresh('#p_p_id_" "<p style='margin-bottom:20px'><strong>Completato</strong></p><a href='#' class='btn btn-success' onclick=\"Liferay.Portlet.refresh('#p_p_id_"
+ PortletKeys.FASCICOLOFE + "_')\">Refresh</a>"); + PortletKeys.FASCICOLOFE + "_')\">Refresh</a>");

83
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/SismicaAdministrationPortlet.java

@ -7,6 +7,7 @@ import it.tref.liferay.portos.bo.model.ControlloPratica;
import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DettPratica;
import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.DocPratica;
import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.IntPratica;
import it.tref.liferay.portos.bo.model.Pagamento;
import it.tref.liferay.portos.bo.model.Sorteggio; import it.tref.liferay.portos.bo.model.Sorteggio;
import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.model.Territorio;
import it.tref.liferay.portos.bo.service.ConfigurazioneLocalService; import it.tref.liferay.portos.bo.service.ConfigurazioneLocalService;
@ -17,6 +18,7 @@ import it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.DocPraticaLocalService; import it.tref.liferay.portos.bo.service.DocPraticaLocalService;
import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil;
import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil;
import it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil; import it.tref.liferay.portos.bo.service.SorteggioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.persistence.DocPraticaPersistenceImpl; import it.tref.liferay.portos.bo.service.persistence.DocPraticaPersistenceImpl;
@ -96,13 +98,21 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
public void sostituisciDL(ActionRequest actionRequest, ActionResponse actionResponse) throws SystemException, PortalException, IOException { public void sostituisciDL(ActionRequest actionRequest, ActionResponse actionResponse) throws SystemException, PortalException, IOException {
SismicaUtil.sostituisciDL(actionRequest, actionResponse); SismicaUtil.sostituisciDL(actionRequest, actionResponse);
Long userId = null; long userId = 0;
String title = null; String title = null;
String description = null; String description = null;
String mimeType = null; String mimeType = null;
String changeLog = StringPool.BLANK; String changeLog = StringPool.BLANK;
FileEntry fileEntry = null; FileEntry fileEntry = null;
Date now = new Date(); Date now = new Date();
long companyId = 0;
long groupId = 0;
long defaultFolderId = 0;
Folder defaultFolder = null;
String folderName = null;
byte[] bytes = null;
long folderId = 0;
long repositoryId = 0;
ServiceContext serviceContext = new ServiceContext(); ServiceContext serviceContext = new ServiceContext();
String className = ParamUtil.getString(actionRequest, "className"); String className = ParamUtil.getString(actionRequest, "className");
@ -117,18 +127,18 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
case "it.tref.liferay.portos.bo.model.DocPratica": case "it.tref.liferay.portos.bo.model.DocPratica":
DocPratica pratica = DocPraticaLocalServiceUtil.getDocPratica(idOggetto); DocPratica pratica = DocPraticaLocalServiceUtil.getDocPratica(idOggetto);
userId = pratica.getUserId(); userId = pratica.getUserId();
long companyId = pratica.getCompanyId(); companyId = pratica.getCompanyId();
long groupId = pratica.getGroupId(); groupId = pratica.getGroupId();
serviceContext.setCompanyId(companyId); serviceContext.setCompanyId(companyId);
serviceContext.setScopeGroupId(groupId); serviceContext.setScopeGroupId(groupId);
serviceContext.setUserId(userId); serviceContext.setUserId(userId);
long defaultFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID); defaultFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
Folder defaultFolder = DLAppLocalServiceUtil.getFolder(defaultFolderId); defaultFolder = DLAppLocalServiceUtil.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(pratica.getClassPk()); folderName = PraticaUtil.getFolderName(pratica.getClassPk());
long folderId = defaultFolder.getFolderId(); folderId = defaultFolder.getFolderId();
long repositoryId = defaultFolder.getRepositoryId(); repositoryId = defaultFolder.getRepositoryId();
try { try {
folder = DLAppLocalServiceUtil.getFolder(repositoryId, folderId, folderName); folder = DLAppLocalServiceUtil.getFolder(repositoryId, folderId, folderName);
@ -137,16 +147,16 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
StringPool.BLANK, serviceContext); StringPool.BLANK, serviceContext);
} }
byte[] bytes = FileUtil.getBytes(file); bytes = FileUtil.getBytes(file);
title = pratica.getTipologia() + StringPool.UNDERLINE + sourceFileName; title = pratica.getTipologia() + StringPool.UNDERLINE + sourceFileName;
description = sourceFileName; description = sourceFileName;
mimeType = MimeTypesUtil.getContentType(sourceFileName); mimeType = MimeTypesUtil.getContentType(sourceFileName);
try { /*try {
DLAppLocalServiceUtil.deleteFileEntry(pratica.getDlFileEntryId()); DLAppLocalServiceUtil.deleteFileEntry(pratica.getDlFileEntryId());
} catch(PortalException e){ } catch(PortalException e){
} }*/
try { try {
fileEntry = DLAppLocalServiceUtil.getFileEntry(pratica.getDlFileEntryId()); fileEntry = DLAppLocalServiceUtil.getFileEntry(pratica.getDlFileEntryId());
@ -158,13 +168,60 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
mimeType, title, description, changeLog, bytes, serviceContext); mimeType, title, description, changeLog, bytes, serviceContext);
} }
/*fileEntry = DLAppLocalServiceUtil.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_"
+ sourceFileName, mimeType, title, description, changeLog, bytes, serviceContext);*/
pratica.setDlFileEntryId(fileEntry.getFileEntryId()); pratica.setDlFileEntryId(fileEntry.getFileEntryId());
pratica.setSha256(DigestUtils.sha256Hex(bytes)); pratica.setSha256(DigestUtils.sha256Hex(bytes));
DocPraticaLocalServiceUtil.updateDocPratica(pratica); DocPraticaLocalServiceUtil.updateDocPratica(pratica);
break; break;
case "it.tref.liferay.portos.bo.model.Pagamento":
Pagamento pagamento = PagamentoLocalServiceUtil.getPagamento(idOggetto);
userId = pagamento.getUserId();
companyId = pagamento.getCompanyId();
groupId = pagamento.getGroupId();
serviceContext.setCompanyId(companyId);
serviceContext.setScopeGroupId(groupId);
serviceContext.setUserId(userId);
defaultFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
defaultFolder = DLAppLocalServiceUtil.getFolder(defaultFolderId);
folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
folderId = defaultFolder.getFolderId();
repositoryId = defaultFolder.getRepositoryId();
try {
folder = DLAppLocalServiceUtil.getFolder(repositoryId, folderId, folderName);
} catch (NoSuchFolderException e) {
folder = DLAppLocalServiceUtil.addFolder(userId, repositoryId, folderId, folderName,
StringPool.BLANK, serviceContext);
}
bytes = FileUtil.getBytes(file);
title = now.getTime() + StringPool.UNDERLINE + "pagamento_manuale" + StringPool.UNDERLINE
+ pagamento.getPagamentoId() + StringPool.UNDERLINE + sourceFileName;
description = StringPool.BLANK;
mimeType = MimeTypesUtil.getContentType(sourceFileName);
/*try {
DLAppLocalServiceUtil.deleteFileEntry(pagamento.getFileEntryId());
} catch(PortalException e){
}*/
try {
fileEntry = DLAppLocalServiceUtil.getFileEntry(pagamento.getFileEntryId());
fileEntry = DLAppLocalServiceUtil.updateFileEntry(userId, fileEntry.getFileEntryId(),
now.getTime() + "_" + sourceFileName, mimeType, title, description, changeLog, false, bytes,
serviceContext);
} catch (PortalException e) {
fileEntry = DLAppLocalServiceUtil.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_" + sourceFileName,
mimeType, title, description, changeLog, bytes, serviceContext);
}
pagamento.setFileEntryId(fileEntry.getFileEntryId());
PagamentoLocalServiceUtil.updatePagamento(pagamento);
break;
default: default:
break; break;

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AllegatoManualeLocalServiceImpl.java

@ -34,6 +34,7 @@ import com.liferay.portal.kernel.util.MimeTypesUtil;
import com.liferay.portal.kernel.util.OrderByComparator; import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil; import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@ -121,6 +122,7 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId); Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId()); String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null; Folder folder = null;
try { try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName); folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java

@ -63,6 +63,7 @@ import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
@ -577,6 +578,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId()); String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null; Folder folder = null;
try { try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AvvisoLocalServiceImpl.java

@ -62,6 +62,7 @@ import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
@ -982,7 +983,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
dynamicQuery.add(RestrictionsFactoryUtil.eq("fileEntryIdInvio", 0l)); dynamicQuery.add(RestrictionsFactoryUtil.eq("fileEntryIdInvio", 0l));
dynamicQuery.add(RestrictionsFactoryUtil.ne("fileEntryIdBase", 0l)); dynamicQuery.add(RestrictionsFactoryUtil.ne("fileEntryIdBase", 0l));
dynamicQuery.add(RestrictionsFactoryUtil.eq("rifiutato", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("rifiutato", false));
List avvisi = avvisoPersistence.findWithDynamicQuery(dynamicQuery); List<Avviso> avvisi = avvisoPersistence.findWithDynamicQuery(dynamicQuery);
return avvisi; return avvisi;
} }
@ -1083,6 +1084,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
if (Validator.isNotNull(folder)) { if (Validator.isNotNull(folder)) {
byte[] bytes = Base64.decode(fileToSave); byte[] bytes = Base64.decode(fileToSave);
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(), FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(),
folder.getRepositoryId(), folderId, fileName, folder.getRepositoryId(), folderId, fileName,
MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m", "", "", bytes, MimeTypesUtil.getContentType(fileName + ".p7m"), fileName + ".p7m", "", "", bytes,

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocAggiuntivaLocalServiceImpl.java

@ -31,6 +31,7 @@ import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@ -141,6 +142,8 @@ public class DocAggiuntivaLocalServiceImpl extends DocAggiuntivaLocalServiceBase
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId); Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId()); String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null; Folder folder = null;
try { try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName); folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);

186
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DocPraticaLocalServiceImpl.java

@ -45,6 +45,7 @@ import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants; import com.liferay.portal.kernel.workflow.WorkflowConstants;
import com.liferay.portal.model.RoleConstants; import com.liferay.portal.model.RoleConstants;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil; import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil;
import com.liferay.portal.security.permission.PermissionThreadLocal; import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.RoleLocalServiceUtil;
@ -57,13 +58,14 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
* The implementation of the doc pratica local service. * The implementation of the doc pratica local service.
* *
* <p> * <p>
* All custom service methods should be put in this class. Whenever methods are added, rerun * All custom service methods should be put in this class. Whenever methods are
* ServiceBuilder to copy their definitions into the * added, rerun ServiceBuilder to copy their definitions into the
* {@link it.tref.liferay.portos.bo.service.DocPraticaLocalService} interface. * {@link it.tref.liferay.portos.bo.service.DocPraticaLocalService} interface.
* *
* <p> * <p>
* This is a local service. Methods of this service will not have security checks based on the * This is a local service. Methods of this service will not have security
* propagated JAAS credentials because this service can only be accessed from within the same VM. * checks based on the propagated JAAS credentials because this service can only
* be accessed from within the same VM.
* </p> * </p>
* *
* @author Davide Barbagallo, 3F Consulting * @author Davide Barbagallo, 3F Consulting
@ -72,9 +74,9 @@ import com.liferay.portlet.documentlibrary.NoSuchFolderException;
*/ */
public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl { public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
/* /*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
* it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil} to access the doc pratica local * {@link it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil} to
* service. * access the doc pratica local service.
*/ */
private Log _log = LogFactoryUtil.getLog(DocPraticaLocalServiceImpl.class); private Log _log = LogFactoryUtil.getLog(DocPraticaLocalServiceImpl.class);
@ -100,21 +102,22 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return deleteDocPratica(docPraticaLocalService.getDocPratica(docPraticaId)); return deleteDocPratica(docPraticaLocalService.getDocPratica(docPraticaId));
} }
public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId, byte[] dlFileEntry, public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId,
String fileName, String version, boolean praticaValidata, String descLong, String tipologia, String sha256, byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong,
boolean aggiornato, String jsonFirmatari, long dettPraticaIdRimozione, Date dtDataRimozione, String tipologia, String sha256, boolean aggiornato, String jsonFirmatari,
ServiceContext serviceContext) throws PortalException, SystemException { long dettPraticaIdRimozione, Date dtDataRimozione, ServiceContext serviceContext)
throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId); User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date(); Date now = new Date();
validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry, fileName, version, validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry,
praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari, dettPraticaIdRimozione, fileName, version, praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari,
dtDataRimozione); dettPraticaIdRimozione, dtDataRimozione);
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName())); .getName()));
FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia); FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
@ -146,15 +149,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica; return docPratica;
} }
public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId, byte[] dlFileEntry, public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId,
String fileName, String tipologia, String jsonFirmatari, ServiceContext serviceContext) throws PortalException, byte[] dlFileEntry, String fileName, String tipologia, String jsonFirmatari,
SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId); User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date(); Date now = new Date();
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName())); DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia); FileEntry fileEntry = addAttachment(classPk, intPraticaId, userId, fileName, dlFileEntry, tipologia);
@ -185,15 +189,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica; return docPratica;
} }
public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId, long fileEntryId, public DocPratica addDocPratica(long userId, String className, long classPk, long intPraticaId,
String fileName, String tipologia, String jsonFirmatari, ServiceContext serviceContext) throws PortalException, long fileEntryId, String fileName, String tipologia, String jsonFirmatari,
SystemException { ServiceContext serviceContext) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId); User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date(); Date now = new Date();
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName())); DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
docPratica.setCompanyId(serviceContext.getCompanyId()); docPratica.setCompanyId(serviceContext.getCompanyId());
docPratica.setUserId(user.getUserId()); docPratica.setUserId(user.getUserId());
@ -223,18 +228,19 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
} }
public DocPratica addDocPraticaForImport(long userId, String className, long classPk, long intPraticaId, public DocPratica addDocPraticaForImport(long userId, String className, long classPk, long intPraticaId,
byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong, String tipologia, byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong,
String sha256, boolean aggiornato, String jsonFirmatari, long dettPraticaIdRimozione, Date dtDataRimozione, String tipologia, String sha256, boolean aggiornato, String jsonFirmatari,
long oldDocPraticaId, ServiceContext serviceContext) throws PortalException, SystemException { long dettPraticaIdRimozione, Date dtDataRimozione, long oldDocPraticaId,
ServiceContext serviceContext) throws PortalException, SystemException {
Date now = new Date(); Date now = new Date();
validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry, fileName, version, validate(serviceContext.getScopeGroupId(), 0L, className, classPk, intPraticaId, dlFileEntry,
praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari, dettPraticaIdRimozione, fileName, version, praticaValidata, descLong, tipologia, sha256, aggiornato, jsonFirmatari,
dtDataRimozione); dettPraticaIdRimozione, dtDataRimozione);
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName())); .getName()));
docPratica.setCompanyId(serviceContext.getCompanyId()); docPratica.setCompanyId(serviceContext.getCompanyId());
docPratica.setUserId(userId); docPratica.setUserId(userId);
@ -269,7 +275,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
FileEntry fileEntry = null; FileEntry fileEntry = null;
// DettPratica dettPratica = dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId); // DettPratica dettPratica =
// dettPraticaPersistence.fetchByPrimaryKey(dettPraticaId);
IntPratica intPratica = intPraticaPersistence.fetchByPrimaryKey(intPraticaId); IntPratica intPratica = intPraticaPersistence.fetchByPrimaryKey(intPraticaId);
Territorio territorio = territorioPersistence.fetchByPrimaryKey(intPratica.getTerritorioId()); Territorio territorio = territorioPersistence.fetchByPrimaryKey(intPratica.getTerritorioId());
@ -277,9 +284,9 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
long groupId = territorio.getGroupId(); long groupId = territorio.getGroupId();
// TODO forse è meglio ragionare con un'altra logica per i permessi // TODO forse è meglio ragionare con un'altra logica per i permessi
User user = User user = UserLocalServiceUtil.getRoleUsers(
UserLocalServiceUtil.getRoleUsers( RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR)
RoleLocalServiceUtil.getRole(intPratica.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId()).get(0); .getRoleId()).get(0);
try { try {
PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(user)); PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(user));
} catch (Exception e) { } catch (Exception e) {
@ -292,11 +299,10 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
serviceContext.setCompanyId(companyId); serviceContext.setCompanyId(companyId);
serviceContext.setScopeGroupId(groupId); serviceContext.setScopeGroupId(groupId);
serviceContext.setUserId(userId); serviceContext.setUserId(userId);
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
// TODO forse mettiamo i permesssi ma non mi pare sicuro. long defaultFolderId = configurazioneLocalService.findByC_ChiaveLong(companyId,
ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
long defaultFolderId =
configurazioneLocalService.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId); Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
@ -304,12 +310,12 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
Folder folder = null; Folder folder = null;
try { try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName); folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
defaultFolder.getFolderId(), folderName);
} catch (NoSuchFolderException e) { } catch (NoSuchFolderException e) {
// cartella non presente -> creo cartella // cartella non presente -> creo cartella
folder = folder = dlAppLocalService.addFolder(userId, defaultFolder.getRepositoryId(),
dlAppLocalService.addFolder(userId, defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName, defaultFolder.getFolderId(), folderName, StringPool.BLANK, serviceContext);
StringPool.BLANK, serviceContext);
} }
Date now = new Date(); Date now = new Date();
String title = tipoAllegato + StringPool.UNDERLINE + sourceFileName; String title = tipoAllegato + StringPool.UNDERLINE + sourceFileName;
@ -317,13 +323,13 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
String mimeType = MimeTypesUtil.getContentType(sourceFileName); String mimeType = MimeTypesUtil.getContentType(sourceFileName);
String changeLog = StringPool.BLANK; String changeLog = StringPool.BLANK;
fileEntry = fileEntry = dlAppLocalService.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(),
dlAppLocalService.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_" now.getTime() + "_" + sourceFileName, mimeType, title, description, changeLog, content,
+ sourceFileName, mimeType, title, description, changeLog, content, serviceContext); serviceContext);
try { try {
PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil.create(UserLocalServiceUtil PermissionThreadLocal.setPermissionChecker(PermissionCheckerFactoryUtil
.getUser(delegaUserId))); .create(UserLocalServiceUtil.getUser(delegaUserId)));
} catch (Exception e) { } catch (Exception e) {
throw new SystemException(e); throw new SystemException(e);
@ -344,7 +350,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
docPraticaLocalService.updateDocPratica(docPratica); docPraticaLocalService.updateDocPratica(docPratica);
} }
public void addFirmeAndApprova(long docPraticaId, List<String> codiciFiscali) throws PortalException, SystemException { public void addFirmeAndApprova(long docPraticaId, List<String> codiciFiscali) throws PortalException,
SystemException {
DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId); DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
String jsonFirmatari = docPratica.getJsonFirmatari(); String jsonFirmatari = docPratica.getJsonFirmatari();
@ -357,7 +364,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
docPraticaLocalService.updateDocPratica(docPratica); docPraticaLocalService.updateDocPratica(docPratica);
} }
public void addErrorAndApprova(long docPraticaId, String errorCode) throws PortalException, SystemException { public void addErrorAndApprova(long docPraticaId, String errorCode) throws PortalException,
SystemException {
DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId); DocPratica docPratica = docPraticaLocalService.getDocPratica(docPraticaId);
docPratica.setModifiedDate(new Date()); docPratica.setModifiedDate(new Date());
@ -376,16 +384,16 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
} }
private void validate(long groupId, long docPraticaId, String className, long classPk, long intPraticaId, private void validate(long groupId, long docPraticaId, String className, long classPk, long intPraticaId,
byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong, String tipologia, byte[] dlFileEntry, String fileName, String version, boolean praticaValidata, String descLong,
String sha256, boolean aggiornato, String jsonFirmatari, long dettPraticaIdRimozione, Date dtDataRimozione) String tipologia, String sha256, boolean aggiornato, String jsonFirmatari,
throws PortalException, SystemException { long dettPraticaIdRimozione, Date dtDataRimozione) throws PortalException, SystemException {
// TODO Write your own validation code // TODO Write your own validation code
} }
public DocPratica updateDocPraticaAggiornato(long docPraticaId, boolean aggiornato) throws SystemException { public DocPratica updateDocPraticaAggiornato(long docPraticaId, boolean aggiornato)
throws SystemException {
DocPratica docPratica = docPraticaPersistence.fetchByPrimaryKey(docPraticaId); DocPratica docPratica = docPraticaPersistence.fetchByPrimaryKey(docPraticaId);
docPratica.setAggiornato(aggiornato); docPratica.setAggiornato(aggiornato);
@ -436,7 +444,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPraticaPersistence.findByClassPk(classPk); return docPraticaPersistence.findByClassPk(classPk);
} }
public List<DocPratica> findByStaus(int status, int start, int end, OrderByComparator order) throws SystemException { public List<DocPratica> findByStaus(int status, int start, int end, OrderByComparator order)
throws SystemException {
return docPraticaPersistence.findByStatus(status, start, end, order); return docPraticaPersistence.findByStatus(status, start, end, order);
} }
@ -467,8 +476,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return soggettoPersistence.findWithDynamicQuery(dynamicQuery, start, end); return soggettoPersistence.findWithDynamicQuery(dynamicQuery, start, end);
} }
public List<DocPratica> findByIntPratica_ClassPk_Tipologia(long intPraticaId, long classPk, String tipologia, public List<DocPratica> findByIntPratica_ClassPk_Tipologia(long intPraticaId, long classPk,
int start, int end) throws SystemException { String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
@ -478,8 +487,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end); return dynamicQuery(dynamicQuery, start, end);
} }
public List<DocPratica> findByIntPratica_ClassPk_Tipologie(long intPraticaId, long classPk, List<String> tipologie) public List<DocPratica> findByIntPratica_ClassPk_Tipologie(long intPraticaId, long classPk,
throws SystemException { List<String> tipologie) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
@ -500,7 +509,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery); return dynamicQuery(dynamicQuery);
} }
public DocPratica fetchByC_Group_DlFileEntry_Version(long dlFileEntryId, String version) throws SystemException { public DocPratica fetchByC_Group_DlFileEntry_Version(long dlFileEntryId, String version)
throws SystemException {
return docPraticaPersistence.fetchByDlFileEntry_Version(dlFileEntryId, version); return docPraticaPersistence.fetchByDlFileEntry_Version(dlFileEntryId, version);
} }
@ -513,14 +523,15 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
public List<Long> findDistinctDlFileEntryId(long classPk, String tipologia, int start, int end) public List<Long> findDistinctDlFileEntryId(long classPk, String tipologia, int start, int end)
throws SystemException { throws SystemException {
return findDistinctDlFileEntryId(new long[] {classPk}, tipologia, start, end); return findDistinctDlFileEntryId(new long[] { classPk }, tipologia, start, end);
} }
public List<Long> findDistinctDlFileEntryId(long[] classPks, String tipologia, int start, int end) public List<Long> findDistinctDlFileEntryId(long[] classPks, String tipologia, int start, int end)
throws SystemException { throws SystemException {
DynamicQuery dynamicQuery = docPraticaLocalService.dynamicQuery(); DynamicQuery dynamicQuery = docPraticaLocalService.dynamicQuery();
dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property("dlFileEntryId"))); dynamicQuery.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil
.property("dlFileEntryId")));
dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia)); dynamicQuery.add(PropertyFactoryUtil.forName("tipologia").eq(tipologia));
Junction or = RestrictionsFactoryUtil.disjunction(); Junction or = RestrictionsFactoryUtil.disjunction();
for (long classPk : classPks) { for (long classPk : classPks) {
@ -540,8 +551,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery); return dynamicQuery(dynamicQuery);
} }
public List<DocPratica> getValidByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end) public List<DocPratica> getValidByIntPratica_Tipologia(long intPraticaId, String tipologia, int start,
throws SystemException { int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
@ -551,7 +562,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end); return dynamicQuery(dynamicQuery, start, end);
} }
public int countValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia) throws SystemException { public int countValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia)
throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId); DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
@ -559,8 +571,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery); return (int) docPraticaPersistence.countWithDynamicQuery(dynamicQuery);
} }
public List<DocPratica> getValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia, int start, int end) public List<DocPratica> getValidTmpByIntPratica_Tipologia(long intPraticaId, String tipologia, int start,
throws SystemException { int end) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId); DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
@ -569,8 +581,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end); return dynamicQuery(dynamicQuery, start, end);
} }
public List<DocPratica> getValidTmpByIntPratica_DettPratica_Tipologia(long intPraticaId, long dettPraticaId, String tipologia, int start, int end) public List<DocPratica> getValidTmpByIntPratica_DettPratica_Tipologia(long intPraticaId,
throws SystemException { long dettPraticaId, String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId); DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
@ -581,8 +593,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end); return dynamicQuery(dynamicQuery, start, end);
} }
public List<DocPratica> getValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie, int start, int end) public List<DocPratica> getValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie,
throws SystemException { int start, int end) throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId); DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie)); dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
@ -591,7 +603,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery, start, end); return dynamicQuery(dynamicQuery, start, end);
} }
public int countValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie) throws SystemException { public int countValidTmpByIntPratica_Tipologie(long intPraticaId, String[] tipologie)
throws SystemException {
DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId); DynamicQuery dynamicQuery = createvalidTmpQueryByIntPratica(intPraticaId);
dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie)); dynamicQuery.add(RestrictionsFactoryUtil.in("tipologia", tipologie));
@ -626,14 +639,15 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return dynamicQuery(dynamicQuery); return dynamicQuery(dynamicQuery);
} }
public List<DocPratica> getValidUntilClassPkByIntPratica(long intPraticaId, long classPk, String tipologia, public List<DocPratica> getValidUntilClassPkByIntPratica(long intPraticaId, long classPk,
int start, int end) throws SystemException { String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));
dynamicQuery.add(RestrictionsFactoryUtil.le("classPk", classPk)); dynamicQuery.add(RestrictionsFactoryUtil.le("classPk", classPk));
dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia)); dynamicQuery.add(RestrictionsFactoryUtil.eq("tipologia", tipologia));
// dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione", null)); // dynamicQuery.add(RestrictionsFactoryUtil.eq("dettPraticaIdRimozione",
// null));
dynamicQuery.add(RestrictionsFactoryUtil.eq("rimosso", false)); dynamicQuery.add(RestrictionsFactoryUtil.eq("rimosso", false));
dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk")); dynamicQuery.addOrder(OrderFactoryUtil.desc("classPk"));
return dynamicQuery(dynamicQuery, start, end); return dynamicQuery(dynamicQuery, start, end);
@ -660,16 +674,17 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPraticaLocalService.dynamicQuery(dynamicQuery, start, end); return docPraticaLocalService.dynamicQuery(dynamicQuery, start, end);
} }
//ADT BUG FE ID = 9 // ADT BUG FE ID = 9
public DocPratica addDocPraticaAnnullamento(long userId, String className, long classPk, long intPraticaId, long fileEntryId, public DocPratica addDocPraticaAnnullamento(long userId, String className, long classPk,
String fileName, String tipologia, String sha256, String jsonFirmatari, ServiceContext serviceContext) throws PortalException, long intPraticaId, long fileEntryId, String fileName, String tipologia, String sha256,
SystemException { String jsonFirmatari, ServiceContext serviceContext) throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId); User user = userPersistence.findByPrimaryKey(userId);
Date now = new Date(); Date now = new Date();
DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class.getName())); DocPratica docPratica = docPraticaPersistence.create(counterLocalService.increment(DocPratica.class
.getName()));
docPratica.setCompanyId(serviceContext.getCompanyId()); docPratica.setCompanyId(serviceContext.getCompanyId());
docPratica.setUserId(user.getUserId()); docPratica.setUserId(user.getUserId());
@ -699,9 +714,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
return docPratica; return docPratica;
} }
/** /**
*Metodo nuovo ADT * Metodo nuovo ADT
* *
* @param intPraticaId * @param intPraticaId
* @param classPk * @param classPk
@ -711,8 +725,8 @@ public class DocPraticaLocalServiceImpl extends DocPraticaLocalServiceBaseImpl {
* @return * @return
* @throws SystemException * @throws SystemException
*/ */
public List<DocPratica> findByIntPratica_ClassPk_TipologiaNew(long intPraticaId, long classPk, String tipologia, public List<DocPratica> findByIntPratica_ClassPk_TipologiaNew(long intPraticaId, long classPk,
int start, int end) throws SystemException { String tipologia, int start, int end) throws SystemException {
DynamicQuery dynamicQuery = dynamicQuery(); DynamicQuery dynamicQuery = dynamicQuery();
dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId)); dynamicQuery.add(RestrictionsFactoryUtil.eq("intPraticaId", intPraticaId));

3
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/IntPraticaLocalServiceImpl.java

@ -74,6 +74,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
@ -107,6 +108,7 @@ import com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil;
import com.liferay.portal.kernel.workflow.WorkflowTask; import com.liferay.portal.kernel.workflow.WorkflowTask;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.model.WorkflowInstanceLink; import com.liferay.portal.model.WorkflowInstanceLink;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.security.permission.PermissionThreadLocal; import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.service.UserLocalServiceUtil;
@ -1133,6 +1135,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId()); String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null; Folder folder = null;
try { try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),

6
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/PagamentoLocalServiceImpl.java

@ -44,6 +44,7 @@ import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFolderException; import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil; import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
@ -68,6 +69,7 @@ import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
*/ */
public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl { public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
private static final Log _log = LogFactoryUtil.getLog(PagamentoLocalServiceImpl.class); private static final Log _log = LogFactoryUtil.getLog(PagamentoLocalServiceImpl.class);
/* /*
* NOTE FOR DEVELOPERS: Never reference this interface directly. Always use * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use
* {@link it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil} to * {@link it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil} to
@ -272,7 +274,6 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return updatePagamento(pagamento); return updatePagamento(pagamento);
} }
@SuppressWarnings("unchecked")
public List<Pagamento> findByCommittente_Mezzo(String codiceFiscaleCommittente, String mezzo, int start, public List<Pagamento> findByCommittente_Mezzo(String codiceFiscaleCommittente, String mezzo, int start,
int end) throws SystemException { int end) throws SystemException {
@ -289,7 +290,6 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return (int) pagamentoPersistence.countWithDynamicQuery(dynamicQuery); return (int) pagamentoPersistence.countWithDynamicQuery(dynamicQuery);
} }
@SuppressWarnings("unchecked")
public List<Pagamento> findByCommittente_Mezzo_Utilizzata(String codiceFiscaleCommittente, String mezzo, public List<Pagamento> findByCommittente_Mezzo_Utilizzata(String codiceFiscaleCommittente, String mezzo,
String utilizzata, int start, int end) throws SystemException { String utilizzata, int start, int end) throws SystemException {
@ -585,6 +585,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(pagamento.getClassPk()); String folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null; Folder folder = null;
try { try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
@ -644,6 +645,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(pagamento.getClassPk()); String folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null; Folder folder = null;
try { try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ParereGeologoLocalServiceImpl.java

@ -31,6 +31,7 @@ import com.liferay.portal.kernel.util.MimeTypesUtil;
import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.model.User; import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext; import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException; import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
@ -116,6 +117,7 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId); Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(parereGeologo.getDettPraticaId()); String folderName = PraticaUtil.getFolderName(parereGeologo.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null; Folder folder = null;
try { try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_bo build.namespace=portos_bo
build.number=2474 build.number=2477
build.date=1602313407057 build.date=1602754023327
build.auto.upgrade=true build.auto.upgrade=true
## ##

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/sismica_administration/view.jsp

@ -169,6 +169,8 @@ String dataProssimoSorteggio =
<aui:option label="Seleziona tipo di oggetto" value=""></aui:option> <aui:option label="Seleziona tipo di oggetto" value=""></aui:option>
<aui:option label="DocPratica (allegati)" selected="<%=oggetto.equals(DocPratica.class.getName())%>" <aui:option label="DocPratica (allegati)" selected="<%=oggetto.equals(DocPratica.class.getName())%>"
value="<%=DocPratica.class.getName()%>"></aui:option> value="<%=DocPratica.class.getName()%>"></aui:option>
<aui:option label="Pagamento (allegato)" selected="<%=oggetto.equals(Pagamento.class.getName())%>"
value="<%=Pagamento.class.getName()%>"></aui:option>
</aui:select> </aui:select>
<aui:input type="file" name="file" label="File" /> <aui:input type="file" name="file" label="File" />
<aui:input name="classPK" label="Id oggetto"> <aui:input name="classPK" label="Id oggetto">

4
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_calendar_appointments build.namespace=portos_calendar_appointments
build.number=173 build.number=174
build.date=1576157134948 build.date=1602593587481
build.auto.upgrade=true build.auto.upgrade=true
## ##

2
liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/calendar.jsp

@ -24,7 +24,7 @@
if(isIstruttoreForOrgs){ if(isIstruttoreForOrgs){
selectedOrganizationId = "" + defaultBoUserOrganization; selectedOrganizationId = "" + defaultBoUserOrganization;
} else { } else {
selectedOrganizationId = "21055"; selectedOrganizationId = "14287050";
} }
} }

126
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/allegatipratica/view_accordion.jsp

@ -1,3 +1,5 @@
<%@page import="com.liferay.portal.kernel.log.LogFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.log.Log"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> <%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
@ -38,9 +40,10 @@
<%@page import="java.util.LinkedHashMap"%> <%@page import="java.util.LinkedHashMap"%>
<%@page import="java.util.Map.Entry"%> <%@page import="java.util.Map.Entry"%>
<%@ include file="/html/allegatipratica/init.jsp" %> <%@ include file="/html/allegatipratica/init.jsp"%>
<% <%
Log _log = LogFactoryUtil.getLog("view_accordion.jsp");
String comingFrom = ParamUtil.getString(request,"comingFrom", String comingFrom = ParamUtil.getString(request,"comingFrom",
GetterUtil.getString( GetterUtil.getString(
PortalUtil.getOriginalServletRequest(request).getParameter("page_allegati"), PortalUtil.getOriginalServletRequest(request).getParameter("page_allegati"),
@ -88,27 +91,25 @@
tipologiaAllegati.add(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ANNULLAMENTO_FASCICOLO); tipologiaAllegati.add(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ANNULLAMENTO_FASCICOLO);
type="ad"; type="ad";
} }
%> %>
<liferay-portlet:resourceURL portletName="4_WAR_portosfeportlet" var="downloadAllURLs" id="downloadAllDocPraticas"> <liferay-portlet:resourceURL portletName="4_WAR_portosfeportlet" var="downloadAllURLs"
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" /> id="downloadAllDocPraticas">
<liferay-portlet:param name="classPk" value="<%= String.valueOf(classPk) %>" /> <liferay-portlet:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId())%>" />
<liferay-portlet:param name="comingFrom" value="<%= comingFrom %>" /> <liferay-portlet:param name="classPk" value="<%=String.valueOf(classPk)%>" />
<liferay-portlet:param name="type" value="<%= type %>" /> <liferay-portlet:param name="comingFrom" value="<%=comingFrom%>" />
</liferay-portlet:resourceURL> <liferay-portlet:param name="type" value="<%=type%>" />
</liferay-portlet:resourceURL>
<div class="container_btn_all_allegati padding_bottom"> <div class="container_btn_all_allegati padding_bottom">
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" > <liferay-ui:icon-menu showWhenSingleIcon="<%=false%>" extended="false" showExpanded="true"
<span class="tooltip-info" title="Download Allegati"> cssClass="inline_toolbar">
<aui:button id='<%=renderResponse.getNamespace()+"download_all"%>' <span class="tooltip-info" title="Download Allegati"> <aui:button
icon="fa fa-download" cssClass="btn btn-primary btn-action" id='<%=renderResponse.getNamespace()+"download_all"%>' icon="fa fa-download"
href="<%= downloadAllURLs %>" cssClass="btn btn-primary btn-action" href="<%=downloadAllURLs%>" />
/>
</span> </span>
</liferay-ui:icon-menu> </liferay-ui:icon-menu>
</div> </div>
<% <%
for(String codiceDoc:tipologiaAllegati){ for(String codiceDoc:tipologiaAllegati){
List<DocPratica> docPraticas; List<DocPratica> docPraticas;
if(fullVersion){ if(fullVersion){
@ -118,22 +119,22 @@
docPraticas = DocPraticaServiceUtil.getValidUntilClassPkByIntPratica(intPraticaId, classPk, codiceDoc, QueryUtil.ALL_POS, QueryUtil.ALL_POS); docPraticas = DocPraticaServiceUtil.getValidUntilClassPkByIntPratica(intPraticaId, classPk, codiceDoc, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
} }
%> %>
<div class="panel-group allegato-group"> <div class="panel-group allegato-group">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<a class="collapse_a" data-toggle="collapse" href="#collapse-<%=codiceDoc%>_<%= type %>"> <a class="collapse_a" data-toggle="collapse" href="#collapse-<%=codiceDoc%>_<%=type%>">
<h4 class="panel-title allegato-group__title"> <h4 class="panel-title allegato-group__title">
<liferay-ui:message key='<%="label-documenti-tipologia-"+codiceDoc %>'/> <liferay-ui:message key='<%="label-documenti-tipologia-"+codiceDoc%>' />
</h4> </h4> <span class='num_allegati <%=docPraticas.size()>0 ? "green" : "red"%>'><%=docPraticas.size()%></span>
<span class='num_allegati <%= docPraticas.size()>0 ? "green" : "red" %>'><%=docPraticas.size()%></span>
</a> </a>
</div> </div>
<div id="collapse-<%=codiceDoc%>_<%= type %>" class="panel-collapse collapse lfr-search-container"> <div id="collapse-<%=codiceDoc%>_<%=type%>" class="panel-collapse collapse lfr-search-container">
<% <%
if(!docPraticas.isEmpty()){ if(!docPraticas.isEmpty()){
%> %>
<table class="table table-striped allegati-tipologia-table" id="<portlet:namespace/>allegati-table-<%= codiceDoc %>"> <table class="table table-striped allegati-tipologia-table"
id="<portlet:namespace/>allegati-table-<%=codiceDoc%>">
<thead class="table-columns allegato-group__head"> <thead class="table-columns allegato-group__head">
<tr> <tr>
<th class="text-center">STATO</th> <th class="text-center">STATO</th>
@ -150,14 +151,13 @@
<% <%
for(DocPratica docPratica:docPraticas){ for(DocPratica docPratica:docPraticas){
long docPraticaId = docPratica.getDocPraticaId(); long docPraticaId = docPratica.getDocPraticaId();
_log.info("Processo docPratica id = "+docPraticaId);
%> %>
<tr> <tr>
<td class="text-center"> <td class="text-center"><span
<span class='fa fa-circle <%= Validator.isNull(docPratica.getDtDataRimozione()) ? "txt-green" : "txt-red" %>'></span> class='fa fa-circle <%=Validator.isNull(docPratica.getDtDataRimozione()) ? "txt-green" : "txt-red"%>'></span>
</td>
<td>
<%= docPratica.getFileName() %>
</td> </td>
<td><%=docPratica.getFileName()%></td>
<td class="text-center"> <td class="text-center">
<% <%
FirmeBean firme = FirmeUtil.deserialize(docPratica.getJsonFirmatari()); FirmeBean firme = FirmeUtil.deserialize(docPratica.getJsonFirmatari());
@ -187,15 +187,12 @@
} }
} }
if(firme.numeroFirme()>0){ if(firme.numeroFirme()>0){
%> %> <span class="fa fa-check icon-asseverazioni tooltip-info" title="<%=title.toString()%>"
<span class="fa fa-check icon-asseverazioni tooltip-info" title="<%=title.toString() %>" style="color:green"> style="color: green"> <sub style="font-weight: bold"><%=firme.numeroFirme()%></sub>
<sub style="font-weight: bold"><%=firme.numeroFirme() %></sub> </span> <%
</span>
<%
}else{ }else{
%> %> <span class="fa fa-close icon-asseverazioni tooltip-info" title="Non ci sono firme sul file"
<span class="fa fa-close icon-asseverazioni tooltip-info" title="Non ci sono firme sul file" style="color:red"></span> style="color: red"></span> <%
<%
} }
%> %>
</td> </td>
@ -228,9 +225,7 @@
<% <%
DettPratica removing = DettPraticaLocalServiceUtil.fetchDettPratica(docPratica.getDettPraticaIdRimozione()); DettPratica removing = DettPraticaLocalServiceUtil.fetchDettPratica(docPratica.getDettPraticaIdRimozione());
if(removing != null){ if(removing != null){
%> %> <%=removing.getFullDescription()%> <%
<%= removing.getFullDescription() %>
<%
} }
%> %>
</td> </td>
@ -239,26 +234,28 @@
%> --%> %> --%>
<td class="text-center action-col"> <td class="text-center action-col"><c:choose>
<c:choose> <c:when test="<%=Validator.isNotNull(docPratica.getDlFileEntryId())%>">
<c:when test="<%= Validator.isNotNull(docPratica.getDlFileEntryId()) %>"> <liferay-portlet:renderURL var="previewURL" windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<liferay-portlet:renderURL var="previewURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> <liferay-portlet:param name="fileEntryId"
<liferay-portlet:param name="fileEntryId" value="<%= String.valueOf(docPratica.getDlFileEntryId()) %>" /> value="<%=String.valueOf(docPratica.getDlFileEntryId())%>" />
<liferay-portlet:param name="mvcPath" value="/html/common/preview_file_entry.jsp" /> <liferay-portlet:param name="mvcPath" value="/html/common/preview_file_entry.jsp" />
</liferay-portlet:renderURL> </liferay-portlet:renderURL>
<liferay-ui:icon id='<%="open_"+docPraticaId %>' linkCssClass="btn btn-action" iconCssClass="fa fa-clipboard" message="Visualizza" url="<%=previewURL%>" useDialog="true"/> <liferay-ui:icon id='<%="open_"+docPraticaId%>' linkCssClass="btn btn-action"
<liferay-ui:icon id='<%="download_"+docPraticaId %>' linkCssClass="btn btn-action" iconCssClass="fa fa-download" message="Download" url="<%=docPratica.getDownloadUrl(themeDisplay)%>"/> iconCssClass="fa fa-clipboard" message="Visualizza" url="<%=previewURL%>" useDialog="true" />
<liferay-ui:icon id='<%="download_"+docPraticaId%>' linkCssClass="btn btn-action"
iconCssClass="fa fa-download" message="Download" url="<%=docPratica.getDownloadUrl(themeDisplay)%>" />
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<liferay-util:include page="/html/common/import_window.jsp" servletContext="<%= application %>" portletId="<%= PortletKeys.FASCICOLO %>" > <liferay-util:include page="/html/common/import_window.jsp" servletContext="<%=application%>"
<liferay-util:param name="classPK" value="<%= String.valueOf(docPratica.getDocPraticaId()) %>" /> portletId="<%=PortletKeys.FASCICOLO%>">
<liferay-util:param name="classNAME" value="<%= DocPratica.class.getName() %>" /> <liferay-util:param name="classPK" value="<%=String.valueOf(docPratica.getDocPraticaId())%>" />
<liferay-util:param name="classNAME" value="<%=DocPratica.class.getName()%>" />
<liferay-util:param name="message" value="Download" /> <liferay-util:param name="message" value="Download" />
</liferay-util:include> </liferay-util:include>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose></td>
</td>
</tr> </tr>
<% <%
} }
@ -270,23 +267,18 @@
%> %>
</div> </div>
</div> </div>
</div> </div>
<% <%
} }
%> %>
<script type="text/javascript"> <script type="text/javascript">
YUI().use( YUI().use('aui-tooltip', function(Y) {
'aui-tooltip', new Y.TooltipDelegate({
function(Y) { trigger : '.allegati-tipologia-table .tooltip-info',
new Y.TooltipDelegate( position : 'top',
{ cssClass : 'tooltip-help',
trigger: '.allegati-tipologia-table .tooltip-info', html : true,
position: 'top', opacity : 1
cssClass: 'tooltip-help', });
html: true, });
opacity: 1
}
);
}
);
</script> </script>

2
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/edit_fascicolo.jsp

@ -1,4 +1,3 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.util.HttpUtil"%> <%@page import="com.liferay.portal.kernel.util.HttpUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%> <%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
@ -13,7 +12,6 @@
<%@page import="com.liferay.portal.kernel.util.ArrayUtil"%> <%@page import="com.liferay.portal.kernel.util.ArrayUtil"%>
<%@ include file="/html/fascicolofe/init.jsp" %> <%@ include file="/html/fascicolofe/init.jsp" %>
<% <%
String backURL = ParamUtil.getString(request, "backURL"); String backURL = ParamUtil.getString(request, "backURL");

458
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/common/save_actions.jspf

@ -1,6 +1,11 @@
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Delega"%>
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%>
<%@page import="com.liferay.portal.kernel.log.Log"%>
<%@page import="com.liferay.portal.kernel.log.LogFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%> <%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="javax.portlet.PortletResponse"%> <%@page import="javax.portlet.PortletResponse"%>
<%@page import="com.liferay.portal.model.Portlet"%> <%@page import="com.liferay.portal.model.Portlet"%>
<%@page import="java.util.HashMap"%> <%@page import="java.util.HashMap"%>
@ -21,73 +26,74 @@
<%@page import="it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil"%> <%@page import="it.tref.liferay.portos.bo.service.DelegaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.AsseverazioniUtil"%> <%@page import="it.tref.liferay.portos.bo.util.AsseverazioniUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.DelegheUtil"%> <%@page import="it.tref.liferay.portos.bo.util.DelegheUtil"%>
<div class="pull-right" > <div class="pull-right">
<% <%
Log _log = LogFactoryUtil.getLog("save_actions.jspf");
String randomId = StringUtil.randomId(); String randomId = StringUtil.randomId();
String formName = "fmDomande"; String formName = "fmDomande";
String buttonId = "fmbuttonsalvaconferma_"+randomId; String buttonId = "fmbuttonsalvaconferma_" + randomId;
String buttonAsseverazioneId = "fmbuttonasseverazione_"+randomId; String buttonAsseverazioneId = "fmbuttonasseverazione_" + randomId;
String script = String script = "var el_relazioni = $('textarea[name=_"
"var el_relazioni = $('textarea[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Relazioni]');" + + PortletKeys.FASCICOLOFE
"if (el_relazioni.length) {" + + "_{{prefix}}Relazioni]');"
"var el_coniugio = $('input[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Coniugio]');" + + "if (el_relazioni.length) {"
"var el_coniugiochk = $('input[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Coniugio]:checked');" + + "var el_coniugio = $('input[name=_"
+ PortletKeys.FASCICOLOFE
+ "_{{prefix}}Coniugio]');"
+ "var el_coniugiochk = $('input[name=_"
+ PortletKeys.FASCICOLOFE
+ "_{{prefix}}Coniugio]:checked');"
+
"console.log('length: ' + el_relazioni.length);" + "console.log('length: ' + el_relazioni.length);"
+
"var err_coniugio = (el_coniugiochk.length == 0);" + "var err_coniugio = (el_coniugiochk.length == 0);"
"var err_relazioni = ((el_relazioni.val().replace(/\\s*/g, '').length < 10) && (el_coniugiochk.val() == 1));" + + "var err_relazioni = ((el_relazioni.val().replace(/\\s*/g, '').length < 10) && (el_coniugiochk.val() == 1));"
+
"el_coniugio.parent().css({color:(err_coniugio ? '#a94442' : '#333')});" + "el_coniugio.parent().css({color:(err_coniugio ? '#a94442' : '#333')});"
"el_relazioni.css({'border-color':(err_relazioni ?'#a94442' : '#ccc')});" + + "el_relazioni.css({'border-color':(err_relazioni ?'#a94442' : '#ccc')});" +
"if (err_coniugio || err_relazioni) {" + "if (err_coniugio || err_relazioni) {" + "$('#" + renderResponse.getNamespace()
"$('#" + renderResponse.getNamespace() + "{{prefix}}SaveAndCloseDiv_" + randomId + "').parent().scrollTop(0);" + + "{{prefix}}SaveAndCloseDiv_" + randomId + "').parent().scrollTop(0);" + "return false;"
"return false;" + + "}" + "}" + "saveDettPratica(false, '{{type}}');";
"}" +
"}" +
"saveDettPratica(false, '{{type}}');";
%> %>
<aui:input type="hidden" name="cmd" value="" /> <aui:input type="hidden" name="cmd" value="" />
<aui:input type="hidden" name="verifyArea" value="" /> <aui:input type="hidden" name="verifyArea" value="" />
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" > <liferay-ui:icon-menu showWhenSingleIcon="<%=false%>" extended="false" showExpanded="true"
cssClass="inline_toolbar">
<c:if test="<%= !TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione) %>"> <c:if test="<%=!TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione)%>">
<c:if test="<%= intPratica.getUserId() == user.getUserId()%>"> <c:if test="<%=intPratica.getUserId() == user.getUserId()%>">
<liferay-ui:icon <liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true);"
iconCssClass="fa fa-save" linkCssClass="btn" />
message="salva-bozza"
url="javascript:saveDettPratica(true);"
linkCssClass="btn"
/>
</c:if> </c:if>
<c:if test="<%= intPratica.getUserId() == user.getUserId() <c:if
&& !DelegheUtil.hasDelegaAttiva(user.getUserId(),dettPraticaId) test="<%=intPratica.getUserId() == user.getUserId()
&& !DelegheUtil.hasDelegaAttiva(user.getUserId(), dettPraticaId)
&& !AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), dettPraticaId)%>"> && !AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon <liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica"
iconCssClass="fa fa-check-square" url="javascript:saveDettPratica(false, 'domanda', 'verifyFascicolo');" linkCssClass="btn btn-primary" />
message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda', 'verifyFascicolo');"
linkCssClass="btn btn-primary"
/>
</c:if> </c:if>
<c:if test="<%=DelegheUtil.canCompilaDomanda(user.getUserId(),dettPraticaId) %>"> <c:if test="<%=DelegheUtil.canCompilaDomanda(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon <liferay-ui:icon iconCssClass="fa fa-users"
iconCssClass="fa fa-users" linkCssClass='<%=ValidazionePraticaUtil.delegheCompilazioneIsEnable(dettPraticaId) ? "btn"
linkCssClass='<%= ValidazionePraticaUtil.delegheCompilazioneIsEnable(dettPraticaId)?"btn":"btn disabled" %>' : "btn disabled"%>'
message="gestione-deleghe" message="gestione-deleghe" url="javascript:saveDettPratica(false, 'domanda', 'verifyDeleghe');" />
url="javascript:saveDettPratica(false, 'domanda', 'verifyDeleghe');"
/>
</c:if> </c:if>
<c:if test="<%= DelegheUtil.canDoPayment(user.getUserId(),dettPraticaId) %>"> <c:if test="<%=DelegheUtil.canDoPayment(user.getUserId(), dettPraticaId)%>">
<% <%
boolean isEsente = dettPratica.getNormEsenteBollo() && dettPratica.getNormEsenteSpese(); boolean isEsente = dettPratica.getNormEsenteBollo()
boolean isIntegrazione = dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE); && dettPratica.getNormEsenteSpese();
boolean isIntegrazione = dettPratica.getTipoIntegrazione().equals(
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE);
%> %>
<%-- <c:if test="<%= !isEsente && !isIntegrazione && DelegheUtil.canDoPayment(user.getUserId(),dettPraticaId) %>"> <%-- <c:if test="<%= !isEsente && !isIntegrazione && DelegheUtil.canDoPayment(user.getUserId(),dettPraticaId) %>">
<liferay-ui:icon <liferay-ui:icon
@ -98,225 +104,294 @@
/> />
</c:if> --%> </c:if> --%>
<% <%
Map<String,Object> dataMap = new HashMap<String, Object>(); Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("id", renderResponse.getNamespace()+"openVerificaFascicolo"); dataMap.put("id", renderResponse.getNamespace() + "openVerificaFascicolo");
%> %>
<liferay-portlet:renderURL var="completedURL" windowState="<%=LiferayWindowState.POP_UP.toString() %>"> <liferay-portlet:renderURL var="completedURL" windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/completed_fascicolo.jsp"/> <liferay-portlet:param name="mvcPath" value="/html/fascicolofe/completed_fascicolo.jsp" />
<liferay-portlet:param name="classPk" value="<%=String.valueOf(dettPraticaId)%>" /> <liferay-portlet:param name="classPk" value="<%=String.valueOf(dettPraticaId)%>" />
<liferay-portlet:param name="className" value="<%=DettPratica.class.getName()%>" /> <liferay-portlet:param name="className" value="<%=DettPratica.class.getName()%>" />
<liferay-portlet:param name="comingFrom" value="domanda" /> <liferay-portlet:param name="comingFrom" value="domanda" />
</liferay-portlet:renderURL> </liferay-portlet:renderURL>
<c:if test="<%= isIntegrazione %>"> <c:if test="<%=isIntegrazione%>">
<liferay-portlet:actionURL name="completeIntegrazione" var="completeIntegrazioneURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> <liferay-portlet:actionURL name="completeIntegrazione" var="completeIntegrazioneURL"
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp"/> windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp" />
<liferay-portlet:param name="dettPraticaId" value="<%=String.valueOf(dettPraticaId)%>" /> <liferay-portlet:param name="dettPraticaId" value="<%=String.valueOf(dettPraticaId)%>" />
<liferay-portlet:param name="redirect" value="<%= completedURL %>" /> <liferay-portlet:param name="redirect" value="<%=completedURL%>" />
</liferay-portlet:actionURL> </liferay-portlet:actionURL>
<liferay-ui:icon <liferay-ui:icon
linkCssClass='<%= ValidazionePraticaUtil.canCompleteIntegrazione(dettPraticaId) ?"btn btn-primary":"btn btn-primary disabled" %>' linkCssClass='<%=ValidazionePraticaUtil.canCompleteIntegrazione(dettPraticaId) ? "btn btn-primary"
iconCssClass="fa fa-check" : "btn btn-primary disabled"%>'
message="Concludi Integrazione" iconCssClass="fa fa-check" message="Concludi Integrazione" url="<%=completeIntegrazioneURL%>"
url="<%= completeIntegrazioneURL %>" data="<%=dataMap%>" />
data="<%= dataMap %>"
/>
</c:if> </c:if>
<c:if test="<%= !isIntegrazione %>"> <c:if test="<%=!isIntegrazione%>">
<c:if test="<%= isEsente %>"> <c:if test="<%=isEsente%>">
<liferay-portlet:actionURL name="completeDomandaEsente" var="completeDomandaEsenteURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>"> <liferay-portlet:actionURL name="completeDomandaEsente" var="completeDomandaEsenteURL"
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp"/> windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp" />
<liferay-portlet:param name="dettPraticaId" value="<%=String.valueOf(dettPraticaId)%>" /> <liferay-portlet:param name="dettPraticaId" value="<%=String.valueOf(dettPraticaId)%>" />
<liferay-portlet:param name="redirect" value="<%= completedURL %>" /> <liferay-portlet:param name="redirect" value="<%=completedURL%>" />
</liferay-portlet:actionURL> </liferay-portlet:actionURL>
<liferay-ui:icon <liferay-ui:icon
linkCssClass='<%= ValidazionePraticaUtil.canCompleteDettPraticaEsente(dettPraticaId) ?"btn btn-primary":"btn btn-primary disabled" %>' linkCssClass='<%=ValidazionePraticaUtil.canCompleteDettPraticaEsente(dettPraticaId) ? "btn btn-primary"
iconCssClass="fa fa-check" : "btn btn-primary disabled"%>'
useDialog="<%= true %>" iconCssClass="fa fa-check" useDialog="<%=true%>" message="Concludi Domanda"
message="Concludi Domanda" url="<%=completeDomandaEsenteURL%>" data="<%=dataMap%>" />
url="<%= completeDomandaEsenteURL %>"
data="<%= dataMap %>"
/>
</c:if> </c:if>
<c:if test="<%= !isEsente %>"> <c:if test="<%=!isEsente%>">
<liferay-ui:icon <liferay-ui:icon iconCssClass="fa fa-cogs"
iconCssClass="fa fa-cogs" linkCssClass='<%=ValidazionePraticaUtil.pagamentoIsEnable(dettPraticaId) ? "btn btn-primary"
linkCssClass='<%=ValidazionePraticaUtil.pagamentoIsEnable(dettPraticaId)?"btn btn-primary":"btn btn-primary disabled" %>' : "btn btn-primary disabled"%>'
message='<%= PagamentoLocalServiceUtil.countByClassPk(dettPraticaId)>0 ? LanguageUtil.get(pageContext, "dati-pagamento") : LanguageUtil.get(pageContext, "calcola-importo") %>' message='<%=PagamentoLocalServiceUtil.countByClassPk(dettPraticaId) > 0 ? LanguageUtil
url="javascript:saveDettPratica(false, 'domanda', 'verifyPagamenti');" .get(pageContext, "dati-pagamento") : LanguageUtil.get(pageContext,
data="<%= dataMap %>" "calcola-importo")%>'
/> url="javascript:saveDettPratica(false, 'domanda', 'verifyPagamenti');" data="<%=dataMap%>" />
</c:if> </c:if>
</c:if> </c:if>
</c:if> </c:if>
<c:if test="<%=DelegheUtil.hasDelegaAttiva(user.getUserId(),dettPraticaId) && !DelegheUtil.hasDelegaPagamento(user.getUserId(), dettPraticaId) %>"> <c:if
<liferay-ui:icon test="<%=DelegheUtil.hasDelegaAttiva(user.getUserId(), dettPraticaId)
iconCssClass="fa fa-save" && !DelegheUtil.hasDelegaPagamento(user.getUserId(), dettPraticaId)%>">
message="save" <liferay-ui:icon iconCssClass="fa fa-save" message="save" url="javascript:saveDettPratica(true);"
url="javascript:saveDettPratica(true);" linkCssClass="btn" />
linkCssClass="btn"
/>
<% <%
long delegaId = ParamUtil.getLong(request, "delegaId"); long delegaId = ParamUtil.getLong(request, "delegaId");
if (delegaId == 0) {
_log.error("Errore pratica id " + intPratica.getIntPraticaId() + ", utente "
+ user.getScreenName() + ", delegaId = 0");
}
Delega delega = DelegaLocalServiceUtil.getDelega(delegaId); Delega delega = DelegaLocalServiceUtil.getDelega(delegaId);
boolean validated = true; boolean validated = true;
StringBuilder tooltipSection = new StringBuilder(); StringBuilder tooltipSection = new StringBuilder();
if(delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)){ if (delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)) {
//List<String> notCompleted = ValidazionePraticaUtil.notCompletedSection(SezioniUtil.SEZIONE_GEOLOGICA, dettPraticaId); //List<String> notCompleted = ValidazionePraticaUtil.notCompletedSection(SezioniUtil.SEZIONE_GEOLOGICA, dettPraticaId);
List<String> notCompleted = ValidazionePraticaUtil.hasDelegaGeologoCompleted(dettPraticaId); List<String> notCompleted = ValidazionePraticaUtil
if(!notCompleted.isEmpty()){ .hasDelegaGeologoCompleted(dettPraticaId);
if (!notCompleted.isEmpty()) {
validated = false; validated = false;
tooltipSection.append("<ul class='list-body-modal'>"); tooltipSection.append("<ul class='list-body-modal'>");
for(String incomplete : notCompleted){ for (String incomplete : notCompleted) {
tooltipSection.append("<li class='item-body-modal'>"+LanguageUtil.get(pageContext, incomplete)+"</li>"); tooltipSection.append("<li class='item-body-modal'>"
+ LanguageUtil.get(pageContext, incomplete) + "</li>");
} }
tooltipSection.append("</ul>"); tooltipSection.append("</ul>");
} }
} }
%> %>
<c:if test="<%= !validated %>"> <c:if test="<%=!validated%>">
<% <%
String buttonIdVerifica = "fmbuttonverifica_"+randomId; String buttonIdVerifica = "fmbuttonverifica_" + randomId;
%> %>
<!-- ADT BUG FE ID = 14 --> <!-- ADT BUG FE ID = 14 -->
<liferay-ui:icon <liferay-ui:icon id="<%=buttonIdVerifica%>" iconCssClass="fa fa-times-circle txt-red"
id="<%= buttonIdVerifica %>" message="verifica-delega" url="javascript:saveDettPratica(true,'saveAndVerify');" linkCssClass="btn" />
iconCssClass="fa fa-times-circle txt-red"
message="verifica-delega"
url="javascript:saveDettPratica(true,'saveAndVerify');"
linkCssClass="btn"
/>
<!-- ADT BUG FE ID = 14 --> <!-- ADT BUG FE ID = 14 -->
<div id="${isBar}" hidden> <div id="${isBar}" hidden>
<liferay-util:include page="/html/common/submit_window_delega.jsp" servletContext="<%= application %>" > <liferay-util:include page="/html/common/submit_window_delega.jsp" servletContext="<%=application%>">
<liferay-util:param name="titolo" value="Validazione Sezione Geologia"></liferay-util:param> <liferay-util:param name="titolo" value="Validazione Sezione Geologia"></liferay-util:param>
<liferay-util:param name="headerCSS" value="display-inline"></liferay-util:param> <liferay-util:param name="headerCSS" value="display-inline"></liferay-util:param>
<liferay-util:param name="contentDiv" value='<%= "verificaDiv_"+randomId %>'></liferay-util:param> <liferay-util:param name="contentDiv" value='<%="verificaDiv_" + randomId%>'></liferay-util:param>
<liferay-util:param name="buttonId" value="<%=buttonIdVerifica %>"></liferay-util:param> <liferay-util:param name="buttonId" value="<%=buttonIdVerifica%>"></liferay-util:param>
<liferay-util:param name="buttonAnnulla" value="Chiudi"></liferay-util:param> <liferay-util:param name="buttonAnnulla" value="Chiudi"></liferay-util:param>
<liferay-util:param name="okVisible" value="false"></liferay-util:param> <liferay-util:param name="okVisible" value="false"></liferay-util:param>
<liferay-util:param name="width" value="500"></liferay-util:param> <liferay-util:param name="width" value="500"></liferay-util:param>
<liferay-util:param name="height" value="320"></liferay-util:param> <liferay-util:param name="height" value="320"></liferay-util:param>
</liferay-util:include> </liferay-util:include>
<div hidden id='<%=renderResponse.getNamespace()+"verificaDiv_"+randomId %>' class="text-center" > <div hidden id='<%=renderResponse.getNamespace() + "verificaDiv_" + randomId%>' class="text-center">
<h4 class="txt-bold text-center">Sezione Geologia incompleta:</h4> <h4 class="txt-bold text-center">Sezione Geologia incompleta:</h4>
<%= tooltipSection.toString() %> <%=tooltipSection.toString()%>
</div> </div>
</div> </div>
</c:if> </c:if>
<c:if test="<%= validated && DelegheUtil.TIPO_GEOLOGO.equalsIgnoreCase(delega.getTipologia()) %>"> <c:if test="<%=validated
<liferay-ui:icon && DelegheUtil.TIPO_GEOLOGO.equalsIgnoreCase(delega.getTipologia())%>">
iconCssClass="fa fa-check-circle txt-green" <liferay-ui:icon iconCssClass="fa fa-check-circle txt-green" message="verifica-delega"
message="verifica-delega" url="javascript:void(0)" linkCssClass="btn disabled" />
url="javascript:void(0)"
linkCssClass="btn disabled"
/>
</c:if> </c:if>
<span class="<%= !validated ? "tooltip-info" : StringPool.BLANK %>" title="Delega incompleta"> <span class="<%=!validated ? "tooltip-info" : StringPool.BLANK%>" title="Delega incompleta"> <liferay-ui:icon
<liferay-ui:icon id="<%=buttonId%>" iconCssClass="fa fa-check-circle" message="concludi-delega" url="javascript:void(0)"
id="<%=buttonId %>" linkCssClass='<%=!validated ? "btn btn-primary disabled" : "btn btn-primary"%>' />
iconCssClass="fa fa-check-circle"
message="concludi-delega"
url="javascript:void(0)"
linkCssClass='<%= !validated ? "btn btn-primary disabled" : "btn btn-primary" %>'
/>
</span> </span>
<c:if test="<%= validated %>"> <c:if test="<%=validated%>">
<div id='<%=renderResponse.getNamespace()+"dgSaveAndCloseDiv_"+randomId %>' class="hide" > <div id='<%=renderResponse.getNamespace() + "dgSaveAndCloseDiv_" + randomId%>' class="hide">
<span> <span> <c:choose>
<c:choose> <c:when
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_TOTALE) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>"> test="<%=delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_TOTALE)
<%= LanguageUtil.format(pageContext, "confirm-delega-totale", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %> && delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-totale",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_COMPILAZIONE) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>"> <c:when
<%= LanguageUtil.format(pageContext, "confirm-delega-compilazione", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %> test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_COMPILAZIONE)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-compilazione",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>"> <c:when
<input type="hidden" name="_<%= PortletKeys.FASCICOLOFE %>_dgPresenti" value="1" /> test="<%=delega.getTipologia()
.equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<input type="hidden" name="_<%=PortletKeys.FASCICOLOFE%>_dgPresenti" value="1" />
Dichiara<br> Dichiara<br>
<label><input required type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_dgConiugio" onclick="$('#<portlet:namespace />dgrelazioni').hide()" value="0" /> di non trovarsi in rapporti di coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label><br> <label><input required type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_dgConiugio"
<label><input type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_dgConiugio" onclick="$('#<portlet:namespace />dgrelazioni').show()" value="1" /> di trovarsi in rapporti di coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio Civile (indicare un nominativo per riga).</label> onclick="$('#<portlet:namespace />dgrelazioni').hide()" value="0" /> di non trovarsi in rapporti di
<textarea id="<portlet:namespace />dgrelazioni" name="_<%= PortletKeys.FASCICOLOFE %>_dgRelazioni" style="display:none"></textarea> coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i
dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label>
<br>
<label><input type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_dgConiugio"
onclick="$('#<portlet:namespace />dgrelazioni').show()" value="1" /> di trovarsi in rapporti di
coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio
Civile (indicare un nominativo per riga).</label>
<textarea id="<portlet:namespace />dgrelazioni" name="_<%=PortletKeys.FASCICOLOFE%>_dgRelazioni"
style="display: none"></textarea>
<hr> <hr>
<div class="anteprimaasseverazione"><%= AsseverazioneLocalServiceUtil.anteprimaAsseverazione(TipoSoggettoUtil.GEOLOGO, user, dettPratica, null) %></div> <div class="anteprimaasseverazione"><%=AsseverazioneLocalServiceUtil.anteprimaAsseverazione(
TipoSoggettoUtil.GEOLOGO, user, dettPratica, null)%></div>
</c:when> </c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_FIRMA_INSERIMENTO_ALLEGATI) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>"> <c:when
<%= LanguageUtil.format(pageContext, "confirm-delega-firma-inserimento", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %> test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_FIRMA_INSERIMENTO_ALLEGATI)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-firma-inserimento",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_FINE_LAVORI) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>"> <c:when
<%= LanguageUtil.format(pageContext, "confirm-delega-fine-lavori", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %> test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_FINE_LAVORI)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-fine-lavori",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_VISUALIZZAZIONE) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>"> <c:when
<%= LanguageUtil.format(pageContext, "confirm-delega-visualizzazione", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %> test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_VISUALIZZAZIONE)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-visualizzazione",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_COLLAUDO) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>"> <c:when
<%= LanguageUtil.format(pageContext, "confirm-delega-collaudo", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %> test="<%=delega.getTipologia().equalsIgnoreCase(
DelegheUtil.TIPO_COLLAUDO)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-collaudo",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when> </c:when>
</c:choose> </c:choose>
</span> </span>
</div> </div>
<liferay-portlet:resourceURL id="isCompletedDelegaGeologo" var="isCompletedDelegaGeologoURL" /> <liferay-portlet:resourceURL id="isCompletedDelegaGeologo" var="isCompletedDelegaGeologoURL" />
<% <%
String function = "A.io.request('"+isCompletedDelegaGeologoURL+"',{data: {"+renderResponse.getNamespace()+"classPk: "+dettPraticaId+"},"+ String function = "A.io.request('"
"dataType: 'json',on: {success: function(event, id, obj) {console.log(this.get('responseData'));var response = this.get('responseData');"+ + isCompletedDelegaGeologoURL
"console.log(response.isCompleted);"+ + "',{data: {"
"if(!response.isCompleted){var body = A.one('#"+renderResponse.getNamespace()+"dgSaveAndCloseDiv_"+randomId+"');"+ + renderResponse.getNamespace()
"body.html('<p class=\"text-center\">Delega incompleta<a href=\"javascript:void(0)\" class=\"btn btn-success\" style=\"margin-bottom:20px\" onclick=\"window.location.reload()\">Refresh</a></p>');"+ + "classPk: "
"body.ancestor('.modal-body').next('.modal-footer').remove();return;}"+ + dettPraticaId
"}, complete: function(event){A.one('#"+renderResponse.getNamespace()+"dgSaveAndCloseDiv_"+randomId+"').show();modal.show();}"+ + "},"
"}});"; + "dataType: 'json',on: {success: function(event, id, obj) {console.log(this.get('responseData'));var response = this.get('responseData');"
+ "console.log(response.isCompleted);"
+ "if(!response.isCompleted){var body = A.one('#"
+ renderResponse.getNamespace()
+ "dgSaveAndCloseDiv_"
+ randomId
+ "');"
+ "body.html('<p class=\"text-center\">Delega incompleta<a href=\"javascript:void(0)\" class=\"btn btn-success\" style=\"margin-bottom:20px\" onclick=\"window.location.reload()\">Refresh</a></p>');"
+ "body.ancestor('.modal-body').next('.modal-footer').remove();return;}"
+ "}, complete: function(event){A.one('#" + renderResponse.getNamespace()
+ "dgSaveAndCloseDiv_" + randomId + "').show();modal.show();}" + "}});";
%> %>
<liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%= application %>" > <liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%=application%>">
<liferay-util:param name="formName" value="<%= formName %>"></liferay-util:param> <liferay-util:param name="formName" value="<%=formName%>"></liferay-util:param>
<liferay-util:param name="onClick" value="<%= script.replace(\"{{prefix}}\", \"dg\").replace(\"{{type}}\", \"delega\") %>"></liferay-util:param> <liferay-util:param name="onClick"
value="<%=script.replace(\"{{prefix}}\",\"dg\")
.replace(\"{{type}}\",\"delega\")%>"></liferay-util:param>
<liferay-util:param name="titolo" value="Conclusione Delega"></liferay-util:param> <liferay-util:param name="titolo" value="Conclusione Delega"></liferay-util:param>
<liferay-util:param name="contentDiv" value='<%= "dgSaveAndCloseDiv_"+randomId %>'></liferay-util:param> <liferay-util:param name="contentDiv" value='<%="dgSaveAndCloseDiv_" + randomId%>'></liferay-util:param>
<liferay-util:param name="buttonId" value="<%=buttonId %>"></liferay-util:param> <liferay-util:param name="buttonId" value="<%=buttonId%>"></liferay-util:param>
<liferay-util:param name="buttonConferma" value="Conferma"></liferay-util:param> <liferay-util:param name="buttonConferma" value="Conferma"></liferay-util:param>
<liferay-util:param name="width" value="500"></liferay-util:param> <liferay-util:param name="width" value="500"></liferay-util:param>
<liferay-util:param name="height" value="320"></liferay-util:param> <liferay-util:param name="height" value="320"></liferay-util:param>
<c:if test='<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO) %>'> <c:if test='<%=delega.getTipologia()
<liferay-util:param name="function" value="<%= function %>"></liferay-util:param> .equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)%>'>
<liferay-util:param name="function" value="<%=function%>"></liferay-util:param>
</c:if> </c:if>
</liferay-util:include> </liferay-util:include>
</c:if> </c:if>
</c:if> </c:if>
<c:if test="<%=AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), intPraticaId) %>"> <c:if test="<%=AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), intPraticaId)%>">
<liferay-ui:icon <liferay-ui:icon id="<%=buttonAsseverazioneId%>" iconCssClass="fa fa-save" message="Assevera" url="#"
id="<%=buttonAsseverazioneId %>" linkCssClass="btn btn-primary" />
iconCssClass="fa fa-save" <div id='<%=renderResponse.getNamespace() + "asSaveAndCloseDiv_" + randomId%>' class="hide">
message="Assevera" <input type="hidden" name="_<%=PortletKeys.FASCICOLOFE%>_asPresenti" value="1" /> <label><input
url="#" required type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_asConiugio"
linkCssClass="btn btn-primary" onclick="$('#<portlet:namespace />asrelazioni').hide()" value="0" /> di non trovarsi in rapporti di
/> coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i
<div id='<%=renderResponse.getNamespace()+"asSaveAndCloseDiv_"+randomId %>' class="hide" > dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label><br> <label><input
<input type="hidden" name="_<%= PortletKeys.FASCICOLOFE %>_asPresenti" value="1" /> type="radio" name="_<%=PortletKeys.FASCICOLOFE%>_asConiugio"
<label><input required type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_asConiugio" onclick="$('#<portlet:namespace />asrelazioni').hide()" value="0" /> di non trovarsi in rapporti di coniugio, parentela o affinità, del coniuge o del convivente, entro il 2° grado, con i dirigenti e i dipendenti dell'Ufficio del Genio Civile deputati alla trattazione del procedimento.</label><br> onclick="$('#<portlet:namespace />asrelazioni').show()" value="1" /> di trovarsi in rapporti di
<label><input type="radio" name="_<%= PortletKeys.FASCICOLOFE %>_asConiugio" onclick="$('#<portlet:namespace />asrelazioni').show()" value="1" /> di trovarsi in rapporti di coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio Civile (indicare un nominativo per riga).</label> coniugio, parentela o affinità entro il 2° grado con i seguenti dipendenti dell'Ufficio del Genio Civile
<textarea id="<portlet:namespace />asrelazioni" name="_<%= PortletKeys.FASCICOLOFE %>_asRelazioni" style="display:none"></textarea> (indicare un nominativo per riga).</label>
<textarea id="<portlet:namespace />asrelazioni" name="_<%=PortletKeys.FASCICOLOFE%>_asRelazioni"
style="display: none"></textarea>
<hr> <hr>
<ol class="asseverazioni-list"> <ol class="asseverazioni-list">
<% <%
List<Asseverazione> asseverazioni = AsseverazioneServiceUtil.findByDettPratica_CodiceFiscale_InEsito(dettPraticaId, user.getScreenName(), new String[] {DelegheUtil.STATO_ASSEGNATA}, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); List<Asseverazione> asseverazioni = AsseverazioneServiceUtil
for(Asseverazione asseverazione : asseverazioni){ .findByDettPratica_CodiceFiscale_InEsito(dettPraticaId, user.getScreenName(),
new String[] { DelegheUtil.STATO_ASSEGNATA }, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null);
for (Asseverazione asseverazione : asseverazioni) {
%> %>
<li class="anteprimaasseverazione"> <li class="anteprimaasseverazione">
<p> <p>
<c:if test="<%= asseverazione.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>"> <c:if test="<%=asseverazione.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<% <%
String testoAsseverazione = AsseverazioneLocalServiceUtil.anteprimaAsseverazione(asseverazione.getTipologia(), user, dettPratica, null); String testoAsseverazione = AsseverazioneLocalServiceUtil
.anteprimaAsseverazione(asseverazione.getTipologia(), user,
dettPratica, null);
if (Validator.isNull(testoAsseverazione)) { if (Validator.isNull(testoAsseverazione)) {
testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(asseverazione, user.getScreenName()); testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(
asseverazione, user.getScreenName());
} }
%> %>
<%= testoAsseverazione %> <%=testoAsseverazione%>
</c:if> </c:if>
</p> </p>
</li> </li>
@ -325,32 +400,25 @@
%> %>
</ol> </ol>
</div> </div>
<liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%= application %>" > <liferay-util:include page="/html/common/submit_window.jsp" servletContext="<%=application%>">
<liferay-util:param name="formName" value="formAsseverazione"></liferay-util:param> <liferay-util:param name="formName" value="formAsseverazione"></liferay-util:param>
<liferay-util:param name="onClick" value="<%= script.replace(\"{{prefix}}\", \"as\").replace(\"{{type}}\", \"asseverazione\") %>"></liferay-util:param> <liferay-util:param name="onClick"
value="<%=script.replace(\"{{prefix}}\",\"as\").replace(\"{{type}}\",\"asseverazione\")%>"></liferay-util:param>
<liferay-util:param name="titolo" value="Conferma Asseverazione"></liferay-util:param> <liferay-util:param name="titolo" value="Conferma Asseverazione"></liferay-util:param>
<liferay-util:param name="contentDiv" value='<%= "asSaveAndCloseDiv_"+randomId %>'></liferay-util:param> <liferay-util:param name="contentDiv" value='<%="asSaveAndCloseDiv_" + randomId%>'></liferay-util:param>
<liferay-util:param name="buttonId" value="<%= buttonAsseverazioneId %>"></liferay-util:param> <liferay-util:param name="buttonId" value="<%=buttonAsseverazioneId%>"></liferay-util:param>
<liferay-util:param name="buttonConferma" value="Conferma"></liferay-util:param> <liferay-util:param name="buttonConferma" value="Conferma"></liferay-util:param>
<liferay-util:param name="width" value="800"></liferay-util:param> <liferay-util:param name="width" value="800"></liferay-util:param>
</liferay-util:include> </liferay-util:include>
</c:if> </c:if>
</c:if> </c:if>
<c:if test="<%= TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione) %>"> <c:if test="<%=TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione)%>">
<liferay-ui:icon <liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true);"
iconCssClass="fa fa-save" linkCssClass="btn" />
message="salva-bozza"
url="javascript:saveDettPratica(true);"
linkCssClass="btn"
/>
<liferay-ui:icon <liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica"
iconCssClass="fa fa-check-square" url="javascript:saveDettPratica(false, 'domanda');" linkCssClass="btn btn-primary" />
message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda');"
linkCssClass="btn btn-primary"
/>
</c:if> </c:if>
</liferay-ui:icon-menu> </liferay-ui:icon-menu>

Caricamento…
Annulla
Salva