load distributions from api
[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</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/hosts/software.o.o/images/favicon.ico" 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     /* ]]> */
25     </script>
26
27   </head>
28   <body>
29
30     <div id="header">
31       <div id="header-content" class="container_12">
32         <a id="header-logo" href="/">
33           <%= image_tag '/themes/bento/images/header-logo.png', :width => 46, :height => 26, :alt => _("Header Logo") %>
34         </a>
35         <ul id="global-navigation">
36           <li id="item-downloads"><a href="http://en.opensuse.org/Sitemap#downloads"><%= _("Downloads") %></a></li>
37           <li id="item-support"><a href="http://en.opensuse.org/Sitemap#support"><%= _("Support") %></a></li>
38           <li id="item-community"><a href="http://en.opensuse.org/Sitemap#community"><%= _("Community") %></a></li>
39           <li id="item-development"><a href="http://en.opensuse.org/Sitemap#development"><%= _("Development") %></a></li>
40         </ul>
41       </div>
42     </div>
43
44     <div id="content" class="container_12 content-wrapper">
45       <div class="grid_9 alpha">
46
47         <div class="box box-shadow grid_9 alpha">
48           <h2 class="box-header"><%=_("Package Search")%></h2>
49           <div id="get_software">
50             <p><%=_("Search and install software packages from the openSUSE Build Service:") %></p>
51             <div id="search_form">
52               <% form_tag( {:controller => 'search'}, :method => :get ) do %>
53                 <%= text_field_tag 'q', @query, :size => 40 %>
54                 <div id="form_control">
55                   <%= select_tag 'baseproject', options_for_select(@distributions, (@baseproject or default_baseproject)) %>
56                   <%= submit_tag _('Search'), :name => nil %>
57                 </div>
58               <% end -%>
59             </div>
60           </div>
61         </div>
62
63         <%= setup_baseproject %>
64
65         <div class="box box-shadow grid_9 alpha">
66           <h2 class="box-header">
67             <span class="alignleft"><%= @page_title -%></span>
68             <% if @right_box == :search -%>
69               <span class="alignright" style="padding-right: 10px">
70                 <% if @release != "developer" -%>
71                   <%= _('switch to') -%> <%= link_to _('Development Version'), {:controller => "main", :action => "developer", :lang => @lang } -%>
72                 <% else -%>
73                   <%= _('switch to') -%> <%= link_to _('Released Version'), {:controller => "main", :action => "index", :lang => @lang } -%>
74                 <% end -%>
75               </span>
76             <% end -%>
77           </h2>
78           <div>
79             <%= @content_for_layout %>
80           </div>
81         </div>
82
83       </div>
84       <div class="grid_3 omega">
85
86         <div class="box box-shadow grid_3 omega">
87           <h2 class="box-header centered"><%= _("Popular Software") %></h2>
88
89           <p>
90             <% top = top_downloads
91               top1=top[0][:count]
92               top10=top[-1][:count]
93               top.each do |query| -%>
94                 <% queryclass=((Float(query[:count] - top10) / (top1 - top10)) * 5).round %>
95               <a class='<%= "nowrap query query_#{queryclass}"%>'><%= query[:query] %></a>
96             <% end -%>
97           </p>
98         </div>
99
100         <div class="box box-shadow grid_3 omega">
101           <h2 class="box-header centered"><%=_("Getting Help")%></h2>
102           <ul class="navlist">
103             <li><a href="http://en.opensuse.org/Download_Help"><%=_("Download Help")%></a></li>
104             <li><a href="http://en.opensuse.org/Download_Help#Burn_the_ISO_Image.28s.29"><%=_("Burn CD/DVD Image(s)")%></a></li>
105             <li><a href="http://en.opensuse.org/Installation"><%=_("Installation Guides")%></a></li>
106             <li><a href="http://www.novell.com/documentation/opensuse112/"><%=_("Official Manuals")%></a></li>
107             <li><a href="http://en.opensuse.org/Additional_YaST_Package_Repositories"><%=_("Package Repositories")%></a></li>
108           </ul>
109         </div>
110
111         <div class="box box-shadow grid_3 omega">
112           <h2 class="box-header centered"><%=_("Sponsored by")%></h2>
113           <!--<p class="centered" style="color: #ccc; font-size: 0.8em"><%=_("Platinum Sponsor")%></p>-->
114           <p class="centered "style="color: #ccc; font-size: 0.8em;"><%=_("Gold Sponsor")%></p>
115           <p class="centered">
116             <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>
117             <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>
118           </p>
119           <p class="centered "style="color: #ccc; font-size: 0.8em;"><%=_("Silver Sponsor")%></p>
120           <p class="centered">
121             <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>
122           </p>
123           <!--<p class="centered" style="color: #ccc; font-size: 0.8em"><%=_("Bronze Sponsor")%></p>-->
124         </div>
125
126         <div class="box box-shadow grid_3 omega">
127           <h2 class="box-header"><%=_("Buy openSUSE")%></h2>
128           <div class="centered" style="padding-left: 16px;">
129             <a href="<%= _("http://en.opensuse.org/Buy_openSUSE") %>"><img src="http://static.opensuse.org/c/images/common/openSUSE11.2_Box.jpg" title="<%=_("Buy openSUSE 11.2")%>" alt="<%=_("Buy openSUSE 11.2")%>"/></a>
130           </div>
131           <p class="centered">
132             <a href="<%= _("http://en.opensuse.org/Buy_openSUSE") %>" title="Buy openSUSE" style="text-decoration: none; font-weight: bold"><%=_("Buy openSUSE 11.2!")%></a>
133           </p>
134         </div>
135
136       </div>
137
138     </div>
139
140     <div id="footer" class="container_12">
141       <div id="footer-content" class="grid_12">
142       </div>
143       <div id="footer-legal" class="border-top grid_12">
144         <a href="http://en.opensuse.org/openSUSE:About">About openSUSE</a> |
145         <a href="http://en.opensuse.org/openSUSE:General_disclaimer">Legal information</a> |
146         <a href="mailto:webmaster@opensuse.org">Feedback</a>
147         <br/><br/>
148         <a href="http://www.novell.com/linux/"><img src="http://static.opensuse.org/c/images/common/founded_novell.gif" alt="Founded by Novell" /></a>
149       </div>
150     </div>
151
152     <% if @right_box == :search -%>
153       <!--[if lte IE 7]>
154           <script type="text/javascript">
155            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.")
156           </script>
157         <![endif]-->
158       <% end -%>
159
160   </body>
161 </html>