Sha256: 279784b25a5813166030d1c870031be5213cdfcfd98c437a0e9bcfc3ad2dbcd9

Contents?: true

Size: 1.78 KB

Versions: 2

Compression:

Stored size: 1.78 KB

Contents

- content_types ||= nil
- title ||= _("Product")
- always_show_add ||= false

-if editable

  = render :partial => "katello/common/common_products",
           :locals => {:record => record,
                       :content_types => content_types,
                       :readable_products => readable_products || nil,
                       :editable_products => editable_products || nil}

  #package_filter
    %table
      %thead
        %tr
          %th #{title}

      %tr
        %td
          %form#add_product_form
            %div #{_('Add Products and Repositories:')}
            #select_container
              .spinner
              .success
                = _("Saved")
              %select#product_select{:style => 'width:400px;', 'data-placeholder' => _("Choose a product.."),
                'data-url' => save_url}
              .centered
                -if always_show_add || (editable_products && editable_products.count > 0)
                  %a#add_product #{_('+ Add')}

      %tr
        %td.no_padding
          %table#product_list

-else

  %table#readonly_products
    %thead
      %tr
        %th #{title}

    -product_and_repos = get_product_and_repos(record, content_types)
    -if product_and_repos.empty?
      %tr
        %td #{_('No products or repositories selected.')}

    -else
      -product_and_repos.each_pair do |product, repos|
        %tr{:id => "product_#{product.id}"}
          %td
            %label #{_('Product')}:
            #{product.name}

        -if repos.empty?
          %tr{:class => "child-of-product_#{product.id}"}
            %td #{_("All repositories")}

        -else
          -repos.each do |repo|
            %tr{:class => "child-of-product_#{product.id}"}
              %td
                %label #{_('Repository')}:
                #{repo.name}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
katello-2.2.2 app/views/katello/common/_common_product_repo_selector.html.haml
katello-1.5.0 app/views/katello/common/_common_product_repo_selector.html.haml