make it use jquery (for now own copy)
[opensuse:software-o-o.git] / app / views / main / developer2.rhtml
1     <% 
2       @right_box = :search 
3       @page_title = "Download " + @releasename
4     -%>
5
6         <script language="javascript">  
7           var mymedium = "<%= @medium %>";
8
9           var mylink = '';
10           var directory = "<%= @directory %>";
11           var isos = new Array();
12           <% @isos.each { |key, value| %>
13                <%= "isos['#{key}'] = '#{value}';" %>
14           <% } %>
15
16           function changeiso () {
17                 mylink = mymedium;
18                 if ($('#i686').attr('checked')) {
19                         mylink += "-32";
20                 } else { 
21                         mylink += "-64";
22                 }
23                 mylink = directory + "/iso/openSUSE-" + isos[mylink] + ".iso";
24                 if ($('#p_torrent').attr('checked')) {
25                         mylink += ".torrent";
26                 }
27                 if ($('#p_metalink').attr('checked')) {
28                         mylink += ".metalink";
29                 }
30                 if ($('#p_mirror').attr('checked')) {
31                         mylink += "?mirrorlist";
32                 }
33                 $('#downloadtext').html(mylink);
34           }
35
36           $(function() { 
37           changeiso();
38
39           $('.changeiso').click(function(){  
40                 changeiso(); 
41                 return true; });
42
43           $('button.changeiso').click(function(){  
44                 mymedium = this.id.substr(3);
45                 changeiso();
46                 return false; });
47
48           $('#download').click(function() { 
49                 window.location = mylink;
50                 return false;
51           });
52           });
53         </script>  
54       <table>
55         <tr>
56           <td width="70%">
57             
58             <div class="helplink">
59               <a href="help_media.html" onclick="return popup(this.href,'Media','750','600')" title="Popup: Help on Download Media">Help</a>
60             </div>
61             <h2>Choose an Installation Medium</h2>
62
63             <%= render(:partial => "change_install", :locals => { :medium => "dvd", :comment => "DVD is the standard medium for most" }) %>
64             <%= render(:partial => "change_install", :locals => { :medium => "gnome", :comment => "Live CD with GNOME desktop" }) %>
65             <%= render(:partial => "change_install", :locals => { :medium => "kde", :comment => "Live CD with KDE desktop" }) %>
66             <%= render(:partial => "change_install", :locals => { :medium => "net", :comment => "Network installation for experts" }) %>
67           </td>
68           <td>
69             
70             <form action="/main/download">
71             <div id="architecture">
72               <h4>Type of Computer</h4>
73               <div class="subcolumns">
74                 <label for="i686" id="l_i686" class="selected">
75                   <input name="arch" value="i686" id="i686" checked="checked" type="radio" class="changeiso" />32&nbsp;Bit&nbsp;PC<br />
76                   <span class="arch_eg" style="display: none">x86: Computers with e.g. AMD&reg; Sempron or Intel&reg; Celeron&trade;, almost all desktop computers dating 2004 or earlier. This version also runs on 64bit PCs.</span>
77                 </label>
78                 <label for="x86_64" id="l_x86_64" class="">
79                   <input name="arch" value="x86_64" id="x86_64" type="radio" class="changeiso" />
80                   64 Bit PC<br />
81                   <span class="arch_eg" style="display: none">x86-64: Most new computers with e.g. AMD&reg;: Opteron&trade;, Turion&trade; 64, Athlon&trade; 64, or Intel&reg;: Core&trade;2, Pentium&reg; 4 6xx, Pentium&reg; D CPUs</span>
82                 </label>
83               </div>
84             </div>
85             <div id="protocol">
86               <div class="helplink">
87                 <a href="help_method.html" onclick="return popup(this.href,'Method','750','600')" title="Popup: Help on Download Methods">Help</a>
88               </div>
89               <h4>Download Method</h4>
90               <label>
91                 <input id="p_http" name="protocol" value="http" checked="checked" type="radio" class="changeiso"/>Direct Link
92               </label>
93               <br/>
94               <label>
95                 <input id="p_torrent" name="protocol" value="torrent" type="radio" class="changeiso"/>BitTorrent
96               </label>
97               <br/>
98               <label>
99                 <input id="p_metalink" name="protocol" value="metalink" type="radio" class="changeiso"/>Metalink
100               </label>
101               <br/>
102               <label>
103                 <input id="p_mirror" name="protocol" value="mirror" type="radio" class="changeiso"/>Pick Mirror
104               </label>
105             </div>
106             <div style="text-align: top; ">
107               <div>
108                  <input type="image" src="/images/local/download-icon.png" alt="Download" style="width: 250px" id="download"/>
109                  <span id="downloadtext"></span>
110               </div>
111               <input type="hidden" name="medium" value="<%= @medium %>"/>
112               <input type="hidden" name="release" value="developer"/>       
113             </div>
114           </form>
115           </td></tr></table>
116       </form>
117
118       <div id="download_links" style="clear: right;">
119         <h2>4. Start Download Here</h2>
120         <p class="info_text">
121           To download a file, right-click on the link and choose "Save as" from the pop-up menu.
122           <br />
123           In case of problems with the download, please <a href="http://en.opensuse.org/Download_Help">refer to the Download Help</a>.
124         </p>
125
126         <div id="script_only" class="hide">
127           <%= render(:partial => "dvd_block", :locals => { :torrent => 0, :arch => "32" } ) %>
128           <%= render(:partial => "livecd_block", :locals => { :torrent => 0, :arch => "32" } ) %>
129           <%= render(:partial => "net_block", :locals => { :torrent => 0, :arch => "32" }) %>
130           
131           <%= render(:partial => "dvd_block", :locals => { :torrent => 0, :arch => "64" }) %>
132           <%= render(:partial => "livecd_block", :locals => { :torrent => 0, :arch => "64" }) %>
133           <%= render(:partial => "net_block", :locals => { :torrent => 0, :arch => "64" }) %>
134           
135           <%= render(:partial => "dvd_block", :locals => { :torrent => 1, :arch => "32" }) %>
136           <%= render(:partial => "livecd_block", :locals => { :torrent => 1, :arch => "32" }) %>
137           
138           <%= render(:partial => "dvd_block", :locals => { :torrent => 1, :arch => "64" }) %>
139           <%= render(:partial => "livecd_block", :locals => { :torrent => 1, :arch => "64" }) %>
140         </div>
141
142       </div>
143     <hr />
144     <div id="download_help" class="info_text">
145       <h2>5. How to Proceed</h2>
146       <ol style="list-style-type:lower-latin">
147         <li>After having successfully downloaded the ISO image(s), burn the image(s) with your favorite burning application to a DVD or CD. Please do <em>not</em> burn a data DVD/CD, but rather choose the option to burn an ISO image. <a href="http://en.opensuse.org/Download_Help#Burn_the_ISO_Image.28s.29">More information</a></li>
148         <li>Boot from the DVD or CD. In case your computer does not automatically boot from CD/DVD, open the BIOS setup to allow booting from CD or DVD.</li>
149         <li>Instructions are available as follows:
150           <dl>
151             <dt>Installation from DVD/CD:</dt>
152             <dd>
153               <a href="http://www.novell.com/documentation/opensuse110/opensuse110_startup/data/opensuse110_startup.html">Official <%= @releasename %> Start-Up guide</a>
154               <br />
155               <a href="http://en.opensuse.org/INSTALL_Local">Step-by-step installation guide</a>
156             </dd>
157             <dt>Network Installation</dt>
158             <dd>
159               <a href="http://en.opensuse.org/INSTALL_Internet">Internet Installation</a>
160             </dd>
161           </dl>
162         </li>
163       </ol>
164     </div>