| @ -0,0 +1,18 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <classpath> | |||
| <classpathentry kind="src" output="bin/main" path="src/main/java"> | |||
| <attributes> | |||
| <attribute name="gradle_scope" value="main"/> | |||
| <attribute name="gradle_used_by_scope" value="main,test,testIntegration"/> | |||
| </attributes> | |||
| </classpathentry> | |||
| <classpathentry kind="src" output="bin/main" path="src/main/resources"> | |||
| <attributes> | |||
| <attribute name="gradle_scope" value="main"/> | |||
| <attribute name="gradle_used_by_scope" value="main,test,testIntegration"/> | |||
| </attributes> | |||
| </classpathentry> | |||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/> | |||
| <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> | |||
| <classpathentry kind="output" path="bin/default"/> | |||
| </classpath> | |||
| @ -0,0 +1,4 @@ | |||
| .gradle/ | |||
| .sass-cache/ | |||
| build/ | |||
| target/ | |||
| @ -0,0 +1,24 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <projectDescription> | |||
| <name>modelo-redireccion-seguimiento</name> | |||
| <comment>Project modelo-redireccion-seguimiento created by Buildship.</comment> | |||
| <projects> | |||
| </projects> | |||
| <buildSpec> | |||
| <buildCommand> | |||
| <name>org.eclipse.jdt.core.javabuilder</name> | |||
| <arguments> | |||
| </arguments> | |||
| </buildCommand> | |||
| <buildCommand> | |||
| <name>org.eclipse.buildship.core.gradleprojectbuilder</name> | |||
| <arguments> | |||
| </arguments> | |||
| </buildCommand> | |||
| </buildSpec> | |||
| <natures> | |||
| <nature>org.eclipse.jdt.core.javanature</nature> | |||
| <nature>com.liferay.ide.core.liferayNature</nature> | |||
| <nature>org.eclipse.buildship.core.gradleprojectnature</nature> | |||
| </natures> | |||
| </projectDescription> | |||
| @ -0,0 +1,2 @@ | |||
| connection.project.dir=../.. | |||
| eclipse.preferences.version=1 | |||
| @ -0,0 +1,46 @@ | |||
| <%@ include file="/init.jsp" %> | |||
| <liferay-portlet:actionURL portletConfiguration="<%= true %>" | |||
| var="configurationActionURL" | |||
| /> | |||
| <c:choose> | |||
| <c:when test = "${permiso_role == true}"> | |||
| <div class=" pb-3 px-3 pt-3" style=""> | |||
| <div class="container"> | |||
| <aui:form action="<%= configurationActionURL %>" method="post" name="fm"> | |||
| <liferay-ui:tabs | |||
| names='<%= "Config Redireccion" %>' | |||
| refresh="<%= false %>" | |||
| type="tabs nav-tabs-default" | |||
| > | |||
| <liferay-ui:section> | |||
| <aui:fieldset-group> | |||
| <aui:input label="Url Redireccion Seguimiento" name="urlRedireccion" required="required" type="text" value="${urlRedireccion}" /> | |||
| </br> | |||
| <aui:input label="Canal" name="campoCanal" required="required" type="text" value="${campoCanal}" /> | |||
| </br> | |||
| <aui:input label="Url Permanencia Redireccion" name="urlPermanencia" required="required" type="text" value="${urlPermanencia}" /> | |||
| </br> | |||
| </aui:fieldset-group> | |||
| </liferay-ui:section> | |||
| </liferay-ui:tabs> | |||
| <aui:button-row> | |||
| <aui:button type="submit"></aui:button> | |||
| </aui:button-row> | |||
| </aui:form> | |||
| </div> | |||
| </div> | |||
| </c:when> | |||
| <c:otherwise> | |||
| <p><b><liferay-ui:message key="modelo.redireccion.seguimiento.sin.permiso"/></b></p> | |||
| </c:otherwise> | |||
| </c:choose> | |||
| <script type="text/javascript"> | |||
| </script> | |||
| @ -0,0 +1,2 @@ | |||
| .modelo-redireccion-seguimiento { | |||
| } | |||
| @ -0,0 +1,24 @@ | |||
| <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |||
| <c:choose> | |||
| <c:when test = "${modoEdit == false}"> | |||
| <script src="https://cdn.rawgit.com/jquery/jquery/2.1.4/dist/jquery.min.js"></script> | |||
| <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> | |||
| </c:when> | |||
| <c:otherwise> | |||
| </c:otherwise> | |||
| </c:choose> | |||
| <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> | |||
| <%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %><%@ | |||
| taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %><%@ | |||
| taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %><%@ | |||
| taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> | |||
| <liferay-theme:defineObjects /> | |||
| <portlet:defineObjects /> | |||
| @ -0,0 +1,33 @@ | |||
| <%@ include file="/init.jsp" %> | |||
| <c:choose> | |||
| <c:when test = "${modoEdit == false}"> | |||
| <c:choose> | |||
| <c:when test = "${monstrarRedireccion == true}"> | |||
| <div class="container"> | |||
| <div id="cargandoContratos" style="text-align: center;margin: inherit; margin-top: 5%; margin-bottom: 5%;"> | |||
| <img src="<%=request.getContextPath()%>/images/loader.gif" alt="loading"><br><liferay-ui:message key="modelo.redireccion.seguimiento.cargando"/></div> | |||
| </div> | |||
| <script type="text/javascript"> | |||
| $(document).ready(function() { | |||
| console.log("Redireccion Seguimiento" ); | |||
| var redireccioPermanencia = '${urlPermanenciaRedirect}'; | |||
| var redireccioSeguimiento = '${urlSeguimiento}'; | |||
| window.open(redireccioSeguimiento, '_blank'); | |||
| window.location.replace(redireccioPermanencia); | |||
| }); | |||
| </script> | |||
| </c:when> | |||
| <c:otherwise> | |||
| </c:otherwise> | |||
| </c:choose> | |||
| </c:when> | |||
| <c:otherwise> | |||
| <div class="container"> | |||
| <h2 class="component-heading mb-0 pb-0 text-center text-break text-blue-hites"> | |||
| <div class="title-hites" style="margin-top: 10%;margin-bottom: 10%;"><liferay-ui:message key="modelo.redireccion.seguimiento.sin.redirecion"/></div> | |||
| </h2> | |||
| </div> | |||
| </c:otherwise> | |||
| </c:choose> | |||
| @ -0,0 +1,8 @@ | |||
| javax.portlet.title.modelo_redireccion_seguimiento_ModeloRedireccionSeguimientoPortlet=ModeloRedireccionSeguimiento | |||
| modeloredireccionseguimiento.caption=Hello from ModeloRedireccionSeguimiento! | |||
| modelo.redireccion.seguimiento.sin.permiso=No tiene Permisos para modificar esta Configuraci\uFFFDn. | |||
| modelo.redireccion.seguimiento.cargando=Un momento, por favor... | |||
| modelo.redireccion.seguimiento.sin.redirecion=Sin redireccion | |||
| @ -0,0 +1,6 @@ | |||
| Bundle-Name: modelo-redireccion-seguimiento | |||
| Bundle-SymbolicName: modelo.redireccion.seguimiento | |||
| Bundle-Version: 1.0.0 | |||
| Import-Package: *;resolution:=optional | |||
| -includeresource: \ | |||
| META-INF/lib/jjwt-0.7.0.jar=jjwt-0.7.0.jar;lib:=true | |||
| @ -0,0 +1,23 @@ | |||
| dependencies { | |||
| compileOnly group: "com.liferay", name: "com.liferay.asset.taglib" | |||
| compileOnly group: "com.liferay", name: "com.liferay.comment.taglib" | |||
| compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib" | |||
| compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib.dynamic.section" | |||
| compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib.form.navigator" | |||
| compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib.util" | |||
| compileOnly group: "com.liferay", name: "com.liferay.journal.taglib" | |||
| compileOnly group: "com.liferay", name: "com.liferay.layout.taglib" | |||
| compileOnly group: "com.liferay", name: "com.liferay.site.taglib" | |||
| compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel" | |||
| compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl" | |||
| compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib" | |||
| compileOnly group: "javax.portlet", name: "portlet-api" | |||
| compileOnly group: "javax.servlet", name: "javax.servlet-api" | |||
| compileOnly group: "jstl", name: "jstl" | |||
| compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations" | |||
| cssBuilder group: "com.liferay", name: "com.liferay.css.builder", version: "3.0.2" | |||
| compileInclude group: 'io.jsonwebtoken', name: 'jjwt', version: '0.7.0' | |||
| } | |||
| @ -0,0 +1,84 @@ | |||
| package modelo.redireccion.seguimiento.configuration; | |||
| import com.liferay.portal.kernel.log.Log; | |||
| import com.liferay.portal.kernel.log.LogFactoryUtil; | |||
| import com.liferay.portal.kernel.portlet.ConfigurationAction; | |||
| import com.liferay.portal.kernel.portlet.DefaultConfigurationAction; | |||
| import com.liferay.portal.kernel.util.ParamUtil; | |||
| import com.liferay.portal.kernel.util.PortalUtil; | |||
| import javax.portlet.ActionRequest; | |||
| import javax.portlet.ActionResponse; | |||
| import javax.portlet.PortletConfig; | |||
| import javax.portlet.PortletPreferences; | |||
| import javax.portlet.PortletRequest; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import org.osgi.service.component.annotations.Component; | |||
| import org.osgi.service.component.annotations.ConfigurationPolicy; | |||
| import modelo.redireccion.seguimiento.constants.ModeloRedireccionSeguimientoPortletKeys; | |||
| @Component( | |||
| configurationPid = "modelo.redireccion.seguimiento.configuration.ModeloRedireccionSeguimientoConfiguracion", | |||
| configurationPolicy = ConfigurationPolicy.OPTIONAL, | |||
| immediate = true, | |||
| property = { | |||
| "javax.portlet.name="+ ModeloRedireccionSeguimientoPortletKeys.MODELOREDIRECCIONSEGUIMIENTO | |||
| }, | |||
| service = ConfigurationAction.class | |||
| ) | |||
| public class ModeloRedireccionSeguimientoConfiguracion extends DefaultConfigurationAction{ | |||
| private static final Log _log = LogFactoryUtil.getLog(ModeloRedireccionSeguimientoConfiguracion.class); | |||
| @Override | |||
| public String getJspPath(HttpServletRequest renderRequest) { | |||
| _log.info("[getJspPath()] Inicio ..."); | |||
| HttpServletRequest httpOrigReq = PortalUtil.getOriginalServletRequest(renderRequest); | |||
| String myValue = httpOrigReq.getParameter("p_p_id"); | |||
| if(myValue != null && myValue.contains("PortletConfiguration")) { | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.ROLE_PERMISO, true); | |||
| }else { | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.ROLE_PERMISO, false); | |||
| } | |||
| PortletRequest pr=(PortletRequest) renderRequest.getAttribute("javax.portlet.request"); | |||
| PortletPreferences prefs=pr.getPreferences(); | |||
| //Redireccion | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_REDIRECT, prefs.getValue(ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_REDIRECT, "") ); | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.FIELD_CANAL, prefs.getValue(ModeloRedireccionSeguimientoPortletKeys.FIELD_CANAL, "") ); | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_PERMANENCIA, prefs.getValue(ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_PERMANENCIA, "") ); | |||
| _log.info("[getJspPath()] fin ..."); | |||
| return "/config.jsp"; | |||
| } | |||
| @Override | |||
| public void processAction(PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse) | |||
| throws Exception { | |||
| _log.info("[getJspPath()] Inicio ..."); | |||
| String urlRedireccion = ParamUtil.getString(actionRequest, ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_REDIRECT); | |||
| String campoCanal = ParamUtil.getString(actionRequest, ModeloRedireccionSeguimientoPortletKeys.FIELD_CANAL); | |||
| String urlPermanencia = ParamUtil.getString(actionRequest, ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_PERMANENCIA); | |||
| _log.info("[getJspPath()] urlRedireccion : "+urlRedireccion); | |||
| _log.info("[getJspPath()] campoCanal : "+campoCanal); | |||
| _log.info("[getJspPath()] urlPermanencia : "+urlPermanencia); | |||
| PortletPreferences prefs=actionRequest.getPreferences(); | |||
| prefs.setValue(ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_REDIRECT, urlRedireccion); | |||
| prefs.setValue(ModeloRedireccionSeguimientoPortletKeys.FIELD_CANAL, campoCanal); | |||
| prefs.setValue(ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_PERMANENCIA, urlPermanencia); | |||
| prefs.store(); | |||
| _log.info("[getJspPath()] Fin ..."); | |||
| super.processAction(portletConfig, actionRequest, actionResponse); | |||
| } | |||
| } | |||
| @ -0,0 +1,25 @@ | |||
| package modelo.redireccion.seguimiento.constants; | |||
| /** | |||
| * @author Victor Carrasco | |||
| */ | |||
| public class ModeloRedireccionSeguimientoPortletKeys { | |||
| public static final String MODELOREDIRECCIONSEGUIMIENTO = | |||
| "modelo_redireccion_seguimiento_ModeloRedireccionSeguimientoPortlet"; | |||
| public static final String ROLE_ADMINISTRATOR = "Administrator"; | |||
| public static final String ROLE_PERMISO = "permiso_role"; | |||
| public static final String MOSTRAR_REDIRECCION = "monstrarRedireccion"; | |||
| public static final String URL_SEGUIMIENTO = "urlSeguimiento"; | |||
| public static final String URL_PERMANENCIA = "urlPermanenciaRedirect"; | |||
| /* Campos Configuracion*/ | |||
| /* Redireccion*/ | |||
| public static final String FIELD_URL_REDIRECT = "urlRedireccion"; | |||
| public static final String FIELD_CANAL = "campoCanal"; | |||
| public static final String FIELD_URL_PERMANENCIA = "urlPermanencia"; | |||
| } | |||
| @ -0,0 +1,135 @@ | |||
| package modelo.redireccion.seguimiento.portlet; | |||
| import static java.time.ZoneOffset.UTC; | |||
| import com.liferay.portal.kernel.log.Log; | |||
| import com.liferay.portal.kernel.log.LogFactoryUtil; | |||
| import com.liferay.portal.kernel.model.User; | |||
| import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet; | |||
| import com.liferay.portal.kernel.theme.ThemeDisplay; | |||
| import com.liferay.portal.kernel.util.PortalUtil; | |||
| import com.liferay.portal.kernel.util.WebKeys; | |||
| import javax.portlet.Portlet; | |||
| import javax.portlet.PortletException; | |||
| import javax.portlet.PortletPreferences; | |||
| import javax.portlet.PortletRequest; | |||
| import javax.portlet.RenderRequest; | |||
| import javax.portlet.RenderResponse; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import org.osgi.service.component.annotations.Component; | |||
| import io.jsonwebtoken.Jwts; | |||
| import io.jsonwebtoken.SignatureAlgorithm; | |||
| import modelo.redireccion.seguimiento.constants.ModeloRedireccionSeguimientoPortletKeys; | |||
| import java.io.IOException; | |||
| import java.time.LocalDateTime; | |||
| import java.util.Date; | |||
| import java.util.HashMap; | |||
| import java.util.Map; | |||
| /** | |||
| * @author Victor Carrasco | |||
| */ | |||
| @Component( | |||
| immediate = true, | |||
| property = { | |||
| "com.liferay.portlet.display-category=category.sample", | |||
| "com.liferay.portlet.header-portlet-css=/css/main.css", | |||
| "com.liferay.portlet.instanceable=true", | |||
| "javax.portlet.display-name=ModeloRedireccionSeguimiento", | |||
| "javax.portlet.init-param.template-path=/", | |||
| "javax.portlet.init-param.view-template=/view.jsp", | |||
| "javax.portlet.name=" + ModeloRedireccionSeguimientoPortletKeys.MODELOREDIRECCIONSEGUIMIENTO, | |||
| "javax.portlet.resource-bundle=content.Language", | |||
| "javax.portlet.security-role-ref=power-user,user" | |||
| }, | |||
| service = Portlet.class | |||
| ) | |||
| public class ModeloRedireccionSeguimientoPortlet extends MVCPortlet { | |||
| private static final Log _log = LogFactoryUtil.getLog(ModeloRedireccionSeguimientoPortlet.class); | |||
| public static final String ISSUER = "cl.hites.sts"; | |||
| public static final int EXPIRACION = 30; | |||
| byte[] secretKey = new byte[64]; | |||
| @Override | |||
| public void doView(RenderRequest renderRequest, RenderResponse renderResponse) | |||
| throws IOException, PortletException { | |||
| ThemeDisplay themeDisplay = (ThemeDisplay) renderRequest.getAttribute(WebKeys.THEME_DISPLAY); | |||
| PortletRequest pr=(PortletRequest) renderRequest.getAttribute("javax.portlet.request"); | |||
| PortletPreferences prefs=pr.getPreferences(); | |||
| User user = themeDisplay.getUser(); | |||
| HttpServletRequest httpReq = PortalUtil.getHttpServletRequest(renderRequest); | |||
| HttpServletRequest httpOrigReq = PortalUtil.getOriginalServletRequest(httpReq); | |||
| String myValue = httpOrigReq.getParameter("p_l_mode"); | |||
| if(myValue != null && myValue.equals("edit")) { | |||
| renderRequest.setAttribute( "modoEdit", true); | |||
| }else { | |||
| renderRequest.setAttribute( "modoEdit", false); | |||
| if(!user.getDefaultUser()) { | |||
| String rut = user.getScreenName().trim(); | |||
| String[] rutUsuario = rut.split("-"); rut = ""; | |||
| for (String rutUser : rutUsuario) { rut = rut + rutUser; } | |||
| _log.info("[doView()] rut : "+rut); | |||
| String urlRedireccion = prefs.getValue(ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_REDIRECT, ""); | |||
| _log.info("[doView()] url Redireccion Seguimiento : " +urlRedireccion); | |||
| String canal = prefs.getValue(ModeloRedireccionSeguimientoPortletKeys.FIELD_CANAL, ""); | |||
| _log.info("[doView()] c : " +canal); | |||
| String urlPermanencia = prefs.getValue(ModeloRedireccionSeguimientoPortletKeys.FIELD_URL_PERMANENCIA, ""); | |||
| _log.info("[doView()] c : " +urlPermanencia); | |||
| Map<String, Object> map = new HashMap<>(); | |||
| map.put("rut", rut); | |||
| map.put("canal", canal); | |||
| String token = makeToken(rut,map); | |||
| if( token!=null&&!token.isEmpty()) { | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.MOSTRAR_REDIRECCION, true); | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.URL_SEGUIMIENTO, urlRedireccion.concat(token)); | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.URL_PERMANENCIA, urlPermanencia); | |||
| }else { | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.MOSTRAR_REDIRECCION, false); | |||
| } | |||
| }else { | |||
| renderRequest.setAttribute( ModeloRedireccionSeguimientoPortletKeys.MOSTRAR_REDIRECCION, false); | |||
| } | |||
| } | |||
| super.doView(renderRequest, renderResponse); | |||
| } | |||
| private String makeToken(String userName, Map<String, Object> dataToEncripted) { | |||
| String result = ""; | |||
| Date expiration = Date.from(LocalDateTime.now(UTC).plusMinutes(EXPIRACION)/*.plusHours(2)*/.toInstant(UTC)); | |||
| result = Jwts.builder(). | |||
| setClaims(dataToEncripted). | |||
| setSubject(userName). | |||
| //setAudience(issuer). | |||
| setExpiration(expiration). | |||
| setIssuer(ISSUER). | |||
| signWith(SignatureAlgorithm.HS512, secretKey). | |||
| compact(); | |||
| return result; | |||
| } | |||
| } | |||
| @ -0,0 +1,46 @@ | |||
| <%@ include file="/init.jsp" %> | |||
| <liferay-portlet:actionURL portletConfiguration="<%= true %>" | |||
| var="configurationActionURL" | |||
| /> | |||
| <c:choose> | |||
| <c:when test = "${permiso_role == true}"> | |||
| <div class=" pb-3 px-3 pt-3" style=""> | |||
| <div class="container"> | |||
| <aui:form action="<%= configurationActionURL %>" method="post" name="fm"> | |||
| <liferay-ui:tabs | |||
| names='<%= "Config Redireccion" %>' | |||
| refresh="<%= false %>" | |||
| type="tabs nav-tabs-default" | |||
| > | |||
| <liferay-ui:section> | |||
| <aui:fieldset-group> | |||
| <aui:input label="Url Redireccion Seguimiento" name="urlRedireccion" required="required" type="text" value="${urlRedireccion}" /> | |||
| </br> | |||
| <aui:input label="Canal" name="campoCanal" required="required" type="text" value="${campoCanal}" /> | |||
| </br> | |||
| <aui:input label="Url Permanencia Redireccion" name="urlPermanencia" required="required" type="text" value="${urlPermanencia}" /> | |||
| </br> | |||
| </aui:fieldset-group> | |||
| </liferay-ui:section> | |||
| </liferay-ui:tabs> | |||
| <aui:button-row> | |||
| <aui:button type="submit"></aui:button> | |||
| </aui:button-row> | |||
| </aui:form> | |||
| </div> | |||
| </div> | |||
| </c:when> | |||
| <c:otherwise> | |||
| <p><b><liferay-ui:message key="modelo.redireccion.seguimiento.sin.permiso"/></b></p> | |||
| </c:otherwise> | |||
| </c:choose> | |||
| <script type="text/javascript"> | |||
| </script> | |||
| @ -0,0 +1,2 @@ | |||
| .modelo-redireccion-seguimiento { | |||
| } | |||
| @ -0,0 +1,24 @@ | |||
| <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |||
| <c:choose> | |||
| <c:when test = "${modoEdit == false}"> | |||
| <script src="https://cdn.rawgit.com/jquery/jquery/2.1.4/dist/jquery.min.js"></script> | |||
| <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> | |||
| </c:when> | |||
| <c:otherwise> | |||
| </c:otherwise> | |||
| </c:choose> | |||
| <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> | |||
| <%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %><%@ | |||
| taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %><%@ | |||
| taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %><%@ | |||
| taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> | |||
| <liferay-theme:defineObjects /> | |||
| <portlet:defineObjects /> | |||
| @ -0,0 +1,33 @@ | |||
| <%@ include file="/init.jsp" %> | |||
| <c:choose> | |||
| <c:when test = "${modoEdit == false}"> | |||
| <c:choose> | |||
| <c:when test = "${monstrarRedireccion == true}"> | |||
| <div class="container"> | |||
| <div id="cargandoContratos" style="text-align: center;margin: inherit; margin-top: 5%; margin-bottom: 5%;"> | |||
| <img src="<%=request.getContextPath()%>/images/loader.gif" alt="loading"><br><liferay-ui:message key="modelo.redireccion.seguimiento.cargando"/></div> | |||
| </div> | |||
| <script type="text/javascript"> | |||
| $(document).ready(function() { | |||
| console.log("Redireccion Seguimiento" ); | |||
| var redireccioPermanencia = '${urlPermanenciaRedirect}'; | |||
| var redireccioSeguimiento = '${urlSeguimiento}'; | |||
| window.open(redireccioSeguimiento, '_blank'); | |||
| window.location.replace(redireccioPermanencia); | |||
| }); | |||
| </script> | |||
| </c:when> | |||
| <c:otherwise> | |||
| </c:otherwise> | |||
| </c:choose> | |||
| </c:when> | |||
| <c:otherwise> | |||
| <div class="container"> | |||
| <h2 class="component-heading mb-0 pb-0 text-center text-break text-blue-hites"> | |||
| <div class="title-hites" style="margin-top: 10%;margin-bottom: 10%;"><liferay-ui:message key="modelo.redireccion.seguimiento.sin.redirecion"/></div> | |||
| </h2> | |||
| </div> | |||
| </c:otherwise> | |||
| </c:choose> | |||
| @ -0,0 +1,8 @@ | |||
| javax.portlet.title.modelo_redireccion_seguimiento_ModeloRedireccionSeguimientoPortlet=ModeloRedireccionSeguimiento | |||
| modeloredireccionseguimiento.caption=Hello from ModeloRedireccionSeguimiento! | |||
| modelo.redireccion.seguimiento.sin.permiso=No tiene Permisos para modificar esta Configuraci\uFFFDn. | |||
| modelo.redireccion.seguimiento.cargando=Un momento, por favor... | |||
| modelo.redireccion.seguimiento.sin.redirecion=Sin redireccion | |||
Powered by TurnKey Linux.