mirror of
https://codeberg.org/metamuffin/abrechenbarkeit.git
synced 2025-01-30 18:51:41 +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)
|
||||
return respond(200, "Abrechnungen", function()
|
||||
print([[<table class="log"]])
|
||||
print([[<tr>
|
||||
print([[<thead><tr>
|
||||
<th>Time</th>
|
||||
<th>Username</th>
|
||||
<th>Amount</th>
|
||||
|
@ -362,7 +362,8 @@ local function r_log(filter)
|
|||
<th>P.-Count</th>
|
||||
<th>Comment</th>
|
||||
<th>Actions</th>
|
||||
</tr>]])
|
||||
</tr></thead>]])
|
||||
print("<tbody>")
|
||||
for time, username, amount, pcode, pcount, comment in read_log() do
|
||||
if filter == nil or filter == username then
|
||||
print(string.format([[
|
||||
|
@ -394,6 +395,7 @@ local function r_log(filter)
|
|||
))
|
||||
end
|
||||
end
|
||||
print("</tbody>")
|
||||
print("</table>")
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -284,6 +284,14 @@ tr:nth-child(2n) {
|
|||
background-color: var(--b0);
|
||||
}
|
||||
|
||||
table.log > tbody {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
table.log > tbody > tr {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: inherit;
|
||||
color: white;
|
||||
|
|
Loading…
Add table
Reference in a new issue