Subversion Repositories bacoAlunos

Rev

Rev 1463 | Rev 1465 | 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
 
1464 jmachado 37
<div class="row">
38
    <div class="col-md-12 col-sm-12 col-xs-12">
39
        <div class="panel panel-primary">
40
            <div class="panel-heading"><bean:message key="intranet.todo"/></div>
41
            <div class="panel-body">
1040 jmachado 42
 
43
 
44
 
1312 jmachado 45
 
1040 jmachado 46
 
1464 jmachado 47
                <%
48
                    for (IToDoCat toDoCat : todos)
49
                    {
50
                        String imgClose;
51
                        String imgOpen;
52
                        String style;
53
                        String img;
54
                        String styleClass;
55
                         // Duarte Santos
56
                        if (toDoCat.getDescription().equals(ModuleEnum.TodoAnnouncements.getMessageKey()) || toDoCat.getDescription().equals(ModuleEnum.Surveys.getMessageKey()))
57
                        {
58
                            styleClass = "WARNING";
59
                            img = "/imgs/openedboxNeg.gif";
60
                            style = "";
61
                            imgClose = "/imgs/closedboxNeg.gif";
62
                            imgOpen = "/imgs/openedboxNeg.gif";
1463 jmachado 63
 
1464 jmachado 64
                        }
65
                        //Filipe Matos
66
                        else
67
                        if(toDoCat.getDescription().equals(ModuleEnum.TodoAnnouncements.getMessageKey()) || toDoCat.getDescription().equals(ModuleEnum.Assessments.getMessageKey())){
214 jmachado 68
 
1464 jmachado 69
                            styleClass = "WARNING";
70
                            img = "/imgs/openedboxNeg.gif";
71
                            style = "";
72
                            imgClose = "/imgs/closedboxNeg.gif";
73
                            imgOpen = "/imgs/openedboxNeg.gif";
74
                        }
75
                        else
76
                        if (toDoCat.getDescription().equals(ModuleEnum.Reminders.getMessageKey()) || toDoCat.getDescription().equals(ModuleEnum.CourseUnits.getMessageKey()))
77
                        {
78
                            styleClass = "";
79
                            img = "/imgs/openedbox.gif";
80
                            style = "";
81
                            imgClose = "/imgs/closedbox.gif";
82
                            imgOpen = "/imgs/openedbox.gif";
83
                        }
84
                        else
85
                        {
86
                            styleClass = "";
87
                            img = "/imgs/closedbox.gif";
88
                            style = Globals.HIDDEN;
89
                            imgClose = "/imgs/closedbox.gif";
90
                            imgOpen = "/imgs/openedbox.gif";
91
                        }
92
                %>
808 jmachado 93
 
1464 jmachado 94
                    <div class="list-group">
95
                        <div class="list-group-item list-group-item-warning"><%=MessageResources.getMessage(request, toDoCat.getDescription())%> (<%=toDoCat.getTotalToDo()%>)</div>
1040 jmachado 96
 
205 jmachado 97
 
1463 jmachado 98
 
214 jmachado 99
 
100
 
1464 jmachado 101
                    <%--<ul id="<%=toDoCat.getDescription()%>" style="<%=style%>">--%>
102
                   <%
103
                            for (IToDo todo : toDoCat.getAllToDos())
104
                            {
1463 jmachado 105
 
1464 jmachado 106
                                if (todo.getUrl() != null)
205 jmachado 107
                                {
1464 jmachado 108
                        %>
109
                        <div class="list-group-item">
343 jmachado 110
 
1464 jmachado 111
                            <a href="<%=request.getContextPath() + todo.getUrl()%>">
112
 
113
                                    <%
114
                                        if(todo.getCatArg0() == null && todo.getCatKey() != null)
115
                                        {
116
                                            out.print(MessageResources.getMessage(request,todo.getCatKey()) + ":");
117
                                        }
118
                                        else if(todo.getCatArg0() != null && todo.getCatKey() != null)
119
                                        {
120
                                            out.print(MessageResources.getMessage(request,todo.getCatKey(),todo.getCatArg0()) + ":");
121
                                        }
122
 
123
                                    %>
124
                                    <%=todo.getLabelInsideCat(request)%>
125
                                    <img src="<%=request.getContextPath()%>/imgs/preencher.gif" width="35px"/>
126
                            </a>
127
 
128
                        </div>
129
                        <%
130
                        }
131
                        else
132
                        {
133
                        %>
134
                        <div class="list-group-item">
214 jmachado 135
                            <%=todo.getLabelInsideCat(request)%>
1464 jmachado 136
                        </div>
137
                        <%
138
                                }
139
                            }
140
                        %>
1463 jmachado 141
 
205 jmachado 142
 
1464 jmachado 143
                    </div>
144
 
214 jmachado 145
                <%
202 jmachado 146
                    }
214 jmachado 147
                %>
1040 jmachado 148
 
1463 jmachado 149
            </div>
1464 jmachado 150
        </div>
1312 jmachado 151
    </div>
620 jmachado 152
</div>
1463 jmachado 153
<%
154
    }
155
%>