Improved groups
This commit is contained in:
21
pages/group/history.go
Normal file
21
pages/group/history.go
Normal file
@ -0,0 +1,21 @@
|
||||
package group
|
||||
|
||||
import (
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils/history"
|
||||
)
|
||||
|
||||
// History of the edits.
|
||||
var History = history.Handler(renderHistory, "Group")
|
||||
|
||||
func renderHistory(obj interface{}, entries []*arn.EditLogEntry, user *arn.User) string {
|
||||
group := obj.(*arn.Group)
|
||||
var member *arn.GroupMember
|
||||
|
||||
if user != nil {
|
||||
member = group.FindMember(user.ID)
|
||||
}
|
||||
|
||||
return components.GroupTabs(group, member, user) + components.EditLog(entries, user)
|
||||
}
|
Reference in New Issue
Block a user