template

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

templ: version: v0.3.924

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderFragmentICUMessage

func RenderFragmentICUMessage(
	w http.ResponseWriter, r *http.Request,
	tikID string, msg *ICUMessage,
)

func RenderOOBUpdate

func RenderOOBUpdate(
	w http.ResponseWriter, r *http.Request,
	tikID string, msg *ICUMessage, d DataIndex,
)

func RenderPageIndex

func RenderPageIndex(w http.ResponseWriter, r *http.Request, data DataIndex)

func RenderViewIndex

func RenderViewIndex(w http.ResponseWriter, r *http.Request, data DataIndex)

Types

type Catalog

type Catalog struct {
	Locale  string
	Default bool
}

type DataIndex

type DataIndex struct {
	TIKs              iter.Seq[TIK]
	Catalogs          []*Catalog
	CatalogsDisplayed []*Catalog
	FilterTIKs        FilterTIKs
	NumAll            int
	NumChanged        int
	NumEmpty          int
	NumComplete       int
	NumIncomplete     int
	NumInvalid        int
	TotalChanges      int
	CanApplyChanges   bool
}

type FilterTIKs

type FilterTIKs int8
const (
	FilterTIKsAll FilterTIKs = iota
	FilterTIKsChanged
	FilterTIKsEmpty
	FilterTIKsComplete
	FilterTIKsIncomplete
	FilterTIKsInvalid
)

type ICUMessage

type ICUMessage struct {
	ID                string
	IncompleteReports []string
	Message           string
	Error             string

	// MessageOriginal holds the original value before the change.
	// This is only relevant when Changed == true.
	MessageOriginal string

	Catalog *Catalog

	// Changed is true when there was a change to this message.
	// In that case MessageOriginal holds the original message value.
	Changed bool

	IsReadOnly bool
}

type TIK

type TIK struct {
	ID          string
	TIK         string
	Description string
	ICU         []*ICUMessage
}

Jump to

Keyboard shortcuts

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