added locale picker to home page. setting locale value in the selector on page load
[Evergreen.git] / Open-ILS / web / opac / skin / default / xml / home / homesearch.xml
1
2 <div id='canvas_main' class='home_search canvas'
3         style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;' 
4         xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
5
6         <!-- load my js -->
7         <script language='javascript' type='text/javascript'
8                 src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js"> </script>
9         <script language='javascript' type='text/javascript'
10                 src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js"> </script>
11
12         <script language='javascript' type='text/javascript'>
13                 config.ids.searchbar = {};
14                 config.css.searchbar = {};
15                 config.ids.searchbar.text                               = 'search_box'; 
16                 config.ids.searchbar.submit                     = 'search_submit';      
17                 config.ids.searchbar.type_selector      = 'search_type_selector';
18                 config.ids.searchbar.depth_selector     = 'depth_selector';
19                 config.ids.searchbar.form_selector      = 'form_selector';
20                 config.ids.searchbar.extra_row          = 'searchbar_extra';
21                 config.ids.searchbar.main_row                   = 'searchbar_main_row';
22                 config.ids.searchbar.table                              = 'searchbar_table';
23                 config.ids.searchbar.location_tag       = 'search_location_tag_link';
24                 config.ids.searchbar.lib_sel_span       = 'lib_selector_span';
25                 config.ids.searchbar.lib_sel_link       = 'lib_selector_link';
26                 config.ids.searchbar.depth_sel_span     = 'depth_selector_span';
27         </script>
28
29
30         <div style='width: 100%; text-align: center'>
31                 <img src='<!--#echo var="OILS_BASE"-->/images/main_logo.jpg' />
32         </div>
33
34         <style>.rowpad { height: 20px; }</style>
35
36         <table id='frontsearch_table' height='100%' width='100%' 
37                 style='margin-top: 10px; border-collapse: collapse;'>
38
39                 <tbody>
40
41                         <tr class='color_3'>
42
43                                 <script language='javascript' type='text/javascript'>
44                                         config.ids.common.now_searching = 'now_searching_location';
45                                 </script>
46
47                                 <td style='padding: 6px;' class='border_5' align='center'>
48                                         <span>&opac.search.nowSearching;</span>
49                                         <span style='padding: 1px;' id='now_searching_location'>  </span>
50                                 </td>
51                         </tr>
52
53
54                         <tr class='rowpad'><td></td></tr>
55
56                         <tr>
57                                 <td nowrap='nowrap' align='center' class='color_1 border_5'>
58                                         <input id='search_box' style='width: 300px;' type='text' />
59                                         <span style='padding-left: 6px;'>
60                                                 <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
61                                         </span>
62                                 </td>
63                         </tr>
64
65                         <tr class='rowpad'><td></td></tr>
66
67                         <tr class='color_3 border_5'>
68
69                                 <td nowrap='nowrap' align='center' style='padding: 4px;'>
70
71                                         <span style='padding-right:40px;'>
72                                                 <!--#include virtual="../common/stypes_selector.xml"-->
73                                         </span>
74
75                                         <span>
76                                                 <!--
77                                                 <span>&common.format;: </span>
78                                                 -->
79                                                 <!--#set var='FORM_SEL_ID' value='form_selector'-->
80                                                 <!--#include virtual="../common/format_selector.xml"-->
81                                         </span>
82
83                                 </td>
84                         </tr>
85
86                         <tr class='rowpad'><td></td></tr>
87
88                         <tr class='color_1 border_5'>
89                                 <td align='center' style='padding: 4px; padding-bottom: 6px;'>
90                                         <span style='padding-right: 15px;'>
91                                                 <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
92                                         <span>
93                                                 <span class='hide_me' id='depth_selector_span'>
94                                                         <select id='depth_selector' >
95                                                                 <option value='new'>&opac.navigate.selectNewOrg;...</option>
96                                                         </select>
97                                                 </span>
98                                                 <span class='hide_me' id='lib_selector_span'>
99                                                         <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
100                                                 </span>
101                                         </span>
102                                         <span style='padding-left: 15px;'>
103                                                 <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
104                                         </span>
105                                 </td>
106                         </tr>
107
108             <!-- locale picker -->
109             <tr><td align='center' valign='bottom' style='padding-top:10px;'>
110                         <span style='vertical-align: top;'>&common.language;</span>
111                         <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore" 
112                     searchAttr="label" required="false" value='<!--#echo var="locale"-->'>
113                                 <script type="dojo/label" event="onChange">
114                                         if (this.getValue()) {
115                                                 location.href = location.href.replace( /opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
116                                         }
117                                 </script>
118                         </span>
119             </td></tr>
120
121                 </tbody>
122         </table>
123
124 </div>
125
126
127
128
129
130