remove piwik for now
[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 "/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 "/themes/bento/js/l10n/global-navigation-data-#{@lang}.js", "/themes/bento/js/global-navigation.js" %>
15
16     <%= yield :content_for_head %>
17
18     <script type="text/javascript">
19       /* <![CDATA[ */
20 <%= yield :head_javascript %>
21   $(function() {
22 <%= yield :ready_function %>
23          
24     var flip = 0;
25     $(".options_link").click(function () {
26       $("#search_options").toggle( flip++ % 2 == 0 );
27     });
28   });
29   /* ]]> */
30     </script>
31
32     <!-- Piwik -->
33     <!--
34     <script type="text/javascript">
35       var _paq = _paq || [];
36       (function(){
37         var u=(("https:" == document.location.protocol) ? "https://features.opensuse.org/piwik/" : "http://features.opensuse.org/piwik/");
38         _paq.push(['setSiteId', 3]);
39         _paq.push(['setTrackerUrl', u+'piwik.php']);
40         _paq.push(['trackPageView']);
41         _paq.push([ 'setDomains', ["*.opensuse.org"]]);
42         var d=document,
43         g=d.createElement('script'),
44         s=d.getElementsByTagName('script')[0];
45         g.type='text/javascript';
46         g.defer=true;
47         g.async=true;
48         g.src=u+'piwik.js';
49         s.parentNode.insertBefore(g,s);
50       })();
51     </script>
52     -->
53     <!-- End Piwik Code -->
54
55   </head>
56   <body>
57
58     <div id="header">
59       <div id="header-content" class="container_12">
60         <a id="header-logo" href="/">
61           <%= image_tag '/themes/bento/images/header-logo.png', :width => 46, :height => 26, :alt => _("Header Logo") %>
62         </a>
63         <ul id="global-navigation">
64           <li id="item-downloads"><a href="http://en.opensuse.org/openSUSE:Browse#downloads"><%= _("Downloads") %></a></li>
65           <li id="item-support"><a href="http://en.opensuse.org/openSUSE:Browse#support"><%= _("Support") %></a></li>
66           <li id="item-community"><a href="http://en.opensuse.org/openSUSE:Browse#community"><%= _("Community") %></a></li>
67           <li id="item-development"><a href="http://en.opensuse.org/openSUSE:Browse#development"><%= _("Development") %></a></li>
68         </ul>
69       </div>
70     </div>
71
72     <% unless flash.blank? %>
73       <%= render(:partial => "layouts/flash", :object => flash) %>
74     <% end %>
75
76     <div id="content" class="container_12 content-wrapper">
77       <div class="grid_9 alpha">
78
79         <%= render :partial => 'search/search_box' unless @hide_search_box %>
80
81         <div class="box box-shadow">
82           <h2 class="box-header">
83             <span class="alignleft"><%= @box_title || @page_title -%></span>
84             <% if @right_box == :search -%>
85               <span class="alignright" style="padding-right: 10px">
86                 <% if !@release.blank? and @release != "developer" -%>
87                   <%= _('switch to') -%> <%= link_to _('Development Version'), {:controller => "main", :action => "developer", :lang => @lang } -%>
88                 <% elsif !@release.blank? -%>
89                   <%= _('switch to') -%> <%= link_to _('Released Version'), {:controller => "main", :action => "index", :lang => @lang } -%>
90                 <% end -%>
91               </span>
92             <% end -%>
93           </h2>
94           <div>
95             <%= @content_for_layout %>
96           </div>
97         </div>
98
99       </div>
100       <div class="grid_3 omega">
101
102         <div class="box box-shadow">
103           <h2 class="box-header centered"><%= _("Popular Software") %></h2>
104           <p>
105             <% top = top_downloads
106             if !top.blank?
107               top1=top[0][:count]
108               top10=top[-1][:count]
109               if top1 - top10 > 0
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               end
115             end -%>
116           </p>
117         </div>
118
119
120         <div class="box box-shadow">
121           <h2 class="box-header centered"><%=_("Getting Help")%></h2>
122           <ul class="navigation">
123             <li><a href="http://en.opensuse.org/SDB:Download_help"><%=_("Download Help")%></a></li>
124             <li><a href="http://en.opensuse.org/SDB:Download_help#Burn_the_ISO_image.28s.29"><%=_("Burn CD/DVD Image(s)")%></a></li>
125             <li><a href="http://en.opensuse.org/Portal:Installation"><%=_("Installation Guides")%></a></li>
126             <li><a href="http://doc.opensuse.org/"><%=_("Official Manuals")%></a></li>
127             <li><a href="http://en.opensuse.org/Package_repositories"><%=_("Package Repositories")%></a></li>
128             <li><a href="http://en.opensuse.org/openSUSE:Submitting_bug_reports"><%=_("Reporting Bugs")%></a></li>
129           </ul>
130         </div>
131
132         <!--
133         <div class="box box-shadow">
134           <h2 class="box-header centered"><%=_("Countdown")%></h2>
135           <div class="centered">
136             <img src="http://counter.opensuse.org/11.4/small" title="<%=_("openSUSE Countdown")%>" alt="<%=_("openSUSE Countdown")%>" width="130" height="130"/>
137           </div>
138         </div>
139         -->
140
141         <div class="box box-shadow">
142           <h2 class="box-header aligncenter"><%=_("Buy openSUSE")%></h2>
143           <div class="centered">
144             <a href="<%= _("http://en.opensuse.org/Buy_openSUSE") %>"><%= image_tag "114_Boxshot_GB_3D.jpg", :title => _("Buy openSUSE"), :alt => _("Buy openSUSE"), :width => 90, :height => 114 %></a>
145           </div>
146           <p class="centered">
147             <a href="<%= _("http://en.opensuse.org/Buy_openSUSE") %>" title="Buy openSUSE" style="text-decoration: none; font-weight: bold"><%=_("Buy openSUSE")%></a>
148           </p>
149         </div>
150
151         <div class="box box-shadow">
152           <h2 class="box-header centered"><%=_("Sponsored by")%></h2>
153           <!--<p class="centered" style="color: #ccc; font-size: 0.8em"><%=_("Platinum Sponsor")%></p>-->
154           <p class="centered" style="color: #ccc; font-size: 0.8em;"><%=_("Gold Sponsor")%></p>
155           <p class="centered">
156             <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" width="136" height="66"/></a>
157             <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" width="180" height="85"/></a>
158           </p>
159           <p class="centered" style="color: #ccc; font-size: 0.8em;"><%=_("Silver Sponsor")%></p>
160           <p class="centered">
161             <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" width="100" height="100"/></a>
162           </p>
163           <!--<p class="centered" style="color: #ccc; font-size: 0.8em"><%=_("Bronze Sponsor")%></p>-->
164         </div>
165
166         <div class="box box-shadow">
167           <h2 class="box-header centered"><%= _("Language") %></h2>
168           <form action="<%= url_for :controller => :main, :action => :index %>" method="get" class="centered">
169           <select name="lang" onChange="this.form.submit();">
170             <option value="<%= @lang %>" selected="true"><%= link_to(LANGUAGE_NAMES[@lang] || @lang, :controller => :main, :action => :index, :lang => "#{@lang}") %></option>
171             <% LANGUAGES.each do |lang| %>
172             <option value="<%= lang %>"><%= link_to(LANGUAGE_NAMES[lang] || lang, :controller => :main, :action => :index, :lang => "#{lang}") %></option>
173             <% end -%>
174           </select>
175             </form>
176         </div>
177
178       </div>
179
180     </div>
181
182     <div id="footer" class="container_12">
183       <div id="footer-content" class="grid_12">
184       </div>
185       <div id="footer-legal" class="border-top grid_12">
186         <a href="http://en.opensuse.org/Portal:Project">About openSUSE</a> |
187         <a href="http://en.opensuse.org/Terms_of_site">Legal information</a> |
188         <a href="mailto:admin@opensuse.org">Feedback</a>
189         <br/><br/>
190         <a href="http://www.novell.com/linux/"><img src="http://static.opensuse.org/c/images/common/founded_novell.gif" alt="Founded by Novell" width="139" height="18" /></a>
191       </div>
192     </div>
193
194     <% if @right_box == :search -%>
195       <!--[if lte IE 7]>
196           <script type="text/javascript">
197            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.")
198           </script>
199         <![endif]-->
200     <% end -%>
201
202   </body>
203 </html>