Keep moving towards pure Python components
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
<c-layouts.base>
|
||||
{% load static %}
|
||||
<div class="2xl:max-w-(--breakpoint-2xl) xl:max-w-(--breakpoint-xl) md:max-w-(--breakpoint-md) sm:max-w-(--breakpoint-sm) self-center">
|
||||
<c-simple-table :columns=["Test"] :rows=data.rows :page_obj=page_obj :elided_page_range=elided_page_range :header_action=data.header_action />
|
||||
</div>
|
||||
</c-layouts.base>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<c-layouts.base>
|
||||
{% load static %}
|
||||
<div class="2xl:max-w-(--breakpoint-2xl) xl:max-w-(--breakpoint-xl) md:max-w-(--breakpoint-md) sm:max-w-(--breakpoint-sm) self-center">
|
||||
<c-simple-table :columns=data.columns :rows=data.rows :page_obj=page_obj :elided_page_range=elided_page_range :header_action=data.header_action />
|
||||
{% include "simple_table.html" with rows=data.rows columns=data.columns page_obj=page_obj elided_page_range=elided_page_range header_action=data.header_action %}
|
||||
</div>
|
||||
</c-layouts.base>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<c-layouts.base>
|
||||
{% load static %}
|
||||
<div class="2xl:max-w-(--breakpoint-2xl) xl:max-w-(--breakpoint-xl) md:max-w-(--breakpoint-md) sm:max-w-(--breakpoint-sm) self-center">
|
||||
<c-simple-table :columns=data.columns :rows=data.rows :page_obj=page_obj :elided_page_range=elided_page_range :header_action=data.header_action />
|
||||
{% include "simple_table.html" with rows=data.rows columns=data.columns page_obj=page_obj elided_page_range=elided_page_range header_action=data.header_action %}
|
||||
</div>
|
||||
</c-layouts.base>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
<div class="mb-6">
|
||||
<c-h1 :badge="purchase_count">Purchases</c-h1>
|
||||
{% if purchase_count %}
|
||||
<c-simple-table :rows=purchase_data.rows :columns=purchase_data.columns />
|
||||
{% include "simple_table.html" with rows=purchase_data.rows columns=purchase_data.columns page_obj=None elided_page_range=None header_action=None %}
|
||||
{% else %}
|
||||
No purchases yet.
|
||||
{% endif %}
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="mb-6">
|
||||
<c-h1 :badge="session_count">Sessions</c-h1>
|
||||
{% if session_count %}
|
||||
<c-simple-table :rows=session_data.rows :columns=session_data.columns :header_action=session_data.header_action :page_obj=session_page_obj :elided_page_range=session_elided_page_range />
|
||||
{% include "simple_table.html" with rows=session_data.rows columns=session_data.columns header_action=session_data.header_action page_obj=session_page_obj elided_page_range=session_elided_page_range %}
|
||||
{% else %}
|
||||
No sessions yet.
|
||||
{% endif %}
|
||||
@@ -155,7 +155,7 @@
|
||||
<div class="mb-6">
|
||||
<c-h1 :badge="playevent_count">Play Events</c-h1>
|
||||
{% if playevent_count %}
|
||||
<c-simple-table :rows=playevent_data.rows :columns=playevent_data.columns />
|
||||
{% include "simple_table.html" with rows=playevent_data.rows columns=playevent_data.columns page_obj=None elided_page_range=None header_action=None %}
|
||||
{% else %}
|
||||
No play events yet.
|
||||
{% endif %}
|
||||
|
||||
@@ -966,7 +966,7 @@ class SimpleTableRenderingTest(unittest.TestCase):
|
||||
"""Verify list-style rows render as <tr> with <th scope='row'> + <td>."""
|
||||
from django.template.loader import render_to_string
|
||||
result = render_to_string(
|
||||
"cotton/simple_table.html",
|
||||
"simple_table.html",
|
||||
{
|
||||
"columns": ["Game", "Started", "Ended"],
|
||||
"rows": [["Game1", "2025-01-01", "2025-03-01"]],
|
||||
@@ -990,7 +990,7 @@ class SimpleTableRenderingTest(unittest.TestCase):
|
||||
"""Verify empty rows list renders empty <tbody>."""
|
||||
from django.template.loader import render_to_string
|
||||
result = render_to_string(
|
||||
"cotton/simple_table.html",
|
||||
"simple_table.html",
|
||||
{
|
||||
"columns": ["Game", "Started"],
|
||||
"rows": [],
|
||||
@@ -1008,7 +1008,7 @@ class SimpleTableRenderingTest(unittest.TestCase):
|
||||
"""Verify multiple rows all render."""
|
||||
from django.template.loader import render_to_string
|
||||
result = render_to_string(
|
||||
"cotton/simple_table.html",
|
||||
"simple_table.html",
|
||||
{
|
||||
"columns": ["Game", "Started"],
|
||||
"rows": [["GameA", "2025-01-01"], ["GameB", "2025-02-01"]],
|
||||
@@ -1028,7 +1028,7 @@ class SimpleTableRenderingTest(unittest.TestCase):
|
||||
"""Verify dict-style rows with row_id and cell_data render correctly."""
|
||||
from django.template.loader import render_to_string
|
||||
result = render_to_string(
|
||||
"cotton/simple_table.html",
|
||||
"simple_table.html",
|
||||
{
|
||||
"columns": ["Name", "Date"],
|
||||
"rows": [
|
||||
@@ -1055,7 +1055,7 @@ class SimpleTableRenderingTest(unittest.TestCase):
|
||||
"""Verify empty rows list renders empty <tbody>."""
|
||||
from django.template.loader import render_to_string
|
||||
result = render_to_string(
|
||||
"cotton/simple_table.html",
|
||||
"simple_table.html",
|
||||
{
|
||||
"columns": ["Game", "Started"],
|
||||
"rows": [],
|
||||
@@ -1073,7 +1073,7 @@ class SimpleTableRenderingTest(unittest.TestCase):
|
||||
"""Verify multiple rows all render."""
|
||||
from django.template.loader import render_to_string
|
||||
result = render_to_string(
|
||||
"cotton/simple_table.html",
|
||||
"simple_table.html",
|
||||
{
|
||||
"columns": ["Game", "Started"],
|
||||
"rows": [["GameA", "2025-01-01"], ["GameB", "2025-02-01"]],
|
||||
@@ -1093,7 +1093,7 @@ class SimpleTableRenderingTest(unittest.TestCase):
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.safestring import mark_safe
|
||||
result = render_to_string(
|
||||
"cotton/simple_table.html",
|
||||
"simple_table.html",
|
||||
{
|
||||
"columns": ["Game", "Started"],
|
||||
"rows": [["Game1", "2025-01-01"]],
|
||||
@@ -1110,7 +1110,7 @@ class SimpleTableRenderingTest(unittest.TestCase):
|
||||
"""Verify dict-style rows with row_id and cell_data render correctly."""
|
||||
from django.template.loader import render_to_string
|
||||
result = render_to_string(
|
||||
"cotton/simple_table.html",
|
||||
"simple_table.html",
|
||||
{
|
||||
"columns": ["Name", "Date"],
|
||||
"rows": [
|
||||
|
||||
Reference in New Issue
Block a user