-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
205 lines (201 loc) · 12.5 KB
/
index.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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<?xml version="1.0" encoding="UTF-8"?>
<div data-template="templates:surround" data-template-with="templates/page.html" data-template-at="content">
<div data-template="templates:include" data-template-path="templates/menu.html"/>
<section class="sarit-banner" role="banner">
<div class="container">
<div class="row">
<div class="sarit-page-headline-wrapper col-md-12">
<h1>SARIT</h1><span>Search and Retrieval of Indic Texts</span>
</div>
</div>
</div>
</section>
<main class="container">
<div class="row">
<section class="col-md-3 col-md-push-9">
<div data-template="templates:include" data-template-path="templates/search-form.html"/>
<div class="panel panel-info" data-template="app:show-if-logged-in">
<div class="panel-heading">
<h3 class="panel-title">Upload</h3>
</div>
<div class="panel-body">
<p>Upload TEI XML or ODD files into the test document set. Click on the button below or
drag&drop files on it.
</p>
<span class="btn btn-success btn-block fileinput-button">
<i class="material-icons">file_upload</i>
<span>Select files...</span>
<input id="fileupload" type="file" name="files[]" multiple="multiple"/>
</span><!-- The global progress bar -->
<div id="progress" class="progress">
<div class="progress-bar progress-bar-success"/>
</div><!-- The container for the uploaded files -->
<table id="files-table" class="files table table-striped">
<thead>
<th>Uploaded Files</th>
</thead>
<tbody id="files"/>
</table>
</div>
</div>
</section>
<section class="col-md-9 col-md-pull-3">
<div class="panel panel-default list-works" data-template="app:list-works">
<div class="panel-heading">
<h3 class="panel-title"><span class="app:statistics"/></h3>
</div>
<div class="panel-body">
<div class="row">
<form action="" class="form-inline col-md-12">
<div class="form-group">
<select name="browse" class="form-control"
data-template="templates:form-control">
<option value="author">Author</option>
<option value="title">Title</option>
<option value="file">Filename</option>
</select>
</div>
<div class="form-group">
<span class="input-group">
<input type="text" name="filter" class="form-control typeahead-meta"
data-template="templates:form-control" autocomplete="off"
placeholder="filter by"/>
<span class="input-group-btn">
<button id="f-btn-search" type="submit" class="sarit-search-btn btn">
<span class="glyphicon glyphicon-search"/>
</button>
</span>
</span>
</div>
</form>
</div>
<div class="row">
<div class="col-md-6">
<ul class="pagination" data-template="app:paginate" data-template-per-page="20" data-template-max-pages="5" data-template-min-hits="21" data-template-key="all"/>
</div>
<div class="col-md-6">
<p class="pull-right">Browsing <span class="result-count text-success">
<span id="hit-count" data-template="app:hit-count" data-template-key="all"/> documents.</span>
</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table class="documents table">
<thead>
<tr>
<th/>
<th><a href="?order=title">Title</a></th>
<th><a href="?order=author">Author</a></th>
<th><a href="?order=lang">Script</a></th>
<th></th>
</tr>
</thead>
<tbody data-template="app:browse" data-template-per-page="20">
<tr>
<td>
<input type="checkbox" name="target-texts" data-template="app:checkbox"/>
</td>
<td>
<a href="" data-template="app:work-title"/>
</td>
<td>
<a href="" data-template="app:work-author"/>
</td>
<td class="work-type">
<a href="" data-template="app:work-lang"/>
</td>
<td>
<div class="btn-group toolbar">
<!-- TODO: uncomment and fix when PDFs are working -->
<!-- <div class="btn-group hidden-xs"> -->
<!-- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> -->
<!-- <i class="material-icons">print</i> -->
<!-- <span class="hidden-xs">PDF</span> -->
<!-- <span class="caret"/> -->
<!-- </button> -->
<!-- <ul class="dropdown-menu" role="menu"> -->
<!-- <li> -->
<!-- <a class="download-link" data-template="app:download-link" data-template-type="pdf" title="Download as PDF">PDF (FO Version)</a> -->
<!-- </li> -->
<!-- <li data-template="app:show-if-logged-in"> -->
<!-- <a target="_blank" data-template="app:download-link" data-template-type="pdf" data-template-source="true"> -->
<!-- FO Source -->
<!-- </a> -->
<!-- </li> -->
<!-- <li> -->
<!-- <a class="download-link" data-template="app:download-link" data-template-type="tex" title="Download as PDF">PDF (LaTeX Version)</a> -->
<!-- </li> -->
<!-- <li data-template="app:show-if-logged-in"> -->
<!-- <a target="_blank" data-template="app:download-link" data-template-type="tex" data-template-source="true"> -->
<!-- TeX Source -->
<!-- </a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- </div> -->
<a class="btn btn-default hidden-xs download-link" data-template="app:download-link" data-template-type="epub" title="Download as epub ebook">
<i class="material-icons">book</i>
</a>
<a class="btn btn-default" data-template="pages:xml-link" title="View TEI XML">
<i class="material-icons">code</i>
</a>
</div>
</td>
</tr>
<tr class="empty">Please login to upload some documents!</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-md-6">
<ul class="pagination" data-template="app:paginate"
data-template-per-page="20"
data-template-max-pages="5" data-template-min-hits="21"
data-template-key="all"/>
</div>
<div class="col-md-6">
<p class="pull-right">Browsing <span class="result-count text-success">
<span id="hit-count" data-template="app:hit-count" data-template-key="all"/> documents.</span>
</p>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
<script type="text/javascript" src="resources/scripts/jquery.ui.widget.js"/>
<script type="text/javascript" src="resources/scripts/jquery.iframe-transport.js"/>
<script type="text/javascript" src="resources/scripts/jquery.fileupload.js"/>
<script type="text/javascript">
$(function () {
'use strict';
function reloadDocTable() {
$("#documents").load("doc-table.html");
}
$('#fileupload').fileupload({
url: "modules/upload.xql",
dataType: 'json',
done: function (e, data) {
$.each(data.result.files, function (index, file) {
var tr = document.createElement("tr");
var td = document.createElement("td");
td.appendChild(document.createTextNode(file.name));
tr.appendChild(td);
$("#files").append(tr);
});
reloadDocTable();
},
progressall: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
$('#progress .progress-bar').css(
'width',
progress + '%'
);
}
}).prop('disabled', !$.support.fileInput)
.parent().addClass($.support.fileInput ? undefined : 'disabled');
});
</script>
</div>