yast/yast-registration

View on GitHub
src/data/registration/autoyast_summary.erb

Summary

Maintainability
Test Coverage
<%
textdomain "registration"
%>

<h3><%= _("Product Registration") %></h3>
<ul>
  <li>
    <%= @config.do_registration ?
      _("Run registration during autoinstallation") :
      _("Skip registration during autoinstallation") %>
  </li>
</ul>

<% if @config.do_registration %>
  <h3><%= _("Registration Settings") %></h3>
  <ul>
    <li><%= _("E-mail Address: %s") % h(@config.email) %></li>
    <% if !@config.reg_code.to_s.empty? %>
      <li><%= _("Registration Code is Configured") %></li>
    <% end %>

    <% if @config.install_updates %>
      <li><%= _("Install Available Updates") %></li>
    <% end %>
  </ul>

  <h3><%= _("Registration Server") %></h3>
  <ul>
    <% if !@config.reg_server.to_s.empty? %>
      <li><%= _("Server URL: %s") % h(@config.reg_server) %></li>
    <% elsif @config.slp_discovery %>
      <li><%= (_("Server URL: %s") % _("Use SLP discovery")) %></li>
    <% end %>

    <% if !@config.reg_server_cert.to_s.empty? %>
      <li><%= _("SSL Server Certificate URL: %s") % h(@config.reg_server_cert) %></li>
    <% end %>

    <% if !@config.reg_server_cert_fingerprint_type.to_s.empty? %>
      <li><%= _("SSL Certificate Fingerprint: %s") % h(
          "#{@config.reg_server_cert_fingerprint} (#{@config.reg_server_cert_fingerprint_type})")
      %></li>
    <% end %>

  </ul>

  <% if !@config.addons.empty? %>
    <h3><%= _("Extensions and Modules") %></h3>
    <ul>
      <% @config.addons.each do |addon| %>
        <li><%= h(addon["name"]) %></li>
      <% end %>
    </ul>
  <% end %>
<% end %>