Sha256: e362d7ff417dab8acc9447150ce83f9033ad550d980a7fa900cd88120485922c

Contents?: true

Size: 1.78 KB

Versions: 7

Compression:

Stored size: 1.78 KB

Contents

<%= pb_content_tag(:div) do %>
        <% object.column_definitions.each_with_index do |column, index| %>
            <%= pb_rails("table/table_cell", props: { classname: object.td_classname}) do %>
                <%= pb_rails("flex", props:{ align: "center", justify: "start" }) do %>
                    <% if collapsible_trail && index.zero? %>
                        <% (1..depth).each do |i| %>
                            <% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
                            <% left_offset = i * 1.0 + additional_offset %>
                            <div class="collapsible-trail" style="left: <%= left_offset %>em"></div>
                        <% end %>
                    <% end %>

                    <div style="padding-left: <%= depth * 1.25 %>em">
                        <%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
                            <% if index.zero? && object.row[:children].present? %>
                                <button class="gray-icon toggle-all-icon" onclick="expandAllSubRows(this, <%= depth %>)">
                                    <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right:"xs" }) %>
                                </button>
                            <% end %>
                            <%= pb_rails("flex/flex_item") do %>
                                <% if index.zero? %>
                                    <%= pb_rails("caption", props: { margin_left: object.row[:children].present? ? "none" : "xs", text: object.subrow_header }) %>
                                <% end %>
                            <% end %>
                        <% end %>
                    </div>
                <% end %>
            <% end %>
        <% end %>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
playbook_ui-14.11.0.pre.rc.13 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.11.0.pre.rc.12 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5274 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.10.0.pre.alpha.play1465attempt25272 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.10.0.pre.alpha.play16825244 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.11.0.pre.rc.11 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
playbook_ui-14.11.0.pre.rc.10 app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb