1 @extends('sidebar-layout')
4 <div class="col-sm-12 faded">
5 <div class="breadcrumbs">
6 <a href="{{ baseUrl("/search?term=" . urlencode($searchTerm)) }}" class="text-button">@icon('search'){{ trans('entities.search_for_term', ['term' => $searchTerm]) }}</a>
11 @section('container-attrs')
17 <h3>{{ trans('entities.search_filters') }}</h3>
20 <form v-on:submit="updateSearch" v-cloak class="v-cloak anim fadeIn">
21 <h6 class="text-muted">{{ trans('entities.search_content_type') }}</h6>
22 <div class="form-group">
23 <label class="inline checkbox text-page"><input type="checkbox" v-on:change="typeChange" v-model="search.type.page" value="page">{{ trans('entities.page') }}</label>
24 <label class="inline checkbox text-chapter"><input type="checkbox" v-on:change="typeChange" v-model="search.type.chapter" value="chapter">{{ trans('entities.chapter') }}</label>
26 <label class="inline checkbox text-book"><input type="checkbox" v-on:change="typeChange" v-model="search.type.book" value="book">{{ trans('entities.book') }}</label>
27 <label class="inline checkbox text-bookshelf"><input type="checkbox" v-on:change="typeChange" v-model="search.type.bookshelf" value="bookshelf">{{ trans('entities.shelf') }}</label>
30 <h6 class="text-muted">{{ trans('entities.search_exact_matches') }}</h6>
31 <table cellpadding="0" cellspacing="0" border="0" class="no-style">
32 <tr v-for="(term, i) in search.exactTerms">
33 <td style="padding: 0 12px 6px 0;">
34 <input class="exact-input outline" v-on:input="exactChange" type="text" v-model="search.exactTerms[i]"></td>
36 <button type="button" class="text-neg text-button" v-on:click="removeExact(i)">
43 <button type="button" class="text-button" v-on:click="addExact">
44 @icon('add-circle'){{ trans('common.add') }}
50 <h6 class="text-muted">{{ trans('entities.search_tags') }}</h6>
51 <table cellpadding="0" cellspacing="0" border="0" class="no-style">
52 <tr v-for="(term, i) in search.tagTerms">
53 <td style="padding: 0 12px 6px 0;">
54 <input class="tag-input outline" v-on:input="tagChange" type="text" v-model="search.tagTerms[i]"></td>
56 <button type="button" class="text-neg text-button" v-on:click="removeTag(i)">
63 <button type="button" class="text-button" v-on:click="addTag">
64 @icon('add-circle'){{ trans('common.add') }}
71 <h6 class="text-muted">{{ trans('entities.search_options') }}</h6>
72 <label class="checkbox">
73 <input type="checkbox" v-on:change="optionChange('viewed_by_me')"
74 v-model="search.option.viewed_by_me" value="page">
75 {{ trans('entities.search_viewed_by_me') }}
77 <label class="checkbox">
78 <input type="checkbox" v-on:change="optionChange('not_viewed_by_me')"
79 v-model="search.option.not_viewed_by_me" value="page">
80 {{ trans('entities.search_not_viewed_by_me') }}
82 <label class="checkbox">
83 <input type="checkbox" v-on:change="optionChange('is_restricted')"
84 v-model="search.option.is_restricted" value="page">
85 {{ trans('entities.search_permissions_set') }}
87 <label class="checkbox">
88 <input type="checkbox" v-on:change="optionChange('created_by:me')"
89 v-model="search.option['created_by:me']" value="page">
90 {{ trans('entities.search_created_by_me') }}
92 <label class="checkbox">
93 <input type="checkbox" v-on:change="optionChange('updated_by:me')"
94 v-model="search.option['updated_by:me']" value="page">
95 {{ trans('entities.search_updated_by_me') }}
99 <h6 class="text-muted">{{ trans('entities.search_date_options') }}</h6>
100 <table cellpadding="0" cellspacing="0" border="0" class="no-style form-table">
102 <td width="200">{{ trans('entities.search_updated_after') }}</td>
104 <button type="button" class="text-button" v-if="!search.dates.updated_after"
105 v-on:click="enableDate('updated_after')">{{ trans('entities.search_set_date') }}</button>
109 <tr v-if="search.dates.updated_after">
111 <input v-if="search.dates.updated_after" class="tag-input"
112 v-on:input="dateChange('updated_after')" type="date" v-model="search.dates.updated_after"
113 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
116 <button v-if="search.dates.updated_after" type="button" class="text-neg text-button"
117 v-on:click="dateRemove('updated_after')">
123 <td>{{ trans('entities.search_updated_before') }}</td>
125 <button type="button" class="text-button" v-if="!search.dates.updated_before"
126 v-on:click="enableDate('updated_before')">{{ trans('entities.search_set_date') }}</button>
130 <tr v-if="search.dates.updated_before">
132 <input v-if="search.dates.updated_before" class="tag-input"
133 v-on:input="dateChange('updated_before')" type="date" v-model="search.dates.updated_before"
134 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
137 <button v-if="search.dates.updated_before" type="button" class="text-neg text-button"
138 v-on:click="dateRemove('updated_before')">
144 <td>{{ trans('entities.search_created_after') }}</td>
146 <button type="button" class="text-button" v-if="!search.dates.created_after"
147 v-on:click="enableDate('created_after')">{{ trans('entities.search_set_date') }}</button>
151 <tr v-if="search.dates.created_after">
153 <input v-if="search.dates.created_after" class="tag-input"
154 v-on:input="dateChange('created_after')" type="date" v-model="search.dates.created_after"
155 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
158 <button v-if="search.dates.created_after" type="button" class="text-neg text-button"
159 v-on:click="dateRemove('created_after')">
165 <td>{{ trans('entities.search_created_before') }}</td>
167 <button type="button" class="text-button" v-if="!search.dates.created_before"
168 v-on:click="enableDate('created_before')">{{ trans('entities.search_set_date') }}</button>
172 <tr v-if="search.dates.created_before">
174 <input v-if="search.dates.created_before" class="tag-input"
175 v-on:input="dateChange('created_before')" type="date" v-model="search.dates.created_before"
176 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
179 <button v-if="search.dates.created_before" type="button" class="text-neg text-button"
180 v-on:click="dateRemove('created_before')">
188 <button type="submit" class="button primary">{{ trans('entities.search_update') }}</button>
197 <div class="container small" v-pre>
198 <input type="hidden" name="searchTerm" value="{{$searchTerm}}">
200 <h1>{{ trans('entities.search_results') }}</h1>
201 <h6 class="text-muted">{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}</h6>
202 @include('partials/entity-list', ['entities' => $entities])
204 <a href="{{ $nextPageLink }}" class="button">{{ trans('entities.search_more') }}</a>