Merge branch 'refs/heads/master' into feature/autowired-database
# Conflicts: # templates/productList.html.twig
This commit is contained in:
2
bin/cachewarmup
Executable file
2
bin/cachewarmup
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
bin/cli php console.php app:cache:warm-twig
|
||||||
1151
composer.lock
generated
1151
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
use Symfony\Component\HttpFoundation\RequestStack;
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
|
|
||||||
#[AsCommand(name: 'app:cache:warm-twig', description: '')]
|
#[AsCommand(name: 'app:cache:warm-twig', description: 'Warmup twig cache')]
|
||||||
class CacheWarmCommand extends Command
|
class CacheWarmCommand extends Command
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ final class SearchController extends BaseController
|
|||||||
->orWhere([['name', 'like', "%$search%"]])
|
->orWhere([['name', 'like', "%$search%"]])
|
||||||
->orWhere([['subTitle', 'like', "%$search%"]])->get();
|
->orWhere([['subTitle', 'like', "%$search%"]])->get();
|
||||||
|
|
||||||
return $this->render('productList.html.twig', ['products' => $products ?? [], 'search' => $search]);
|
return $this->render('productList.html.twig', ['products' => $products ?? [], 'search' => $search, 'listType' => 'search_'.$search]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
<span class="badge text-bg-light">{{ product.subTitle }}</span>
|
<span class="badge text-bg-light">{{ product.subTitle }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<nav aria-label="breadcrumb mb-0" style="--bs-breadcrumb-divider: '>';" >
|
<nav aria-label="breadcrumb" style="--bs-breadcrumb-divider: '>';" >
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb mb-0">
|
||||||
{% for category in product.categories %}
|
{% for category in product.categories %}
|
||||||
<li class="breadcrumb-item" aria-current="page"><a class="breadcrumb-item text-decoration-none" href="{{ path('app_category', {'category': category}) }}">{{ category }}</a></li>
|
<li class="breadcrumb-item" aria-current="page"><a class="breadcrumb-item text-decoration-none" href="{{ path('app_category', {'category': category}) }}">{{ category }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<div class="d-flex flex-row">
|
<div class="d-flex flex-row">
|
||||||
{% if product.price.last.price != product.price.last.productStandardPrice %}<span
|
{% if product.price.last.price != product.price.last.productStandardPrice %}<span
|
||||||
class="badge text-bg-warning text-decoration-line-through flex-fill">{{ product.price.last.productStandardPrice | format_currency('PLN', {}, 'pl') }}</span> <span
|
class="badge text-bg-warning text-decoration-line-through flex-fill">{{ product.price.last.productStandardPrice | format_currency('PLN', {}, 'pl') }}</span> <span
|
||||||
class="badge text-bg-success flex-fill">{{ ((1 - product.price.last.price / product.price.last.productStandardPrice)*100)|number_format(0) }}%</span>
|
class="badge text-bg-success flex-fill">{{ ((1 - product.price.last.price / product.price.last.productStandardPrice)*100)|number_format(0) }}%</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user