Explorar o código

add screen name to TOC directory search output

Mike hai 5 meses
pai
achega
e2f660b2f2
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      server/toc/http.go

+ 3 - 0
server/toc/http.go

@@ -31,6 +31,7 @@ const directoryTpl = `
 <TABLE>
 {{- range .Results -}}
 <TR><TD>
+<B>Screen Name:</B> {{.ScreenName}}<BR>
 {{- if .FirstName}}<B>First Name:</B> {{.FirstName}}<BR>{{- end -}}
 {{- if .MiddleName}}<B>Middle Name:</B> {{.MiddleName}}<BR>{{- end -}}
 {{- if .LastName}}<B>Last Name:</B> {{.LastName}}<BR>{{- end -}}
@@ -329,6 +330,7 @@ func (s OSCARProxy) outputSearchResults(ctx context.Context, w http.ResponseWrit
 		NickName   string
 		ZIP        string
 		Address    string
+		ScreenName string
 	}
 	type PageData struct {
 		Results []DirSearchResult
@@ -337,6 +339,7 @@ func (s OSCARProxy) outputSearchResults(ctx context.Context, w http.ResponseWrit
 	results := make([]DirSearchResult, 0, len(users))
 	for _, result := range users {
 		rec := DirSearchResult{}
+		rec.ScreenName, _ = result.String(wire.ODirTLVScreenName)
 		rec.FirstName, _ = result.String(wire.ODirTLVFirstName)
 		rec.MiddleName, _ = result.String(wire.ODirTLVMiddleName)
 		rec.LastName, _ = result.String(wire.ODirTLVLastName)