Sha256: 2dd9d55e26c0e57a08406acda2ec0afb89a5184ed2db6df1c9d3b3ec3c872b89

Contents?: true

Size: 1.55 KB

Versions: 16

Compression:

Stored size: 1.55 KB

Contents

<%= pb_content_tag(:thead) do %>
  <% object.header_rows.each_with_index do |header_row, row_index| %>
    <%= pb_rails("table/table_row") do %>
      <% header_row.each_with_index do |cell, cell_index| %>
        <% header_id = cell[:accessor].present? ? cell[:accessor] : "header_#{row_index}_#{cell_index}" %>
        <%= pb_rails("table/table_header", props: { id: header_id, colspan: cell[:colspan], classname: [object.th_classname(is_first_column: cell_index.zero?), ('last-header-cell' if cell[:is_last_in_group] && cell_index != 0)].compact.join(' '), sort_menu: cell[:accessor] ? cell[:sort_menu] : nil }) do %>
          <%= pb_rails("flex", props: { align: "center", justify: cell_index.zero? ? "start" : row_index === header_rows.size - 1 ? "end" : "center", text_align: "end" }) do %>
            <% if cell_index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") && row_index === header_rows.size - 1 %>
              <% if loading %>
                <div class="<%= object.loading ? 'loading-toggle-icon' : '' %>"></div>
              <% else %>
                <button
                  class="gray-icon toggle-all-icon"
                  onclick="expandAllRows(this); event.preventDefault();">
                  <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
                </button>
              <% end %>
            <% end %>
            <%= cell[:label] %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
playbook_ui-14.13.0.pre.rc.5 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobug5781 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.13.0.pre.rc.4 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.playrailsinputmaskissue5775 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5757 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5754 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobugzindextoken5751 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5738 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.13.0.pre.rc.3 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.PLAY1865reactdatepickerreinitializingbug5732 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5728 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.play1862buttondisabledlinkbug5716 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.12.0.pre.alpha.play1862buttondisabledlinkbug5714 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.13.0.pre.rc.2 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.13.0.pre.rc.1 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
playbook_ui-14.13.0.pre.rc.0 app/pb_kits/playbook/pb_advanced_table/table_header.html.erb