1
0
dwelling-home/web/templates/guestbook_admin.pug

48 lines
2.4 KiB
Plaintext
Executable File

extends base.pug
block meta_description
meta(name='description' content="Guestbook administration.")
block append head
link(href='/assets/css/guestbook_admin.css' rel='stylesheet')
script(src='/assets/js/guestbook_admin.js' defer='')
block nav
a(href='/') Home
a(href='/stuff') Stuff
a(href='/mindflow') Mindflow
a(href='/about') About
h1 Guestbook
block content
:go:func GuestbookAdmin(title, owner string, entries []*guestbook.Entry, r *http.Request)
section#posts
if (len(entries) > 0)
each entry in entries
article
header
- var created_tz = util.ToClientTimezone(entry.Created, r).Format("2006-01-02T15:04:05")
| Entry ##{entry.ID} by #[span.highlighted #{entry.Name}] #[em #{entry.Website}] on #[time(datetime=created_tz) #{created_tz}]
form.entry(onsubmit='return false;')
input(type='hidden' value=entry.ID name='entry_id')
textarea(maxlength='4096' placeholder='Your message' name="message" required='')= entry.Message
button(name="edit-entry") Edit
button(name="delete-entry") Delete
if (entry.Reply != nil)
.reply
header
- var reply_created_tz = util.ToClientTimezone(entry.Reply.Created, r).Format("2006-01-02 15:04:05")
| Reply by #[span.highlighted #{owner}] on #[time(datetime=reply_created_tz) #{reply_created_tz}]
form.reply(onsubmit='return false;')
input(type='hidden' value=entry.ID name='entry_id')
textarea(maxlength='4096' placeholder='Your message' name="message" required='')= entry.Reply.Message
button(name="edit-reply") Edit
button(name="delete-reply") Delete
else
form.reply(onsubmit='return false;')
input(type='hidden' value=entry.ID name='entry_id')
textarea(maxlength='4096' placeholder='Write a reply' name="message" required='')
button(name="reply") Reply
else
p.center No posts.