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')
18 <h3>{{ trans('entities.search_filters') }}</h3>
21 <form v-on:submit="updateSearch" v-cloak class="v-cloak anim fadeIn">
22 <h6 class="text-muted">{{ trans('entities.search_content_type') }}</h6>
23 <div class="form-group">
24 <label class="inline checkbox text-page"><input type="checkbox" v-on:change="typeChange" v-model="search.type.page" value="page">{{ trans('entities.page') }}</label>
25 <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>
29 <h6 class="text-muted">{{ trans('entities.search_exact_matches') }}</h6>
30 <table cellpadding="0" cellspacing="0" border="0" class="no-style">
31 <tr v-for="(term, i) in search.exactTerms">
32 <td style="padding: 0 12px 6px 0;">
33 <input class="exact-input outline" v-on:input="exactChange" type="text" v-model="search.exactTerms[i]"></td>
35 <button type="button" class="text-neg text-button" v-on:click="removeExact(i)">
42 <button type="button" class="text-button" v-on:click="addExact">
43 @icon('add-circle'){{ trans('common.add') }}
49 <h6 class="text-muted">{{ trans('entities.search_tags') }}</h6>
50 <table cellpadding="0" cellspacing="0" border="0" class="no-style">
51 <tr v-for="(term, i) in search.tagTerms">
52 <td style="padding: 0 12px 6px 0;">
53 <input class="tag-input outline" v-on:input="tagChange" type="text" v-model="search.tagTerms[i]"></td>
55 <button type="button" class="text-neg text-button" v-on:click="removeTag(i)">
62 <button type="button" class="text-button" v-on:click="addTag">
63 @icon('add-circle'){{ trans('common.add') }}
70 <h6 class="text-muted">Options</h6>
71 <label class="checkbox">
72 <input type="checkbox" v-on:change="optionChange('viewed_by_me')"
73 v-model="search.option.viewed_by_me" value="page">
74 {{ trans('entities.search_viewed_by_me') }}
76 <label class="checkbox">
77 <input type="checkbox" v-on:change="optionChange('not_viewed_by_me')"
78 v-model="search.option.not_viewed_by_me" value="page">
79 {{ trans('entities.search_not_viewed_by_me') }}
81 <label class="checkbox">
82 <input type="checkbox" v-on:change="optionChange('is_restricted')"
83 v-model="search.option.is_restricted" value="page">
84 {{ trans('entities.search_permissions_set') }}
86 <label class="checkbox">
87 <input type="checkbox" v-on:change="optionChange('created_by:me')"
88 v-model="search.option['created_by:me']" value="page">
89 {{ trans('entities.search_created_by_me') }}
91 <label class="checkbox">
92 <input type="checkbox" v-on:change="optionChange('updated_by:me')"
93 v-model="search.option['updated_by:me']" value="page">
94 {{ trans('entities.search_updated_by_me') }}
98 <h6 class="text-muted">Date Options</h6>
99 <table cellpadding="0" cellspacing="0" border="0" class="no-style form-table">
101 <td width="200">{{ trans('entities.search_updated_after') }}</td>
103 <button type="button" class="text-button" v-if="!search.dates.updated_after"
104 v-on:click="enableDate('updated_after')">{{ trans('entities.search_set_date') }}</button>
108 <tr v-if="search.dates.updated_after">
110 <input v-if="search.dates.updated_after" class="tag-input"
111 v-on:input="dateChange('updated_after')" type="date" v-model="search.dates.updated_after"
112 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
115 <button v-if="search.dates.updated_after" type="button" class="text-neg text-button"
116 v-on:click="dateRemove('updated_after')">
122 <td>{{ trans('entities.search_updated_before') }}</td>
124 <button type="button" class="text-button" v-if="!search.dates.updated_before"
125 v-on:click="enableDate('updated_before')">{{ trans('entities.search_set_date') }}</button>
129 <tr v-if="search.dates.updated_before">
131 <input v-if="search.dates.updated_before" class="tag-input"
132 v-on:input="dateChange('updated_before')" type="date" v-model="search.dates.updated_before"
133 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
136 <button v-if="search.dates.updated_before" type="button" class="text-neg text-button"
137 v-on:click="dateRemove('updated_before')">
143 <td>{{ trans('entities.search_created_after') }}</td>
145 <button type="button" class="text-button" v-if="!search.dates.created_after"
146 v-on:click="enableDate('created_after')">{{ trans('entities.search_set_date') }}</button>
150 <tr v-if="search.dates.created_after">
152 <input v-if="search.dates.created_after" class="tag-input"
153 v-on:input="dateChange('created_after')" type="date" v-model="search.dates.created_after"
154 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
157 <button v-if="search.dates.created_after" type="button" class="text-neg text-button"
158 v-on:click="dateRemove('created_after')">
164 <td>{{ trans('entities.search_created_before') }}</td>
166 <button type="button" class="text-button" v-if="!search.dates.created_before"
167 v-on:click="enableDate('created_before')">{{ trans('entities.search_set_date') }}</button>
171 <tr v-if="search.dates.created_before">
173 <input v-if="search.dates.created_before" class="tag-input"
174 v-on:input="dateChange('created_before')" type="date" v-model="search.dates.created_before"
175 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
178 <button v-if="search.dates.created_before" type="button" class="text-neg text-button"
179 v-on:click="dateRemove('created_before')">
187 <button type="submit" class="button primary">{{ trans('entities.search_update') }}</button>
196 <div class="container small">
197 <input type="hidden" name="searchTerm" value="{{$searchTerm}}">
199 <h1>{{ trans('entities.search_results') }}</h1>
200 <h6 class="text-muted">{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}</h6>
201 @include('partials/entity-list', ['entities' => $entities])
203 <a href="{{ $nextPageLink }}" class="button">{{ trans('entities.search_more') }}</a>