Added:
- toolbar refactor
This commit is contained in:
@@ -1,41 +1,8 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% block toolbar %}
|
||||
{% set left_group %}
|
||||
<twig:ToolBarButton icon="sync-alt" text="Tout actualiser" action="refresh"/>
|
||||
<twig:ToolBarButton icon="rss" text="Synchro RSS" action="syncRss"/>
|
||||
<twig:Divider/>
|
||||
<twig:ToolBarButton icon="search" text="Rechercher tout" action="search"/>
|
||||
<twig:ToolBarButton icon="user-plus" text="Importation manuelle" action="import"/>
|
||||
<twig:Divider/>
|
||||
<twig:ToolBarButton icon="wrench" text="Modifier Mangas" action="editMangas"/>
|
||||
|
||||
{% endset %}
|
||||
|
||||
{% set right_group %}
|
||||
<twig:ToolBarButton icon="th-large" text="Options" action="showOptions"/>
|
||||
<twig:DropdownMenu
|
||||
icon="eye"
|
||||
text="Vue"
|
||||
items="{{ toolbarItems.viewOptions }}"
|
||||
/>
|
||||
<twig:Divider/>
|
||||
<twig:DropdownMenu
|
||||
icon="sort"
|
||||
text="Trier"
|
||||
items="{{ toolbarItems.sortItems }}"
|
||||
/>
|
||||
<twig:DropdownMenu
|
||||
icon="filter"
|
||||
text="Filtre"
|
||||
items="{{ toolbarItems.filterItems }}"
|
||||
/>
|
||||
{% endset %}
|
||||
|
||||
<twig:Toolbar
|
||||
left_group="{{ left_group }}"
|
||||
right_group="{{ right_group }}"
|
||||
data-action="click@window->toolbar#clickOutside"
|
||||
/>
|
||||
{% if toolbar is defined %}
|
||||
<twig:Toolbar toolbar="{{ toolbar }}"/>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<div class="relative">
|
||||
@@ -100,18 +67,21 @@
|
||||
<i class="fas fa-bookmark text-gray-500 text-3xl"></i>
|
||||
<h2 class="text-xl font-semibold">Volume {{ '%02d'|format(volume) }}</h2>
|
||||
<div class="flex items-center">
|
||||
<span class="px-2 py-1 text-sm rounded {{ available_chapters|length > 0 ? 'bg-green-500 text-white' : 'bg-red-500 text-white' }}">
|
||||
<span
|
||||
class="px-2 py-1 text-sm rounded {{ available_chapters|length > 0 ? 'bg-green-500 text-white' : 'bg-red-500 text-white' }}">
|
||||
{{ available_chapters|length }} / {{ total_chapters }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<span class="text-gray-600 mr-2">{{ chapters|length }} Chapters</span>
|
||||
<i data-table-target="toggleIcon" data-action="click->table#toggle" class="fas fa-chevron-{{ is_first ? 'up' : 'down' }} cursor-pointer"></i>
|
||||
<i data-table-target="toggleIcon" data-action="click->table#toggle"
|
||||
class="fas fa-chevron-{{ is_first ? 'up' : 'down' }} cursor-pointer"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-table-target="body" class="p-4 border-t" {{ not is_first ? 'style="display: none;"' : '' }}>
|
||||
<div data-table-target="body"
|
||||
class="p-4 border-t" {{ not is_first ? 'style="display: none;"' : '' }}>
|
||||
<table class="min-w-full table-auto">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -134,7 +104,8 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="px-4 py-2 flex justify-end gap-2">
|
||||
<a href="{{ path('download_cbz', {chapterId: chapters|first.id}) }}" class="text-gray-500 hover:text-green-500">
|
||||
<a href="{{ path('download_cbz', {chapterId: chapters|first.id}) }}"
|
||||
class="text-gray-500 hover:text-green-500">
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
@@ -169,7 +140,8 @@
|
||||
data-url="{{ path('add_chapter', {id: chapter.id}) }}"
|
||||
>
|
||||
<span class="text-gray-500 hover:text-green-500">
|
||||
<i data-download-chapter-target="icon" class="fas fa-search"></i>
|
||||
<i data-download-chapter-target="icon"
|
||||
class="fas fa-search"></i>
|
||||
</span>
|
||||
</button>
|
||||
{% else %}
|
||||
@@ -179,7 +151,8 @@
|
||||
</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
<a href="{{ path('download_cbz', {chapterId: chapter.id}) }}" class="text-gray-500 hover:text-green-500">
|
||||
<a href="{{ path('download_cbz', {chapterId: chapter.id}) }}"
|
||||
class="text-gray-500 hover:text-green-500">
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user