package devicesview
import "github.com/tigorlazuardi/redmage/views"
import "github.com/tigorlazuardi/redmage/views/components"
import "github.com/tigorlazuardi/redmage/models"
import "github.com/tigorlazuardi/redmage/api"
import "strconv"
import "fmt"
import "github.com/tigorlazuardi/redmage/views/utils"
type Data struct {
Error string
Devices models.DeviceSlice
Total int64
Params api.DevicesListParams
}
templ Devices(c *views.Context, data Data) {
@components.Doctype() {
@components.Head(c, components.HeadTitle("Redmage - Devices"))
@components.Body(c) {
@DevicesContent(c, data)
}
}
}
templ DevicesContent(c *views.Context, data Data) {
Devices
Add Device
{ strconv.FormatInt(data.Total, 10) } Devices
@devicesList(data)
}
}