Split browser.php to commands with routes.

This commit is contained in:
Krzysztof Płaczek
2024-10-13 20:44:14 +02:00
parent e13a0acce1
commit f2e6cba2f5
12 changed files with 281 additions and 40 deletions

View File

@@ -4,12 +4,12 @@
<table class='table table-hover'>
<tr>
<td><img src='{{ product.image }}&width=150' class='img-fluid' alt='{{ product.name }}'/></td>
<td><a href='?product_id={{ product.id }}'>{{ product.name }}</a></td>
<td><a href='/browser.php/product/{{ product.id }}'>{{ product.name }}</a></td>
<td>{{ product.subTitle }}</td>
<td>
<ul class='nav'>
{% for category in product.categories %}
<li class="nav-item"><a class="nav-link" href="?category={{ category }}"> {{ category }} </a></li>
<li class="nav-item"><a class="nav-link" href="/browser.php/category/{{ category }}"> {{ category }} </a></li>
{% endfor %}
</ul>
</td>

View File

@@ -6,12 +6,12 @@
<tr>
<td class="align-middle font-weight-bold h3"><a class="text-warning text-decoration-none" href="?star={{ product.id }}">{% if product.starred %}{% else %}{% endif %}</a></td>
<td><img src='{{ product.image }}&width=70' class='img-fluid' alt='{{ product.name }}'/></td>
<td class="align-middle"><a href='?product_id={{ product.id }}'>{{ product.name }}</a></td>
<td class="align-middle"><a href='/browser.php/product/{{ product.id }}'>{{ product.name }}</a></td>
<td class="align-middle">{{ product.subTitle }}</td>
<td class="align-middle">
<ul class='nav'>
{% for category in product.categories %}
<li class="nav-item"><a class="nav-link" href="?category={{ category }}"> {{ category }} </a></li>
<li class="nav-item"><a class="nav-link" href="/browser.php/category/{{ category }}"> {{ category }} </a></li>
{% endfor %}
</ul>
</td>