forked from CollaboraOnline/online
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.html
70 lines (68 loc) · 3.05 KB
/
Main.html
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
<!DOCTYPE html>
<html lang="en" ng-app="SearchApp">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search - Proof of Concept</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-resource.min.js"></script>
<script src="Main.js"></script>
</head>
<body ng-controller="SearchMainController">
<div class="container">
<div class="row">
<div class="col">
<form class="row g-1 justify-content-md-center">
<div class="col-sm-6">
<input class="form-control" type="text" ng-model="searchString" placeholder="Search string..." >
</div>
<div class="col-auto">
<button type="button" ng-click="searchClicked()" ng-disabled="searchDisabled()" class="btn btn-primary mb-3">Search</button>
</div>
<div class="col-auto">
<button type="button" ng-click="reindexClicked()" class="btn btn-primary">Re-index Documents</button>
</div>
</form>
</div>
</div>
<div class="row" ng-show="searchResult.length > 0">
<div class="col"><b>Search Result</b></div>
<table class="table table-vcenter table-striped table-hover table-bordered">
<thead>
<tr>
<th class="col-xs-6">Filename</th>
<th class="col-xs-6">Image</th>
</tr>
</thead>
<tbody>
<tr>
<tr class="table-repeat" ng-repeat="result in searchResult">
<td><a href="{{result.href}}">{{result.filename}}</td>
<td><img data-ng-src="data:image/png;base64,{{result.image}}"/></td>
</tr>
</tbody>
</table>
<button type="button" ng-click="clearSearchResults()" class="btn btn-primary">Clear</button>
</div>
<div class="row" ng-show="searchResult.length == 0">
<table class="table table-vcenter table-striped table-hover table-bordered">
<thead>
<tr>
<th class="col-xs-6">Filename</th>
</tr>
</thead>
<tbody>
<tr>
<tr class="table-repeat" ng-repeat="document in documents">
<td><a href="{{document.href}}">{{document.name}}</a></td>
</tr>
</tbody>
</table>
</div>
<div class="row">
<p>Status: {{status}}</p>
</div>
</div>
</body>
</html>