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>
25 <label class="inline checkbox text-book"><input type="checkbox" v-on:change="typeChange" v-model="search.type.book" value="book">{{ trans('entities.book') }}</label>
28 <h6 class="text-muted">{{ trans('entities.search_exact_matches') }}</h6>
29 <table cellpadding="0" cellspacing="0" border="0" class="no-style">
30 <tr v-for="(term, i) in search.exactTerms">
31 <td style="padding: 0 12px 6px 0;">
32 <input class="exact-input outline" v-on:input="exactChange" type="text" v-model="search.exactTerms[i]"></td>
34 <button type="button" class="text-neg text-button" v-on:click="removeExact(i)">
41 <button type="button" class="text-button" v-on:click="addExact">
42 @icon('add-circle'){{ trans('common.add') }}
48 <h6 class="text-muted">{{ trans('entities.search_tags') }}</h6>
49 <table cellpadding="0" cellspacing="0" border="0" class="no-style">
50 <tr v-for="(term, i) in search.tagTerms">
51 <td style="padding: 0 12px 6px 0;">
52 <input class="tag-input outline" v-on:input="tagChange" type="text" v-model="search.tagTerms[i]"></td>
54 <button type="button" class="text-neg text-button" v-on:click="removeTag(i)">
61 <button type="button" class="text-button" v-on:click="addTag">
62 @icon('add-circle'){{ trans('common.add') }}
69 <h6 class="text-muted">Options</h6>
70 <label class="checkbox">
71 <input type="checkbox" v-on:change="optionChange('viewed_by_me')"
72 v-model="search.option.viewed_by_me" value="page">
73 {{ trans('entities.search_viewed_by_me') }}
75 <label class="checkbox">
76 <input type="checkbox" v-on:change="optionChange('not_viewed_by_me')"
77 v-model="search.option.not_viewed_by_me" value="page">
78 {{ trans('entities.search_not_viewed_by_me') }}
80 <label class="checkbox">
81 <input type="checkbox" v-on:change="optionChange('is_restricted')"
82 v-model="search.option.is_restricted" value="page">
83 {{ trans('entities.search_permissions_set') }}
85 <label class="checkbox">
86 <input type="checkbox" v-on:change="optionChange('created_by:me')"
87 v-model="search.option['created_by:me']" value="page">
88 {{ trans('entities.search_created_by_me') }}
90 <label class="checkbox">
91 <input type="checkbox" v-on:change="optionChange('updated_by:me')"
92 v-model="search.option['updated_by:me']" value="page">
93 {{ trans('entities.search_updated_by_me') }}
97 <h6 class="text-muted">Date Options</h6>
98 <table cellpadding="0" cellspacing="0" border="0" class="no-style form-table">
100 <td width="200">{{ trans('entities.search_updated_after') }}</td>
102 <button type="button" class="text-button" v-if="!search.dates.updated_after"
103 v-on:click="enableDate('updated_after')">{{ trans('entities.search_set_date') }}</button>
107 <tr v-if="search.dates.updated_after">
109 <input v-if="search.dates.updated_after" class="tag-input"
110 v-on:input="dateChange('updated_after')" type="date" v-model="search.dates.updated_after"
111 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
114 <button v-if="search.dates.updated_after" type="button" class="text-neg text-button"
115 v-on:click="dateRemove('updated_after')">
121 <td>{{ trans('entities.search_updated_before') }}</td>
123 <button type="button" class="text-button" v-if="!search.dates.updated_before"
124 v-on:click="enableDate('updated_before')">{{ trans('entities.search_set_date') }}</button>
128 <tr v-if="search.dates.updated_before">
130 <input v-if="search.dates.updated_before" class="tag-input"
131 v-on:input="dateChange('updated_before')" type="date" v-model="search.dates.updated_before"
132 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
135 <button v-if="search.dates.updated_before" type="button" class="text-neg text-button"
136 v-on:click="dateRemove('updated_before')">
142 <td>{{ trans('entities.search_created_after') }}</td>
144 <button type="button" class="text-button" v-if="!search.dates.created_after"
145 v-on:click="enableDate('created_after')">{{ trans('entities.search_set_date') }}</button>
149 <tr v-if="search.dates.created_after">
151 <input v-if="search.dates.created_after" class="tag-input"
152 v-on:input="dateChange('created_after')" type="date" v-model="search.dates.created_after"
153 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
156 <button v-if="search.dates.created_after" type="button" class="text-neg text-button"
157 v-on:click="dateRemove('created_after')">
163 <td>{{ trans('entities.search_created_before') }}</td>
165 <button type="button" class="text-button" v-if="!search.dates.created_before"
166 v-on:click="enableDate('created_before')">{{ trans('entities.search_set_date') }}</button>
170 <tr v-if="search.dates.created_before">
172 <input v-if="search.dates.created_before" class="tag-input"
173 v-on:input="dateChange('created_before')" type="date" v-model="search.dates.created_before"
174 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
177 <button v-if="search.dates.created_before" type="button" class="text-neg text-button"
178 v-on:click="dateRemove('created_before')">
186 <button type="submit" class="button primary">{{ trans('entities.search_update') }}</button>
195 <div class="container small" v-pre>
196 <input type="hidden" name="searchTerm" value="{{$searchTerm}}">
198 <h1>{{ trans('entities.search_results') }}</h1>
199 <h6 class="text-muted">{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}</h6>
200 @include('partials/entity-list', ['entities' => $entities])
202 <a href="{{ $nextPageLink }}" class="button">{{ trans('entities.search_more') }}</a>