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

53 lines
2.7 KiB
Plaintext
Raw Normal View History

2023-02-06 02:00:20 +04:00
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
form.entry(onsubmit='return false;')
header
- var created_tz = util.ToClientTimezone(entry.Created, r).Format("Monday _2 January 2006 15:04:05 -07:00")
| ##{entry.ID} by #[input(type='text' name='name' value=entry.Name)] #[input(type='text' name='website' value=entry.Website)]
if entry.Website != ""
| (#[input(type='checkbox' name='hide_website') hide])
else
| (#[input(type='checkbox' name='hide_website' checked='') hide])
p on #[time(datetime=created_tz) #{created_tz}]
2023-02-06 02:00:20 +04:00
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("Monday _2 January 2006 15:04:05 -07:00")
2023-02-06 02:00:20 +04:00
| 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.