aswi2021mr-proper-gitlab/application/view/searchContent.php @ 9a7b1f4c
1 |
<div class="search-filters container"> |
---|---|
2 |
<div class="row"> |
3 |
<div class="mr-3"> |
4 |
<label for="lemma" class="mr-2">Lemma</label> |
5 |
<input type="text" id="lemma"> |
6 |
</div>
|
7 |
<div class="mr-3"> |
8 |
<label for="wordshape" class="mr-2">Tvar slova</label> |
9 |
<input type="text" id="wordshape"> |
10 |
</div>
|
11 |
<div class="mr-3"> |
12 |
<label for="wordclass" class="mr-2">Slovní druh</label> |
13 |
<select id="wordclass"> |
14 |
<option>Substantivum</option> |
15 |
<option>Adjektivum</option> |
16 |
<option>Pronominum</option> |
17 |
<option>Numeralium</option> |
18 |
<option>Verbum</option> |
19 |
<option>Adverbium</option> |
20 |
<option>Prepozice</option> |
21 |
<option>konjunkce</option> |
22 |
<option>Partikule</option> |
23 |
<option>Interjekce</option> |
24 |
</select>
|
25 |
</div>
|
26 |
<div class="mr-3"> |
27 |
<label for="source" class="mr-2">Rukopisný pramen</label> |
28 |
<input type="text" id="source"> |
29 |
</div>
|
30 |
<div class="mr-3"> |
31 |
<label for="location" class="mr-2">Lokace</label> |
32 |
<input type="text" id="location"> |
33 |
</div>
|
34 |
</div>
|
35 |
</div>
|
36 |
|
37 |
<div class="search-results my-4"> |
38 |
<table class="table table-striped"> |
39 |
<thead>
|
40 |
<tr>
|
41 |
<th scope="col">Lemma</th> |
42 |
<th scope="col">Prefix</th> |
43 |
<th scope="col">Slovo</th> |
44 |
<th scope="col">Suffix</th> |
45 |
<th scope="col">Koncovka</th> |
46 |
<th scope="col"></th> |
47 |
</tr>
|
48 |
</thead>
|
49 |
<tbody id="search-table"> |
50 |
<script>
|
51 |
const data = [{"id":1,"context":"","date":"2013-08-22 00:00:00","description":"","description2":"","description3":"","ending":"e","finished":true,"namedentity":0,"position1":"45","position2":"19","positiondetail":"","prefix":"","suffix":"","word":"abaty\u0161e","lemma_id":1,"tag_id":1},{"id":2,"context":"","date":"2013-08-22 00:00:00","description":"","description2":"","description3":"","ending":"e","finished":true,"namedentity":0,"position1":"45","position2":"20","positiondetail":"","prefix":"","suffix":"","word":"abaty\u0161e","lemma_id":1,"tag_id":2},{"id":24,"context":"","date":"2013-05-29 00:00:00","description":"","description2":"\\N","description3":"\\N","ending":"","finished":true,"namedentity":1,"position1":"100","position2":"07","positiondetail":"","prefix":"","suffix":"","word":"Albrecht","lemma_id":7,"tag_id":8},{"id":3,"context":"","date":"2013-08-22 00:00:00","description":"","description2":"","description3":"","ending":"\u011b","finished":true,"namedentity":0,"position1":"45","position2":"19","positiondetail":"","prefix":"","suffix":"","word":"abaty\u0161\u011b","lemma_id":1,"tag_id":1},{"id":4,"context":"","date":"2013-05-27 00:00:00","description":"","description2":"","description3":"","ending":"a","finished":true,"namedentity":1,"position1":"96","position2":"15","positiondetail":"","prefix":"","suffix":"","word":"Adalfa","lemma_id":2,"tag_id":3},{"id":5,"context":"","date":"2013-05-27 00:00:00","description":"","description2":"\\N","description3":"\\N","ending":"a","finished":true,"namedentity":1,"position1":"96","position2":"15","positiondetail":"","prefix":"","suffix":"","word":"Adolfa","lemma_id":3,"tag_id":3},{"id":25,"context":"","date":"2013-05-28 00:00:00","description":"","description2":"","description3":"","ending":"a","finished":true,"namedentity":1,"position1":"99","position2":"04","positiondetail":"","prefix":"","suffix":"","word":"Albrechta","lemma_id":7,"tag_id":3},{"id":6,"context":"","date":"2013-05-31 00:00:00","description":"","description2":"\\N","description3":"\\N","ending":"\u011b","finished":true,"namedentity":1,"position1":"104","position2":"24","positiondetail":"","prefix":"","suffix":"\u00e9\u0159","word":"Ajn\u0161tejn\u00e9\u0159\u011b","lemma_id":4,"tag_id":3},{"id":7,"context":"","date":"2013-05-27 00:00:00","description":"","description2":"","description3":"","ending":"u","finished":true,"namedentity":0,"position1":"96","position2":"10","positiondetail":"","prefix":"","suffix":"\u00f3v","word":"Albertovu","lemma_id":5,"tag_id":4},{"id":38,"context":"z","date":"2013-03-28 00:00:00","description":"","description2":"\\N","description3":"\\N","ending":"a","finished":true,"namedentity":1,"position1":"39","position2":"05","positiondetail":"","prefix":"","suffix":"","word":"Aldenburka","lemma_id":12,"tag_id":7}] |
52 |
let result = ""; |
53 |
data.forEach((item) => { |
54 |
result += "<tr>"; |
55 |
result += "<td>" + item.lemma_id + "</td>"; |
56 |
result += "<td>" + item.prefix + "</td>"; |
57 |
result += "<td>" + item.word + "</td>"; |
58 |
result += "<td>" + item.suffix + "</td>"; |
59 |
result += "<td>" + item.ending + "</td>"; |
60 |
result += "<td class=\"action-td\">" + |
61 |
"<button class=\"btn\"><i class=\"fa fa-search\"></i></button>" + |
62 |
"</td>"; |
63 |
result += "</tr>"; |
64 |
});
|
65 |
document.getElementById("search-table").innerHTML = result; |
66 |
</script>
|
67 |
</tbody>
|
68 |
</table>
|
69 |
</div>
|
70 |
|
71 |
|