(detail)
return columns
This serves the same purpose as `get_detail_column_infos` except
    that it only applies to 'short' details that have tabs with nodesets and sorting
    configured.
This serves the same purpose as `get_detail_column_infos` except
    that it only applies to 'short' details that have tabs with nodesets and sorting
    configured.
This serves the same purpose as get_detail_column_infos except that it only applies to short details that have tabs with nodesets and sorting configured .
def get_detail_column_infos_for_tabs_with_sorting(detail):
    """This serves the same purpose as `get_detail_column_infos` except
    that it only applies to 'short' details that have tabs with nodesets and sorting
    configured."""
    sort_elements = get_nodeset_sort_elements(detail)

    columns = []
    tab_spans = detail.get_tab_spans()
    detail_columns = list(detail.get_columns())  # do this to ensure we get the indexed values
    for tab in detail.get_tabs():
        tab_span = tab_spans[tab.id]
        tab_columns = detail_columns[tab_span[0]:tab_span[1]]
        if tab.has_nodeset and sort_elements[tab.id]:
            tab_sorts = sort_elements[tab.id]
            _, sort_columns = get_sort_and_sort_only_columns(tab_columns, tab_sorts)
            for column in tab_columns:
                if column.invisible:
                    sort_element, order = sort_columns.pop(column.field, (None, None))
                    columns.append(DetailColumnInfo(column, sort_element, order))
                else:
                    columns.append(DetailColumnInfo(column, None, None))
        else:
            columns.extend([
                DetailColumnInfo(column, None, None)
                for column in tab_columns
            ])

    return columns
def get_detail_column_infos_for_tabs_with_sorting ( detail ) : sort_elements = get_nodeset_sort_elements ( detail ) columns = [ ] tab_spans = detail . get_tab_spans ( ) detail_columns = list ( detail . get_columns ( ) ) # do this to ensure we get the indexed values for tab in detail . get_tabs ( ) : tab_span = tab_spans [ tab . id ] tab_columns = detail_columns [ tab_span [ 0 ] : tab_span [ 1 ] ] if tab . has_nodeset and sort_elements [ tab . id ] : tab_sorts = sort_elements [ tab . id ] _ , sort_columns = get_sort_and_sort_only_columns ( tab_columns , tab_sorts ) for column in tab_columns : if column . invisible : sort_element , order = sort_columns . pop ( column . field , ( None , None ) ) columns . append ( DetailColumnInfo ( column , sort_element , order ) ) else : columns . append ( DetailColumnInfo ( column , None , None ) ) else : columns . extend ( [ DetailColumnInfo ( column , None , None ) for column in tab_columns ] ) return columns