2023-02-06 02:00:20 +04:00
|
|
|
extends base.pug
|
|
|
|
|
|
|
|
block meta_description
|
|
|
|
meta(name='description' content="Guestbook administration.")
|
|
|
|
|
|
|
|
block append head
|
2023-05-10 01:03:20 +04:00
|
|
|
link(href='/assets/css/guestbook.css' rel='stylesheet')
|
2023-02-06 02:00:20 +04:00
|
|
|
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
|
2023-05-10 01:03:20 +04:00
|
|
|
a(href='/guestbook') Guestbook
|
|
|
|
h1 Guestbook Admin
|
2023-02-06 02:00:20 +04:00
|
|
|
|
|
|
|
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;')
|
2023-05-09 23:55:49 +04:00
|
|
|
header
|
|
|
|
- var created_tz = util.ToClientTimezone(entry.Created, r).Format("Monday _2 January 2006 15:04:05 -07:00")
|
2023-05-10 01:03:20 +04:00
|
|
|
| ##{entry.ID} by #[input(type='text' maxlength='80' placeholder='Name (Anonymous if left blank)' name='name' value=entry.Name)] #[input(type='text' maxlength='255' placeholder='Website (optional)' name='website' value=entry.Website)]
|
2023-05-09 23:55:49 +04:00
|
|
|
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
|
2023-05-09 23:55:49 +04:00
|
|
|
- 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.
|