Sfoglia il codice sorgente

Permessi file allegati manuali

master
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. 13
      liferay-plugins-sdk-6.2/ivy-settings.xml
  4. 224
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/AllegatiManualiPortlet.java
  5. 85
      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. 1206
      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. 8
      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. 336
      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. 544
      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.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://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=http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/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.pom.developer.name=Brian Wing Shun Chan
@ -352,8 +352,8 @@
ivy.resolve.transitive.dependencies=true
ivy.resolve.transitive.dependencies.test=true
ivy.version=2.4.0
#ivy.version=2.4.0.LIFERAY-PATCHED-1-SNAPSHOT
#ivy.version=2.4.0
ivy.version=2.4.0.LIFERAY-PATCHED-1-SNAPSHOT
##
## JMX

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

@ -2,13 +2,20 @@
<settings defaultResolver="default" />
<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="io.spring.repo.maven.release" root="http://repo.spring.io/release/"/>
<chain dual="true" name="default">
<resolver ref="local-m2" />
<resolver ref="liferay-public" />
<resolver ref="io.spring.repo.maven.release" />
</chain>
</resolvers>
</ivysettings>
<repositories>
<repository>
<id>org.opensaml</id>
<url>https://build.shibboleth.net/nexus/content/repositories/releases</url>
</repository>
</repositories>
</ivysettings>

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

@ -44,116 +44,116 @@ import com.liferay.util.bridges.mvc.MVCPortlet;
public class AllegatiManualiPortlet extends MVCPortlet {
private Log _log = LogFactoryUtil.getLog(AllegatiManualiPortlet.class);
public void uploadAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException,
SystemException {
try {
UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest);
long intPraticaId = ParamUtil.getLong(uploadRequest, "intPraticaId");
long dettPraticaId = ParamUtil.getLong(uploadRequest, "dettPraticaId");
String descrizione = ParamUtil.getString(uploadRequest, "descrizione");
String sourceFileName = uploadRequest.getFileName("docFile");
File file = uploadRequest.getFile("docFile");
if (Validator.isNotNull(sourceFileName) && file != null) {
// lunghezza fissata a 200
if (sourceFileName.length() > 200) {
SessionErrors.add(actionRequest, "error.geniocivilefe.allegato.manuale.length.valid");
}
} else {
SessionErrors.add(actionRequest, "error.geniocivilefe.allegato.manuale.is.request");
}
if (!SessionErrors.isEmpty(actionRequest)) {
PortalUtil.copyRequestParameters(actionRequest, actionResponse);
} else {
if (Validator.isNotNull(intPraticaId) && Validator.isNotNull(dettPraticaId)) {
byte[] content = FileUtil.getBytes(file);
AllegatoManuale allegatoManuale =
AllegatoManualeLocalServiceUtil.addAllegatoManuale(serviceContext.getUserId(), intPraticaId,
dettPraticaId, descrizione, content, sourceFileName, serviceContext);
}
}
PortalUtil.copyRequestParameters(actionRequest, actionResponse);
} catch (Exception e) {
PortalUtil.copyRequestParameters(actionRequest, actionResponse);
_log.error("Error", e);
throw new SystemException(e);
}
}
public void deleteAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
long allegatoManualeId = ParamUtil.getLong(actionRequest, "allegatoManualeId");
AllegatoManualeServiceUtil.deleteAllegatoManuale(allegatoManualeId);
}
@Override
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws IOException,
PortletException {
String id = resourceRequest.getResourceID();
try {
if ("downloadAll".equals(id)) {
long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId");
List<AllegatoManuale> docs = AllegatoManualeServiceUtil.findByIntPratica(intPraticaId);
ZipWriter zipWriter = ZipWriterFactoryUtil.getZipWriter();
for (AllegatoManuale doc : docs) {
InputStream inputStream = null;
try {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId());
inputStream =
DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(), fileEntry.getVersion(), false);
String name = fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension();
zipWriter.addEntry(name, inputStream);
} finally {
StreamUtil.cleanUp(inputStream);
}
}
resourceResponse.reset();
File file = zipWriter.getFile();
byte[] data = Files.readAllBytes(file.toPath());
resourceResponse.setContentType(ContentTypes.APPLICATION_ZIP);
resourceResponse.addProperty(HttpHeaders.CACHE_CONTROL, "max-age=3600, must-revalidate");
resourceResponse
.addProperty(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + file.getName() + "\"");
resourceResponse.setContentLength(data.length);
resourceResponse.getPortletOutputStream().write(data);
resourceResponse.getPortletOutputStream().flush();
resourceResponse.getPortletOutputStream().close();
} else if ("importFile".equals(id)) {
long classPk = ParamUtil.getLong(resourceRequest, "classPk");
String className = ParamUtil.getString(resourceRequest, "className");
FilesImporter.importaFile(classPk, className);
PortletResponseUtil
.write(
resourceResponse,
"<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>");
} else {
super.serveResource(resourceRequest, resourceResponse);
}
} catch (PortalException | SystemException e) {
_log.error(e, e);
throw new IOException(e);
}
}
private Log _log = LogFactoryUtil.getLog(AllegatiManualiPortlet.class);
public void uploadAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse)
throws PortalException, SystemException {
try {
UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
ServiceContext serviceContext = ServiceContextFactory.getInstance(uploadRequest);
long intPraticaId = ParamUtil.getLong(uploadRequest, "intPraticaId");
long dettPraticaId = ParamUtil.getLong(uploadRequest, "dettPraticaId");
String descrizione = ParamUtil.getString(uploadRequest, "descrizione");
String sourceFileName = uploadRequest.getFileName("docFile");
File file = uploadRequest.getFile("docFile");
if (Validator.isNotNull(sourceFileName) && file != null) {
// lunghezza fissata a 200
if (sourceFileName.length() > 200) {
SessionErrors.add(actionRequest, "error.geniocivilefe.allegato.manuale.length.valid");
}
} else {
SessionErrors.add(actionRequest, "error.geniocivilefe.allegato.manuale.is.request");
}
if (!SessionErrors.isEmpty(actionRequest)) {
PortalUtil.copyRequestParameters(actionRequest, actionResponse);
} else {
if (Validator.isNotNull(intPraticaId) && Validator.isNotNull(dettPraticaId)) {
byte[] content = FileUtil.getBytes(file);
AllegatoManualeLocalServiceUtil
.addAllegatoManuale(serviceContext.getUserId(), intPraticaId, dettPraticaId,
descrizione, content, sourceFileName, serviceContext);
}
}
PortalUtil.copyRequestParameters(actionRequest, actionResponse);
} catch (Exception e) {
PortalUtil.copyRequestParameters(actionRequest, actionResponse);
_log.error("Error", e);
throw new SystemException(e);
}
}
public void deleteAllegatoManuale(ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
long allegatoManualeId = ParamUtil.getLong(actionRequest, "allegatoManualeId");
AllegatoManualeServiceUtil.deleteAllegatoManuale(allegatoManualeId);
}
@Override
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse)
throws IOException, PortletException {
String id = resourceRequest.getResourceID();
try {
if ("downloadAll".equals(id)) {
long intPraticaId = ParamUtil.getLong(resourceRequest, "intPraticaId");
List<AllegatoManuale> docs = AllegatoManualeServiceUtil.findByIntPratica(intPraticaId);
ZipWriter zipWriter = ZipWriterFactoryUtil.getZipWriter();
for (AllegatoManuale doc : docs) {
InputStream inputStream = null;
try {
FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doc.getFileEntryId());
inputStream = DLFileEntryLocalServiceUtil.getFileAsStream(fileEntry.getFileEntryId(),
fileEntry.getVersion(), false);
String name = fileEntry.getTitle() + StringPool.PERIOD + fileEntry.getExtension();
zipWriter.addEntry(name, inputStream);
} finally {
StreamUtil.cleanUp(inputStream);
}
}
resourceResponse.reset();
File file = zipWriter.getFile();
byte[] data = Files.readAllBytes(file.toPath());
resourceResponse.setContentType(ContentTypes.APPLICATION_ZIP);
resourceResponse.addProperty(HttpHeaders.CACHE_CONTROL, "max-age=3600, must-revalidate");
resourceResponse.addProperty(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\""
+ file.getName() + "\"");
resourceResponse.setContentLength(data.length);
resourceResponse.getPortletOutputStream().write(data);
resourceResponse.getPortletOutputStream().flush();
resourceResponse.getPortletOutputStream().close();
} else if ("importFile".equals(id)) {
long classPk = ParamUtil.getLong(resourceRequest, "classPk");
String className = ParamUtil.getString(resourceRequest, "className");
FilesImporter.importaFile(classPk, className);
PortletResponseUtil
.write(resourceResponse,
"<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>");
} else {
super.serveResource(resourceRequest, resourceResponse);
}
} catch (PortalException | SystemException e) {
_log.error(e, e);
throw new IOException(e);
}
}
}

85
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.DocPratica;
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.Territorio;
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.DocPraticaLocalServiceUtil;
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.TerritorioLocalServiceUtil;
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 {
SismicaUtil.sostituisciDL(actionRequest, actionResponse);
Long userId = null;
long userId = 0;
String title = null;
String description = null;
String mimeType = null;
String changeLog = StringPool.BLANK;
FileEntry fileEntry = null;
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();
String className = ParamUtil.getString(actionRequest, "className");
@ -117,18 +127,18 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
case "it.tref.liferay.portos.bo.model.DocPratica":
DocPratica pratica = DocPraticaLocalServiceUtil.getDocPratica(idOggetto);
userId = pratica.getUserId();
long companyId = pratica.getCompanyId();
long groupId = pratica.getGroupId();
companyId = pratica.getCompanyId();
groupId = pratica.getGroupId();
serviceContext.setCompanyId(companyId);
serviceContext.setScopeGroupId(groupId);
serviceContext.setUserId(userId);
long defaultFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
Folder defaultFolder = DLAppLocalServiceUtil.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(pratica.getClassPk());
long folderId = defaultFolder.getFolderId();
long repositoryId = defaultFolder.getRepositoryId();
defaultFolderId = ConfigurazioneLocalServiceUtil.findByC_ChiaveLong(companyId, ConfigurazioneConstants.ATTACHMENT_FOLDER_ID);
defaultFolder = DLAppLocalServiceUtil.getFolder(defaultFolderId);
folderName = PraticaUtil.getFolderName(pratica.getClassPk());
folderId = defaultFolder.getFolderId();
repositoryId = defaultFolder.getRepositoryId();
try {
folder = DLAppLocalServiceUtil.getFolder(repositoryId, folderId, folderName);
@ -137,16 +147,16 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
StringPool.BLANK, serviceContext);
}
byte[] bytes = FileUtil.getBytes(file);
bytes = FileUtil.getBytes(file);
title = pratica.getTipologia() + StringPool.UNDERLINE + sourceFileName;
description = sourceFileName;
mimeType = MimeTypesUtil.getContentType(sourceFileName);
try {
/*try {
DLAppLocalServiceUtil.deleteFileEntry(pratica.getDlFileEntryId());
} catch(PortalException e){
}
}*/
try {
fileEntry = DLAppLocalServiceUtil.getFileEntry(pratica.getDlFileEntryId());
@ -157,14 +167,61 @@ public class SismicaAdministrationPortlet extends MVCPortlet {
fileEntry = DLAppLocalServiceUtil.addFileEntry(userId, folder.getRepositoryId(), folder.getFolderId(), now.getTime() + "_" + sourceFileName,
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.setSha256(DigestUtils.sha256Hex(bytes));
DocPraticaLocalServiceUtil.updateDocPratica(pratica);
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:
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.StringPool;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserGroupRoleLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@ -121,6 +122,7 @@ public class AllegatoManualeLocalServiceImpl extends AllegatoManualeLocalService
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
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.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
@ -577,6 +578,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
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.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
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.ne("fileEntryIdBase", 0l));
dynamicQuery.add(RestrictionsFactoryUtil.eq("rifiutato", false));
List avvisi = avvisoPersistence.findWithDynamicQuery(dynamicQuery);
List<Avviso> avvisi = avvisoPersistence.findWithDynamicQuery(dynamicQuery);
return avvisi;
}
@ -1083,6 +1084,7 @@ public class AvvisoLocalServiceImpl extends AvvisoLocalServiceBaseImpl {
if (Validator.isNotNull(folder)) {
byte[] bytes = Base64.decode(fileToSave);
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
FileEntry fileEntry = DLAppLocalServiceUtil.addFileEntry(avviso.getUserId(),
folder.getRepositoryId(), folderId, fileName,
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.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
@ -141,6 +142,8 @@ public class DocAggiuntivaLocalServiceImpl extends DocAggiuntivaLocalServiceBase
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(), defaultFolder.getFolderId(), folderName);

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

File diff soppresso perché troppo grande Load Diff

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.Locale;
import java.util.Map;
import org.apache.commons.codec.digest.DigestUtils;
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.model.User;
import com.liferay.portal.model.WorkflowInstanceLink;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.security.permission.PermissionThreadLocal;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
@ -1133,6 +1135,7 @@ public class IntPraticaLocalServiceImpl extends IntPraticaLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(dettPratica.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),

8
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.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portlet.documentlibrary.NoSuchFolderException;
import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
@ -67,7 +68,8 @@ import com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil;
* @see it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil
*/
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
* {@link it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil} to
@ -272,7 +274,6 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return updatePagamento(pagamento);
}
@SuppressWarnings("unchecked")
public List<Pagamento> findByCommittente_Mezzo(String codiceFiscaleCommittente, String mezzo, int start,
int end) throws SystemException {
@ -289,7 +290,6 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
return (int) pagamentoPersistence.countWithDynamicQuery(dynamicQuery);
}
@SuppressWarnings("unchecked")
public List<Pagamento> findByCommittente_Mezzo_Utilizzata(String codiceFiscaleCommittente, String mezzo,
String utilizzata, int start, int end) throws SystemException {
@ -585,6 +585,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
folder = dlAppLocalService.getFolder(defaultFolder.getRepositoryId(),
@ -644,6 +645,7 @@ public class PagamentoLocalServiceImpl extends PagamentoLocalServiceBaseImpl {
String folderName = PraticaUtil.getFolderName(pagamento.getClassPk());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
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.Validator;
import com.liferay.portal.model.User;
import com.liferay.portal.security.permission.ActionKeys;
import com.liferay.portal.service.ServiceContext;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portlet.documentlibrary.NoSuchFileEntryException;
@ -116,6 +117,7 @@ public class ParereGeologoLocalServiceImpl extends ParereGeologoLocalServiceBase
Folder defaultFolder = dlAppLocalService.getFolder(defaultFolderId);
String folderName = PraticaUtil.getFolderName(parereGeologo.getDettPraticaId());
serviceContext.setGroupPermissions(new String[] { ActionKeys.VIEW });
Folder folder = null;
try {
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.number=2474
build.date=1602313407057
build.number=2477
build.date=1602754023327
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="DocPratica (allegati)" selected="<%=oggetto.equals(DocPratica.class.getName())%>"
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:input type="file" name="file" label="File" />
<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.number=173
build.date=1576157134948
build.number=174
build.date=1602593587481
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){
selectedOrganizationId = "" + defaultBoUserOrganization;
} else {
selectedOrganizationId = "21055";
selectedOrganizationId = "14287050";
}
}

336
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 import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
@ -38,9 +40,10 @@
<%@page import="java.util.LinkedHashMap"%>
<%@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",
GetterUtil.getString(
PortalUtil.getOriginalServletRequest(request).getParameter("page_allegati"),
@ -88,27 +91,25 @@
tipologiaAllegati.add(DocumentiPraticaUtil.TIPOLOGIA_ALLEGATO_ANNULLAMENTO_FASCICOLO);
type="ad";
}
%>
<liferay-portlet:resourceURL portletName="4_WAR_portosfeportlet" var="downloadAllURLs" id="downloadAllDocPraticas">
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" />
<liferay-portlet:param name="classPk" value="<%= String.valueOf(classPk) %>" />
<liferay-portlet:param name="comingFrom" value="<%= comingFrom %>" />
<liferay-portlet:param name="type" value="<%= type %>" />
</liferay-portlet:resourceURL>
<liferay-portlet:resourceURL portletName="4_WAR_portosfeportlet" var="downloadAllURLs"
id="downloadAllDocPraticas">
<liferay-portlet:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId())%>" />
<liferay-portlet:param name="classPk" value="<%=String.valueOf(classPk)%>" />
<liferay-portlet:param name="comingFrom" value="<%=comingFrom%>" />
<liferay-portlet:param name="type" value="<%=type%>" />
</liferay-portlet:resourceURL>
<div class="container_btn_all_allegati padding_bottom">
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<span class="tooltip-info" title="Download Allegati">
<aui:button id='<%=renderResponse.getNamespace()+"download_all"%>'
icon="fa fa-download" cssClass="btn btn-primary btn-action"
href="<%= downloadAllURLs %>"
/>
</span>
</liferay-ui:icon-menu>
</div>
<div class="container_btn_all_allegati padding_bottom">
<liferay-ui:icon-menu showWhenSingleIcon="<%=false%>" extended="false" showExpanded="true"
cssClass="inline_toolbar">
<span class="tooltip-info" title="Download Allegati"> <aui:button
id='<%=renderResponse.getNamespace()+"download_all"%>' icon="fa fa-download"
cssClass="btn btn-primary btn-action" href="<%=downloadAllURLs%>" />
</span>
</liferay-ui:icon-menu>
</div>
<%
for(String codiceDoc:tipologiaAllegati){
List<DocPratica> docPraticas;
if(fullVersion){
@ -118,175 +119,166 @@
docPraticas = DocPraticaServiceUtil.getValidUntilClassPkByIntPratica(intPraticaId, classPk, codiceDoc, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
}
%>
<div class="panel-group allegato-group">
<div class="panel panel-default">
<div class="panel-heading">
<a class="collapse_a" data-toggle="collapse" href="#collapse-<%=codiceDoc%>_<%= type %>">
<h4 class="panel-title allegato-group__title">
<liferay-ui:message key='<%="label-documenti-tipologia-"+codiceDoc %>'/>
</h4>
<span class='num_allegati <%= docPraticas.size()>0 ? "green" : "red" %>'><%=docPraticas.size()%></span>
</a>
</div>
<div id="collapse-<%=codiceDoc%>_<%= type %>" class="panel-collapse collapse lfr-search-container">
<%
<div class="panel-group allegato-group">
<div class="panel panel-default">
<div class="panel-heading">
<a class="collapse_a" data-toggle="collapse" href="#collapse-<%=codiceDoc%>_<%=type%>">
<h4 class="panel-title allegato-group__title">
<liferay-ui:message key='<%="label-documenti-tipologia-"+codiceDoc%>' />
</h4> <span class='num_allegati <%=docPraticas.size()>0 ? "green" : "red"%>'><%=docPraticas.size()%></span>
</a>
</div>
<div id="collapse-<%=codiceDoc%>_<%=type%>" class="panel-collapse collapse lfr-search-container">
<%
if(!docPraticas.isEmpty()){
%>
<table class="table table-striped allegati-tipologia-table" id="<portlet:namespace/>allegati-table-<%= codiceDoc %>">
<thead class="table-columns allegato-group__head">
<tr>
<th class="text-center">STATO</th>
<th>ALLEGATO</th>
<th class="text-center">FIRME</th>
<%-- <% if(!comingFrom.equals("page_va_allegati") && !comingFrom.equals("page_in_allegati") ) { %> --%>
<th>AGGIUNTO DA</th>
<th>INVALIDATO DA</th>
<%-- <% } %> --%>
<th class="text-center">AZIONI</th>
</tr>
</thead>
<tbody class="allegato-group__body">
<%
<table class="table table-striped allegati-tipologia-table"
id="<portlet:namespace/>allegati-table-<%=codiceDoc%>">
<thead class="table-columns allegato-group__head">
<tr>
<th class="text-center">STATO</th>
<th>ALLEGATO</th>
<th class="text-center">FIRME</th>
<%-- <% if(!comingFrom.equals("page_va_allegati") && !comingFrom.equals("page_in_allegati") ) { %> --%>
<th>AGGIUNTO DA</th>
<th>INVALIDATO DA</th>
<%-- <% } %> --%>
<th class="text-center">AZIONI</th>
</tr>
</thead>
<tbody class="allegato-group__body">
<%
for(DocPratica docPratica:docPraticas){
long docPraticaId = docPratica.getDocPraticaId();
long docPraticaId = docPratica.getDocPraticaId();
_log.info("Processo docPratica id = "+docPraticaId);
%>
<tr>
<td class="text-center">
<span class='fa fa-circle <%= Validator.isNull(docPratica.getDtDataRimozione()) ? "txt-green" : "txt-red" %>'></span>
</td>
<td>
<%= docPratica.getFileName() %>
</td>
<td class="text-center">
<%
FirmeBean firme = FirmeUtil.deserialize(docPratica.getJsonFirmatari());
StringBuilder title = new StringBuilder();
if(firme.numeroFirme()>0){
if(!firme.getFirmeDigitali().isEmpty()){
title.append("Firma sul file:<ul>");
for(FirmeDetail firma: firme.getFirmeDigitali()){
title.append("<li>"+firma.getCfFirmatario());
if(Validator.isNotNull(firma.getDtFirma())){
title.append(" del "+dateFormatDate.format(firma.getDtFirma()));
}
title.append("</li>");
}
title.append("</ul>");
}
if(!firme.getFirmeApplicativo().isEmpty()){
title.append("Firme da applicativo:<ul>");
for(FirmeDetail firma: firme.getFirmeApplicativo()){
title.append("<li>"+firma.getCfFirmatario());
if(Validator.isNotNull(firma.getDtFirma())){
title.append(" del "+dateFormatDate.format(firma.getDtFirma()));
}
title.append("</li>");
}
title.append("</ul>");
}
}
if(firme.numeroFirme()>0){
%>
<span class="fa fa-check icon-asseverazioni tooltip-info" title="<%=title.toString() %>" style="color:green">
<sub style="font-weight: bold"><%=firme.numeroFirme() %></sub>
</span>
<%
}else{
%>
<span class="fa fa-close icon-asseverazioni tooltip-info" title="Non ci sono firme sul file" style="color:red"></span>
<%
}
<tr>
<td class="text-center"><span
class='fa fa-circle <%=Validator.isNull(docPratica.getDtDataRimozione()) ? "txt-green" : "txt-red"%>'></span>
</td>
<td><%=docPratica.getFileName()%></td>
<td class="text-center">
<%
FirmeBean firme = FirmeUtil.deserialize(docPratica.getJsonFirmatari());
StringBuilder title = new StringBuilder();
if(firme.numeroFirme()>0){
if(!firme.getFirmeDigitali().isEmpty()){
title.append("Firma sul file:<ul>");
for(FirmeDetail firma: firme.getFirmeDigitali()){
title.append("<li>"+firma.getCfFirmatario());
if(Validator.isNotNull(firma.getDtFirma())){
title.append(" del "+dateFormatDate.format(firma.getDtFirma()));
}
title.append("</li>");
}
title.append("</ul>");
}
if(!firme.getFirmeApplicativo().isEmpty()){
title.append("Firme da applicativo:<ul>");
for(FirmeDetail firma: firme.getFirmeApplicativo()){
title.append("<li>"+firma.getCfFirmatario());
if(Validator.isNotNull(firma.getDtFirma())){
title.append(" del "+dateFormatDate.format(firma.getDtFirma()));
}
title.append("</li>");
}
title.append("</ul>");
}
}
if(firme.numeroFirme()>0){
%> <span class="fa fa-check icon-asseverazioni tooltip-info" title="<%=title.toString()%>"
style="color: green"> <sub style="font-weight: bold"><%=firme.numeroFirme()%></sub>
</span> <%
}else{
%> <span class="fa fa-close icon-asseverazioni tooltip-info" title="Non ci sono firme sul file"
style="color: red"></span> <%
}
%>
</td>
<%-- <% if(!comingFrom.equals("page_va_allegati") && !comingFrom.equals("page_in_allegati") ) { %> --%>
<td>
<%
String description = StringPool.BLANK;
if(DettPratica.class.getName().equalsIgnoreCase(docPratica.getClassName())){
DettPratica adding = DettPraticaLocalServiceUtil.fetchDettPratica(docPratica.getClassPk());
if(adding!=null){
description = adding.getFullDescription() ;
}
}else if(FineLavori.class.getName().equalsIgnoreCase(docPratica.getClassName())){
FineLavori adding = FineLavoriLocalServiceUtil.fetchFineLavori(docPratica.getClassPk());
if(adding!=null){
description = adding.getFullDescription() ;
}
}else if(Collaudo.class.getName().equalsIgnoreCase(docPratica.getClassName())){
Collaudo adding = CollaudoLocalServiceUtil.fetchCollaudo(docPratica.getClassPk());
if(adding!=null){
description = adding.getFullDescription() ;
}
}
out.print(description);
%>
</td>
<%-- <% if(!comingFrom.equals("page_va_allegati") && !comingFrom.equals("page_in_allegati") ) { %> --%>
<td>
<%
String description = StringPool.BLANK;
if(DettPratica.class.getName().equalsIgnoreCase(docPratica.getClassName())){
DettPratica adding = DettPraticaLocalServiceUtil.fetchDettPratica(docPratica.getClassPk());
if(adding!=null){
description = adding.getFullDescription() ;
}
}else if(FineLavori.class.getName().equalsIgnoreCase(docPratica.getClassName())){
FineLavori adding = FineLavoriLocalServiceUtil.fetchFineLavori(docPratica.getClassPk());
if(adding!=null){
description = adding.getFullDescription() ;
}
}else if(Collaudo.class.getName().equalsIgnoreCase(docPratica.getClassName())){
Collaudo adding = CollaudoLocalServiceUtil.fetchCollaudo(docPratica.getClassPk());
if(adding!=null){
description = adding.getFullDescription() ;
}
}
out.print(description);
%>
</td>
<td>
<%
DettPratica removing = DettPraticaLocalServiceUtil.fetchDettPratica(docPratica.getDettPraticaIdRimozione());
if(removing != null){
%>
<%= removing.getFullDescription() %>
<%
}
%>
</td>
<%-- <%
</td>
<td>
<%
DettPratica removing = DettPraticaLocalServiceUtil.fetchDettPratica(docPratica.getDettPraticaIdRimozione());
if(removing != null){
%> <%=removing.getFullDescription()%> <%
}
%>
</td>
<%-- <%
}
%> --%>
<td class="text-center action-col">
<c:choose>
<c:when test="<%= Validator.isNotNull(docPratica.getDlFileEntryId()) %>">
<liferay-portlet:renderURL var="previewURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="fileEntryId" value="<%= String.valueOf(docPratica.getDlFileEntryId()) %>" />
<liferay-portlet:param name="mvcPath" value="/html/common/preview_file_entry.jsp" />
</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='<%="download_"+docPraticaId %>' linkCssClass="btn btn-action" iconCssClass="fa fa-download" message="Download" url="<%=docPratica.getDownloadUrl(themeDisplay)%>"/>
</c:when>
<c:otherwise>
<liferay-util:include page="/html/common/import_window.jsp" servletContext="<%= application %>" portletId="<%= PortletKeys.FASCICOLO %>" >
<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:include>
</c:otherwise>
</c:choose>
</td>
</tr>
<%
<td class="text-center action-col"><c:choose>
<c:when test="<%=Validator.isNotNull(docPratica.getDlFileEntryId())%>">
<liferay-portlet:renderURL var="previewURL" windowState="<%=LiferayWindowState.POP_UP.toString()%>">
<liferay-portlet:param name="fileEntryId"
value="<%=String.valueOf(docPratica.getDlFileEntryId())%>" />
<liferay-portlet:param name="mvcPath" value="/html/common/preview_file_entry.jsp" />
</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='<%="download_"+docPraticaId%>' linkCssClass="btn btn-action"
iconCssClass="fa fa-download" message="Download" url="<%=docPratica.getDownloadUrl(themeDisplay)%>" />
</c:when>
<c:otherwise>
<liferay-util:include page="/html/common/import_window.jsp" servletContext="<%=application%>"
portletId="<%=PortletKeys.FASCICOLO%>">
<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:include>
</c:otherwise>
</c:choose></td>
</tr>
<%
}
%>
</tbody>
</table>
</tbody>
</table>
<%
}
%>
</div>
</div>
</div>
</div>
<%
}
%>
<script type="text/javascript">
YUI().use(
'aui-tooltip',
function(Y) {
new Y.TooltipDelegate(
{
trigger: '.allegati-tipologia-table .tooltip-info',
position: 'top',
cssClass: 'tooltip-help',
html: true,
opacity: 1
}
);
}
);
YUI().use('aui-tooltip', function(Y) {
new Y.TooltipDelegate({
trigger : '.allegati-tipologia-table .tooltip-info',
position : 'top',
cssClass : 'tooltip-help',
html : true,
opacity : 1
});
});
</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="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
@ -13,7 +12,6 @@
<%@page import="com.liferay.portal.kernel.util.ArrayUtil"%>
<%@ include file="/html/fascicolofe/init.jsp" %>
<%
String backURL = ParamUtil.getString(request, "backURL");

544
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="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="com.liferay.portal.model.Portlet"%>
<%@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.util.AsseverazioniUtil"%>
<%@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 formName = "fmDomande";
String buttonId = "fmbuttonsalvaconferma_"+randomId;
String buttonAsseverazioneId = "fmbuttonasseverazione_"+randomId;
String script =
"var el_relazioni = $('textarea[name=_" + PortletKeys.FASCICOLOFE + "_{{prefix}}Relazioni]');" +
"if (el_relazioni.length) {" +
"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);" +
"var err_coniugio = (el_coniugiochk.length == 0);" +
"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_relazioni.css({'border-color':(err_relazioni ?'#a94442' : '#ccc')});" +
"if (err_coniugio || err_relazioni) {" +
"$('#" + renderResponse.getNamespace() + "{{prefix}}SaveAndCloseDiv_" + randomId + "').parent().scrollTop(0);" +
"return false;" +
"}" +
"}" +
"saveDettPratica(false, '{{type}}');";
String buttonId = "fmbuttonsalvaconferma_" + randomId;
String buttonAsseverazioneId = "fmbuttonasseverazione_" + randomId;
String script = "var el_relazioni = $('textarea[name=_"
+ PortletKeys.FASCICOLOFE
+ "_{{prefix}}Relazioni]');"
+ "if (el_relazioni.length) {"
+ "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);"
+
"var err_coniugio = (el_coniugiochk.length == 0);"
+ "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_relazioni.css({'border-color':(err_relazioni ?'#a94442' : '#ccc')});" +
"if (err_coniugio || err_relazioni) {" + "$('#" + renderResponse.getNamespace()
+ "{{prefix}}SaveAndCloseDiv_" + randomId + "').parent().scrollTop(0);" + "return false;"
+ "}" + "}" + "saveDettPratica(false, '{{type}}');";
%>
<aui:input type="hidden" name="cmd" value="" />
<aui:input type="hidden" name="verifyArea" value="" />
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<c:if test="<%= !TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione) %>">
<c:if test="<%= intPratica.getUserId() == user.getUserId()%>">
<liferay-ui:icon
iconCssClass="fa fa-save"
message="salva-bozza"
url="javascript:saveDettPratica(true);"
linkCssClass="btn"
/>
<liferay-ui:icon-menu showWhenSingleIcon="<%=false%>" extended="false" showExpanded="true"
cssClass="inline_toolbar">
<c:if test="<%=!TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione)%>">
<c:if test="<%=intPratica.getUserId() == user.getUserId()%>">
<liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true);"
linkCssClass="btn" />
</c:if>
<c:if test="<%= intPratica.getUserId() == user.getUserId()
&& !DelegheUtil.hasDelegaAttiva(user.getUserId(),dettPraticaId)
&& !AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon
iconCssClass="fa fa-check-square"
message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda', 'verifyFascicolo');"
linkCssClass="btn btn-primary"
/>
<c:if
test="<%=intPratica.getUserId() == user.getUserId()
&& !DelegheUtil.hasDelegaAttiva(user.getUserId(), dettPraticaId)
&& !AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda', 'verifyFascicolo');" linkCssClass="btn btn-primary" />
</c:if>
<c:if test="<%=DelegheUtil.canCompilaDomanda(user.getUserId(),dettPraticaId) %>">
<liferay-ui:icon
iconCssClass="fa fa-users"
linkCssClass='<%= ValidazionePraticaUtil.delegheCompilazioneIsEnable(dettPraticaId)?"btn":"btn disabled" %>'
message="gestione-deleghe"
url="javascript:saveDettPratica(false, 'domanda', 'verifyDeleghe');"
/>
<c:if test="<%=DelegheUtil.canCompilaDomanda(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon iconCssClass="fa fa-users"
linkCssClass='<%=ValidazionePraticaUtil.delegheCompilazioneIsEnable(dettPraticaId) ? "btn"
: "btn disabled"%>'
message="gestione-deleghe" url="javascript:saveDettPratica(false, 'domanda', 'verifyDeleghe');" />
</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 isIntegrazione = dettPratica.getTipoIntegrazione().equals(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE);
boolean isEsente = dettPratica.getNormEsenteBollo()
&& dettPratica.getNormEsenteSpese();
boolean isIntegrazione = dettPratica.getTipoIntegrazione().equals(
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE);
%>
<%-- <c:if test="<%= !isEsente && !isIntegrazione && DelegheUtil.canDoPayment(user.getUserId(),dettPraticaId) %>">
<liferay-ui:icon
@ -98,259 +104,321 @@
/>
</c:if> --%>
<%
Map<String,Object> dataMap = new HashMap<String, Object>();
dataMap.put("id", renderResponse.getNamespace()+"openVerificaFascicolo");
Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("id", renderResponse.getNamespace() + "openVerificaFascicolo");
%>
<liferay-portlet:renderURL var="completedURL" windowState="<%=LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/completed_fascicolo.jsp"/>
<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="classPk" value="<%=String.valueOf(dettPraticaId)%>" />
<liferay-portlet:param name="className" value="<%=DettPratica.class.getName()%>" />
<liferay-portlet:param name="comingFrom" value="domanda" />
</liferay-portlet:renderURL>
<c:if test="<%= isIntegrazione %>">
<liferay-portlet:actionURL name="completeIntegrazione" var="completeIntegrazioneURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp"/>
<c:if test="<%=isIntegrazione%>">
<liferay-portlet:actionURL name="completeIntegrazione" var="completeIntegrazioneURL"
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="redirect" value="<%= completedURL %>" />
<liferay-portlet:param name="redirect" value="<%=completedURL%>" />
</liferay-portlet:actionURL>
<liferay-ui:icon
linkCssClass='<%= ValidazionePraticaUtil.canCompleteIntegrazione(dettPraticaId) ?"btn btn-primary":"btn btn-primary disabled" %>'
iconCssClass="fa fa-check"
message="Concludi Integrazione"
url="<%= completeIntegrazioneURL %>"
data="<%= dataMap %>"
/>
linkCssClass='<%=ValidazionePraticaUtil.canCompleteIntegrazione(dettPraticaId) ? "btn btn-primary"
: "btn btn-primary disabled"%>'
iconCssClass="fa fa-check" message="Concludi Integrazione" url="<%=completeIntegrazioneURL%>"
data="<%=dataMap%>" />
</c:if>
<c:if test="<%= !isIntegrazione %>">
<c:if test="<%= isEsente %>">
<liferay-portlet:actionURL name="completeDomandaEsente" var="completeDomandaEsenteURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fascicolo.jsp"/>
<c:if test="<%=!isIntegrazione%>">
<c:if test="<%=isEsente%>">
<liferay-portlet:actionURL name="completeDomandaEsente" var="completeDomandaEsenteURL"
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="redirect" value="<%= completedURL %>" />
<liferay-portlet:param name="redirect" value="<%=completedURL%>" />
</liferay-portlet:actionURL>
<liferay-ui:icon
linkCssClass='<%= ValidazionePraticaUtil.canCompleteDettPraticaEsente(dettPraticaId) ?"btn btn-primary":"btn btn-primary disabled" %>'
iconCssClass="fa fa-check"
useDialog="<%= true %>"
message="Concludi Domanda"
url="<%= completeDomandaEsenteURL %>"
data="<%= dataMap %>"
/>
linkCssClass='<%=ValidazionePraticaUtil.canCompleteDettPraticaEsente(dettPraticaId) ? "btn btn-primary"
: "btn btn-primary disabled"%>'
iconCssClass="fa fa-check" useDialog="<%=true%>" message="Concludi Domanda"
url="<%=completeDomandaEsenteURL%>" data="<%=dataMap%>" />
</c:if>
<c:if test="<%= !isEsente %>">
<liferay-ui:icon
iconCssClass="fa fa-cogs"
linkCssClass='<%=ValidazionePraticaUtil.pagamentoIsEnable(dettPraticaId)?"btn btn-primary":"btn btn-primary disabled" %>'
message='<%= PagamentoLocalServiceUtil.countByClassPk(dettPraticaId)>0 ? LanguageUtil.get(pageContext, "dati-pagamento") : LanguageUtil.get(pageContext, "calcola-importo") %>'
url="javascript:saveDettPratica(false, 'domanda', 'verifyPagamenti');"
data="<%= dataMap %>"
/>
<c:if test="<%=!isEsente%>">
<liferay-ui:icon iconCssClass="fa fa-cogs"
linkCssClass='<%=ValidazionePraticaUtil.pagamentoIsEnable(dettPraticaId) ? "btn btn-primary"
: "btn btn-primary disabled"%>'
message='<%=PagamentoLocalServiceUtil.countByClassPk(dettPraticaId) > 0 ? LanguageUtil
.get(pageContext, "dati-pagamento") : LanguageUtil.get(pageContext,
"calcola-importo")%>'
url="javascript:saveDettPratica(false, 'domanda', 'verifyPagamenti');" data="<%=dataMap%>" />
</c:if>
</c:if>
</c:if>
<c:if test="<%=DelegheUtil.hasDelegaAttiva(user.getUserId(),dettPraticaId) && !DelegheUtil.hasDelegaPagamento(user.getUserId(), dettPraticaId) %>">
<liferay-ui:icon
iconCssClass="fa fa-save"
message="save"
url="javascript:saveDettPratica(true);"
linkCssClass="btn"
/>
<%
<c:if
test="<%=DelegheUtil.hasDelegaAttiva(user.getUserId(), dettPraticaId)
&& !DelegheUtil.hasDelegaPagamento(user.getUserId(), dettPraticaId)%>">
<liferay-ui:icon iconCssClass="fa fa-save" message="save" url="javascript:saveDettPratica(true);"
linkCssClass="btn" />
<%
long delegaId = ParamUtil.getLong(request, "delegaId");
Delega delega = DelegaLocalServiceUtil.getDelega(delegaId);
boolean validated = true;
StringBuilder tooltipSection = new StringBuilder();
if(delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)){
//List<String> notCompleted = ValidazionePraticaUtil.notCompletedSection(SezioniUtil.SEZIONE_GEOLOGICA, dettPraticaId);
List<String> notCompleted = ValidazionePraticaUtil.hasDelegaGeologoCompleted(dettPraticaId);
if(!notCompleted.isEmpty()){
validated = false;
tooltipSection.append("<ul class='list-body-modal'>");
for(String incomplete : notCompleted){
tooltipSection.append("<li class='item-body-modal'>"+LanguageUtil.get(pageContext, incomplete)+"</li>");
}
tooltipSection.append("</ul>");
}
}
if (delegaId == 0) {
_log.error("Errore pratica id " + intPratica.getIntPraticaId() + ", utente "
+ user.getScreenName() + ", delegaId = 0");
}
Delega delega = DelegaLocalServiceUtil.getDelega(delegaId);
boolean validated = true;
StringBuilder tooltipSection = new StringBuilder();
if (delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)) {
//List<String> notCompleted = ValidazionePraticaUtil.notCompletedSection(SezioniUtil.SEZIONE_GEOLOGICA, dettPraticaId);
List<String> notCompleted = ValidazionePraticaUtil
.hasDelegaGeologoCompleted(dettPraticaId);
if (!notCompleted.isEmpty()) {
validated = false;
tooltipSection.append("<ul class='list-body-modal'>");
for (String incomplete : notCompleted) {
tooltipSection.append("<li class='item-body-modal'>"
+ LanguageUtil.get(pageContext, incomplete) + "</li>");
}
tooltipSection.append("</ul>");
}
}
%>
<c:if test="<%= !validated %>">
<c:if test="<%=!validated%>">
<%
String buttonIdVerifica = "fmbuttonverifica_"+randomId;
String buttonIdVerifica = "fmbuttonverifica_" + randomId;
%>
<!-- ADT BUG FE ID = 14 -->
<liferay-ui:icon
id="<%= buttonIdVerifica %>"
iconCssClass="fa fa-times-circle txt-red"
message="verifica-delega"
url="javascript:saveDettPratica(true,'saveAndVerify');"
linkCssClass="btn"
/>
<liferay-ui:icon id="<%=buttonIdVerifica%>" iconCssClass="fa fa-times-circle txt-red"
message="verifica-delega" url="javascript:saveDettPratica(true,'saveAndVerify');" linkCssClass="btn" />
<!-- ADT BUG FE ID = 14 -->
<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="headerCSS" value="display-inline"></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="contentDiv" value='<%="verificaDiv_" + randomId%>'></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="okVisible" value="false"></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: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>
<%= tooltipSection.toString() %>
<%=tooltipSection.toString()%>
</div>
</div>
</c:if>
<c:if test="<%= validated && DelegheUtil.TIPO_GEOLOGO.equalsIgnoreCase(delega.getTipologia()) %>">
<liferay-ui:icon
iconCssClass="fa fa-check-circle txt-green"
message="verifica-delega"
url="javascript:void(0)"
linkCssClass="btn disabled"
/>
<c:if test="<%=validated
&& DelegheUtil.TIPO_GEOLOGO.equalsIgnoreCase(delega.getTipologia())%>">
<liferay-ui:icon iconCssClass="fa fa-check-circle txt-green" message="verifica-delega"
url="javascript:void(0)" linkCssClass="btn disabled" />
</c:if>
<span class="<%= !validated ? "tooltip-info" : StringPool.BLANK %>" title="Delega incompleta">
<liferay-ui:icon
id="<%=buttonId %>"
iconCssClass="fa fa-check-circle"
message="concludi-delega"
url="javascript:void(0)"
linkCssClass='<%= !validated ? "btn btn-primary disabled" : "btn btn-primary" %>'
/>
<span class="<%=!validated ? "tooltip-info" : StringPool.BLANK%>" title="Delega incompleta"> <liferay-ui:icon
id="<%=buttonId%>" iconCssClass="fa fa-check-circle" message="concludi-delega" url="javascript:void(0)"
linkCssClass='<%=!validated ? "btn btn-primary disabled" : "btn btn-primary"%>' />
</span>
<c:if test="<%= validated %>">
<div id='<%=renderResponse.getNamespace()+"dgSaveAndCloseDiv_"+randomId %>' class="hide" >
<span>
<c:choose>
<c:when test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_TOTALE) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<%= LanguageUtil.format(pageContext, "confirm-delega-totale", new String[]{user.getFirstName()+user.getMiddleName(), user.getLastName()}) %>
<c:if test="<%=validated%>">
<div id='<%=renderResponse.getNamespace() + "dgSaveAndCloseDiv_" + randomId%>' class="hide">
<span> <c:choose>
<c:when
test="<%=delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_TOTALE)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%=LanguageUtil.format(
pageContext,
"confirm-delega-totale",
new String[] { user.getFirstName() + user.getMiddleName(),
user.getLastName() })%>
</c:when>
<c:when 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
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 test="<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO) && delega.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<input type="hidden" name="_<%= PortletKeys.FASCICOLOFE %>_dgPresenti" value="1" />
<c:when
test="<%=delega.getTipologia()
.equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)
&& delega.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<input type="hidden" name="_<%=PortletKeys.FASCICOLOFE%>_dgPresenti" value="1" />
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 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>
<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 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>
<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 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
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 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
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 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
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 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
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:choose>
</span>
</div>
<liferay-portlet:resourceURL id="isCompletedDelegaGeologo" var="isCompletedDelegaGeologoURL" />
<%
String function = "A.io.request('"+isCompletedDelegaGeologoURL+"',{data: {"+renderResponse.getNamespace()+"classPk: "+dettPraticaId+"},"+
"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();}"+
"}});";
String function = "A.io.request('"
+ isCompletedDelegaGeologoURL
+ "',{data: {"
+ renderResponse.getNamespace()
+ "classPk: "
+ dettPraticaId
+ "},"
+ "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: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:include page="/html/common/submit_window.jsp" servletContext="<%=application%>">
<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="titolo" value="Conclusione Delega"></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="contentDiv" value='<%="dgSaveAndCloseDiv_" + randomId%>'></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="width" value="500"></liferay-util:param>
<liferay-util:param name="height" value="320"></liferay-util:param>
<c:if test='<%= delega.getTipologia().equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO) %>'>
<liferay-util:param name="function" value="<%= function %>"></liferay-util:param>
<c:if test='<%=delega.getTipologia()
.equalsIgnoreCase(DelegheUtil.TIPO_GEOLOGO)%>'>
<liferay-util:param name="function" value="<%=function%>"></liferay-util:param>
</c:if>
</liferay-util:include>
</c:if>
</c:if>
<c:if test="<%=AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), intPraticaId) %>">
<liferay-ui:icon
id="<%=buttonAsseverazioneId %>"
iconCssClass="fa fa-save"
message="Assevera"
url="#"
linkCssClass="btn btn-primary"
/>
<div id='<%=renderResponse.getNamespace()+"asSaveAndCloseDiv_"+randomId %>' class="hide" >
<input type="hidden" name="_<%= PortletKeys.FASCICOLOFE %>_asPresenti" value="1" />
<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>
<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>
<textarea id="<portlet:namespace />asrelazioni" name="_<%= PortletKeys.FASCICOLOFE %>_asRelazioni" style="display:none"></textarea>
<c:if test="<%=AsseverazioniUtil.hasAsseverazioneAttiva(user.getUserId(), intPraticaId)%>">
<liferay-ui:icon id="<%=buttonAsseverazioneId%>" iconCssClass="fa fa-save" message="Assevera" url="#"
linkCssClass="btn btn-primary" />
<div id='<%=renderResponse.getNamespace() + "asSaveAndCloseDiv_" + randomId%>' class="hide">
<input type="hidden" name="_<%=PortletKeys.FASCICOLOFE%>_asPresenti" value="1" /> <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> <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>
<textarea id="<portlet:namespace />asrelazioni" name="_<%=PortletKeys.FASCICOLOFE%>_asRelazioni"
style="display: none"></textarea>
<hr>
<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);
for(Asseverazione asseverazione : asseverazioni){
%>
<li class="anteprimaasseverazione">
<p>
<c:if test="<%= asseverazione.getCodiceFiscale().equalsIgnoreCase(user.getScreenName()) %>">
<%
String testoAsseverazione = AsseverazioneLocalServiceUtil.anteprimaAsseverazione(asseverazione.getTipologia(), user, dettPratica, null);
if (Validator.isNull(testoAsseverazione)) {
testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(asseverazione, user.getScreenName());
}
%>
<%= testoAsseverazione %>
</c:if>
</p>
</li>
<%
}
%>
<%
List<Asseverazione> asseverazioni = AsseverazioneServiceUtil
.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">
<p>
<c:if test="<%=asseverazione.getCodiceFiscale().equalsIgnoreCase(
user.getScreenName())%>">
<%
String testoAsseverazione = AsseverazioneLocalServiceUtil
.anteprimaAsseverazione(asseverazione.getTipologia(), user,
dettPratica, null);
if (Validator.isNull(testoAsseverazione)) {
testoAsseverazione = AsseverazioniUtil.retrieveAsseverazioneText(
asseverazione, user.getScreenName());
}
%>
<%=testoAsseverazione%>
</c:if>
</p>
</li>
<%
}
%>
</ol>
</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="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="contentDiv" value='<%= "asSaveAndCloseDiv_"+randomId %>'></liferay-util:param>
<liferay-util:param name="buttonId" value="<%= buttonAsseverazioneId %>"></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="buttonConferma" value="Conferma"></liferay-util:param>
<liferay-util:param name="width" value="800"></liferay-util:param>
</liferay-util:include>
</c:if>
</c:if>
<c:if test="<%= TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione) %>">
<liferay-ui:icon
iconCssClass="fa fa-save"
message="salva-bozza"
url="javascript:saveDettPratica(true);"
linkCssClass="btn"
/>
<liferay-ui:icon
iconCssClass="fa fa-check-square"
message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda');"
linkCssClass="btn btn-primary"
/>
<c:if test="<%=TipoIntegrazioneUtil.VARIAZIONE_SOGGETTO.equals(tipoIntegrazione)%>">
<liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza" url="javascript:saveDettPratica(true);"
linkCssClass="btn" />
<liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-verifica"
url="javascript:saveDettPratica(false, 'domanda');" linkCssClass="btn btn-primary" />
</c:if>
</liferay-ui:icon-menu>

Caricamento…
Annulla
Salva