mirror of
https://codeberg.org/metamuffin/abrechenbarkeit.git
synced 2025-01-31 02:51:42 +00:00
rotate log to be chronological starting with newest
This commit is contained in:
parent
8643a7a303
commit
2b5aa684f1
2 changed files with 12 additions and 2 deletions
|
@ -354,7 +354,7 @@ end
|
||||||
local function r_log(filter)
|
local function r_log(filter)
|
||||||
return respond(200, "Abrechnungen", function()
|
return respond(200, "Abrechnungen", function()
|
||||||
print([[<table class="log"]])
|
print([[<table class="log"]])
|
||||||
print([[<tr>
|
print([[<thead><tr>
|
||||||
<th>Time</th>
|
<th>Time</th>
|
||||||
<th>Username</th>
|
<th>Username</th>
|
||||||
<th>Amount</th>
|
<th>Amount</th>
|
||||||
|
@ -362,7 +362,8 @@ local function r_log(filter)
|
||||||
<th>P.-Count</th>
|
<th>P.-Count</th>
|
||||||
<th>Comment</th>
|
<th>Comment</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>]])
|
</tr></thead>]])
|
||||||
|
print("<tbody>")
|
||||||
for time, username, amount, pcode, pcount, comment in read_log() do
|
for time, username, amount, pcode, pcount, comment in read_log() do
|
||||||
if filter == nil or filter == username then
|
if filter == nil or filter == username then
|
||||||
print(string.format([[
|
print(string.format([[
|
||||||
|
@ -394,6 +395,7 @@ local function r_log(filter)
|
||||||
))
|
))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
print("</tbody>")
|
||||||
print("</table>")
|
print("</table>")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -284,6 +284,14 @@ tr:nth-child(2n) {
|
||||||
background-color: var(--b0);
|
background-color: var(--b0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.log > tbody {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
table.log > tbody > tr {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
color: white;
|
color: white;
|
||||||
|
|
Loading…
Add table
Reference in a new issue