Rev 1306 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@ page import="jomm.dao.impl.AbstractDao" %>
<%@ page import="pt.estgp.estgweb.services.directories.DirectoryService" %>
<%@ page import="pt.estgp.estgweb.services.directories.xsd.Directory" %>
<%@ page import="pt.estgp.estgweb.services.directories.xsd.LeafT" %>
<%@ page import="pt.estgp.estgweb.services.directories.xsd.NodeT" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %>
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %>
<%@ taglib prefix="hmlt" uri="http://jakarta.apache.org/struts/tags-html" %>
<jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/>
<%
Integer cont = (Integer) request.getAttribute("Contador");
int pad = 30*cont;
int rightsPad = 30*(cont+1);
%>
<nested:root>
<%
%>
<tr>
<td style="white-space: nowrap; <nested:equal value="" property="id">background-color: yellow;</nested:equal> padding-left: <%=pad%>px"><a name="<nested:write property="id"/>"></a>
<nested:select property="node">
<html:option value="true">Nó</html:option>
<html:option value="false">Folha</html:option>
</nested:select>
<nested:text style="width: 100%" property="id"/>
</td>
<td style="width: 300px"><nested:text style="width:100%" property="url"/></td>
<td style="width: 200px">
<table cellspadding="0" cellspacing="0" style="width: 100%">
<tr>
<td>PT</td>
<td><nested:text style="width:100%" property="label"/></td>
</tr>
<tr class="multilang">
<td>EN</td>
<td><nested:text style="width:100%" property="labelEn"/></td>
</tr>
<tr class="multilang">
<td>ES</td>
<td><nested:text style="width:100%" property="labelEs"/></td>
</tr>
</table>
</td>
<td class="advanced">
<nested:select property="layout">
<html:option value="true">Sim</html:option>
<html:option value="false">Nao</html:option>
</nested:select>
</td>
<td class="advanced">
<nested:select property="style">
<html:option value="true">Sim</html:option>
<html:option value="false">Nao</html:option>
</nested:select>
</td>
<td class="advanced">
<nested:select property="absolute">
<html:option value="true">Sim</html:option>
<html:option value="false">Nao</html:option>
</nested:select>
</td>
<td class="advanced">
<nested:select property="proxy">
<html:option value="local">Link Relativo Local</html:option>
<html:option value="estgp">ESTGP Páginas Estáticas</html:option>
<html:option value="conteudos">Conteudos Páginas Dinâmicas</html:option>
<html:option value="ionline">IOnline Pastas Partilhadas</html:option>
<html:option value="grupos">Grupos Pastas Partilhadas</html:option>
</nested:select>
</td>
<td class="advanced">
<nested:select property="remoteExtensionRoot">
<html:option value="false">Não</html:option>
<html:option value="true">Extender FTP</html:option>
</nested:select>
</td>
<td class="advanced">
<nested:select property="group">
<logic:notEmpty name="todosGrupos">
<html:option value=""></html:option>
<logic:iterate id="g" name="todosGrupos">
<html:option value="${g.name}">${g.name} - ${g.description}</html:option>
</logic:iterate>
</logic:notEmpty>
</nested:select>
</td>
<td class="advanced" style="white-space: nowrap">
<button type="button" class="btn btn-danger btn-sm" onclick="if(confirm('<nested:message key="directories.remove.ask" arg0="${leaf.id}"/>')){set(form,'removeLeaf');setId(form,'<nested:write property="id"/>');form.submit()}else{return false;}"><span class="glyphicon glyphicon-remove"></span></button> <button type="button" onclick="set(form,'addLeaf');setId(form,'<nested:write property="id"/>');form.action = form.action + '#<nested:write property="id"/>';form.submit()" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus"></span></button>
</td>
<!--<td>remoteExtensionRoot</td>
<td>ftpDirectory</td>
<td>size</td>
<td>mimeType</td>-->
</tr>
<nested:notEmpty property="rights">
<tr class="accessRights">
<td style="padding-left: <%=rightsPad%>px">Direitos Acesso (<nested:write property="id"/>)</td>
<td colspan="10">
<table class="dataTable tablesorter" style="width: 100%">
<thead>
<tr>
<th>Tipo Alvo</th>
<th>Alvo</th>
<th>Acesso</th>
<td><button type="button" onclick="set(form,'addRight');setId(form,'<nested:write property="id"/>');form.action = form.action + '#<nested:write property="id"/>';form.submit()" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus"></span></button></td>
</tr>
</thead>
<tbody>
<nested:iterate id="r" property="rights.right">
<nested:define id="r" toScope="request"/>
<tr>
<td>
<nested:select property="target">
<html:option value="role">Papel</html:option>
<html:option value="user">Utilizador</html:option>
</nested:select>
</td>
<td><nested:text style="width: 100%" property="name"/></td>
<td>
<nested:select property="type">
<html:option value="permit">Permitir</html:option>
<html:option value="restrict">Restringir</html:option>
</nested:select>
</td>
<td>
<button type="button" class="btn btn-danger btn-sm" onclick="if(confirm('<nested:message key="directories.remove.ask" arg0="${r.name}"/>')){form.action = form.action + '#<nested:write name="leaf" property="id"/>';set(form,'removeRight');setId(form,'<nested:write name="leaf" property="id"/>');setName(form,'<nested:write property="name"/>');setTarget(form,'<nested:write property="target"/>');setType(form,'<nested:write property="type"/>');form.submit()}else{return false;}"><span class="glyphicon glyphicon-remove"></span></button>
</td>
</tr>
</nested:iterate>
</table>
</td>
</tr>
</nested:notEmpty>
<%
request.setAttribute("Contador",cont+1);
%>
<nested:iterate id="leaf" property="leaf">
<nested:define id="leaf" toScope="request"/>
<jsp:include page="leafNode.jsp"/>
</nested:iterate>
<%
request.setAttribute("Contador",cont);
%>
</nested:root>