Rev 1312 | Rev 1464 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
202 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.services.common.IToDoCat" %> |
2 | <%@ page import="java.util.List" %> |
||
3 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
||
4 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
||
5 | <%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
||
6 | <%@ page import="jomm.utils.MessageResources" %> |
||
7 | <%@ page import="pt.estgp.estgweb.services.common.IToDo" %> |
||
214 | jmachado | 8 | <%@ page import="pt.estgp.estgweb.services.common.ModuleEnum" %> |
223 | jmachado | 9 | <%@ page import="pt.estgp.estgweb.web.Globals" %> |
202 | jmachado | 10 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
11 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
13 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
14 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
15 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
16 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
17 | <%-- |
||
18 | Created by IntelliJ IDEA. |
||
19 | User: Jorge |
||
20 | Date: 2/Jun/2008 |
||
21 | Time: 16:01:47 |
||
22 | To change this template use File | Settings | File Templates. |
||
23 | --%> |
||
24 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
25 | |||
26 | <% |
||
27 | |||
28 | IServiceManager sm = ServiceManager.getInstance(); |
||
29 | String[] names = new String[]{}; |
||
30 | Object[] args = new Object[]{}; |
||
31 | |||
32 | List<IToDoCat> todos = (List<IToDoCat>) sm.execute(RequestUtils.getRequester(request, response), "CommonServicesGetAllTodosCat", args, names); |
||
1463 | jmachado | 33 | if (todos == null || todos.size() == 0) |
34 | { |
||
202 | jmachado | 35 | %> |
36 | |||
1040 | jmachado | 37 | |
1312 | jmachado | 38 | <div class="panel panel-primary"> |
39 | <div class="panel-heading"><bean:message key="intranet.todo"/></div> |
||
40 | <div class="panel-body"> |
||
1040 | jmachado | 41 | |
42 | |||
1312 | jmachado | 43 | |
1040 | jmachado | 44 | |
1463 | jmachado | 45 | |
202 | jmachado | 46 | <% |
47 | for (IToDoCat toDoCat : todos) |
||
48 | { |
||
214 | jmachado | 49 | String imgClose; |
50 | String imgOpen; |
||
51 | String style; |
||
52 | String img; |
||
53 | String styleClass; |
||
684 | jmachado | 54 | // Duarte Santos |
671 | jmachado | 55 | if (toDoCat.getDescription().equals(ModuleEnum.TodoAnnouncements.getMessageKey()) || toDoCat.getDescription().equals(ModuleEnum.Surveys.getMessageKey())) |
214 | jmachado | 56 | { |
57 | styleClass = "WARNING"; |
||
58 | img = "/imgs/openedboxNeg.gif"; |
||
223 | jmachado | 59 | style = ""; |
214 | jmachado | 60 | imgClose = "/imgs/closedboxNeg.gif"; |
61 | imgOpen = "/imgs/openedboxNeg.gif"; |
||
62 | |||
63 | } |
||
808 | jmachado | 64 | //Filipe Matos |
223 | jmachado | 65 | else |
808 | jmachado | 66 | if(toDoCat.getDescription().equals(ModuleEnum.TodoAnnouncements.getMessageKey()) || toDoCat.getDescription().equals(ModuleEnum.Assessments.getMessageKey())){ |
67 | |||
68 | styleClass = "WARNING"; |
||
69 | img = "/imgs/openedboxNeg.gif"; |
||
70 | style = ""; |
||
71 | imgClose = "/imgs/closedboxNeg.gif"; |
||
72 | imgOpen = "/imgs/openedboxNeg.gif"; |
||
73 | } |
||
74 | else |
||
223 | jmachado | 75 | if (toDoCat.getDescription().equals(ModuleEnum.Reminders.getMessageKey()) || toDoCat.getDescription().equals(ModuleEnum.CourseUnits.getMessageKey())) |
214 | jmachado | 76 | { |
77 | styleClass = ""; |
||
78 | img = "/imgs/openedbox.gif"; |
||
223 | jmachado | 79 | style = ""; |
214 | jmachado | 80 | imgClose = "/imgs/closedbox.gif"; |
81 | imgOpen = "/imgs/openedbox.gif"; |
||
82 | } |
||
83 | else |
||
84 | { |
||
85 | styleClass = ""; |
||
86 | img = "/imgs/closedbox.gif"; |
||
223 | jmachado | 87 | style = Globals.HIDDEN; |
214 | jmachado | 88 | imgClose = "/imgs/closedbox.gif"; |
89 | imgOpen = "/imgs/openedbox.gif"; |
||
90 | } |
||
202 | jmachado | 91 | %> |
1040 | jmachado | 92 | |
1463 | jmachado | 93 | <div class="list-group"> |
94 | <div class="list-group-item-heading"><%=MessageResources.getMessage(request, toDoCat.getDescription())%> (<%=toDoCat.getTotalToDo()%>) <img alt="abrir" src="<%=request.getContextPath() + img%>" onclick="this.src=showOrHide('<%=toDoCat.getDescription()%>','<%=request.getContextPath() + imgClose%>','<%=request.getContextPath() + imgOpen%>')" ></div> |
||
1040 | jmachado | 95 | </div> |
205 | jmachado | 96 | |
1463 | jmachado | 97 | |
620 | jmachado | 98 | |
214 | jmachado | 99 | |
1463 | jmachado | 100 | <%--<ul id="<%=toDoCat.getDescription()%>" style="<%=style%>">--%> |
620 | jmachado | 101 | <% |
214 | jmachado | 102 | for (IToDo todo : toDoCat.getAllToDos()) |
202 | jmachado | 103 | { |
214 | jmachado | 104 | |
105 | if (todo.getUrl() != null) |
||
106 | { |
||
107 | %> |
||
1463 | jmachado | 108 | <div class="list-group-item"> |
109 | |||
214 | jmachado | 110 | <a href="<%=request.getContextPath() + todo.getUrl()%>"> |
1463 | jmachado | 111 | |
205 | jmachado | 112 | <% |
343 | jmachado | 113 | if(todo.getCatArg0() == null && todo.getCatKey() != null) |
205 | jmachado | 114 | { |
115 | out.print(MessageResources.getMessage(request,todo.getCatKey()) + ":"); |
||
116 | } |
||
343 | jmachado | 117 | else if(todo.getCatArg0() != null && todo.getCatKey() != null) |
118 | { |
||
119 | out.print(MessageResources.getMessage(request,todo.getCatKey(),todo.getCatArg0()) + ":"); |
||
120 | } |
||
121 | |||
205 | jmachado | 122 | %> |
214 | jmachado | 123 | <%=todo.getLabelInsideCat(request)%> |
1463 | jmachado | 124 | |
214 | jmachado | 125 | </a> |
205 | jmachado | 126 | |
1463 | jmachado | 127 | </div> |
214 | jmachado | 128 | <% |
129 | } |
||
130 | else |
||
131 | { |
||
132 | %> |
||
1463 | jmachado | 133 | <div class="list-group-item"> |
214 | jmachado | 134 | <%=todo.getLabelInsideCat(request)%> |
1463 | jmachado | 135 | </div> |
214 | jmachado | 136 | <% |
137 | } |
||
202 | jmachado | 138 | } |
214 | jmachado | 139 | %> |
1040 | jmachado | 140 | |
1463 | jmachado | 141 | |
142 | </div> |
||
143 | |||
202 | jmachado | 144 | <% |
145 | } |
||
146 | %> |
||
1040 | jmachado | 147 | |
1312 | jmachado | 148 | </div> |
620 | jmachado | 149 | </div> |
1463 | jmachado | 150 | <% |
151 | } |
||
152 | %> |