change guestbook panel layout

This commit is contained in:
b1ek 2023-02-28 15:34:08 +10:00
parent c90a144d1a
commit 12f4abc6ec
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 19 additions and 8 deletions

View File

@ -25,6 +25,16 @@
margin: 2px 0;
padding: 0;
}
.cp_gb_entry .cp_gb_entry_name {
text-align: left;
white-space: nowrap;
width: 1px;
}
.cp_gb_entry .cp_gb_entry_hide {
text-align: right;
white-space: nowrap;
width: 1px;
}
.cp_gb_entry_hidden {
filter: opacity(0.7)
}

View File

@ -42,23 +42,24 @@ block content
input(type='submit' name='import' value='Send')
hr
div(style='max-height:160px;overflow-y:scroll')
table
table(width='100%')
if (!gb_records || gb_records.length == 0)
p Nothing to show.
each record of gb_records
tr(class='' + (record.hidden ? 'cp_gb_entry_hidden' : ''))
tr(class='cp_gb_entry' + (record.hidden ? ' cp_gb_entry_hidden' : ''))
form(action='/admin/panel/gb_api' method='POST')
input(type='hidden' name='id' value=record.id)
td
td(class='cp_gb_entry_name')
a(href='/guestbook#gb_entry_' + record.id)= record.id
| : #{record.name}
| :
b= record.name + ' says:'
td
if (record.text.length > 40)
| #{record.text.substr(0, 40)}...
if (record.text.length > 30)
| #{record.text.substr(0, 340)}...
else
| #{record.text}
td
if (access_level >= 3)
if (access_level >= 3)
td(class='cp_gb_entry_hide')
if (!record.hidden)
input(type='submit' name='hide' value='Hide')
else