<% if @primary_licenses.length > 0 %> <% @primary_licenses.each_index do |index| license = @primary_licenses[index] %>

<%= t('.primary_license', :num => index + 1, :key => truncate(license.license_code, 13))%> - <%= link_to_popup t('common.enter_license_code'), :url => edit_license_path(:id => license.id), :method => :get %>

<% end %> <% end %> <% if @primary_licenses.length < 2 %>

<%= t '.new_primary_license'%> - <%= link_to_popup t('common.enter_license_code'), :url => edit_license_path(:id => -1), :method => :get %>

<% end %> <% if @license_info.getPrimaryLicense().getLicenseType() == -1 %>

<%= t_label '.license_status'%>

<%= t 'common.none'%>

<% elsif !@primary_licenses[0].is_valid_license_code? || @license_info.getPrimaryLicense().getLicenseType() == 0 %>

<%= t_label '.license_status'%>

<%= t 'common.invalid_license'%>

<% elsif @license_info.getPrimaryLicense().getLicenseType() == 1 || @license_info.getPrimaryLicense().getLicenseType() == 2 %>

<%= t_label '.license_status'%>

<%= t 'common.valid'%>

<% if @license_info.getPrimaryLicense().isSAPEnabled() %>

<%= t_label '.sap_enabled'%>

Enabled

<% end %> <% if @license_info.getPrimaryLicense().isInformaticaEnabled() %>

<%= t_label '.infa_enabled'%>

Enabled

<% end %> <% if @license_info.getPrimaryLicense().isOracleEnabled() %>

<%= t_label '.oracle_enabled'%>

Enabled

<% end %> <% if @license_info.getPrimaryLicense().isUniversalConnectorEnabled() %>

<%= t_label '.uc_enabled'%>

Enabled

<% end %>

<%= t_label '.allocated_total_license_points'%>

<%= @allocated_points %>/<% if @license_info.getPrimaryLicense().isUnlimitedPoints() %><%= t 'common.unlimited'%><% else %><%= @license_info.getPrimaryLicense().getPoints() %><% end %>

<%= t_label '.points_required'%>

<%= @points_for_unlicensed %>

<% unless @license_info.getPrimaryLicense().getExpirationDate().nil? %>

<%= t_label 'common.expiration_date'%>

<%= format_timestamp @license_info.getPrimaryLicense().getExpirationDate().getTime() %>

<%end%> <% end %>

<%= t_label '.hardware_id'%>

<%= @hardware_hash %>