Rev 1814 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | fvelez | 1 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
2 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
||
35 | fvelez | 3 | <%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
20 | fvelez | 4 | <%@ page import="pt.estgp.estgweb.domain.views.AnnouncementView" %> |
5 | <%@ page import="java.util.List" %> |
||
1814 | jmachado | 6 | <%@ page import="pt.estgp.estgweb.utils.Globals" %> |
146 | jmachado | 7 | <%@ page language="java" %> |
801 | jmachado | 8 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
146 | jmachado | 9 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
10 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
11 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
35 | fvelez | 13 | |
1312 | jmachado | 14 | <!--# |
15 | ######################################### |
||
16 | #BANNERS |
||
17 | ######################################### |
||
18 | --> |
||
142 | jmachado | 19 | |
1312 | jmachado | 20 | <script> |
21 | $(document).ready(function () { |
||
22 | $('[data-toggle="offcanvas"]').click(function () { |
||
23 | $('.row-offcanvas').toggleClass('active'); |
||
24 | }); |
||
25 | }); |
||
26 | </script> |
||
765 | jmachado | 27 | |
1350 | jmachado | 28 | |
29 | |||
30 | |||
31 | <% |
||
32 | |||
33 | IServiceManager sm = ServiceManager.getInstance(); |
||
34 | String subTarget = null; |
||
35 | String[] names = new String[]{}; |
||
36 | Object[] args = new Object[]{Globals.ANNOUNCEMENT_TYPE_TOP_FLASH_NEWS, subTarget,5}; |
||
37 | List<AnnouncementView> announcementViews = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request, response), "LoadTypeAnnouncements", args, names); |
||
38 | request.setAttribute("Banners", announcementViews); |
||
39 | |||
40 | if(announcementViews.size() > 0) |
||
41 | { |
||
42 | |||
43 | |||
44 | %> |
||
45 | |||
1312 | jmachado | 46 | <div class="row row-offcanvas row-offcanvas-left hidden-xs"> |
765 | jmachado | 47 | |
48 | |||
1312 | jmachado | 49 | <div class="col-xs-12 col-sm-12"> |
50 | <div class="container" style="padding-left: 0;padding-right: 0"> |
||
51 | <!--<p class="pull-left visible-xs"> |
||
52 | <button type="button" class="btn btn-primary btn-xs" data-toggle="offcanvas">Menu</button> |
||
53 | </p>--> |
||
765 | jmachado | 54 | |
1350 | jmachado | 55 | <div id="myCarousel" class="carousel" data-ride="carousel" data-interval="2000"> |
1312 | jmachado | 56 | <!-- Indicators --> |
57 | <ol class="carousel-indicators"> |
||
1350 | jmachado | 58 | <% |
59 | int i = 0; |
||
60 | %> |
||
61 | <logic:iterate id="banner" name="Banners" type="pt.estgp.estgweb.domain.views.AnnouncementView"> |
||
62 | <li data-target="#myCarousel" data-slide-to="<%=i%>" <%=i==0?"class=\"active\"":""%>></li> |
||
63 | <% |
||
64 | i++; |
||
65 | %> |
||
66 | </logic:iterate> |
||
1312 | jmachado | 67 | </ol> |
765 | jmachado | 68 | |
69 | |||
1312 | jmachado | 70 | <!-- Wrapper for slides --> |
71 | <div class="carousel-inner" role="listbox"> |
||
1350 | jmachado | 72 | <% |
73 | i = 0; |
||
74 | %> |
||
75 | <logic:iterate id="banner" name="Banners" type="pt.estgp.estgweb.domain.views.AnnouncementView"> |
||
76 | <div class="item <%=i==0?"active":""%>"> |
||
77 | <a href="${banner.url}"><img src="<%=request.getContextPath()%>/imageStream/${banner.bigImageId}" alt="${banner.title}" height="100%" width="100%"></a> |
||
78 | <baco:isOwner name="banner"> |
||
79 | <div class="carousel-caption"> |
||
80 | <a href="<%=request.getContextPath()%>/startLoadAnnouncement.do?id=${banner.id}" class="btn btn-default">EDITAR</a> |
||
81 | </div> |
||
82 | </baco:isOwner> |
||
83 | <baco:isNotOwner name="banner"> |
||
84 | <baco:hasRole role="admin,all,services"> |
||
85 | <div class="carousel-caption"> |
||
86 | <a href="<%=request.getContextPath()%>/startLoadAnnouncement.do?id=${banner.id}" class="btn btn-default">EDITAR</a> |
||
87 | </div> |
||
88 | </baco:hasRole> |
||
89 | </baco:isNotOwner> |
||
1312 | jmachado | 90 | </div> |
1350 | jmachado | 91 | <% |
92 | i++; |
||
93 | %> |
||
94 | </logic:iterate> |
||
765 | jmachado | 95 | |
1312 | jmachado | 96 | </div> |
54 | jmachado | 97 | |
1312 | jmachado | 98 | <!-- Left and right controls --> |
99 | <!-- |
||
100 | <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"> |
||
101 | <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> |
||
102 | <span class="sr-only">Previous</span> |
||
103 | </a> |
||
104 | <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next"> |
||
105 | <span class="glyphicon glyphicon-chevron-right" aria-hidden="false"></span> |
||
106 | <span class="sr-only">Next</span> |
||
107 | </a>--> |
||
237 | jmachado | 108 | </div> |
56 | fvelez | 109 | |
1312 | jmachado | 110 | <!-- <div class="jumbotron"> |
111 | <h1>Bem vindos ao site da ESTG</h1> |
||
112 | <p>Descobre como é bom fazer parte da nossa comunidade.</p> |
||
113 | </div>--> |
||
114 | |||
115 | |||
116 | </div><!--Container--> |
||
117 | |||
118 | </div><!--/.col-xs-12.col-sm-12--> |
||
119 | |||
120 | |||
121 | </div><!--/row--> |
||
122 | |||
1350 | jmachado | 123 | <% |
124 | } |
||
125 | %> |
||
1312 | jmachado | 126 | <%--- |
127 | ##### |
||
128 | ##### NOTICIAS |
||
129 | ##### |
||
130 | ##### |
||
131 | --%> |
||
132 | <div class="row"> |
||
133 | <div class="container" style="padding:0;margin-top: 20px"> |
||
134 | |||
135 | <jsp:include page="/public/announcements/announcementsIndex.jsp"/> |
||
136 | |||
137 | </div><!--Container--> |
||
138 | </div><!--row--> |
||
139 |