Rev 1312 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1312 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.Globals" %> |
457 | jmachado | 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
3 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
4 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
5 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
9 | <baco:isModuleOn module="search"> |
||
10 | |||
472 | jmachado | 11 | |
457 | jmachado | 12 | <% |
13 | String allChecked = ""; |
||
14 | String anyChecked = ""; |
||
15 | String phraseChecked = ""; |
||
16 | String query = request.getParameter("query"); |
||
17 | String searchType = request.getParameter("searchType"); |
||
18 | if(query == null) |
||
19 | query = ""; |
||
20 | |||
21 | allChecked = "checked=\"checked\""; |
||
22 | if(searchType == null) |
||
23 | allChecked = "checked=\"checked\""; |
||
24 | else if(searchType.equals("search.type.all")) |
||
25 | allChecked = "checked=\"checked\""; |
||
26 | else if(searchType.equals("search.type.any")) |
||
27 | anyChecked = "checked=\"checked\""; |
||
28 | else if(searchType.equals("search.type.phrase")) |
||
29 | phraseChecked = "checked=\"checked\""; |
||
30 | |||
31 | |||
32 | %> |
||
33 | |||
34 | |||
35 | |||
36 | |||
37 | <% |
||
38 | if(request.getParameter("size") == null) |
||
39 | { |
||
1312 | jmachado | 40 | |
457 | jmachado | 41 | %> |
42 | |||
1312 | jmachado | 43 | |
44 | <div class="row hidden-xs hidden-sm"> |
||
45 | <div class="col-sm-8"> |
||
46 | <a style="border:0" href="<%=request.getContextPath()%>"><img style="border:0" src="<%=request.getContextPath()%>/layout/themes/${pt_estgp_estgweb_theme}/logo.png" /></a> |
||
47 | </div> |
||
48 | <div class="col-sm-4"> |
||
49 | <html:form styleId="searchForm" action="/search" method="post"> |
||
50 | <input type="hidden" name="dispatch" value="search"/> |
||
51 | <input type="hidden" name="searchType" value="search.type.all"/> |
||
52 | <div class="form-group"> |
||
53 | <label>Pesquisar no portal:</label> |
||
54 | <div class="input-group"> |
||
55 | <input type="text" class="form-control input-sm" name="query" value="<%=query.replace("\"",""")%>"/> |
||
56 | <span class="input-group-addon cursorLink" onclick="$('#searchForm').submit()"> |
||
57 | <span class="glyphicon glyphicon-search"></span> |
||
58 | </span> |
||
59 | </div> |
||
60 | </div> |
||
61 | <%--<td><input type="radio" name="searchType" value="search.type.all" <%=allChecked%>/></td>--%> |
||
62 | <%--<td><bean:message key="search.type.all"/></td>--%> |
||
63 | <%--<td><input type="radio" name="searchType" value="search.type.any" <%=anyChecked%>/></td>--%> |
||
64 | <%--<td><bean:message key="search.type.any"/></td>--%> |
||
65 | <%--<td><input type="radio" name="searchType" value="search.type.phrase" <%=phraseChecked%>/></td>--%> |
||
66 | <%--<td><bean:message key="search.type.phrase"/></td>--%> |
||
67 | </html:form> |
||
68 | </div> |
||
69 | </div> |
||
70 | |||
71 | <div class="row visible-xs visible-sm hidden-md hidden-lg"> |
||
72 | |||
73 | <div class="col-xs-2 col-sm-2"> |
||
74 | <a height="60px" style="border:0" href="<%=request.getContextPath()%>"><img style="border:0" src="<%=request.getContextPath()%>/layout/themes/${pt_estgp_estgweb_theme}/logo.png" /></a> |
||
75 | </div> |
||
76 | <div class="col-xs-10 col-sm-10"> |
||
77 | <html:form styleId="searchFormXs" action="/search" method="post"> |
||
78 | <input type="hidden" name="dispatch" value="search"/> |
||
79 | <input type="hidden" name="searchType" value="search.type.all"/> |
||
80 | <div class="form-group"> |
||
81 | <div class="input-group"> |
||
82 | <input type="text" class="form-control input-sm" name="query" value="<%=query.replace("\"",""")%>"/> |
||
83 | <span class="input-group-addon cursorLink " onclick="$('#searchFormXs').submit()"> |
||
84 | <span class="glyphicon glyphicon-search"></span> |
||
85 | </span> |
||
86 | </div> |
||
87 | </div> |
||
88 | </html:form> |
||
89 | </div> |
||
90 | </div> |
||
91 | |||
92 | |||
472 | jmachado | 93 | <% |
94 | } |
||
95 | else if(request.getParameter("size").equals("small")) |
||
96 | { |
||
97 | %> |
||
1312 | jmachado | 98 | |
1317 | jmachado | 99 | <html:form action="/user/searchIntranet" method="post"> |
1312 | jmachado | 100 | <input type="hidden" name="dispatch" value="search"/> |
101 | <input type="hidden" name="from" value="Home"/> |
||
102 | <input type="hidden" name="searchType" value="search.type.all"/> |
||
103 | <div class="row"> |
||
104 | <div class="col-sm-9"><input type="text" class="form-control" name="query" value="<%=query%>"/> </div> |
||
105 | <div class="col-sm-2"><input onmouseout="src='<%=request.getContextPath()%>/imgs/lupa.gif'" onmouseover="src='<%=request.getContextPath()%>/imgs/lupa_light.gif'" type="image" onclick="this.form.submit()" src="<%=request.getContextPath()%>/imgs/lupa.gif"/></div> |
||
106 | </div> |
||
107 | </html:form> |
||
472 | jmachado | 108 | <% |
109 | } |
||
110 | %> |
||
111 | |||
112 | |||
484 | jmachado | 113 | </baco:isModuleOn> |