Skip to content

Commit

Permalink
improve display of unsupported distris
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltom committed Mar 19, 2012
1 parent f51ee2e commit 0e94f06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/views/package/show.html.erb
Expand Up @@ -69,6 +69,7 @@

$('#show-extra-dists').click(function() {
$('#show-extra-dists').hide();
$('#unsupported-title').show();
$('.extra-dists').slideToggle();
return false;
});
Expand Down Expand Up @@ -186,15 +187,16 @@
<% #get extra distributions that are not in the default distribution list %>
<% @extra_packages = @packages.reject{|p| @distributions.map{|d| d[:project]}.include? p.baseproject } %>
<% @extra_dists = @extra_packages.map{|p| p.baseproject}.uniq.map{|d| {:project => d}}.reject{|d| d[:project].nil?} %>
<% @extra_dists = @extra_packages.map{|p| p.baseproject}.uniq.sort.map{|d| {:project => d}}.reject{|d| d[:project].nil?} %>
<% unless @extra_dists.blank? %>
<a id="show-extra-dists" href="#">Show more packages for unsupported distributions</a>
<div class="hidden" id="unsupported-title">Unsupported distributions:</div>
<% @extra_dists.each do |distro| -%>
<li class="extra-dists hidden">
<a href="#" onclick=" toggle_dist('<%= escape_for_id distro[:project] %>'); return false;"
class="distro-toggle" id="distro-toggle-<%= escape_for_id distro[:project] %>"><%= distro[:project] %></a>
class="distro-toggle" id="distro-toggle-<%= escape_for_id distro[:project] %>"><%= distro[:project].gsub(":", " ").sub("DISCONTINUED", "") %></a>
<% pks = @extra_packages.select{|s| s.baseproject == distro[:project] } %>
<ul class="pkg-options-details hidden" id="dist_<%= escape_for_id distro[:project] %>" >
<%= render :partial => 'download_rows', :locals => {:packages => pks, :distro => distro} %>
Expand Down

0 comments on commit 0e94f06

Please sign in to comment.