tplutil

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMetadata

func AddMetadata(currentSortColumn string, currentSortDirection string, currentFilter string, input map[string]ColumnConfig) map[string]ColumnState

AddMetadata takes information about table columns and the current sort column and direction and adds metadata for the template to use to render the sortable table headings.

Types

type ColumnConfig

type ColumnConfig struct {
	Label                any
	DefaultSortDirection string
	Minimal              bool
}

type ColumnState

type ColumnState struct {
	Label                any
	CurrentFilter        string
	CurrentSortColumn    string
	CurrentSortDirection string
	SortColumn           string
	SortDirection        string
	Minimal              bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL