diff --git a/find.go b/find.go index c058d4a..e0eb77b 100644 --- a/find.go +++ b/find.go @@ -70,6 +70,7 @@ func loadCategoryInformation(ctxt ui.AmContext, offset int) error { ctxt.VarMap().Set("resultHeader", fmt.Sprintf("Communities in Category (Displaying %d-%d of %d)", offset*listMax+1, offset*listMax+len(commList), numComm)) ctxt.VarMap().Set("resultList", commList) + ctxt.VarMap().Set("resultFromDirectory", true) if offset > 0 { ctxt.VarMap().Set("resultShowPrev", true) } @@ -113,6 +114,7 @@ func FindPage(ctxt ui.AmContext) (string, any, error) { } ctxt.SetSession("find.mode", mode) ctxt.VarMap().Set("mode", mode) + ctxt.VarMap().Set("ofs", ofs) switch mode { case "COM": ctxt.VarMap().Set("field", "name") @@ -127,9 +129,12 @@ func FindPage(ctxt ui.AmContext) (string, any, error) { ctxt.VarMap().Set("oper", "st") ctxt.VarMap().Set("term", "") case "CAT": + ctxt.VarMap().Set("field", "name") ctxt.VarMap().Set("oper", "st") ctxt.VarMap().Set("term", "") case "PST": + ctxt.VarMap().Set("field", "name") + ctxt.VarMap().Set("oper", "in") ctxt.VarMap().Set("term", "") } diff --git a/ui/templates.go b/ui/templates.go index 805e21e..b107e94 100644 --- a/ui/templates.go +++ b/ui/templates.go @@ -12,6 +12,7 @@ package ui import ( "embed" + "errors" "fmt" "io" "reflect" @@ -90,7 +91,7 @@ func makeYearRange(a jet.Arguments) reflect.Value { return reflect.ValueOf(err) } } else { - return reflect.ValueOf(fmt.Errorf("cannot locate year: marker in param")) + return reflect.ValueOf(errors.New("cannot locate year: marker in param")) } } diff --git a/ui/views/find.jet b/ui/views/find.jet index 6858474..b322c76 100644 --- a/ui/views/find.jet +++ b/ui/views/find.jet @@ -45,9 +45,6 @@