-
Notifications
You must be signed in to change notification settings - Fork 137
/
search.htm
146 lines (120 loc) · 6.74 KB
/
search.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!--
ARCHES - a program developed to inventory and manage immovable cultural heritage.
Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
{% extends "base-manager.htm" %}
{% load i18n %}
{% load template_tags %}
{% load staticfiles %}
{% block title %} {{ block.super }} {% trans "Search" %} {% endblock title %}
{% block main_content %}
<div class="content-panel flexrow" data-bind="click:function() { menuActive(false); }, visible: true", style="display:none;">
<div class="flex search-results-panel">
<div class="search-attribute-widget">
<div class="search-dropdown" data-bind="component: {
name: 'term-filter',
params: sharedStateObject
}"></div>
<!-- Inline Filters (for QA and Resource Type) -->
<div class="search-inline-filters">
<div class="resource-filter" data-bind="component: {
name: 'resource-type-filter',
params: sharedStateObject
}"></div>
<!--ko if: sharedStateObject.userIsReviewer-->
<div class="qa-filter" data-bind="component: {
name: 'provisional-filter',
params: sharedStateObject
}"></div>
<!--/ko-->
</div>
</div>
<div class="search-control-container" data-bind="css: { 'slide': !sharedStateObject.resultsExpanded() }">
<!-- Title Block -->
<div class="search-count-container">
<h3 class="search-title" data-bind="text: '{% trans 'Results: ' %}' + total()"></h3>
<!--ko if: sharedStateObject.filterApplied() -->
<button class="btn-sm btn btn-mint btn-labeled" style="padding: 2px 9px;" data-bind="click: function() {sharedStateObject.clearQuery();}">{% trans "Clear Filters" %}</button>
<!--/ko-->
</div>
<div class="search-results-container">
<div data-bind="component: {
name: 'search-results',
params: sharedStateObject
}"></div>
<div class="margin-bottom-30"></div>
<div data-bind="component: {
name: 'paging-filter',
params: sharedStateObject
}"></div>
</div>
</div>
</div>
<div class="flex" style="flex-direction: column">
<!-- Title Block -->
<div class="search-toolbar" style="">
<div class="search-type-btn-panel" data-bind="foreach: {data: sharedStateObject.filtersList, as: 'filter'}">
<!-- ko if: filter.type === 'filter' && filter.enabled -->
{% if user|can_read_resource_instance %}
<button class="search-type-btn relative" style="" data-bind="css: {'active': $parent.sharedStateObject.selectedTab() === filter.componentname}, click: function(){$parent.sharedStateObject.selectedTab(filter.componentname)}">
<i data-bind="css: filter.icon"></i>
<span data-bind="text: filter.name"></span>
</button>
{% endif %}
<!-- /ko -->
</div>
<div class="search-type-btn-popup-panel">
<div class="popup-panel-row" data-bind="foreach: {data: sharedStateObject.filtersList, as: 'filter'}">
<!-- ko if: filter.type === 'popup' && filter.enabled -->
{% if user|can_read_resource_instance %}
<button class="saved-search-container search-type-btn-popup relative" style="" data-bind="css: {'active': $parent.sharedStateObject.selectedPopup() === filter.componentname}, click: function(){$parent.sharedStateObject.selectPopup(filter.componentname); setTimeout(function() {$(window).trigger('resize');}, 100);}">
<i data-bind="css: filter.icon"></i>
<!-- <p data-bind="text: filter.name"></p> -->
</button>
{% endif %}
<!-- /ko -->
</div>
</div>
</div>
<div class="flex">
<!-- Card Container -->
<div class="card-form-preview-container relative">
<div class="tab-content relative" data-bind="foreach: {data: sharedStateObject.filtersList, as: 'filter'}">
<!-- ko if: filter.type === 'filter' && filter.enabled -->
<div class="tab-pane" data-bind="css: {'active': $parent.sharedStateObject.selectedTab() === filter.componentname}">
<div style="height: calc(100vh - 100px)" data-bind="component: {
name: filter.componentname,
params: $parent.sharedStateObject
}"></div>
</div>
<!-- /ko -->
</div>
<div class="tab-content search-popup-panel" data-bind="foreach: {data: sharedStateObject.filtersList, as: 'filter'}, visible: sharedStateObject.selectedPopup() !== ''">
<!-- ko if: filter.type === 'popup' && filter.enabled -->
<div class="tab-pane" data-bind="css: {'active': $parent.sharedStateObject.selectedPopup() === filter.componentname}">
<div data-bind="component: {
name: filter.componentname,
params: $parent.sharedStateObject
}"></div>
</div>
<!-- /ko -->
</div>
</div>
</div>
</div>
</div>
{% endblock main_content %}
{% block tabs %}{% endblock tabs %}
{% block pre_require_js %}
{{block.super}}
{% endblock pre_require_js %}