forked from zedomel/dwca-gsheet-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MetadataEditor.html
executable file
·73 lines (68 loc) · 2.29 KB
/
MetadataEditor.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
<!DOCTYPE html>
<html>
<head>
<?!= include('Header'); ?>
<?!= include('MetadataEditorCSS'); ?>
<?!= include('MetadataEditorJS'); ?>
</head>
<body>
<?
var mappedSheets = getMappedSheets();
var coreSheet = null;
var rowTypes = [];
for(var i = 0; i < mappedSheets.length; i++){
if(mappedSheets[i].core) {
coreSheet = mappedSheets[i];
break;
}
}
if (mappedSheets.length > 1) {
rowTypes = getRowTypes();
}
?>
<div class="dwca-metadata">
<? if( mappedSheets.length > 1) { ?>
<div class="row">
<h5 class="col-12">Select Core Sheet</h5>
<div class="form-group form-inline col-12">
<label for="coreSheetIndex">Core sheet:</label>
<select class="form-control" id="coreSheetIndex">
<option value=""></option>
<? for(var i = 0; i < mappedSheets.length; i++) { ?>
<option value="<?= mappedSheets[i].index ?>" <? if(mappedSheets[i].core) { ?> selected <? } ?>><?= mappedSheets[i].name ?></option>
<? } ?>
</select>
</div>
</div>
<div class="row">
<h5 class="col-12">Row Types</h5>
<? for(var i = 0; i < mappedSheets.length; i++) { ?>
<div class="form-group form-inline col-12">
<label><?= mappedSheets[i].name ?>:</label>
<select class="form-control rowtype" id="<?= mappedSheets[i].index ?>">
<option value=""></option>
<? for(var j = 0; j < rowTypes.length; j++) { ?>
<option value="<?= rowTypes[j] ?>" <? if(mappedSheets[i].rowType == rowTypes[j] ) { ?> selected <? } ?>><?= rowTypes[j] ?></option>
<? } ?>
</select>
</div>
<? } ?>
</div>
<!-- <div class="relationship row">
<h5 class="col-12">Darwin Core Archive Schema</h5>
<div id="dwca-schema" class="row">
<div class="text-center loading" style="display: none;">
<div class="spinner-border" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
<div>Icons made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a></div>
</div> -->
<? } ?>
<div class="generate-dwca">
<button class="action" id="generate-dwca">Generate DwC-Archive</button>
</div>
</div>
</body>
</html>