41 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-03-09 18:04:06 +00:00
component EditLog(entries []*arn.EditLogEntry, user *arn.User)
h1 Editor log
2018-03-09 18:53:21 +00:00
table.edit-log
2018-03-09 18:04:06 +00:00
thead
tr.mountable
2018-03-09 18:53:21 +00:00
th.text-center Icon
2018-03-09 18:04:06 +00:00
th User
th Object
2018-03-09 19:13:43 +00:00
th Type
2018-03-09 18:53:21 +00:00
th Key
2018-03-09 18:04:06 +00:00
th Old
th New
th Date
tbody
each entry in entries
tr.mountable
td
2018-03-09 19:13:43 +00:00
.edit-log-icon(title=entry.Action)
if entry.Action == "create"
.edit-log-create
2018-03-09 18:53:21 +00:00
RawIcon("plus")
2018-03-09 19:13:43 +00:00
else if entry.OldValue == "" && entry.NewValue != ""
.edit-log-add
RawIcon("plus-circle")
2018-03-09 18:53:21 +00:00
else if entry.OldValue != "" && entry.NewValue == ""
.edit-log-remove
RawIcon("minus")
else
.edit-log-change
RawIcon("pencil")
2018-03-09 18:04:06 +00:00
td
2018-03-09 18:53:21 +00:00
.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)
2018-03-09 19:13:43 +00:00
td.edit-log-type= entry.ObjectType
2018-03-09 18:53:21 +00:00
td.edit-log-key= entry.Key
2018-03-09 18:04:06 +00:00
td= entry.OldValue
td= entry.NewValue
2018-03-09 18:53:21 +00:00
td.edit-log-date.utc-date(data-date=entry.Created)