Configuração para Painel de Controle / Ajustes de layout

parent db926089
<%@ include file="/init.jsp" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ 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" %>
boolean errArquivo = false; <%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
boolean errVazio = false; <%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
boolean errDataNula = false; <%@ taglib uri="http://liferay.com/tld/clay" prefix="clay" %>
boolean errHorarioLimite = false;
String cssErro = "control-group error"; <%@ page import="com.liferay.portal.kernel.util.ParamUtil" %>
<%@ page import="com.liferay.frontend.taglib.clay.servlet.taglib.util.JSPNavigationItemList" %>
if(request.getAttribute("erroArquivo") != null){ <%@ page import="com.liferay.portal.kernel.language.LanguageUtil" %>
errArquivo = (Boolean) request.getAttribute("erroArquivo"); <%@ page import="javax.portlet.PortletPreferences" %>
} <%@ page import="javax.portlet.ActionRequest" %>
if(request.getAttribute("erroVazio") != null){ <%@ page import="javax.portlet.PortletURL" %>
errVazio = (Boolean) request.getAttribute("erroVazio"); <%@ page import="com.liferay.portal.kernel.util.HtmlUtil" %>
} <%@ page import="com.liferay.portal.kernel.util.GetterUtil"%>
if(request.getAttribute("erroDataNula") != null){ <%@ page import="com.liferay.portal.kernel.util.Validator" %>
errDataNula = (Boolean) request.getAttribute("erroDataNula"); <%@ page import="com.liferay.portal.kernel.dao.search.RowChecker" %>
} <%@ page import="com.liferay.portal.kernel.search.Document" %>
if(request.getAttribute("erroHorarioLimite") != null){ <%@ page import="com.liferay.portal.kernel.dao.orm.QueryUtil" %>
errHorarioLimite = (Boolean) request.getAttribute("erroHorarioLimite"); <%@ page import="com.liferay.portal.kernel.search.Hits" %>
} <%@ page import="com.liferay.portal.kernel.util.UnicodeFormatter" %>
%> <%@ page import="com.liferay.portal.kernel.util.PrefsParamUtil" %>
<%@ page import="com.liferay.portal.kernel.util.Constants" %>
<%@ page import="com.liferay.portal.kernel.portlet.LiferayWindowState" %>
<liferay-theme:defineObjects /> <liferay-theme:defineObjects />
<portlet:defineObjects /> <portlet:defineObjects />
<liferay-ui:error key="erroListagemNula" message="No existem matrias cadastradas para os parmetros utilizados." />
<h3><liferay-ui:message key="admin.form.agendamento.titulo"/></h3>
<hr />
<div class="texto-obs"><liferay-ui:message key="admin.form.agendamento.observacao"/></div>
<portlet:renderURL var="viewUrl">
<portlet:param name="jspPath" value="/view.jsp"/>
</portlet:renderURL>
<portlet:actionURL var="submitActionURL">
<portlet:param name="<%=ActionRequest.ACTION_NAME%>" value="geraCaderno" />
<portlet:param name="mvcPath" value="/view.jsp"/>
</portlet:actionURL>
<form id="<portlet:namespace />formDO" name="<portlet:namespace />formDO" method="POST" action="<%= submitActionURL%>" data-senna-off="true">
<div id="campo-situacao" class="campo">
<label><liferay-ui:message key="admin.form.editar.situacao"/></label>
<select class="selectpicker" name="<portlet:namespace/>situacao" id="<portlet:namespace/>situacao" >
<option value="4">Validada</option>
<option value="6">Aprovada</option>
<option value="8">Divulgada</option>
</select>
<liferay-ui:error key="erroTipoMat" message="Uma Situao deve ser selecionada." />
</div>
<div class='campo <%=errDataNula || errHorarioLimite ? cssErro : "" %>' >
<label><liferay-ui:message key="admin.form.agendamento.data.divulgacao"/></label>
<div class="form-group">
<div class='input-group date' id='datepickeragendamento'>
<input class="form-control" name="<portlet:namespace/>dataP" id="<portlet:namespace/>dataP" onpaste="return false;" ondrop="return false;"/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<liferay-ui:error key="erroDataNula" message="Uma data deve ser selecionada." />
</div>
<button type="submit" id="enviarFormDO" name="enviarFormDO" class="btn btn-primary">Gerar Caderno</button>
<button type="reset" id="limparFormDO" name="limparFormDO" class="btn btn-cancel">Limpar</button>
<button type="button" id="jobForm" name="jobForm" class="oculto" style="display: none">no aperte</button>
</form>
<portlet:resourceURL var="ocultoJob"><portlet:param name="parameter" value="jobOculto" /></portlet:resourceURL>
<portlet:resourceURL var="testAjaxResourceUrl"></portlet:resourceURL>
<%
final String navigation = ParamUtil.getString(request, "navigation", "gerar");
%>
<script type="text/javascript"> <clay:navigation-bar
var urlAjax = "<%=testAjaxResourceUrl%>"; inverted="<%= true %>"
var urlOculto = "<%=ocultoJob%>"; navigationItems='<%=
</script> new JSPNavigationItemList(pageContext) {
\ No newline at end of file {
add(
navigationItem -> {
navigationItem.setActive(navigation.equals("gerar"));
navigationItem.setHref(renderResponse.createRenderURL());
navigationItem.setLabel(LanguageUtil.get(request, "Gerar Caderno"));
});
}
}
%>'
/>
<c:choose>
<c:when test='<%= navigation.equals("gerar") %>'>
<%@ include file="/view-admin.jsp" %>
</c:when>
<c:otherwise>
<%@ include file="/view-admin.jsp" %>
</c:otherwise>
</c:choose>
javax.portlet.title.mprj_doerj_caderno_MprjDoerjCadernoPortlet=MprjDoerjCaderno javax.portlet.title.mprj_doerj_caderno_MprjDoerjCadernoPortlet=Caderno do Diário Oficial
mprjdoerjcaderno.caption=Hello from MprjDoerjCaderno! mprjdoerjcaderno.caption=Hello from MprjDoerjCaderno!
#ADMINISTRACAO #ADMINISTRACAO
......
...@@ -13,6 +13,8 @@ buildscript { ...@@ -13,6 +13,8 @@ buildscript {
apply plugin: "com.liferay.plugin" apply plugin: "com.liferay.plugin"
dependencies { dependencies {
compileOnly group: 'com.liferay', name: 'com.liferay.application.list.api', version: '5.0.3'
compileOnly group: 'com.liferay', name: 'com.liferay.frontend.taglib.clay', version: '2.2.19'
compileOnly group: 'com.liferay', name: 'com.liferay.asset.taglib', version: '4.0.15' compileOnly group: 'com.liferay', name: 'com.liferay.asset.taglib', version: '4.0.15'
compileOnly group: 'com.liferay', name: 'com.liferay.comment.taglib', version: '2.0.7' compileOnly group: 'com.liferay', name: 'com.liferay.comment.taglib', version: '2.0.7'
compileOnly group: 'com.liferay', name: 'com.liferay.frontend.taglib', version: '4.0.15' compileOnly group: 'com.liferay', name: 'com.liferay.frontend.taglib', version: '4.0.15'
...@@ -105,6 +107,6 @@ repositories { ...@@ -105,6 +107,6 @@ repositories {
} }
liferay{ liferay{
liferayHome="/home/henrique/projetos/MPRJ/DXP7.2/implementacao/opt/deploy" liferayHome="C:/Projetos/mprj/opt/deploy"
deployDir=file("${liferayHome}/") deployDir=file("${liferayHome}/")
} }
\ No newline at end of file
package mprj.doerj.caderno.application.list;
import com.liferay.application.list.BasePanelApp;
import com.liferay.application.list.PanelApp;
import com.liferay.portal.kernel.model.Portlet;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import mprj.doerj.caderno.constants.MprjDoerjCadernoPortletKeys;
import mprj.doerj.caderno.constants.MprjDoerjCadernoWebPanelCategoryKeys;
/**
* @author Bertasso
*/
@Component(
immediate = true,
property = {
"panel.app.order:Integer=40",
"panel.category.key=" + MprjDoerjCadernoWebPanelCategoryKeys.CONTROL_PANEL_CATEGORY
},
service = PanelApp.class
)
public class MprjDoerjCadernoPanelApp extends BasePanelApp {
@Override
public String getPortletId() {
return MprjDoerjCadernoPortletKeys.MPRJDOERJCADERNO;
}
@Override
@Reference(
target = "(javax.portlet.name=" + MprjDoerjCadernoPortletKeys.MPRJDOERJCADERNO + ")",
unbind = "-"
)
public void setPortlet(Portlet portlet) {
super.setPortlet(portlet);
}
}
package mprj.doerj.caderno.constants;
/**
* @author everton
*/
public class MprjDoerjCadernoWebPanelCategoryKeys {
public static final String CONTROL_PANEL_CATEGORY = "MPRJ";
}
\ No newline at end of file
...@@ -6,11 +6,8 @@ import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet; ...@@ -6,11 +6,8 @@ import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
import com.liferay.portal.kernel.search.ParseException; import com.liferay.portal.kernel.search.ParseException;
import com.liferay.portal.kernel.servlet.SessionErrors; import com.liferay.portal.kernel.servlet.SessionErrors;
import com.liferay.portal.kernel.servlet.SessionMessages; import com.liferay.portal.kernel.servlet.SessionMessages;
import com.liferay.portal.kernel.theme.ThemeDisplay;
import com.liferay.portal.kernel.upload.UploadPortletRequest;
import com.liferay.portal.kernel.util.ParamUtil; import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.PortalUtil; import com.liferay.portal.kernel.util.PortalUtil;
import com.liferay.portal.kernel.util.WebKeys;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
...@@ -19,9 +16,8 @@ import javax.portlet.ActionRequest; ...@@ -19,9 +16,8 @@ import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse; import javax.portlet.ActionResponse;
import javax.portlet.Portlet; import javax.portlet.Portlet;
import javax.portlet.PortletException; import javax.portlet.PortletException;
import javax.portlet.PortletURL; import javax.portlet.ResourceRequest;
import javax.portlet.RenderRequest; import javax.portlet.ResourceResponse;
import javax.portlet.RenderResponse;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.json.JSONArray; import org.json.JSONArray;
...@@ -29,16 +25,18 @@ import org.osgi.service.component.annotations.Component; ...@@ -29,16 +25,18 @@ import org.osgi.service.component.annotations.Component;
import mprj.doerj.caderno.constants.MprjDoerjCadernoPortletKeys; import mprj.doerj.caderno.constants.MprjDoerjCadernoPortletKeys;
import mprj.doerj.caderno.rest.RestServices; import mprj.doerj.caderno.rest.RestServices;
import mprj.doerj.caderno.util.CadernoUtil;
import mprj.doerj.caderno.util.GeraCaderno; import mprj.doerj.caderno.util.GeraCaderno;
/** /**
* @author diogo.souza * @author diogo.souza
*/ */
@Component(immediate = true, @Component(
configurationPid = "mprj.doerj.caderno.configuration.DoerjCadernoPortletConfiguration", immediate = true,
property = { "com.liferay.portlet.display-category=category.sample", configurationPid = "mprj.doerj.caderno.configuration.DoerjCadernoPortletConfiguration",
"com.liferay.portlet.instanceable=false", "com.liferay.portlet.scopeable=true", property = {
"com.liferay.portlet.display-category=category.hidden",
"com.liferay.portlet.instanceable=false",
"com.liferay.portlet.scopeable=true",
"com.liferay.portlet.header-portlet-css=/css/admin/admin.css", "com.liferay.portlet.header-portlet-css=/css/admin/admin.css",
"com.liferay.portlet.header-portlet-css=/css/datepicker/bootstrap.min.css", "com.liferay.portlet.header-portlet-css=/css/datepicker/bootstrap.min.css",
"com.liferay.portlet.header-portlet-css=/css/datepicker/bootstrap-datepicker3.standalone.min.css", "com.liferay.portlet.header-portlet-css=/css/datepicker/bootstrap-datepicker3.standalone.min.css",
...@@ -56,75 +54,72 @@ property = { "com.liferay.portlet.display-category=category.sample", ...@@ -56,75 +54,72 @@ property = { "com.liferay.portlet.display-category=category.sample",
"com.liferay.portlet.icon=/icon.png", "com.liferay.portlet.icon=/icon.png",
"com.liferay.portlet.requires-namespaced-parameters=false", "com.liferay.portlet.requires-namespaced-parameters=false",
"com.liferay.portlet.ajaxable=true", "com.liferay.portlet.ajaxable=true",
"com.liferay.portlet.control-panel-entry-category=MPRJ", "com.liferay.portlet.control-panel-entry-category=MPRJ",
"com.liferay.portlet.control-panel-entry-weight=39", "com.liferay.portlet.control-panel-entry-weight=40",
"com.liferay.portlet.preferences-unique-per-layout=false", "com.liferay.portlet.preferences-unique-per-layout=false",
"com.liferay.portlet.preferences-owned-by-group=true", "com.liferay.portlet.preferences-owned-by-group=true",
"com.liferay.portlet.add-default-resource=true", "com.liferay.portlet.add-default-resource=true",
"com.liferay.portlet.css-class-wrapper=mprj-doerj-materia-web", "com.liferay.portlet.css-class-wrapper=mprj-doerj-materia-web",
"javax.portlet.display-name=Gest�o de Mat�rias do Di�rio Oficial", "javax.portlet.display-name=Caderno do Diário Oficial",
"javax.portlet.expiration-cache=0", "javax.portlet.expiration-cache=0",
"javax.portlet.init-param.portlet-title-based-navigation=true", "javax.portlet.init-param.portlet-title-based-navigation=true",
"javax.portlet.init-param.template-path=/", "javax.portlet.init-param.template-path=/",
"javax.portlet.info.title=Caderno do Diário Oficial",
"com.liferay.portlet.instanceable=true", "javax.portlet.info.short-title=Caderno do Diário Oficial",
"javax.portlet.display-name=MprjDoerjCaderno", "javax.portlet.info.keywords=Caderno do Diário Oficial",
"javax.portlet.init-param.template-path=/", "javax.portlet.init-param.template-path=/",
"javax.portlet.init-param.view-template=/view.jsp", "javax.portlet.init-param.view-template=/view.jsp",
"javax.portlet.init-param.config-template=/configuration.jsp", "javax.portlet.init-param.config-template=/configuration.jsp",
"javax.portlet.name=" + MprjDoerjCadernoPortletKeys.MPRJDOERJCADERNO, "javax.portlet.name=" + MprjDoerjCadernoPortletKeys.MPRJDOERJCADERNO,
"javax.portlet.resource-bundle=content.Language", "javax.portlet.resource-bundle=content.Language",
"javax.portlet.mime-type=text/html", "javax.portlet.mime-type=text/html",
"javax.portlet.security-role-ref=power-user,user" }, service = Portlet.class) "javax.portlet.security-role-ref=administrator",
"javax.portlet.security-role-ref=guest",
"javax.portlet.security-role-ref=power-user",
"javax.portlet.security-role-ref=user"
},
service = Portlet.class
)
public class MprjDoerjCadernoPortlet extends MVCPortlet { public class MprjDoerjCadernoPortlet extends MVCPortlet {
final static Logger logger = Logger.getLogger(MprjDoerjCadernoPortlet.class); final static Logger logger = Logger.getLogger(MprjDoerjCadernoPortlet.class);
@Override public void serveResource(ResourceRequest resourceRequest,
public void render(RenderRequest renderRequest, RenderResponse renderResponse) ResourceResponse resourceResponse) throws IOException,
throws IOException, PortletException { PortletException {
// ThemeDisplay themeDisplay = (ThemeDisplay) resourceRequest.getAttribute(WebKeys.THEME_DISPLAY);
// ThemeDisplay themeDisplay = (ThemeDisplay) // UploadPortletRequest uploadRequest=PortalUtil.getUploadPortletRequest(resourceRequest);
// resourceRequest.getAttribute(WebKeys.THEME_DISPLAY); // String valor = ParamUtil.getString(resourceRequest, "parameter");
// UploadPortletRequest String cmd = ParamUtil.getString(resourceRequest, "caderno");
// uploadRequest=PortalUtil.getUploadPortletRequest(resourceRequest); // String dataDivulgacao = ParamUtil.getString(uploadRequest, "dataP");
// String valor = ParamUtil.getString(resourceRequest, "parameter"); // String situacao = ParamUtil.getString(uploadRequest, "situacao");
String cmd = ParamUtil.getString(renderRequest, "caderno");
// String dataDivulgacao = ParamUtil.getString(uploadRequest, "dataP"); com.liferay.portal.kernel.json.JSONObject jsonResponse = JSONFactoryUtil.createJSONObject();
// String situacao = ParamUtil.getString(uploadRequest, "situacao");
if (cmd.equals("geraCaderno")){
com.liferay.portal.kernel.json.JSONObject jsonResponse = JSONFactoryUtil.createJSONObject();
try {
if (cmd.equals("geraCaderno")) { } catch (Exception e) {
e.printStackTrace();
try { }
} catch (Exception e) {
// TODO Auto-generated catch block }else{
e.printStackTrace(); try {
} //jsonResponse.put("result", CadernoUtil.getDatasCadastradas());
} else { } catch (SystemException e) {
try { logger.error("Erro requisicao AJAX",e);
jsonResponse.put("result", CadernoUtil.getDatasCadastradas()); //} catch (ParseException e) {
//logger.error("Erro validar horários AJAX",e);
} catch (SystemException e) { }
// TODO Auto-generated catch block // Writing the result in resourceResponse writer.
logger.error("Erro requisicao AJAX", e); PrintWriter writer = resourceResponse.getWriter();
} catch (java.text.ParseException e) { writer.println(jsonResponse);
// TODO Auto-generated catch block
e.printStackTrace();
}
// Writing the result in resourceResponse writer.
PrintWriter writer = renderResponse.getWriter();
writer.println(jsonResponse);
// Creating a JSON object which will contain the sum. // Creating a JSON object which will contain the sum.
} }
//PortletURL renderUrl = resourceResponse.createRenderURL();
PortletURL renderUrl = renderResponse.createRenderURL(); resourceResponse.addProperty("Location", resourceResponse.createRenderURL().toString());
renderResponse.addProperty("Location", renderResponse.createRenderURL().toString()); return;
super.render(renderRequest, renderResponse);
// super.doView(renderRequest, renderResponse);
} }
public void geraCaderno(ActionRequest actionRequest, ActionResponse actionResponse)throws Exception { public void geraCaderno(ActionRequest actionRequest, ActionResponse actionResponse)throws Exception {
...@@ -144,7 +139,7 @@ public class MprjDoerjCadernoPortlet extends MVCPortlet { ...@@ -144,7 +139,7 @@ public class MprjDoerjCadernoPortlet extends MVCPortlet {
caderno.processaCaderno(actionRequest, actionResponse,listaConteudos,dataDivulgacao); caderno.processaCaderno(actionRequest, actionResponse,listaConteudos,dataDivulgacao);
}else{ }else{
String portletName = (String) actionRequest.getAttribute(WebKeys.PORTLET_ID); //String portletName = (String) actionRequest.getAttribute(WebKeys.PORTLET_ID);
} }
......
<%@ include file="/init.jsp" %>
<%
boolean errArquivo = false;
boolean errVazio = false;
boolean errDataNula = false;
boolean errHorarioLimite = false;
String cssErro = "control-group error";
if(request.getAttribute("erroArquivo") != null){
errArquivo = (Boolean) request.getAttribute("erroArquivo");
}
if(request.getAttribute("erroVazio") != null){
errVazio = (Boolean) request.getAttribute("erroVazio");
}
if(request.getAttribute("erroDataNula") != null){
errDataNula = (Boolean) request.getAttribute("erroDataNula");
}
if(request.getAttribute("erroHorarioLimite") != null){
errHorarioLimite = (Boolean) request.getAttribute("erroHorarioLimite");
}
%>
<liferay-theme:defineObjects />
<portlet:defineObjects />
<liferay-portlet:actionURL var="submitActionURL">
<liferay-portlet:param name="<%=ActionRequest.ACTION_NAME%>" value='geraCaderno' />
<liferay-portlet:param name="navigation" value="gerar"/>
<liferay-portlet:param name="mvcPath" value="/view.jsp"/>
</liferay-portlet:actionURL>
<portlet:renderURL var="viewUrl">
<portlet:param name="navigation" value="gerar"/>
<portlet:param name="mvcPath" value="/view.jsp"/>
<portlet:param name="jspPath" value="/view.jsp"/>
</portlet:renderURL>
<liferay-ui:error key="erroListagemNula" message="No existem matrias cadastradas para os parmetros utilizados." />
<aui:form id="<portlet:namespace />formDO" name="<portlet:namespace />formDO" method="POST" action="<%= submitActionURL%>" data-senna-off="true">
<div class="sheet sheet-lg" style="margin-top: 24px">
<liferay-ui:header title="Gerar Caderno"/>
<div style="font-size: 12px; line-height: 12px; color: #A3AFBF; margin-bottom: 15px; margin-top: -10px;"><liferay-ui:message key="*campos obrigatrios"/></div>
<div id="campo-situacao" class="campo">
<label><liferay-ui:message key="admin.form.editar.situacao"/></label>
<div class="form-group">
<div style="width: 31%;">
<aui:select name="situacao" id="situacao" label="">
<aui:option value="4">Validada</aui:option>
<aui:option value="6">Aprovada</aui:option>
<aui:option value="8">Divulgada</aui:option>
</aui:select>
</div>
</div>
<liferay-ui:error key="erroTipoMat" message="Uma Situao deve ser selecionada." />
</div>
<div class='campo <%=errDataNula || errHorarioLimite ? cssErro : "" %>' >
<label><liferay-ui:message key="admin.form.agendamento.data.divulgacao"/></label>
<div class="form-group">
<div class='input-group date' id='datepickeragendamento' style="width: 31%;">
<input class="form-control" name="<portlet:namespace/>dataP" id="<portlet:namespace/>dataP" onpaste="return false;" ondrop="return false;"/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<liferay-ui:error key="erroDataNula" message="Uma data deve ser selecionada." />
</div>
<aui:button-row>
<aui:button type="reset" id="limparFormDO" name="limparFormDO" value="Limpar" />
<aui:button type="submit" id="enviarFormDO" name="enviarFormDO" value="Gerar Caderno" />
<aui:button type="button" id="jobForm" name="jobForm" class="oculto" style="display: none" value="no aperte" />
</aui:button-row>
</div>
</aui:form>
<portlet:resourceURL var="ocultoJob"><portlet:param name="parameter" value="jobOculto" /></portlet:resourceURL>
<portlet:resourceURL var="testAjaxResourceUrl"></portlet:resourceURL>
<script type="text/javascript">
var urlAjax = "<%=testAjaxResourceUrl%>";
var urlOculto = "<%=ocultoJob%>";
</script>
\ No newline at end of file
<%@ include file="/init.jsp" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ 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" %>
boolean errArquivo = false; <%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
boolean errVazio = false; <%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
boolean errDataNula = false; <%@ taglib uri="http://liferay.com/tld/clay" prefix="clay" %>
boolean errHorarioLimite = false;
String cssErro = "control-group error"; <%@ page import="com.liferay.portal.kernel.util.ParamUtil" %>
<%@ page import="com.liferay.frontend.taglib.clay.servlet.taglib.util.JSPNavigationItemList" %>
if(request.getAttribute("erroArquivo") != null){ <%@ page import="com.liferay.portal.kernel.language.LanguageUtil" %>
errArquivo = (Boolean) request.getAttribute("erroArquivo"); <%@ page import="javax.portlet.PortletPreferences" %>
} <%@ page import="javax.portlet.ActionRequest" %>
if(request.getAttribute("erroVazio") != null){ <%@ page import="javax.portlet.PortletURL" %>
errVazio = (Boolean) request.getAttribute("erroVazio"); <%@ page import="com.liferay.portal.kernel.util.HtmlUtil" %>
} <%@ page import="com.liferay.portal.kernel.util.GetterUtil"%>
if(request.getAttribute("erroDataNula") != null){ <%@ page import="com.liferay.portal.kernel.util.Validator" %>
errDataNula = (Boolean) request.getAttribute("erroDataNula"); <%@ page import="com.liferay.portal.kernel.dao.search.RowChecker" %>
} <%@ page import="com.liferay.portal.kernel.search.Document" %>
if(request.getAttribute("erroHorarioLimite") != null){ <%@ page import="com.liferay.portal.kernel.dao.orm.QueryUtil" %>
errHorarioLimite = (Boolean) request.getAttribute("erroHorarioLimite"); <%@ page import="com.liferay.portal.kernel.search.Hits" %>
} <%@ page import="com.liferay.portal.kernel.util.UnicodeFormatter" %>
%> <%@ page import="com.liferay.portal.kernel.util.PrefsParamUtil" %>
<%@ page import="com.liferay.portal.kernel.util.Constants" %>
<%@ page import="com.liferay.portal.kernel.portlet.LiferayWindowState" %>
<liferay-theme:defineObjects /> <liferay-theme:defineObjects />
<portlet:defineObjects /> <portlet:defineObjects />
<liferay-ui:error key="erroListagemNula" message="No existem matrias cadastradas para os parmetros utilizados." />
<h3><liferay-ui:message key="admin.form.agendamento.titulo"/></h3>
<hr />
<div class="texto-obs"><liferay-ui:message key="admin.form.agendamento.observacao"/></div>
<portlet:renderURL var="viewUrl">
<portlet:param name="jspPath" value="/view.jsp"/>
</portlet:renderURL>
<portlet:actionURL var="submitActionURL">
<portlet:param name="<%=ActionRequest.ACTION_NAME%>" value="geraCaderno" />
<portlet:param name="mvcPath" value="/view.jsp"/>
</portlet:actionURL>
<form id="<portlet:namespace />formDO" name="<portlet:namespace />formDO" method="POST" action="<%= submitActionURL%>" data-senna-off="true">
<div id="campo-situacao" class="campo">
<label><liferay-ui:message key="admin.form.editar.situacao"/></label>
<select class="selectpicker" name="<portlet:namespace/>situacao" id="<portlet:namespace/>situacao" >
<option value="4">Validada</option>
<option value="6">Aprovada</option>
<option value="8">Divulgada</option>
</select>
<liferay-ui:error key="erroTipoMat" message="Uma Situao deve ser selecionada." />
</div>
<div class='campo <%=errDataNula || errHorarioLimite ? cssErro : "" %>' >
<label><liferay-ui:message key="admin.form.agendamento.data.divulgacao"/></label>
<div class="form-group">
<div class='input-group date' id='datepickeragendamento'>
<input class="form-control" name="<portlet:namespace/>dataP" id="<portlet:namespace/>dataP" onpaste="return false;" ondrop="return false;"/>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<liferay-ui:error key="erroDataNula" message="Uma data deve ser selecionada." />
</div>
<button type="submit" id="enviarFormDO" name="enviarFormDO" class="btn btn-primary">Gerar Caderno</button>
<button type="reset" id="limparFormDO" name="limparFormDO" class="btn btn-cancel">Limpar</button>
<button type="button" id="jobForm" name="jobForm" class="oculto" style="display: none">no aperte</button>
</form>
<portlet:resourceURL var="ocultoJob"><portlet:param name="parameter" value="jobOculto" /></portlet:resourceURL>
<portlet:resourceURL var="testAjaxResourceUrl"></portlet:resourceURL>
<%
final String navigation = ParamUtil.getString(request, "navigation", "gerar");
%>
<script type="text/javascript"> <clay:navigation-bar
var urlAjax = "<%=testAjaxResourceUrl%>"; inverted="<%= true %>"
var urlOculto = "<%=ocultoJob%>"; navigationItems='<%=
</script> new JSPNavigationItemList(pageContext) {
\ No newline at end of file {
add(
navigationItem -> {
navigationItem.setActive(navigation.equals("gerar"));
navigationItem.setHref(renderResponse.createRenderURL());
navigationItem.setLabel(LanguageUtil.get(request, "Gerar Caderno"));
});
}
}
%>'
/>
<c:choose>
<c:when test='<%= navigation.equals("gerar") %>'>
<%@ include file="/view-admin.jsp" %>
</c:when>
<c:otherwise>
<%@ include file="/view-admin.jsp" %>
</c:otherwise>
</c:choose>
javax.portlet.title.mprj_doerj_caderno_MprjDoerjCadernoPortlet=MprjDoerjCaderno javax.portlet.title.mprj_doerj_caderno_MprjDoerjCadernoPortlet=Caderno do Diário Oficial
mprjdoerjcaderno.caption=Hello from MprjDoerjCaderno! mprjdoerjcaderno.caption=Hello from MprjDoerjCaderno!
#ADMINISTRACAO #ADMINISTRACAO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment