fixed wrong spacing between columns
[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     <%= stylesheet_link_tag "/css/ui.dialog.css", "/themes/bento/css/style.css", "/css/software.css" %>
10     <link href="http://static.opensuse.org/themes/bento/images/favicon.png" rel="shortcut icon" />
11     <%= javascript_include_tag "http://static.opensuse.org/themes/bento/js/jquery.js", "jquery-ui-1.7.2.js", "jrails.js", "application.js"  %>
12     <%= javascript_include_tag "http://static.opensuse.org/c/javascript/common/langsel.js" %>
13     <%= javascript_include_tag "/themes/bento/js/l10n/global-navigation-data-#{@lang}.js", "/themes/bento/js/global-navigation.js" %>
14     <%= javascript_include_tag "http://www.google-analytics.com/ga.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   </head>
33   <body>
34
35     <div id="header">
36       <div id="header-content" class="container_12">
37         <a id="header-logo" href="/">
38           <%= image_tag '/themes/bento/images/header-logo.png', :width => 46, :height => 26, :alt => _("Header Logo") %>
39         </a>
40         <ul id="global-navigation">
41           <li id="item-downloads"><a href="http://en.opensuse.org/openSUSE:Browse#downloads"><%= _("Downloads") %></a></li>
42           <li id="item-support"><a href="http://en.opensuse.org/openSUSE:Browse#support"><%= _("Support") %></a></li>
43           <li id="item-community"><a href="http://en.opensuse.org/openSUSE:Browse#community"><%= _("Community") %></a></li>
44           <li id="item-development"><a href="http://en.opensuse.org/openSUSE:Browse#development"><%= _("Development") %></a></li>
45         </ul>
46       </div>
47     </div>
48
49     <% unless flash.empty? %>
50       <div id="flash-messages" class="container_16" >
51         <% if flash[:success] or flash[:note] %>
52           <div class="grid_16 alpha omega">
53             <div class="ui-state-highlight ui-corner-all">
54               <p>
55                 <span class="ui-icon ui-icon-info"/>
56                 <%=h flash[:success] %><%=h flash[:note] %>
57               </p>
58             </div>
59           </div>
60         <% end %>
61
62         <% if flash[:warn] or flash[:error] %>
63           <div class="grid_16 alpha omega">
64             <div class="ui-state-error ui-corner-all">
65               <p>
66                 <span class="ui-icon ui-icon-alert" />
67                 <%=h flash[:warn] %><%=h flash[:error] %>
68               </p>
69             </div>
70           </div>
71         <% end %>
72       </div>
73     <% end %>
74
75     <div id="content" class="container_12 content-wrapper">
76       <div class="grid_9 alpha">
77
78       <%= render :partial => 'search/search_box' %>
79
80         <div class="box box-shadow">
81           <h2 class="box-header">
82             <span class="alignleft"><%= @box_title || @page_title -%></span>
83             <% if @right_box == :search -%>
84               <span class="alignright" style="padding-right: 10px">
85                 <% if !@release.blank? and @release != "developer" -%>
86                   <%= _('switch to') -%> <%= link_to _('Development Version'), {:controller => "main", :action => "developer", :lang => @lang } -%>
87                 <% elsif !@release.blank? -%>
88                   <%= _('switch to') -%> <%= link_to _('Released Version'), {:controller => "main", :action => "index", :lang => @lang } -%>
89                 <% end -%>
90               </span>
91             <% end -%>
92           </h2>
93           <div>
94             <%= @content_for_layout %>
95           </div>
96         </div>
97
98       </div>
99       <div class="grid_3 omega">
100
101         <div class="box box-shadow">
102           <h2 class="box-header centered"><%= _("Popular Software") %></h2>
103
104           <p>
105             <% top = top_downloads
106               top1=top[0][:count]
107               top10=top[-1][:count]
108               top.each do |query| -%>
109                 <% queryclass=((Float(query[:count] - top10) / (top1 - top10)) * 5).round %>
110               <a class='<%= "nowrap query query_#{queryclass}"%>'><%= query[:query] %></a>
111             <% end -%>
112           </p>
113         </div>
114
115         <div class="box box-shadow">
116           <h2 class="box-header centered"><%=_("Getting Help")%></h2>
117           <ul class="navlist">
118             <li><a href="http://en.opensuse.org/SDB:Download_help"><%=_("Download Help")%></a></li>
119             <li><a href="http://en.opensuse.org/SDB:Download_help#Burn_the_ISO_image.28s.29"><%=_("Burn CD/DVD Image(s)")%></a></li>
120             <li><a href="http://en.opensuse.org/SDB:Installation"><%=_("Installation Guides")%></a></li>
121             <li><a href="http://www.novell.com/documentation/opensuse112/"><%=_("Official Manuals")%></a></li>
122             <li><a href="http://en.opensuse.org/Package_repositories"><%=_("Package Repositories")%></a></li>
123             <li><a href="http://en.opensuse.org/openSUSE:Submitting_bug_reports"><%=_("Reporting Bugs")%></a></li>
124           </ul>
125         </div>
126
127         <div class="box box-shadow">
128
129           <!-- <h2 class="box-header"><%=_("openSUSE 11.3 Counter")%></h2>
130           <div class="centered">
131             <img src="http://counter.opensuse.org/11.3/small" title="<%=_("openSUSE 11.3 Counter")%>" alt="<%=_("openSUSE 11.3 Counter")%>"/>
132           </div> -->
133
134           <h2 class="box-header aligncenter"><%=_("Buy openSUSE")%></h2>
135           <div class="centered">
136             <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>
137           </div>
138           <p class="centered">
139             <a href="<%= _("http://en.opensuse.org/Buy_openSUSE") %>" title="Buy openSUSE" style="text-decoration: none; font-weight: bold"><%=_("Buy openSUSE 11.3!")%></a>
140           </p>
141         </div>
142
143         <div class="box box-shadow">
144           <h2 class="box-header centered"><%=_("Sponsored by")%></h2>
145           <!--<p class="centered" style="color: #ccc; font-size: 0.8em"><%=_("Platinum Sponsor")%></p>-->
146           <p class="centered "style="color: #ccc; font-size: 0.8em;"><%=_("Gold Sponsor")%></p>
147           <p class="centered">
148             <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>
149             <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>
150           </p>
151           <p class="centered "style="color: #ccc; font-size: 0.8em;"><%=_("Silver Sponsor")%></p>
152           <p class="centered">
153             <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>
154           </p>
155           <!--<p class="centered" style="color: #ccc; font-size: 0.8em"><%=_("Bronze Sponsor")%></p>-->
156         </div>
157
158       </div>
159
160     </div>
161
162     <div id="footer" class="container_12">
163       <div id="footer-content" class="grid_12">
164       </div>
165       <div id="footer-legal" class="border-top grid_12">
166         <a href="http://en.opensuse.org/Portal:Project">About openSUSE</a> |
167         <a href="http://en.opensuse.org/Terms_of_site">Legal information</a> |
168         <a href="mailto:admin@opensuse.org">Feedback</a>
169         <br/><br/>
170         <a href="http://www.novell.com/linux/"><img src="http://static.opensuse.org/c/images/common/founded_novell.gif" alt="Founded by Novell" /></a>
171       </div>
172     </div>
173
174     <% if @right_box == :search -%>
175       <!--[if lte IE 7]>
176           <script type="text/javascript">
177            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.")
178           </script>
179         <![endif]-->
180       <% end -%>
181
182   </body>
183 </html>