Skip to content

Commit

Permalink
Don't die when listing extensions and there are no paid or free
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Shaidurov committed Apr 21, 2017
1 parent d956e7f commit 2c200a2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/suse/connect/templates/extensions_list.text.erb
Expand Up @@ -2,19 +2,17 @@

<%
any_installed = installed_products.select {|x| !x.isbase }.any?
{ true => 'FREE EXTENSIONS', false => 'PAID EXTENSIONS' }.each do |type_key, title| %>
{ true => 'FREE EXTENSIONS', false => 'PAID EXTENSIONS' }.each do |type_key, title|
if grouped_extensions[type_key] %>
\e[1m<%= title %>\e[0m

<%
grouped_extensions[type_key].each do |extension| -%>
<% grouped_extensions[type_key].each do |extension| -%>
<%= render 'extension_item.text', locals: { extension: extension, any_installed: any_installed } %>
<%
extension[:extensions].each do |extension| -%>
<% extension[:extensions].each do |extension| -%>
<%= render 'extension_item.text', locals: { extension: extension, nested: true, any_installed: any_installed } %>
<%
end %><%
end %>
<%
<% end
end
end
end %>
\e[1mMORE INFORMATION\e[0m

Expand Down

0 comments on commit 2c200a2

Please sign in to comment.