Hide search results from external datasources
This commit is contained in:
parent
4b7de93c90
commit
277c0c4bfe
|
@ -3,30 +3,60 @@
|
||||||
<div class="block columns">
|
<div class="block columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title">Matching Books</h2>
|
<h2 class="title">Matching Books</h2>
|
||||||
{% for result_set in book_results %}
|
<section class="block">
|
||||||
|
<ul>
|
||||||
|
{% with book_results|first as result_set %}
|
||||||
|
{% for result in result_set.results %}
|
||||||
|
<li class="pd-4">
|
||||||
|
<a href="{{ result.key }}">{% include 'snippets/search_result_text.html' with result=result link=True %}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
{% endwith %}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="block">
|
||||||
|
<p>
|
||||||
|
Didn't find what you were looking for?
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<input class="toggle-control" type="radio" name="more-results" id="fewer-results" checked>
|
||||||
|
<div class="toggle-content hidden">
|
||||||
|
<label class="button is-small" for="more-results">Show results from other catalogues</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input class="toggle-control" type="radio" name="more-results" id="more-results" {% if booo_results|first|length == 0 %}checked{% endif %}>
|
||||||
|
<div class="toggle-content hidden">
|
||||||
|
{% for result_set in book_results|slice:"1:" %}
|
||||||
{% if result_set.results %}
|
{% if result_set.results %}
|
||||||
<section>
|
<section class="block">
|
||||||
{% if not result_set.connector.local %}
|
{% if not result_set.connector.local %}
|
||||||
<h3>
|
<h3 class="title is-5">
|
||||||
Results from <a href="{{ result_set.connector.base_url }}" target="_blank">{% if result_set.connector.name %}{{ result_set.connector.name }}{% else %}{{ result_set.connector.identifier }}{% endif %}</a>
|
Results from <a href="{{ result_set.connector.base_url }}" target="_blank">{% if result_set.connector.name %}{{ result_set.connector.name }}{% else %}{{ result_set.connector.identifier }}{% endif %}</a>
|
||||||
</h3>
|
</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<ul>
|
||||||
{% for result in result_set.results %}
|
{% for result in result_set.results %}
|
||||||
<div>
|
<li class="pb-4">
|
||||||
<form action="/resolve_book" method="POST">
|
<form action="/resolve_book" method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="remote_id" value="{{ result.key }}">
|
<input type="hidden" name="remote_id" value="{{ result.key }}">
|
||||||
<button type="submit">{{ result.title }} by {{ result.author }} ({{ result.year }})</button>
|
<div>{% include 'snippets/search_result_text.html' with result=result link=False %}</div>
|
||||||
|
<button type="submit" class="button is-small is-link is-light">Import book</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if not book_results %}
|
{% if not book_results %}
|
||||||
<p>No books found for "{{ query }}"</p>
|
<p>No books found for "{{ query }}"</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<label class="button is-small" for="fewer-results">Hide results from other catalogues</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2 class="title">Matching Users</h2>
|
<h2 class="title">Matching Users</h2>
|
||||||
|
|
Loading…
Reference in New Issue