|
@@ -29,25 +29,35 @@ func (this *Modules) RegisterModule_Users() *Module {
|
|
|
{Name: "List of Users"},
|
|
|
})
|
|
|
content += builder.DataTable(wrap, "users", "email", "ASC", []builder.DataTableRow{
|
|
|
- {DBField: "id", NameInTable: "", CallBack: nil},
|
|
|
- {DBField: "email", NameInTable: "Email", CallBack: func(values *[]string) string {
|
|
|
- email := `<a href="/cp/users/modify/` + (*values)[0] + `/">` + html.EscapeString((*values)[1]) + `</a>`
|
|
|
- name := html.EscapeString((*values)[2])
|
|
|
- if name != "" && (*values)[3] != "" {
|
|
|
- name += ` ` + (*values)[3]
|
|
|
- }
|
|
|
- if name != "" {
|
|
|
- name = `<div><small>` + name + `</small></div>`
|
|
|
- }
|
|
|
- return `<div>` + email + `</div>` + name
|
|
|
- }},
|
|
|
- {DBField: "first_name", NameInTable: "", CallBack: nil},
|
|
|
- {DBField: "last_name", NameInTable: "", CallBack: nil},
|
|
|
+ {
|
|
|
+ DBField: "id",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ DBField: "email",
|
|
|
+ NameInTable: "Email",
|
|
|
+ CallBack: func(values *[]string) string {
|
|
|
+ email := `<a href="/cp/users/modify/` + (*values)[0] + `/">` + html.EscapeString((*values)[1]) + `</a>`
|
|
|
+ name := html.EscapeString((*values)[2])
|
|
|
+ if name != "" && (*values)[3] != "" {
|
|
|
+ name += ` ` + (*values)[3]
|
|
|
+ }
|
|
|
+ if name != "" {
|
|
|
+ name = `<div><small>` + name + `</small></div>`
|
|
|
+ }
|
|
|
+ return `<div>` + email + `</div>` + name
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ DBField: "first_name",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ DBField: "last_name",
|
|
|
+ },
|
|
|
}, func(values *[]string) string {
|
|
|
return `<a class="ico" href="/cp/users/modify/` + (*values)[0] + `/">` +
|
|
|
assets.SysSvgIconEdit + `</a>` +
|
|
|
`<a class="ico" href="#">` + assets.SysSvgIconRemove + `</a>`
|
|
|
- }, "/cp/users/default/")
|
|
|
+ }, "/cp/users/")
|
|
|
} else if wrap.CurrSubModule == "add" {
|
|
|
content += this.getBreadCrumbs(wrap, &[]consts.BreadCrumb{
|
|
|
{Name: "Add New User"},
|