package views import ( "fmt" "github.com/ditatompel/xmr-remote-nodes/internal/paging" "slices" ) var availablePages = []int{5, 10, 20, 50, 100} templ DtRowPerPage(url, hxTarget string, rowsPerPage int, q interface{}) {
} templ DtRefreshInterval(url, hxTarget, interval string, q interface{}) {
Auto refresh:
if slices.Contains(refreshIntevals, interval) {
}
} templ DtReload(url, hxTarget string, q interface{}) { } // Sort TH table // // URL: Where the URL to get the results is // HxTarget: Where the results will be displayed // Title: The title of the column // ExpectedSort: The expected sort, used to determine the sort direction indicator // SortBy: The current sort by // SortDir: The current sort direction // Q: The current query templ DtThSort(url, hxTarget, title, expectedSort, sortBy, sortDir string, q interface{}) { if expectedSort == sortBy && sortDir== "asc" { { title } ▾ } else if expectedSort == sortBy && sortDir== "desc" { { title } ▴ } else { { title } ▴▾ } } templ DtRowCount(currentPage, rowsPerPage, totalRows int) {

if totalRows <= 0 { No entries found } else { { fmt.Sprintf("%d", (rowsPerPage * currentPage) - rowsPerPage + 1) } if rowsPerPage * currentPage > totalRows { - { fmt.Sprintf("%d", totalRows) } } else { - { fmt.Sprintf("%d", rowsPerPage * currentPage) } } / { fmt.Sprintf("%d", totalRows) } }

} templ DtPagination(url, hxTarget string, q interface{}, p paging.Pagination) {
}