Contacts + Members: only show sections if they can contain
This commit is contained in:
parent
ac4c685b6c
commit
1a67a0e30a
2 changed files with 6 additions and 2 deletions
|
|
@ -155,7 +155,9 @@ func Contacts(c *fiber.Ctx) error {
|
||||||
db.Order(
|
db.Order(
|
||||||
"name collate nocase asc",
|
"name collate nocase asc",
|
||||||
).Find(
|
).Find(
|
||||||
§ions, sqlFilterSections,
|
§ions,
|
||||||
|
"contains_contacts = ? AND id IN ?",
|
||||||
|
true, sqlFilterSections,
|
||||||
)
|
)
|
||||||
|
|
||||||
return c.Render("people", fiber.Map{
|
return c.Render("people", fiber.Map{
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,9 @@ func Members(c *fiber.Ctx) error {
|
||||||
db.Order(
|
db.Order(
|
||||||
"name collate nocase asc",
|
"name collate nocase asc",
|
||||||
).Find(
|
).Find(
|
||||||
§ions, sqlFilterSections,
|
§ions,
|
||||||
|
"contains_members = ? AND id IN ?",
|
||||||
|
true, sqlFilterSections,
|
||||||
)
|
)
|
||||||
|
|
||||||
return c.Render("people", fiber.Map{
|
return c.Render("people", fiber.Map{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue