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