|
|
@ -6,6 +6,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
{% block header %} |
|
|
|
{% block header %} |
|
|
|
{{ emit_tep('all_volumes_page_header') }} |
|
|
|
{{ emit_tep('all_volumes_page_header') }} |
|
|
|
|
|
|
|
|
|
|
|
{% endblock %} |
|
|
|
{% endblock %} |
|
|
|
|
|
|
|
|
|
|
|
{% block content %} |
|
|
|
{% block content %} |
|
|
@ -113,8 +114,30 @@ Vue.component('volumes', { |
|
|
|
template: ` |
|
|
|
template: ` |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="d-grid w-100 bg-mine m-0 p-0 sticky-top shadow"> |
|
|
|
<div class="d-grid w-100 bg-mine m-0 p-0 sticky-top shadow"> |
|
|
|
<div class="row w-100 m-0 p-3"> |
|
|
|
<div class="row d-flex flex-nowrap w-100 m-0 p-3 bg-mine"> |
|
|
|
<input type="text" v-model="search" class="form-control" placeholder="Search Volumes..." /> |
|
|
|
<input type="text" v-model="search" class="form-control flex-shrink-1" placeholder="Search Volumes..." /> |
|
|
|
|
|
|
|
<span class="fa-stack p-0 text-white" onclick="toggleSubMenu()"> |
|
|
|
|
|
|
|
<i class="fas fa-bars fa-stack-1x"></i> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="row d-flex flex-nowrap w-100 m-0 p-3 stashr-submenu"> |
|
|
|
|
|
|
|
<div class="d-flex flex-shrink-1"> |
|
|
|
|
|
|
|
<i class="fas fa-2x fa-sort text-white me-1"></i> |
|
|
|
|
|
|
|
<select class="form-select" aria-label="Default select example" v-model="sorted"> |
|
|
|
|
|
|
|
<option value="volume_sort_title">Name</option> |
|
|
|
|
|
|
|
<option value="volume_year">Year</option> |
|
|
|
|
|
|
|
<option value="volume_total">Length</option> |
|
|
|
|
|
|
|
<option value="progress">Progress</option> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="d-flex flex-shrink-1"> |
|
|
|
|
|
|
|
<i class="fas fa-2x fa-filter text-white me-1"></i> |
|
|
|
|
|
|
|
<select class="form-select" aria-label="Default select example" v-model="filter"> |
|
|
|
|
|
|
|
<option :value="''">All</option> |
|
|
|
|
|
|
|
<option :value=false>Ended</option> |
|
|
|
|
|
|
|
<option :value=true>Ongoing</option> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<ul class="d-flex flex-wrap w-100 m-0 p-0 py-2 justify-content-center"> |
|
|
|
<ul class="d-flex flex-wrap w-100 m-0 p-0 py-2 justify-content-center"> |
|
|
@ -126,12 +149,20 @@ Vue.component('volumes', { |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
`, |
|
|
|
`, |
|
|
|
data() { return { loading: true, search: '', } }, |
|
|
|
data() { return { loading: true, search: '', filter: '', sorted: 'volume_sort_title'} }, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
filteredList() { |
|
|
|
filteredList() { |
|
|
|
return this.volumes.filter(volume => { |
|
|
|
if (this.sorted.toLowerCase() == 'progress') { |
|
|
|
return volume.volume_name.toLowerCase().includes(this.search.toLowerCase()) |
|
|
|
return this.volumes |
|
|
|
}) |
|
|
|
.filter(volume => { return volume.volume_name.toLowerCase().includes(this.search.toLowerCase()) }) |
|
|
|
|
|
|
|
.filter(volume => { return volume.volume_status.toString().includes(this.filter) }) |
|
|
|
|
|
|
|
.sort((a, b) => (a.volume_have / a.volume_total) - (b.volume_have / b.volume_total)) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return this.volumes |
|
|
|
|
|
|
|
.filter(volume => { return volume.volume_name.toLowerCase().includes(this.search.toLowerCase()) }) |
|
|
|
|
|
|
|
.filter(volume => { return volume.volume_status.toString().includes(this.filter) }) |
|
|
|
|
|
|
|
.sort((a, b) => a[this.sorted] - b[this.sorted]) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
delimiters: ["[[","]]"], |
|
|
|
delimiters: ["[[","]]"], |
|
|
|