2018-03-09 19:53:21 +01:00

36 lines
934 B
Plaintext

component EditLog(entries []*arn.EditLogEntry, user *arn.User)
h1 Editor log
table.edit-log
thead
tr.mountable
th.text-center Icon
th User
th Object
th Key
th Old
th New
th Date
tbody
each entry in entries
tr.mountable
td
.edit-log-icon
if entry.OldValue == "" && entry.NewValue != ""
.edit-log-add
RawIcon("plus")
else if entry.OldValue != "" && entry.NewValue == ""
.edit-log-remove
RawIcon("minus")
else
.edit-log-change
RawIcon("pencil")
td
.edit-log-user
Avatar(entry.User())
td.edit-log-object
a(href="/" + strings.ToLower(entry.ObjectType) + "/" + entry.ObjectID, target="_blank")= arn.GetObjectTitle(entry.ObjectType, entry.ObjectID)
td.edit-log-key= entry.Key
td= entry.OldValue
td= entry.NewValue
td.edit-log-date.utc-date(data-date=entry.Created)