/
paninator.go
94 lines (77 loc) · 2.39 KB
/
paninator.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package components
import (
"html/template"
"github.com/GoAdminGroup/go-admin/template/types"
)
type PaginatorAttribute struct {
Name string
CurPageStartIndex string
CurPageEndIndex string
Total string
PreviousClass string
PreviousUrl string
Pages []map[string]string
NextClass string
NextUrl string
PageSizeList []string
Option map[string]template.HTML
Url string
ExtraInfo template.HTML
EntriesInfo template.HTML
types.Attribute
}
func (compo *PaginatorAttribute) SetCurPageStartIndex(value string) types.PaginatorAttribute {
compo.CurPageStartIndex = value
return compo
}
func (compo *PaginatorAttribute) SetCurPageEndIndex(value string) types.PaginatorAttribute {
compo.CurPageEndIndex = value
return compo
}
func (compo *PaginatorAttribute) SetTotal(value string) types.PaginatorAttribute {
compo.Total = value
return compo
}
func (compo *PaginatorAttribute) SetExtraInfo(value template.HTML) types.PaginatorAttribute {
compo.ExtraInfo = value
return compo
}
func (compo *PaginatorAttribute) SetEntriesInfo(value template.HTML) types.PaginatorAttribute {
compo.EntriesInfo = value
return compo
}
func (compo *PaginatorAttribute) SetPreviousClass(value string) types.PaginatorAttribute {
compo.PreviousClass = value
return compo
}
func (compo *PaginatorAttribute) SetPreviousUrl(value string) types.PaginatorAttribute {
compo.PreviousUrl = value
return compo
}
func (compo *PaginatorAttribute) SetPages(value []map[string]string) types.PaginatorAttribute {
compo.Pages = value
return compo
}
func (compo *PaginatorAttribute) SetPageSizeList(value []string) types.PaginatorAttribute {
compo.PageSizeList = value
return compo
}
func (compo *PaginatorAttribute) SetNextClass(value string) types.PaginatorAttribute {
compo.NextClass = value
return compo
}
func (compo *PaginatorAttribute) SetNextUrl(value string) types.PaginatorAttribute {
compo.NextUrl = value
return compo
}
func (compo *PaginatorAttribute) SetOption(value map[string]template.HTML) types.PaginatorAttribute {
compo.Option = value
return compo
}
func (compo *PaginatorAttribute) SetUrl(value string) types.PaginatorAttribute {
compo.Url = value
return compo
}
func (compo *PaginatorAttribute) GetContent() template.HTML {
return ComposeHtml(compo.TemplateList, compo.Separation, *compo, "paginator")
}