-
Notifications
You must be signed in to change notification settings - Fork 6
/
repeater.tpl.go
executable file
·75 lines (60 loc) · 1.56 KB
/
repeater.tpl.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//** This file was code generated by GoT. DO NOT EDIT. ***
package panels
import (
"context"
"io"
)
// DrawTemplate draws the content of the matching control's template file.
func (ctrl *RepeaterPanel) DrawTemplate(ctx context.Context, _w io.Writer) (err error) {
if _, err = io.WriteString(_w, `<h2>Repeaters</h2>
<p>
The Repeater control repeats an HTML snippet of code once for each item of data you provide.
It is similar to a table, which creates a table row for each item of data, but it lets you repeat
custom html. You can base the html on a string you create, or on a GOT template.
</p>
<p>
Repeaters can use Pagers to control which data items are shown in the repeater.
</p>
`); err != nil {
return
}
if `` == "" {
if _, err = io.WriteString(_w, ` `); err != nil {
return
}
ctrl.Page().GetControl("pager1").Draw(ctx, _w)
if _, err = io.WriteString(_w, `
`); err != nil {
return
}
} else {
if _, err = io.WriteString(_w, ` `); err != nil {
return
}
ctrl.Page().GetControl("pager1").ProcessAttributeString(``).Draw(ctx, _w)
if _, err = io.WriteString(_w, `
`); err != nil {
return
}
}
if `` == "" {
if _, err = io.WriteString(_w, ` `); err != nil {
return
}
ctrl.Page().GetControl("repeater1").Draw(ctx, _w)
if _, err = io.WriteString(_w, `
`); err != nil {
return
}
} else {
if _, err = io.WriteString(_w, ` `); err != nil {
return
}
ctrl.Page().GetControl("repeater1").ProcessAttributeString(``).Draw(ctx, _w)
if _, err = io.WriteString(_w, `
`); err != nil {
return
}
}
return
}