Subversion Repositories bacoAlunos

Rev

Rev 1465 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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