<%= _("Host Subscription Status") %>

<% if Organization.current.blank? %>

<%= _("Please select an organization to view subscription status.") %>

<% elsif Organization.current.simple_content_access?%>
This organization has Simple Content Access enabled. Hosts can consume from all repositories in their Content View regardless of subscription status.
<% else %> <% total_count = total_host_count() %> <% partial_consumer_count = partial_consumer_count() %> <% valid_consumer_count = valid_consumer_count()%> <% invalid_consumer_count = invalid_consumer_count()%> <% unknown_consumer_count = unknown_consumer_count() %> <% subscription_status_url = '/content_hosts?search='%> <% registered_subscription_url = subscription_status_url + ERB::Util.url_encode('subscription_status = ') %> <% unknown_search_url = registered_subscription_url + 'unknown or (null? subscription_uuid)' %>
<%= _("Count") %>
<%= link_to("#{registered_subscription_url}" + 'invalid') do %>  <%= _("Invalid") %> <% end %> <%= link_to( "#{invalid_consumer_count}", "#{registered_subscription_url}" + 'invalid')%>
<%= link_to("#{registered_subscription_url}" + 'partial') do %>  <%= _("Partial") %> <% end %> <%= link_to( "#{partial_consumer_count}", "#{registered_subscription_url}" + 'partial')%>
<%= link_to("#{registered_subscription_url}" + 'valid') do %>  <%= _("Valid") %> <% end %> <%= link_to( "#{valid_consumer_count}", "#{registered_subscription_url}" + 'valid')%>
<%= link_to("#{registered_subscription_url}" + 'unsubscribed_hypervisor') do %>  <%= _("Unsubscribed Hypervisor") %> <% end %> <%= link_to( "#{unsubscribed_hypervisor_count}", "#{registered_subscription_url}" + 'unsubscribed_hypervisor')%>
<%= link_to(unknown_search_url) do %>  <%= _("Unknown or Unregistered") %> <% end %> <%= link_to("#{unknown_consumer_count}", unknown_search_url)%>

<%= link_to("Total Content Hosts", '/content_hosts')%>

<%= link_to( "#{total_count}", '/content_hosts')%>
<% end %>