Rename Button to StyledButton, simplify A

This commit is contained in:
2026-06-14 10:47:23 +02:00
parent 7751c29529
commit f036a246a8
11 changed files with 82 additions and 111 deletions
+6 -7
View File
@@ -9,17 +9,16 @@ from django.http import HttpRequest, HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.urls import reverse
from common.components import (
Fragment,
A,
AddForm,
Button,
ButtonGroup,
Fragment,
Icon,
ModuleScript,
paginated_table_content,
PlayEventFilterBar,
StyledButton,
paginated_table_content,
)
from common.layout import render_page
from common.time import dateformat, format_duration, local_strftime
@@ -87,9 +86,9 @@ def create_playevent_tabledata(
for row in row_list
]
return {
"header_action": A(
[], Button([], "Add play event"), url_name="games:add_playevent"
),
"header_action": A(href=reverse("games:add_playevent"))[
StyledButton()["Add play event"]
],
"columns": list(filtered_column_list),
"rows": filtered_row_list,
}