add firefox search
[opensuse:software-o-o.git] / app / views / layouts / application.rhtml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3   <head>
4     <title><%= "software.opensuse.org: " + @page_title %></title>
5     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6     <meta http-equiv="Content-Script-Type" content="text/javascript"/>
7     <meta http-equiv="Content-Style-Type" content="text/css"/>
8
9     <link rel="search" type="application/opensearchdescription+xml" title="openSUSE Software" href="/search_software.xml" />
10
11     <%= stylesheet_link_tag "/css/ui.dialog.css", "/themes/bento/css/style.css", "/css/software.css" %>
12     <link href="http://static.opensuse.org/themes/bento/images/favicon.png" rel="shortcut icon" />
13     <%= javascript_include_tag "http://static.opensuse.org/themes/bento/js/jquery.js", "jquery-ui-1.7.2.js", "jrails.js", "application.js"  %>
14     <%= javascript_include_tag "http://static.opensuse.org/c/javascript/common/langsel.js" %>
15     <%= javascript_include_tag "/themes/bento/js/l10n/global-navigation-data-#{@lang}.js", "/themes/bento/js/global-navigation.js" %>
16     <%= javascript_include_tag "http://www.google-analytics.com/ga.js" %>
17
18     <%= yield :content_for_head %>
19
20     <script type="text/javascript">
21     /* <![CDATA[ */
22     <%= yield :head_javascript %>
23     $(function() {
24       <%= yield :ready_function %>
25          
26       var flip = 0;
27       $(".options_link").click(function () {
28         $("#search_options").toggle( flip++ % 2 == 0 );
29       });
30     });
31     /* ]]> */
32     </script>
33
34   </head>
35   <body>
36
37     <div id="header">
38       <div id="header-content" class="container_12">
39         <a id="header-logo" href="/">
40           <%= image_tag '/themes/bento/images/header-logo.png', :width => 46, :height => 26, :alt => _("Header Logo") %>
41         </a>
42         <ul id="global-navigation">
43           <li id="item-downloads"><a href="http://en.opensuse.org/openSUSE:Browse#downloads"><%= _("Downloads") %></a></li>
44           <li id="item-support"><a href="http://en.opensuse.org/openSUSE:Browse#support"><%= _("Support") %></a></li>
45           <li id="item-community"><a href="http://en.opensuse.org/openSUSE:Browse#community"><%= _("Community") %></a></li>
46           <li id="item-development"><a href="http://en.opensuse.org/openSUSE:Browse#development"><%= _("Development") %></a></li>
47         </ul>
48       </div>
49     </div>
50
51     <% unless flash.empty? %>
52       <div id="flash-messages" class="container_16" >
53         <% if flash[:success] or flash[:note] %>
54           <div class="grid_16 alpha omega">
55             <div class="ui-state-highlight ui-corner-all">
56               <p>
57                 <span class="ui-icon ui-icon-info"/>
58                 <%=h flash[:success] %><%=h flash[:note] %>
59               </p>
60             </div>
61           </div>
62         <% end %>
63
64         <% if flash[:warn] or flash[:error] %>
65           <div class="grid_16 alpha omega">
66             <div class="ui-state-error ui-corner-all">
67               <p>
68                 <span class="ui-icon ui-icon-alert" />
69                 <%=h flash[:warn] %><%=h flash[:error] %>
70               </p>
71             </div>
72           </div>
73         <% end %>
74       </div>
75     <% end %>
76
77     <div id="content" class="container_12 content-wrapper">
78       <div class="grid_9 alpha">
79
80       <%= render :partial => 'search/search_box' %>
81
82         <div class="box box-shadow">
83           <h2 class="box-header">
84             <span class="alignleft"><%= @box_title || @page_title -%></span>
85             <% if @right_box == :search -%>
86               <span class="alignright" style="padding-right: 10px">
87                 <% if !@release.blank? and @release != "developer" -%>
88                   <%= _('switch to') -%> <%= link_to _('Development Version'), {:controller => "main", :action => "developer", :lang => @lang } -%>
89                 <% elsif !@release.blank? -%>
90                   <%= _('switch to') -%> <%= link_to _('Released Version'), {:controller => "main", :action => "index", :lang => @lang } -%>
91                 <% end -%>
92               </span>
93             <% end -%>
94           </h2>
95           <div>
96             <%= @content_for_layout %>
97           </div>
98         </div>
99
100       </div>
101       <div class="grid_3 omega">
102
103         <div class="box box-shadow">
104           <h2 class="box-header centered"><%= _("Popular Software") %></h2>
105
106           <p>
107             <% top = top_downloads
108               top1=top[0][:count]
109               top10=top[-1][:count]
110               top.each do |query| -%>
111                 <% queryclass=((Float(query[:count] - top10) / (top1 - top10)) * 5).round %>
112               <a class='<%= "nowrap query query_#{queryclass}"%>'><%= query[:query] %></a>
113             <% end -%>
114           </p>
115         </div>
116
117         <div class="box box-shadow">
118           <h2 class="box-header centered"><%=_("Getting Help")%></h2>
119           <ul class="navigation">
120             <li><a href="http://en.opensuse.org/SDB:Download_help"><%=_("Download Help")%></a></li>
121             <li><a href="http://en.opensuse.org/SDB:Download_help#Burn_the_ISO_image.28s.29"><%=_("Burn CD/DVD Image(s)")%></a></li>
122             <li><a href="http://en.opensuse.org/SDB:Installation"><%=_("Installation Guides")%></a></li>
123             <li><a href="http://www.novell.com/documentation/opensuse112/"><%=_("Official Manuals")%></a></li>
124             <li><a href="http://en.opensuse.org/Package_repositories"><%=_("Package Repositories")%></a></li>
125             <li><a href="http://en.opensuse.org/openSUSE:Submitting_bug_reports"><%=_("Reporting Bugs")%></a></li>
126           </ul>
127         </div>
128
129         <div class="box box-shadow">
130           <img src="http://counter.opensuse.org/conf/2010/small.png" alt="openSUSE Conference 2010 Counter" class="aligncenter"/>
131         </div>
132         
133         <div class="box box-shadow">
134
135           <!-- <h2 class="box-header"><%=_("openSUSE 11.3 Counter")%></h2>
136           <div class="centered">
137             <img src="http://counter.opensuse.org/11.3/small" title="<%=_("openSUSE 11.3 Counter")%>" alt="<%=_("openSUSE 11.3 Counter")%>"/>
138           </div> -->
139
140           <h2 class="box-header aligncenter"><%=_("Buy openSUSE")%></h2>
141           <div class="centered">
142             <a href="<%= _("http://en.opensuse.org/Buy_openSUSE") %>"><img src="http://en.opensuse.org/images/4/4c/OpenSUSE11.3_Box.png" title="<%=_("Buy openSUSE 11.3")%>" alt="<%=_("Buy openSUSE 11.3")%>"/></a>
143           </div>
144           <p class="centered">
145             <a href="<%= _("http://en.opensuse.org/Buy_openSUSE") %>" title="Buy openSUSE" style="text-decoration: none; font-weight: bold"><%=_("Buy openSUSE 11.3!")%></a>
146           </p>
147         </div>
148
149         <div class="box box-shadow">
150           <h2 class="box-header centered"><%=_("Sponsored by")%></h2>
151           <!--<p class="centered" style="color: #ccc; font-size: 0.8em"><%=_("Platinum Sponsor")%></p>-->
152           <p class="centered" style="color: #ccc; font-size: 0.8em;"><%=_("Gold Sponsor")%></p>
153           <p class="centered">
154             <a href="http://en.opensuse.org/Sponsors"><img title="<%=_("Sponsored by AMD")%>" alt="<%=_("Sponsored by AMD")%>" src="http://static.opensuse.org/c/images/common/Amd.png"/></a>
155             <a href="http://en.opensuse.org/Sponsors"><img title="<%=_("Sponsored by: IP Exchange")%>" alt="<%=_("Sponsored by: IP Exchange")%>" src="http://static.opensuse.org/c/images/common/Ip-exchange.gif"/></a>
156           </p>
157           <p class="centered" style="color: #ccc; font-size: 0.8em;"><%=_("Silver Sponsor")%></p>
158           <p class="centered">
159             <a href="http://en.opensuse.org/Sponsors"><img title="<%=_("Sponsored by: B1 Systems")%>" alt="<%=_("Sponsored by: B1 Systems")%>" src="http://static.opensuse.org/c/images/common/B1-systems-1.jpg"/></a>
160           </p>
161           <!--<p class="centered" style="color: #ccc; font-size: 0.8em"><%=_("Bronze Sponsor")%></p>-->
162         </div>
163
164       </div>
165
166     </div>
167
168     <div id="footer" class="container_12">
169       <div id="footer-content" class="grid_12">
170       </div>
171       <div id="footer-legal" class="border-top grid_12">
172         <a href="http://en.opensuse.org/Portal:Project">About openSUSE</a> |
173         <a href="http://en.opensuse.org/Terms_of_site">Legal information</a> |
174         <a href="mailto:admin@opensuse.org">Feedback</a>
175         <br/><br/>
176         <a href="http://www.novell.com/linux/"><img src="http://static.opensuse.org/c/images/common/founded_novell.gif" alt="Founded by Novell" /></a>
177       </div>
178     </div>
179
180     <% if @right_box == :search -%>
181       <!--[if lte IE 7]>
182           <script type="text/javascript">
183            alert("Please note that the Internet Explorer (all versions) is not capable of handling\nfiles larger than 4 GB.\n\nThis means that you will not be able to download the DVD images using IE.\n\nPlease use a different browser or a downloadmanager.")
184           </script>
185         <![endif]-->
186       <% end -%>
187
188   </body>
189 </html>