Skip to content

Commit

Permalink
Simpler layout for Leap-based releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorgs committed Nov 12, 2015
1 parent ccb91db commit 0329728
Show file tree
Hide file tree
Showing 11 changed files with 231 additions and 158 deletions.
8 changes: 5 additions & 3 deletions app/assets/stylesheets/style.scss
Expand Up @@ -17,11 +17,13 @@
.ui-helper-clearfix{display:block;}
#iso-wrapper{padding:0;margin-right:0;padding-left:15px;padding-right:15px;}
#iso-wrapper h4{margin-top:4px;float:left}
#iso-wrapper div.changeiso{border:2px solid #7C92A4;min-height:50px;margin-bottom:10px;color:#999;cursor:pointer;-moz-border-radius:5px;-webkit-border-radius:5px;background:#ffffff asset-url('gradient-light-grey.png') repeat-x scroll bottom left;}
#iso-wrapper div.changeiso:hover{border:2px solid #690;}
#iso-wrapper div.changeiso h4{margin: 4px 0 2px 0;float:none}
#iso-wrapper div.changeiso{border:2px solid #7C92A4;min-height:50px;margin-bottom:10px;color:#999;-moz-border-radius:5px;-webkit-border-radius:5px;background:#ffffff asset-url('gradient-light-grey.png') repeat-x scroll bottom left;}
#iso-wrapper div.ui-accordion div.changeiso{cursor:pointer}
#iso-wrapper div.ui-accordion div.changeiso:hover{border:2px solid #690;}
#iso-wrapper div.changeiso{border-color:#4987B3;-moz-box-shadow:0px 1px 4px #999;-webkit-box-shadow:0px 1px 4px #999;box-shadow:0px 1px 4px #999;color:#333;}
#iso-wrapper div.changeiso div{padding-top:5px;padding-bottom:2px;margin-right:15px;min-height:55px;}
#iso-wrapper div.changeiso img{margin:5px 15px 0 7px;float:left;height:48px;}
#iso-wrapper div.changeiso img.medium_icon{margin:5px 15px 0 7px;float:left;height:48px;}
.iso-warning{border:2px solid #690;padding: 6px;margin-bottom:10px;-moz-border-radius:5px;-webkit-border-radius:5px;background:#ffffff asset-url('gradient-light-grey.png') repeat-x scroll bottom left;}
.iso-warning{-moz-box-shadow:0px 1px 4px #999;-webkit-box-shadow:0px 1px 4px #999;box-shadow:0px 1px 4px #999;}
.download_buttonClass{-moz-box-shadow:0px 1px 2px #ccc;-webkit-box-shadow:0px 1px 2px #ccc;box-shadow:0px 1px 2px #ccc;color:#069;background-color:#eee;}
Expand Down
22 changes: 5 additions & 17 deletions app/controllers/main_controller.rb
Expand Up @@ -140,41 +140,29 @@ def set_release(release)
elsif release == "421"
@isos = {}
@directory = "http://download.opensuse.org/distribution/leap/42.1"
# No iso for:
@leap = true
# leap means no iso for:
# nonoss, dvd-32, net-32, rescue-XX, kde-XX, gnome-XX, lang-XX
@isos["dvd-64"] = "Leap-42.1-DVD-x86_64"
@isos["net-64"] = "Leap-42.1-NET-x86_64"

@releasenotes = _("https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/42.1/")
@releasename = "openSUSE Leap 42.1"
@repourl = "http://download.opensuse.org/distribution/leap/42.1"
@medium = "dvd"
@inline_signature = true
@gpg = "22C0 7BA5 3417 8CD0 2EFE 22AA B88B 2FD4 3DBD C284"


elsif release == "developer"
@isos = {}
@directory = "http://download.opensuse.org/distribution/leap/42.1-RC1"
@isos["lang-32"] = nil
@isos["lang-64"] = nil
@isos["nonoss"] = nil
@isos["kde-64"] = nil
@isos["kde-32"] = nil
@isos["gnome-64"] = nil
@isos["gnome-32"] = nil
@leap = true
# leap means no iso for:
# nonoss, dvd-32, net-32, rescue-XX, kde-XX, gnome-XX, lang-XX
@isos["dvd-64"] = "Leap-42.1-DVD-x86_64-Build0235-Media"
@isos["dvd-32"] = nil
@isos["rescue-32"] = nil
@isos["rescue-64"] = nil
@isos["net-32"] = nil
@isos["net-64"] = "Leap-42.1-NET-x86_64-Build0235-Media"

@releasenotes = _("https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/42.1/")
@releasename = "openSUSE 42.1 RC 1"
@repourl = "http://download.opensuse.org/distribution/leap/42.1"
@medium = "dvd"
@inline_signature = true
@gpg = "22C0 7BA5 3417 8CD0 2EFE 22AA B88B 2FD4 3DBD C284"
else
flash[:warn] = _("#{release} is not a supported release.")
Expand Down
2 changes: 1 addition & 1 deletion app/views/main/_change_install.html.erb
Expand Up @@ -18,7 +18,7 @@

<div id="ci_<%= medium %>" class="hidden changeiso script_only <%= if @medium == medium then 'medium_selected' else 'medium_unselected' end %> ">
<%= if @medium == medium then iclass='icon_selected' else iclass='icon_unselected' end
image_tag(medium + "_icon.png", :alt => "", :id => "icon_" + medium, :class => iclass) %>
image_tag(medium + "_icon.png", :alt => "", :id => "icon_" + medium, :class => "medium_icon #{iclass}") %>
<div>
<span style="font-size: 120%; font-weight: bold"><%= shorttext %></span>
<br/>
Expand Down
22 changes: 22 additions & 0 deletions app/views/main/_help_method.html.erb
@@ -0,0 +1,22 @@
<div class="hidden" id="help_method_content">
<h2><%=_("Help on Download Method")%></h2>
<p>
<%=_("openSUSE is available via http (direct link) or BitTorrent. The CD for network installation is only available via http.")%>
</p>
<h3><%=_("Direct Link")%></h3>
<p>
<%=_("When downloading images other than the CD for network installation, it is <i>strongly</i> recommended to use a proper download manager to reduce the risk of corrupted data.")%>
</p>
<h3><%=_("BitTorrent")%></h3>
<p>
<%=_("Using <a href=\"http://en.opensuse.org/SDB:BitTorrent\">BitTorrent</a> is recommended on slow links, especially when downloading the DVD image. BitTorrent downloads have several benefits, the clients protect against data corruption and you help relieving the load on the servers by participating in the upload - if enough people participate it will also be faster than the centralized servers - for everybody. Whatsmore, it allows you to stop the download at any time and resume it later.")%>
</p>
<h3><%=_("Metalink")%></h3>
<p>
<%=_("<a href=\"http://en.opensuse.org/SDB:Metalink\">Metalink</a> is an open standard that bundles the various ways (FTP/HTTP/BitTorrent) to get files into one format for easier downloads. This makes it good for downloading ISOs; particularly for people who can't use P2P because of restrictions from their ISP or University. It can deliver very fast download speeds since most clients support multiple connections, to multiple mirrors, automatically. In addition, it can do automatic error detection, and correction. It needs a special client to handle it though.")%>
</p>
<h3><%=_("Pick Mirror")%></h3>
<p>
<%=_("If you want to use a direct link but live in a place in the world where our download redirector has not enough information to redirect to the fastest mirror, you can pick a mirror yourself.")%>
</p>
</div>
24 changes: 24 additions & 0 deletions app/views/main/_leap_medium.html.erb
@@ -0,0 +1,24 @@
<%- url = "#{@directory}/iso/openSUSE-#{@isos[medium+'-64']}.iso" %>
<div class="medium_wrapper">
<div class="changeiso">
<%= image_tag medium + "_icon.png", class: "medium_icon" %>
<div style="padding-left: 70px">
<span style="font-size: 120%; font-weight: bold"><%= shorttext %></span>
<br/>
<span style="font-size: 90%; font-weight: 500"><%= longtext %></span>
<br/>
<h4><%=_("Download Method")%> <%= image_tag 'help-browser.png', :class => "downloadMethodHelpPopup help_icon", :alt => "?", :width => 16, :height => 16 %></h4>
<%
links = []
links << { label: _("Direct link"), url: url}
unless medium == "net" || @release == "developer"
links << { label: _("BitTorrent"), url: "#{url}.torrent" }
end
links << { label: _("Metalink"), url: "#{url}.meta4" }
links << { label: _("Pick Mirror"), url: "#{url}?mirrorlist" }
%>
<span style="font-size: 90%; float: right"><%= link_to _("SHA256 checksum"), "#{url}.sha256" %></span>
<%= links.map { |l| link_to(l[:label], l[:url]) }.join(" | ").html_safe %>
</div>
</div>
</div>
75 changes: 75 additions & 0 deletions app/views/main/_leap_release.html.erb
@@ -0,0 +1,75 @@
<div style="margin-top: 1em; margin-bottom: 1em; padding: 0">

<div id="popup" style="display: none;">
<a href="#" id="popup_close" style="display: block; float: right; padding: 10px">Close</a>
<div id="popup_content"></div>
</div>
<div style="float: right; width: 14em;">
</div>

<h4 style="margin-bottom: 15px"><%= _("Installation Medium") %></h4>
<div id="iso-wrapper">

<%= render(:partial => "leap_medium", :locals => { :medium => "dvd", :shorttext => _("4.7GB DVD (also suitable for USB stick)"), :longtext => _("Contains a large collection of software for desktop or server use.<br/>Suitable for installation or upgrade.") }) %>
<%= render(:partial => "leap_medium", :locals => { :medium => "net", :shorttext => _("Network"), :longtext => _("Downloads the installation system and all packages from online repositories.<br/>Suitable for installation or upgrade.") }) %>

</div>
</div>

<%= render partial: "help_method" %>
<script language="javascript" type="text/javascript">
$("#help_method_content").dialog({
bgiframe: true,
autoOpen:false,
width: "80%",
draggable: false,
resizable: false,
title: 'openSUSE Download Help',
modal: true,
buttons: {
Ok: function() {
$(this).dialog('close');
}
}
});

$(".downloadMethodHelpPopup").click( function (){
$("#help_method_content").dialog('open');
});
</script>

<div id="download_links">
<h3><%= _("Documentation") %></h4>
<p>
<%= _("<a href=\"http://activedoc.opensuse.org/book/opensuse-start-up\">openSUSE startup guide</a>") %>
|
<%= (_("<a href=\'%s\'>Release Notes</a>") % @releasenotes).html_safe %>
|
<%= _('<a href="http://en.opensuse.org/openSUSE:License">License</a>')%>
|
<%= link_to _("openSUSE Derivatives"), "http://en.opensuse.org/Derivatives" %>
</p>

<h3><%=_("Need help?")%></h3>
<p>
<%= _("More information on downloading openSUSE is available from the <a href=\"http://en.opensuse.org/SDB:Download_help\">Download Help</a> and <a href=\"http://en.opensuse.org/SDB:Network_installation\">Network Installation</a> pages in our <a href=\"http://en.opensuse.org/Portal:Documentation\">Documentation Wiki</a>.") %>
<%= _("User manuals are available from <a href=\"http://activedoc.opensuse.org\">activedoc.opensuse.org</a>, for example the <a href=\"http://activedoc.opensuse.org/book/opensuse-start-up/\">Official Start-Up Guide</a>.") %>
</p>

<h3><%=_("Verify your download before use")%></h3>
<%= render partial: "leap_verify" %>
</div>

<div id="download_help" class="info_text">
<h3><%=_("How to Proceed")%></h3>
<ol id="howtoproceed" style="list-style-type:lower-latin">
<li><%=_("After having successfully downloaded the ISO image(s), create a bootable USB stick or burn the image(s) to a DVD (or a CD if the chosen image fits).")%>
<ul>
<li><%= _("More information on creating a <a href='http://en.opensuse.org/Live_USB_stick'>bootable USB stick</a>") %></li>
<li><a href="<%= _("http://en.opensuse.org/SDB:Download_help\#Burn_the_ISO_image.28s.29")%>"><%=_("More information on burning the ISO file to CD/DVD")%></a></li>
</ul>
</li>
<li><%=_("Boot from the DVD, CD or USB stick. In case your computer does not automatically boot from the chosen device, open the BIOS setup to allow booting from it.")%></li>
</ol>
</div>
Expand Up @@ -6,16 +6,3 @@
<%=_("For each ISO, we offer a checksum file with the corresponding SHA256 sum.") %>
<%=_("For extra security, you can use GPG to verify who signed those .sha256 files. It should be %s.") % @gpg %>
</p>
<noscript>
<p>
<% if @isos["#{@medium}-32"] %>
<a href="<%= @directory %>/iso/openSUSE-<%= @isos[@medium + "-32"] %>.iso.sha256">32 Bit</a> / <a href="<%= @directory %>/iso/openSUSE-<%= @isos[@medium + "-64"] %>.iso.sha256">64 Bit</a>.
<% else %>
<a href="<%= @directory %>/iso/openSUSE-<%= @isos[@medium + "-64"] %>.iso.sha256"><%=_("SHA256 checksum")%></a>
<% end %>
</p>
</noscript>
<p class="hidden script_only">
<a id="sig_sha256" href="#"><%=_("SHA256 checksum")%></a>
</p>
</p>
96 changes: 96 additions & 0 deletions app/views/main/_non_leap_release.html.erb
@@ -0,0 +1,96 @@
<script language="javascript" type="text/javascript" src="<%= url_for(:controller => :main, :action => "download_js", :release => @release) %>">
//<![CDATA[
// overwrite in case of changed installation medium
var mymedium = "<%= @medium %>";
//]]>
</script>

<div style="margin-top: 1em; padding: 0">

<div id="popup" style="display: none;">
<a href="#" id="popup_close" style="display: block; float: right; padding: 10px">Close</a>
<div id="popup_content"></div>
</div>
<div style="float: right; width: 14em;">
</div>

<h4 style="margin-bottom: 15px"><%= _("Installation Medium") %></h4>
<div id="iso-wrapper">

<noscript>
<div class="iso-warning">
<%= _("Only DVD and Network medias are fully tested. Alternatives, like live or rescue systems, are recommended for limited use only.") %>
</div>
</noscript>

<div id="downloaderAccordion">
<% if @isos["dvd-64"] %>
<%= render(:partial => "change_install", :locals => { :medium => "dvd", :shorttext => _("4.7GB DVD (also suitable for USB stick)"), :longtext => _("Contains a large collection of software for desktop or server use.<br/>Suitable for installation or upgrade.") }) %>
<% end %>
<% if @isos["net-64"] %>
<%= render(:partial => "change_install", :locals => { :medium => "net", :shorttext => _("Network"), :longtext => _("Downloads the installation system and all packages from online repositories.<br/>Suitable for installation or upgrade.") }) %>
<% end %>
<% if @isos["gnome-32"] %>
<% livecd = ( @isos["gnome-32"].match(/.*-LiveCD-.*/) ? "CD" : "DVD" ) %>
<%= render(:partial => "change_install", :locals => { :medium => "gnome", :shorttext => _("Live GNOME"), :longtext => (_("A GNOME desktop you can run from %s or from USB stick.<br/>Can be installed as is (no upgrade).") % [livecd]).html_safe }) %>
<% end %>
<% if @isos["kde-32"] %>
<% livecd = ( @isos["kde-32"].match(/.*-LiveCD-.*/) ? "CD" : "DVD" ) %>
<%= render(:partial => "change_install", :locals => { :medium => "kde", :shorttext => _("Live KDE"), :longtext => (_("A KDE desktop you can run from %s or from USB stick.<br/>Can be installed as is (no upgrade).") % [livecd]).html_safe }) %>
<% end %>
<% if @isos["rescue-32"] %>
<%= render(:partial => "change_install", :locals => { :medium => "rescue", :shorttext => _("Rescue"), :longtext => _("Rescue system that you can run from CD or from USB stick.<br/>Can not be used for installation or upgrade.") }) %>
<% end %>
<%= render(:partial => "change_install", :locals => { :medium => "derivatives", :shorttext => _("openSUSE Derivatives"), :longtext => _("Get one of the specialized distributions built on openSUSE.") }) %>
</div>

<div id="alternativeMedia" class="iso-warning" style="display:none">
<%= _("Some alternative media (eg. live and rescue systems) are also available, although they are less tested and recommended for limited use only.") %>
<a href="#"><%= _("Click here to display these alternative versions.") %></a>
</div>

</div>
</div>

<hr style="clear: both"/>

<div id="download_links">
<p class="info_text">
<%=_("Choose an installation medium by clicking it and hit the Download button to start the download. Optionally choose your computer type or an alternative download method.") %>
</p>
<h3><%=_("Need help?")%></h3>
<p>
<%= _("More information on downloading openSUSE is available from the <a href=\"http://en.opensuse.org/SDB:Download_help\">Download Help</a> and <a href=\"http://en.opensuse.org/SDB:Network_installation\">Network Installation</a> pages in our <a href=\"http://en.opensuse.org/Portal:Documentation\">Documentation Wiki</a>.") %>
<%= _("User manuals are available from <a href=\"http://activedoc.opensuse.org\">activedoc.opensuse.org</a>, for example the <a href=\"http://activedoc.opensuse.org/book/opensuse-start-up/\">Official Start-Up Guide</a>.") %>
</p>

<h3><%=_("Verify your download before use")%></h3>
<%= render partial: "non_leap_verify" %>
</div>

<div id="download_help" class="info_text">
<h3><%=_("How to Proceed")%></h3>
<ol id="howtoproceed" style="list-style-type:lower-latin">
<li><%=_("After having successfully downloaded the ISO image(s), create a bootable USB stick or burn the image(s) to a DVD (or a CD if the chosen image fits).")%>
<ul>
<li><%= _("More information on creating a <a href='http://en.opensuse.org/Live_USB_stick'>bootable USB stick</a>") %></li>
<li><a href="<%= _("http://en.opensuse.org/SDB:Download_help\#Burn_the_ISO_image.28s.29")%>"><%=_("More information on burning the ISO file to CD/DVD")%></a></li>
</ul>
</li>
<li><%=_("Boot from the DVD, CD or USB stick. In case your computer does not automatically boot from the chosen device, open the BIOS setup to allow booting from it.")%></li>
</ol>
</div>

<% if @isos['lang-64'] %>
<div id="additional_downloads">
<h3><%=_("Add-On Downloads (optional)")%></h3>
<ul id="addon_downloads">
<li class="noscript"><%= render(:partial => "download_link", :locals => { :id => "lang32", :iso => "lang-32", :text => _("Extra Languages (32 Bit)") } ) %></li>
<li class="noscript"><%= render(:partial => "download_link", :locals => { :id => "lang64", :iso => "lang-64", :text => _("Extra Languages (64 Bit)") } ) %></li>
<li class="hidden script_only"><%= render(:partial => "download_link", :locals => { :id => "lang", :iso => "lang-32", :text => _("Extra Languages") } ) %></li>
<li><p class="justify"><%=_('The installation process is available in many languages but, for most of them, the translation of the applications is not included in the image. If you want your openSUSE system to support some additional language, you need to download it from the Internet during the installation or any time after it. If you have easy access to the Internet you do not need this CD, but if you are planning to install openSUSE in some machine with no Internet connection, it will provide you access to all the available translations.')%></p></li>
<li><%= render(:partial => "download_link", :locals => { :id => "nonoss", :iso => "nonoss", :text => _("NonOSS CD") } )%></li>
<li><p class="justify"><%=_('This CD contains free software distributed under proprietary licence not allowing its inclusion to main installation media together with free open-source software. All software from this CD could be downloaded from NON-OSS repository.')%></p></li>
</ul>
</div>
<% end %>
File renamed without changes.

0 comments on commit 0329728

Please sign in to comment.