templates/Frontend/Video/Index.twig line 1
{% extends 'Frontend/Layout.twig' %}{% import 'Frontend/Macros.twig' as macro %}{% block javascripts %}{{ encore_entry_script_tags('frontend') }}{% endblock %}{% block body %}<h1>Videos</h1><div class="row"><div class="col-sm-4"><div class="mb-3 p-4 bg-body-secondary"><div class="mb-2"><label class="label-small">Studio</label><select id="studio"autocomplete="off"placeholder="Search ..."data-controller="frontend-video-studio-search"data-url-search="{{ path('studio.search') }}"data-selected="{{ selectedStudios|json_encode }}"></select></div><div class="mb-2"><label class="label-small">Actor</label><select id="actor"autocomplete="off"placeholder="Search ..."data-controller="frontend-video-actor-search"data-url-search="{{ path('actor.search') }}"data-selected="{{ selectedActors|json_encode }}"></select></div><div class="mb-2"><label for="search" class="label-small">Title</label><input id="search"value="{{ search }}"class="form-control"type="text"placeholder=""></div>{% for category in categories %}<div class="mb-2"><label for="category-{{ category.id }}" class="label-small">{{ category.name }}</label><select id="category-{{ category.id }}"class="tag"autocomplete="off"placeholder="All"data-controller="frontend-video-tag-select"{#{% if category.isMultipleSelect %}multiple{% endif %}#}><option value="">All</option>{% if tags[category.id] is defined %}{% for tag in tags[category.id] %}<option value="{{ tag.id }}"{% if tag.id in selectedTagIds %} selected{% endif %}>{{ tag.name }}</option>{% endfor %}{% endif %}</select></div>{% endfor %}<div class="mt-3"><button class="btn btn-secondary"data-controller="frontend-video-search"data-url="{{ path('video.index') }}"data-action="frontend-video-search#search">Apply filters</button><button class="btn btn-link"data-controller="frontend-video-search"data-url="{{ path('video.index') }}"data-action="frontend-video-search#clear">Clear filters</button></div></div></div><div class="col-sm-8"><turbo-frame id="video-list-{{ paging.getPage() }}" target="_top">{% if videos|length == 0 %}<div class="alert alert-warning">No videos found that matches the search criteria.</div>{% else %}<div class="row row-cols-1 row-cols-md-3 g-3">{% for video in videos %}<div class="col mb-3"><div class="card">{% set img = video.getFrontImage() %}{% if img %}<div class="bg-light ratio ratio-4x3"><img src="/img/video/{{ img.id }}/resize(150,100)/{{ img.filename }}"class="card-img-top object-fit-cover"alt=" "></div>{% endif %}<div class="card-body"><a href="{{ path('video.show', {'id':video.id}) }}" class="stretched-link"><h5 class="card-title">{{ video.title }}</h5></a><p class="card-text">{{ video.description }}</p></div></div></div>{% endfor %}</div>{% if url_next_page %}<turbo-frameid="video-list-{{ paging.getNextPage() }}"src="{{ url_next_page }}"loading="lazy"target="_top"></turbo-frame>{% endif %}{% endif %}</turbo-frame></div></div>{% endblock %}