mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
Default to old search results view for advanced search
Use old results view if matchType or filter params are present in query string.
This commit is contained in:
parent
2ad7eaee4b
commit
373eca641c
1086
pywb/static/query.js
Normal file
1086
pywb/static/query.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,9 +7,19 @@
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
|
||||
{% if "filter=" in env['QUERY_STRING'] or "matchType=" in env['QUERY_STRING'] %}
|
||||
|
||||
<link rel="stylesheet" href="{{ static_prefix }}/css/query.css">
|
||||
<script src="{{ static_prefix }}/js/url-polyfill.min.js"></script>
|
||||
<script src="{{ static_prefix }}/query.js"></script>
|
||||
|
||||
{% else %}
|
||||
|
||||
<script src="{{ static_prefix }}/loading-spinner/loading-spinner.js"></script>
|
||||
<script src="{{ static_prefix }}/vue/vueui.js"></script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% include 'vue_loc.html' %}
|
||||
|
||||
{% endblock %}
|
||||
@ -17,8 +27,17 @@
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div id="app" style="width: 100%; height: 100%"></div>
|
||||
{% if "filter=" in env['QUERY_STRING'] or "matchType=" in env['QUERY_STRING'] %}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center">
|
||||
<h4 class="display-4 text-center text-sm-left p-0">{{ _('Search Results') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center text-center text-sm-left mt-1" id="display-query-type-info"></div>
|
||||
</div>
|
||||
<div class="container mt-3 q-display" id="captures"></div>
|
||||
<script>
|
||||
var text = {
|
||||
months: {
|
||||
@ -52,9 +71,19 @@
|
||||
},
|
||||
};
|
||||
|
||||
VueUI.main("{{ static_prefix }}", "{{ url }}", "{{ prefix }}", undefined, "{{ ui.logo }}", "{{ ui.navbar_background_hex | default('f8f9fa') }}", "{{ ui.navbar_color_hex | default('212529') }}", "{{ ui.navbar_light_buttons }}", "{{ env.pywb_lang | default('en') }}",
|
||||
allLocales, i18nStrings);
|
||||
|
||||
var renderCal = new RenderCalendar({ prefix: "{{ prefix }}", staticPrefix: "{{ static_prefix }}", text: text });
|
||||
renderCal.init();
|
||||
</script>
|
||||
|
||||
{% else %}
|
||||
|
||||
<div id="app" style="width: 100%; height: 100%"></div>
|
||||
|
||||
<script>
|
||||
VueUI.main("{{ static_prefix }}", "{{ url }}", "{{ prefix }}", undefined, "{{ ui.logo }}", "{{ ui.navbar_background_hex | default('f8f9fa') }}", "{{ ui.navbar_color_hex | default('212529') }}", "{{ ui.navbar_light_buttons }}", "{{ env.pywb_lang | default('en') }}",
|
||||
allLocales, i18nStrings);
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user