Untitled
unknown
plain_text
3 years ago
7.9 kB
3
Indexable
Never
<%@ page language="java"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <!DOCTYPE html> <html> <head> <jsp:include page="/WEB-INF/jsp/decorators/meta.jsp" /> <title><fmt:message key="index.title" /></title> <jsp:include page="/WEB-INF/jsp/decorators/css.jsp" /> </head> <body> <div id="wrapper"> <jsp:include page="/WEB-INF/jsp/decorators/menu.jsp" /> <!-- Page Content --> <div id="page-wrapper"> <div class="row"> <div class="col-lg-12"> <h4 class="page-header">Funcionalidades da filial</h4> </div> <!-- /.col-lg-12 --> </div> <!-- /.row --> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <!-- /.panel-heading --> <div class="panel-body"> <form class="form-horizontal"> <div class="form-group"> <label class="col-xs-12 col-sm-1 col-md-2 col-lg-1 control-label">Id:</label> <div class="col-xs-12 col-md-10 col-lg-11"> <p class="form-control-static">${filial.codigo}</p> </div> </div> <div class="form-group"> <label class="col-xs-12 col-sm-1 col-md-2 col-lg-1 control-label">CNPJ:</label> <div class="col-xs-12 col-md-10 col-lg-11"> <p class="form-control-static">${filial.cnpj}</p> </div> </div> <div class="form-group"> <label class="col-xs-12 col-sm-1 col-md-2 col-lg-1 control-label">Razão:</label> <div class="col-xs-12 col-md-10 col-lg-11"> <p class="form-control-static">${filial.razao}</p> </div> </div> <div class="form-group"> <label class="col-xs-12 col-sm-1 col-md-2 col-lg-1 control-label">Fantasia:</label> <div class="col-xs-12 col-md-10 col-lg-11"> <p class="form-control-static">${filial.fantasia}</p> </div> </div> </div> <div style="margin-left: 15px"> <a href="${pageContext.request.contextPath}/funcionalidade/cadastrar/${filial.codigo}" class="btn btn-sm btn-primary""> Cadastrar nova funcionalidade </a> <a href="${pageContext.request.contextPath}/funcionalidade/lista" class="btn btn-sm btn-primary"> Voltar </a> </div> </form> <p class="form-control-static" style="margin-left: 15px; font-weight: bold;">Funcionalidades desta filial:</p> <div class="panel panel-default panel-body" style="margin: 10px;"> <%-- Mensagens de confirmação --%> <c:forEach items="${messages}" var="message"> <div class="alert alert-success" role="alert"> <span class="glyphicon glyphicon glyphicon-ok" aria-hidden="true"></span> <span class="sr-only">Error:</span> ${message} </div> </c:forEach> <%-- Mensagens de informação --%> <c:forEach items="${infos}" var="info"> <div class="alert alert-info" role="alert"> <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <span class="sr-only">Error:</span> ${info} </div> </c:forEach> <%-- Mensagens de erros --%> <c:forEach items="${errors}" var="error"> <div class="alert alert-danger" role="alert"> <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <span class="sr-only">Error:</span> ${error.category} - ${error.message} </div> </c:forEach> <c:if test="${fn:length(funcionalidades) > 0}"> <div class="dataTable_wrapper" style="overflow: auto"> <table class="table table-striped table-hover" id="dataTables"> <thead> <th class="hidden-xs">Id</th> <th class="hidden-xs">Setor</th> <th class="hidden-xs">Descrição</th> <th class="hidden-xs">Usuário</th> <th class="hidden-xs">Data</th> <th class="hidden-xs">Hora</th> <th class="hidden-xs">Deletar</th> </thead> <tbody> <c:forEach items="${funcionalidades}" var="funcionalidades"> <tr> <td class="hidden-xs">${funcionalidades.id}</td> <td class="hidden-xs">${funcionalidades.setor}</td> <td class="hidden-xs">${funcionalidades.descricao}</td> <td class="hidden-xs">${funcionalidades.nome}</td> <td class="hidden-xs">${funcionalidades.data}</td> <td class="hidden-xs">${funcionalidades.hora}</td> <td class="hidden-xs"><a type="button" class="btn btn-default btn-sm" aria-label="Left Align" href="#" data-toggle="modal" data-target="#modal" data-id="${funcionalidades.id}" data-message="Deseja excluir a funcionalidade da ${filial.fantasia} ?" data-url="${pageContext.request.contextPath}/funcionalidade/excluir/${funcionalidades.id}/${funcionalidades.filial}"> <span class="glyphicon glyphicon-remove-circle" aria-hidden="true" /> </a></td> </tr> </c:forEach> </tbody> </table> </div> </c:if> </div> </div> <!-- /.panel-body --> </div> <!-- /.panel --> </div> <!-- /.col-lg-12 --> </div> <!-- /.container-fluid --> </div> <!-- /#page-wrapper --> </div> <!-- /#wrapper --> <!-- Modal --> <div class="modal fade" id="modal" tabindex="-1" role="dialog"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">Confirma</h4> </div> <div class="modal-body"> <a type="button" class="btn btn-primary">Confirmar</a> </div> <div class="modal-footer"> <form method="post"> <input type="hidden" id="recipient-id" /> <button type="button" id="button" class="btn btn-default" data-dismiss="modal">Cancelar</button> <button type="submit" id="submit" class="btn btn-primary">Confirmar</button> </form> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> </div> <!-- /.modal --> <!-- jQuery --> <script src="${pageContext.request.contextPath}/resources/bower_components/jquery/dist/jquery.min.js"></script> <!-- Bootstrap Core JavaScript --> <script src="${pageContext.request.contextPath}/resources/bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <!-- Metis Menu Plugin JavaScript --> <script src="${pageContext.request.contextPath}/resources/bower_components/metisMenu/dist/metisMenu.min.js"></script> <!-- Custom Theme JavaScript --> <script src="${pageContext.request.contextPath}/resources/dist/js/sb-admin-2.js"></script> <script> $('#modal').on('show.bs.modal', function(event) { var button = $(event.relatedTarget) // Button that triggered the modal var id = button.data('id') // Extract info from data-* attributes var url = button.data('url') // Extract info from data-* attributes var msg = button.data('message') // Extract info from data-* attributes var modal = $(this) modal.find('.modal-body').text(msg); modal.find('.modal-footer input').val(id); modal.find('.modal-footer form').attr('action', url); }); </script> </body> </html>