Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1682 → Rev 1683

/branches/v3/impl/conf/language/MessageResources.properties
2163,3 → 2163,4
repository.document.save.success=Documento salvo com sucesso
repositorycol=Colecções do Repositório de Documentos Digitais
repositorycolbrowser=Navegador de Colecções do Repositório de Documentos Digitais
repositoryinterface=Editor de Interfaces do Repositório Digital
/branches/v3/impl/conf/WEB-INF/struts/struts-repositorydocs.xml
17,13 → 17,14
 
<!--CourseDepartments-->
 
<action path="/repositoryDocs" forward="page.repository.interface"/>
<action path="/repositoryDocs" forward="page.repository.public.show.docs"/>
 
<action path="/user/collectionsBrowser" forward="page.repositorycolbrowser"/>
<action path="/user/repositoryEditDocument" forward="page.repository.edit.doc"/>
<action path="/user/repositoryEditCollections" forward="page.repository.edit.col"/>
<action path="/user/repositoryEditInterface" forward="page.repository.edit.interface"/>
<action path="/user/repositoryBrowseCollections" forward="page.repository.browse.col"/>
 
<action path="/user/editRepositoryDoc" forward="page.repositorydoc"/>
 
<action path="/user/editRepositoryCol" forward="page.repositorycol"/>
 
<action path="/user/repositoryDoc"
type="pt.estgp.estgweb.web.controllers.repositorydocs.RepositoryDocController"
/branches/v3/impl/conf/WEB-INF/struts/tiles-repositorydocs.xml
7,29 → 7,37
 
<tiles-definitions>
 
<definition name="page.repositorydoc" extends="page.pae.separators.home">
<definition name="page.repository.edit.doc" extends="page.pae.separators.home">
<put name="title" value="Repositório de Documentos Digitais"/>
<put name="topnav" value="/user/repositoryDocuments/topnavEditRepodoc.jsp"/>
<put name="body" value="/user/repositoryDocuments/repositoryDocument.jsp"/>
</definition>
 
<definition name="page.repositorycol" extends="page.pae.separators.home">
<definition name="page.repository.edit.col" extends="page.pae.separators.home">
<put name="title" value="Colecções do Repositório de Documentos Digitais"/>
<put name="topnav" value="/user/repositoryDocuments/topnavEditRepocol.jsp"/>
<put name="body" value="/user/repositoryDocuments/repositoryCollections.jsp"/>
</definition>
 
 
<definition name="page.repository.interface" extends="base.definition.pae.public">
<put name="title" value="Repositório de Documentos Digitais"/>
<put name="body" value="/user/repositoryDocuments/collectionsInterface.jsp"/>
<definition name="page.repository.edit.interface" extends="page.pae.separators.home">
<put name="title" value="Edição de Interface do repositório Digital"/>
<put name="topnav" value="/user/repositoryDocuments/topnavRepositoryInterface.jsp"/>
<put name="body" value="/user/repositoryDocuments/repositoryInterface.jsp"/>
</definition>
 
 
<definition name="page.repositorycolbrowser" extends="page.pae.separators.home">
<definition name="page.repository.browse.col" extends="page.pae.separators.home">
<put name="title" value="Navegador do Repositório de Documentos Digitais"/>
<put name="topnav" value="/user/repositoryDocuments/topnavRepocolbrowser.jsp"/>
<put name="body" value="/user/repositoryDocuments/collectionsbrowser.jsp"/>
</definition>
 
 
<!--Publicas-->
<definition name="page.repository.public.show.docs" extends="base.definition.pae.public">
<put name="title" value="Repositório Digital"/>
<put name="body" value="/user/repositoryDocuments/collectionsInterface.jsp"/>
</definition>
 
 
 
</tiles-definitions>
/branches/v3/impl/src/web/user/home/panels/institutionTools.jsp
16,9 → 16,10
</div>
<div class="list-group">
<baco:hasRole role="admin,all,repositoryDocs">
<div class="list-group-item"><html:link action="/user/editRepositoryDoc"><bean:message key="repositorydoc"/></html:link></div>
<div class="list-group-item"><html:link action="/user/editRepositoryCol"><bean:message key="repositorycol"/></html:link></div>
<div class="list-group-item"><html:link action="/user/collectionsBrowser"><bean:message key="repositorycolbrowser"/></html:link></div>
<div class="list-group-item"><html:link action="/user/repositoryEditDocument"><bean:message key="repositorydoc"/></html:link></div>
<div class="list-group-item"><html:link action="/user/repositoryEditCollections"><bean:message key="repositorycol"/></html:link></div>
<div class="list-group-item"><html:link action="/user/repositoryBrowseCollections"><bean:message key="repositorycolbrowser"/></html:link></div>
<div class="list-group-item"><html:link action="/user/repositoryEditInterface"><bean:message key="repositoryinterface"/></html:link></div>
</baco:hasRole>
</div>
</div>
/branches/v3/impl/src/web/user/repositoryDocuments/topnavRepositoryInterface.jsp
New file
0,0 → 1,11
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="jomm.web.utils.NavPlaceServer"%>
<%@ page import="jomm.web.utils.TopNav" %>
<%
 
TopNav topNav = NavPlaceServer.getInstance().createTopNav(request);
topNav.addNavPlace("/user/homePae.do", "intranet.separator.home.back");
topNav.addNavPlace(null, "repositoryinterface");
%>
<jsp:include page="/layout/topnav.jsp"/>
/branches/v3/impl/src/web/user/repositoryDocuments/repositoryDocument.jsp
7,6 → 7,8
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="bacoTags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="logic" uri="/WEB-INF/tlds/struts-logic.tld" %>
<%@ taglib prefix="html" uri="/WEB-INF/tlds/struts-html.tld" %>
<%@ taglib prefix="bean" uri="/WEB-INF/tlds/struts-bean.tld" %>
 
<div class="container-fluid">
 
198,13 → 200,13
<button class="btn btn-default btn-lg btn-block btn-huge" ng-click="backEdit()"><span class="glyphicon glyphicon-chevron-left"></span> Voltar à edição</button>
</div>
<div class="col-md-4">
<a class="btn btn-success btn-lg btn-block btn-huge" href="<%=request.getContextPath()%>/user/editRepositoryDoc.do">Adicionar outro documento <span class="glyphicon glyphicon-chevron-right"></span></a>
<html:link styleClass="btn btn-success btn-lg btn-block btn-huge" action="/user/repositoryEditDocument">Adicionar outro documento <span class="glyphicon glyphicon-chevron-right"></span></html:link>
</div>
</div>
<hr/>
<div class="row">
<div class="col-md-4">
<a class="btn btn-danger btn-lg btn-block btn-huge" href="<%=request.getContextPath()%>/user/homePae.do">Sair</a>
<html:link styleClass="btn btn-danger btn-lg btn-block btn-huge" action="/user/homePae">Sair</html:link>
</div>
</div>
 
513,5 → 515,4
<%
AbstractDao.getCurrentSession().getTransaction().commit();
%>
</div>
 
</div>
/branches/v3/impl/src/web/user/repositoryDocuments/collectionsInterface.jsp
3,7 → 3,7
<%@ page import="org.hibernate.criterion.Criterion" %>
<%@ page import="pt.estgp.estgweb.domain.RepositoryDocument" %>
<%@ page import="pt.estgp.estgweb.web.controllers.repositorydocs.interfaces.InterfaceBlock" %>
<%@ page import="pt.estgp.estgweb.web.controllers.repositorydocs.interfaces.InterfaceConfiguration" %>
<%@ page import="pt.estgp.estgweb.web.controllers.repositorydocs.interfaces.InterfaceRow" %>
<%@ page import="java.util.List" %>
<%@ page import="static org.hibernate.criterion.Restrictions.eq" %>
<%@ page import="static org.hibernate.criterion.Restrictions.or" %>
18,7 → 18,7
<%
String configuration = request.getParameter("configuration");
 
InterfaceConfiguration interfaceConfiguration = new InterfaceConfiguration();
InterfaceRow interfaceConfiguration = new InterfaceRow();
interfaceConfiguration.setTitle("Regulamentação Interna");
interfaceConfiguration.setDescription("Descrição Geral");
InterfaceBlock interfaceBlock1 = new InterfaceBlock();
34,7 → 34,7
interfaceBlock2.getCollectionId().add(new Long(3));
interfaceBlock2.getCollectionId().add(new Long(4));
 
InterfaceConfiguration loadedConfig = InterfaceConfiguration.loadFromJson(interfaceConfiguration.toJson());
InterfaceRow loadedConfig = InterfaceRow.loadFromJson(interfaceConfiguration.toJson());
 
int columns = 12 / interfaceConfiguration.getBlocks().size();
request.setAttribute("loadedConfig",loadedConfig);
/branches/v3/impl/src/web/user/repositoryDocuments/repositoryInterface.jsp
New file
0,0 → 1,328
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
<%@ 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-tiles.tld" prefix="tiles" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="bacoTags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<style>
.bg-red{
background-color: red !important;
color: #600000 !important;
padding: 10px;
}
.bg-green{
background-color: green !important;
color: #00ff00 !important;
}
table tr td
{
background-color: red !important;
}
</style>
<div class="container-fluid">
 
<div id="treeAppPageContent" ng-app="treeAppPageContent" ng-controller="treeAppPageContentController">
 
 
<script>
ping();
var treeAppPageContent = angular.module('treeAppPageContent', ['ui.tree']);
GLOBAL_BacoAngularAppDependencies.push('treeAppPageContent');
 
<!-- estes codigos todos do remove e do toggle e etc's não mechi em nada limitei-me a copiar dos gajos-->
treeAppPageContent.controller('treeAppPageContentController', function ($scope) {
 
$scope.data = {
"showTitle" : true,
"showDescription" : false
};
 
 
 
/*
$scope.data = [
{
"id" : 1,
"name" : "Nao deixa fazer drag",
"nodrag" : true,
"isDirectory" : true
 
},
{
"id" : 2,
"name" : "Nao deixa fazer drop",
"nodrop" : true,
"isDirectory" : true
},
{
"id" : 3,
"name" : "Deixa fazer Tudo",
"isDirectory" : true
},
{
"id" : 4,
"name" : "Deixa fazer Tudo e ja foi movido",
"moved" : true,
"isDirectory" : true
},
{
"id" : 5,
"name" : "Exemplo de folha nao deixa abrir",
"isDirectory" : false
}
];*/
$scope.treeOptions = {
accept: function(sourceNodeScope, destNodesScope, destIndex) {
if(sourceNodeScope.$modelValue.type == destNodesScope.$modeValue.type)
return true;
return false;
},
dropped: function(e) {
//console.log (e.source.nodeScope.$modelValue);
//alert ("Largado o nó com nome: " + e.source.nodeScope.$modelValue.name + " sobre " + e.dest.nodesScope.$parent.$modelValue.name);
}
};
 
$scope.addRow = function(container)
{
if(!container.rows)
{
container.rows = [];
}
container.rows.push(
{
"showTitle" : true,
"showDescription" : false,
"type" : "row"
}
);
}
$scope.addColumn = function(row)
{
if(!row.columns)
{
row.columns = [];
}
row.columns.push(
{
"showTitle" : true,
"showDescription" : false,
"cols" : 6,
"type" : "column"
}
);
}
 
$scope.getColStyle = function(column)
{
return "col-md-" + column.cols;
}
}
);
 
</script>
 
 
<div class="panel panel-primary">
<div class="panel-heading clearfix">
Criação de Interface para o Repositório Digital
</div>
<div class="panel-body">
 
<div class="web-messages"></div>
 
 
<div class="form-horizontal">
<div class="form-group">
<label class="col-md-1 control-label">ID</label>
<div class="col-md-11">
<input disabled type="text" class="form-control" ng-model="data.id"/>
</div>
</div>
<div class="form-group">
<label class="col-md-1 control-label">Título</label>
<div class="col-md-9">
<input type="text" class="form-control" ng-model="data.title"/>
</div>
<div class="col-md-2">
<select ng-class="{'bg-red': data.showTitle == false, 'bg-green': data.showTitle == true}" class="form-control chosenOff" type="text" ng-model="data.showTitle" ng-options="o.v as o.n for o in [{ n: 'Mostrar', v: true }, { n: 'Não Mostrar', v: false }]">>
 
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-1 control-label">Descrição</label>
<div class="col-md-9">
<textarea rows="3" class="form-control" ng-model="data.description">
 
</textarea>
</div>
<div class="col-md-2" >
<select ng-class="{'bg-red': data.showDescription == false, 'bg-green': data.showDescription == true}" class="form-control chosenOff" type="text" ng-model="data.showDescription" ng-options="o.v as o.n for o in [{ n: 'Mostrar', v: true }, { n: 'Não Mostrar', v: false }]">>
 
</select>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Linhas <button ng-click="addRow(data)" class="btn btn-default pull-right"><span class="glyphicon glyphicon-plus"></span> Linha</button></div>
<div class="panel-body" ui-tree="treeOptions" id="page-content-root">
 
<div ui-tree-nodes ng-model="data.rows">
<div ng-repeat="row in data.rows" ui-tree-node ng-include="'rows_renderer.html'"></div>
</div>
</div>
</div>
</div>
 
 
 
<pre class="code">{{ data | json }}</pre>
 
</div>
 
 
</div>
 
</div>
 
</div>
 
 
 
<!--TEMPLATE RECURSIVO-->
<script type="text/ng-template" id="rows_renderer.html">
<!--Para nao deixar fazer drag-->
<div class="row tree-node tree-node-content clearfix" ng-class="{modified: node.modified, nodrop: node.nodrop, nodrag: node.nodrag, moved: node.moved}">
<div class="panel panel-primary">
<div class="panel-heading"> <i class="glyphicon glyphicon-resize-vertical" ui-tree-handle></i> Linha {{$index + 1}} </div>
<div class="panel-body">
 
<div class="form-group">
<label class="col-md-1 control-label">Título</label>
<div class="col-md-9">
<input type="text" class="form-control" ng-model="row.title"/>
</div>
<div class="col-md-2">
<select ng-class="{'bg-red': row.showTitle == false, 'bg-green': row.showTitle == true}" class="form-control chosenOff" type="text" ng-model="row.showTitle" ng-options="o.v as o.n for o in [{ n: 'Mostrar', v: true }, { n: 'Não Mostrar', v: false }]">>
 
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-1 control-label">Descrição</label>
<div class="col-md-9">
<textarea rows="3" class="form-control" ng-model="row.description">
 
</textarea>
</div>
<div class="col-md-2">
<select ng-class="{'bg-red': row.showDescription == false, 'bg-green': row.showDescription == true}" class="form-control chosenOff" type="text" ng-model="row.showDescription" ng-options="o.v as o.n for o in [{ n: 'Mostrar', v: true }, { n: 'Não Mostrar', v: false }]">>
 
</select>
</div>
</div>
 
<div class="col-md-12" style="padding: 10px">
<div class="panel panel-info">
<div class="panel-heading clearfix">
Colunas
<button ng-click="addColumn(row)" class="btn btn-default pull-right"><span class="glyphicon glyphicon-plus"></span> Coluna</button>
</div>
<div class="panel-body">
 
 
<div class="row" ui-tree-nodes="" ng-model="row.columns">
<div ng-class="getColStyle(column)" ng-repeat="column in row.columns" ui-tree-node ng-include="'columns_renderer.html'">
 
</div>
</div>
 
</div>
</div>
</div>
 
</div>
</div>
</div>
 
 
 
</script>
 
 
<!--TEMPLATE RECURSIVO-->
<script type="text/ng-template" id="columns_renderer.html">
<!--Para nao deixar fazer drag-->
<div class="clearfix" ng-class="{modified: node.modified, nodrop: node.nodrop, nodrag: node.nodrag, moved: node.moved}">
<div class="panel panel-primary">
<div class="panel-heading clearfix">
<i class="glyphicon glyphicon-resize-vertical" ui-tree-handle></i>
Coluna {{$index + 1}}
<select class="pull-right chosenOff"
style="color:black"
ng-model="column.cols"
ng-options="o.v as o.n for o in [{ n: '1', v: 1 },{ n: '2', v: 2 },{ n: '3', v: 3 }, { n: '4', v: 4 }, { n: '5', v: 5 }, { n: '6', v: 6 }, { n: '7', v: 7 }, { n: '8', v: 8 }, { n: '9', v: 9 }, { n: '10', v: 10 }, { n: '11', v: 11 }, { n: '12', v: 12 }]">
 
 
</select>
</div>
<div class="panel-body">
 
<div class="form-group">
<label class="col-md-3 control-label">Título</label>
<div class="col-md-7">
<input type="text" class="form-control" ng-model="column.title"/>
</div>
<div class="col-md-2">
<select ng-class="{'bg-red': column.showTitle == false, 'bg-green': column.showTitle == true}" class="form-control chosenOff" ng-model="column.showTitle" ng-options="o.v as o.n for o in [{ n: 'Mostrar', v: true }, { n: 'Não Mostrar', v: false }]">
 
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">Descrição</label>
<div class="col-md-7">
<textarea rows="3" class="form-control" ng-model="column.description">
 
</textarea>
</div>
<div class="col-md-2">
<select ng-class="{'bg-red': column.showDescription == false, 'bg-green': column.showDescription == true}" class="form-control chosenOff" ng-model="column.showDescription" ng-options="o.v as o.n for o in [{ n: 'Mostrar', v: true }, { n: 'Não Mostrar', v: false }]">
 
</select>
</div>
</div>
 
 
<div class="col-md-12" style="padding: 10px">
<div class="panel panel-info">
<div class="panel-heading">Blocos</div>
<div class="panel-body">
 
 
<div ui-tree-nodes="" ng-model="column.blocks">
<div ng-repeat="block in column.blocks" ui-tree-node ng-include="'blocks_renderer.html'">
</div>
</div>
 
</div>
</div>
</div>
 
</div>
</div>
</div>
 
 
 
<!--
<ol data-nodrag ui-tree-nodes="" data-nodrop-enabled="true" ng-model="node" ng-class="{hidden: collapsed }">
<li ng-repeat="node in node.childs" ui-tree-node ng-include="'childs_renderer.html'">
</li>
<li ng-repeat="node in node.documents" ui-tree-node ng-include="'documents_renderer.html'">
</li>
</ol>
-->
 
</script>