Rev 1464 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@ page import="pt.estgp.estgweb.services.common.IToDoCat" %>
<%@ page import="java.util.List" %>
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %>
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %>
<%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %>
<%@ page import="jomm.utils.MessageResources" %>
<%@ page import="pt.estgp.estgweb.services.common.IToDo" %>
<%@ page import="pt.estgp.estgweb.services.common.ModuleEnum" %>
<%@ page import="pt.estgp.estgweb.web.Globals" %>
<%@ 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 uri="/WEB-INF/tlds/baco.tld" prefix="baco" %>
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %>
<%--
Created by IntelliJ IDEA.
User: Jorge
Date: 2/Jun/2008
Time: 16:01:47
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
IServiceManager sm = ServiceManager.getInstance();
String[] names = new String[]{};
Object[] args = new Object[]{};
List<IToDoCat> todos = (List<IToDoCat>) sm.execute(RequestUtils.getRequester(request, response), "CommonServicesGetAllTodosCat", args, names);
if (todos != null && todos.size() > 0)
{
%>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="panel panel-primary">
<div class="panel-heading"><bean:message key="intranet.todo"/></div>
<div class="panel-body">
<%
for (IToDoCat toDoCat : todos)
{
String imgClose;
String imgOpen;
String style;
String img;
String styleClass;
// Duarte Santos
if (toDoCat.getDescription().equals(ModuleEnum.TodoAnnouncements.getMessageKey()) || toDoCat.getDescription().equals(ModuleEnum.Surveys.getMessageKey()))
{
styleClass = "WARNING";
img = "/imgs/openedboxNeg.gif";
style = "";
imgClose = "/imgs/closedboxNeg.gif";
imgOpen = "/imgs/openedboxNeg.gif";
}
//Filipe Matos
else
if(toDoCat.getDescription().equals(ModuleEnum.TodoAnnouncements.getMessageKey()) || toDoCat.getDescription().equals(ModuleEnum.Assessments.getMessageKey())){
styleClass = "WARNING";
img = "/imgs/openedboxNeg.gif";
style = "";
imgClose = "/imgs/closedboxNeg.gif";
imgOpen = "/imgs/openedboxNeg.gif";
}
else
if (toDoCat.getDescription().equals(ModuleEnum.Reminders.getMessageKey()) || toDoCat.getDescription().equals(ModuleEnum.CourseUnits.getMessageKey()))
{
styleClass = "";
img = "/imgs/openedbox.gif";
style = "";
imgClose = "/imgs/closedbox.gif";
imgOpen = "/imgs/openedbox.gif";
}
else
{
styleClass = "";
img = "/imgs/closedbox.gif";
style = Globals.HIDDEN;
imgClose = "/imgs/closedbox.gif";
imgOpen = "/imgs/openedbox.gif";
}
%>
<div class="list-group">
<div class="list-group-item list-group-item-warning"><%=MessageResources.getMessage(request, toDoCat.getDescription())%> (<%=toDoCat.getTotalToDo()%>)</div>
<%--<ul id="<%=toDoCat.getDescription()%>" style="<%=style%>">--%>
<%
for (IToDo todo : toDoCat.getAllToDos())
{
if (todo.getUrl() != null)
{
%>
<div class="list-group-item">
<a href="<%=request.getContextPath() + todo.getUrl()%>">
<%
if(todo.getCatArg0() == null && todo.getCatKey() != null)
{
out.print(MessageResources.getMessage(request,todo.getCatKey()) + ":");
}
else if(todo.getCatArg0() != null && todo.getCatKey() != null)
{
out.print(MessageResources.getMessage(request,todo.getCatKey(),todo.getCatArg0()) + ":");
}
%>
<%=todo.getDescription()%>
<img src="<%=request.getContextPath()%>/imgs/preencher.gif" width="35px"/>
</a>
</div>
<%
}
else
{
%>
<div class="list-group-item">
<%=todo.getLabelInsideCat(request)%>
</div>
<%
}
}
%>
</div>
<%
}
%>
</div>
</div>
</div>
</div>
<%
}
%>
Generated by GNU Enscript 1.6.5.2.