Existing Plans <% if can? :config_upload, Kaui::AdminTenant %> <%= link_to ''.html_safe, kaui_engine.admin_tenant_new_catalog_path(:id => @tenant.id), :class => 'btn btn-xs' %> <% end %> <% if can?(:delete, Kaui::AdminTenant) %> <%= link_to ''.html_safe, kaui_engine.admin_tenant_delete_catalog_path(:id => @tenant.id), :method => :delete %> <% end %> Enable XML View

Catalog Versions: <% @catalogs.each do |catalog| %> <% end %> <% @catalogs.each do |catalog| %> <% catalog[:plans].each do |p| %> <% end %> <% end %>
Plan Id Product Category Billing Period Trial
<%= p.plan_id %> <%= humanized_product_name(p.product_name) %> <%= humanized_product_category(p.product_category) %> <%= humanized_billing_period(p.billing_period) %> <% catalog[:currencies].each do |c| %> <%= p.prices[c] %> <% end %> <%= p.trial_length != 0 ? "#{p.trial_length} #{humanized_time_unit(p.trial_time_unit)}" : "N/A" %> <%= link_to ''.html_safe + " currency", kaui_engine.admin_tenant_new_plan_currency_path(:id => @tenant.id, :plan_id => p.plan_id), :class => 'btn btn-xs' %>
<%= javascript_tag do %> function initBasicConfig() { displayCatalogVersion(); displayAmountsForCurrency(); } function displayCatalogVersion() { $('[class^="catalog_version_"]').hide(); $("[class^=catalog_version_" + $("#select_catalog option:selected" ).attr("idx") + "]").show(); } function displayAmountsForCurrency() { var catalogVersion = $("#select_catalog option:selected" ).attr("idx"); $('[class^="plan_currency_"]').hide(); $("[class^=plan_currency_" + $("#select_currencies_" + catalogVersion + " option:selected" ).text() + "]").show(); } $(document).ready(function() { $("#select_catalog").change(function() { displayCatalogVersion(); }); $('[id^="select_currencies"]').change(function() { displayAmountsForCurrency(); }); }); <% end %>