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