tg-prepare 2.1.0b1__py3-none-any.whl → 2.1.0b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tg-prepare might be problematic. Click here for more details.
- {tg_prepare-2.1.0b1.dist-info → tg_prepare-2.1.0b2.dist-info}/METADATA +1 -1
- {tg_prepare-2.1.0b1.dist-info → tg_prepare-2.1.0b2.dist-info}/RECORD +31 -7
- tgp_ui/static/css/bootstrap.min.css.map +1 -0
- tgp_ui/static/img/favicon.ico +0 -0
- tgp_ui/static/img/textgrid-logo.svg +1 -0
- tgp_ui/templates/details/empty_container.html +16 -0
- tgp_ui/templates/details/manage_collection.html +205 -0
- tgp_ui/templates/includes/set_session_id_form.html +16 -0
- tgp_ui/templates/includes/upload_form.html +131 -0
- tgp_ui/templates/modal/delete_project.html +25 -0
- tgp_ui/templates/modal/empty_container.html +9 -0
- tgp_ui/templates/modal/file_explorer_content.html +34 -0
- tgp_ui/templates/modal/file_explorer_main.html +22 -0
- tgp_ui/templates/modal/file_explorer_nextcloud.html +27 -0
- tgp_ui/templates/modal/github_modal.html +29 -0
- tgp_ui/templates/modal/nextcloud_login.html +48 -0
- tgp_ui/templates/modal/tei_explorer.html +58 -0
- tgp_ui/templates/modal/xpath_parser.html +52 -0
- tgp_ui/templates/tabs/check_result.html +90 -0
- tgp_ui/templates/tabs/edit_project.html +113 -0
- tgp_ui/templates/tabs/empty_container.html +12 -0
- tgp_ui/templates/tabs/import_data.html +138 -0
- tgp_ui/templates/tabs/manage_collections.html +88 -0
- tgp_ui/templates/tabs/select_directories.html +41 -0
- tgp_ui/templates/tabs/upload.html +42 -0
- tgp_ui/templates/tabs/validate_metadata.html +227 -0
- {tg_prepare-2.1.0b1.dist-info → tg_prepare-2.1.0b2.dist-info}/WHEEL +0 -0
- {tg_prepare-2.1.0b1.dist-info → tg_prepare-2.1.0b2.dist-info}/entry_points.txt +0 -0
- {tg_prepare-2.1.0b1.dist-info → tg_prepare-2.1.0b2.dist-info}/licenses/LICENSE +0 -0
- {tg_prepare-2.1.0b1.dist-info → tg_prepare-2.1.0b2.dist-info}/projects/.secret_key +0 -0
- {tg_prepare-2.1.0b1.dist-info → tg_prepare-2.1.0b2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<div class="container py-4">
|
|
2
|
+
<div class="row">
|
|
3
|
+
<!-- Form Title -->
|
|
4
|
+
<div class="col-12 text-center mb-4">
|
|
5
|
+
<h1 class="fs-3 fw-bold">Collection(s) - Select Data</h1>
|
|
6
|
+
<p class="text-muted">Choose folders containing TEI/XML documents.</p>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<form class="js-tab-submit" method="POST"
|
|
10
|
+
action="{{ url_for('collection.tab_select_directories', projectname=project.path) }}"
|
|
11
|
+
data-next-target="#tab-set-collections">
|
|
12
|
+
<div class="row">
|
|
13
|
+
{% for folder in project.get_selectable_folders() %}
|
|
14
|
+
<div class="col-md-4 mb-3">
|
|
15
|
+
<div class="card {{ 'border-primary' if folder.path
|
|
16
|
+
in selected_directories else 'border-secondary' }}">
|
|
17
|
+
<div class="card-body">
|
|
18
|
+
<h5 class="card-title">{{ folder.name }}</h5>
|
|
19
|
+
<p class="card-text text-muted">{{ folder.relative_path }}</p>
|
|
20
|
+
<div class="form-check">
|
|
21
|
+
<input class="form-check-input" type="checkbox" name="selected_folder"
|
|
22
|
+
value="{{ folder.path }}" id="folder-{{ loop.index }}" {{ 'checked' if folder.path
|
|
23
|
+
in selected_directories else '' }}>
|
|
24
|
+
<label class="form-check-label" for="folder-{{ loop.index }}">
|
|
25
|
+
Select this folder
|
|
26
|
+
</label>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
{% endfor %}
|
|
32
|
+
</div>
|
|
33
|
+
<div class="mt-4 text-end">
|
|
34
|
+
<button type="submit" class="btn btn-primary">
|
|
35
|
+
<i class="bi bi-chevron-right"></i>
|
|
36
|
+
<span>Next</span>
|
|
37
|
+
</button>
|
|
38
|
+
</div>
|
|
39
|
+
</form>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<div class="container py-4">
|
|
3
|
+
<div class="row">
|
|
4
|
+
<!-- Page Title -->
|
|
5
|
+
<div class="col-12 text-center mb-4">
|
|
6
|
+
<h1 class="fs-3 fw-bold">Upload Project</h1>
|
|
7
|
+
</div>
|
|
8
|
+
<!-- Instanzauswahl -->
|
|
9
|
+
<div class="col-12 mb-4">
|
|
10
|
+
<h4 class="text-center mb-3">Choose the instance:</h4>
|
|
11
|
+
<ul class="nav nav-tabs justify-content-center" id="instanceTabs" role="tablist">
|
|
12
|
+
<li class="nav-item" role="presentation">
|
|
13
|
+
<button class="nav-link active" id="test-tab" data-bs-toggle="tab" data-bs-target="#test-pane"
|
|
14
|
+
type="button" role="tab" aria-controls="test-pane" aria-selected="true">
|
|
15
|
+
Test
|
|
16
|
+
</button>
|
|
17
|
+
</li>
|
|
18
|
+
<li class="nav-item" role="presentation">
|
|
19
|
+
<button class="nav-link" id="prod-tab" data-bs-toggle="tab" data-bs-target="#prod-pane"
|
|
20
|
+
type="button" role="tab" aria-controls="prod-pane" aria-selected="false">
|
|
21
|
+
Live
|
|
22
|
+
</button>
|
|
23
|
+
</li>
|
|
24
|
+
</ul>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- Tab-Inhalte -->
|
|
28
|
+
<div class="tab-content">
|
|
29
|
+
<!-- Testinstanz -->
|
|
30
|
+
<div class="tab-pane fade show active" id="test-pane" role="tabpanel" aria-labelledby="test-tab">
|
|
31
|
+
{% set instance='test' %}
|
|
32
|
+
{% include 'includes/upload_form.html' %}
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- Produktionsinstanz -->
|
|
36
|
+
<div class="tab-pane fade" id="prod-pane" role="tabpanel" aria-labelledby="prod-tab">
|
|
37
|
+
{% set instance='live' %}
|
|
38
|
+
{% include 'includes/upload_form.html' %}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<div class="container py-4">
|
|
3
|
+
<!-- Form Title -->
|
|
4
|
+
<div class="col-12 text-center mb-4">
|
|
5
|
+
<h1 class="fs-3 fw-bold">Validation</h1>
|
|
6
|
+
<strong>Last validation run:</strong> {{ validation_results.last_run }}
|
|
7
|
+
</div>
|
|
8
|
+
<!-- Refresh Button -->
|
|
9
|
+
<div class="row mb-4">
|
|
10
|
+
<div class="col-12 text-center">
|
|
11
|
+
<form class="d-inline-block js-tab-submit"
|
|
12
|
+
action="{{ url_for('collection.tab_validate_metadata', projectname=projectname, refresh=True) }}"
|
|
13
|
+
method="GET">
|
|
14
|
+
<button type="submit" class="btn btn-lg btn-primary d-flex align-items-center justify-content-center">
|
|
15
|
+
<i class="bi bi-arrow-clockwise me-2"></i> Refresh Validation
|
|
16
|
+
</button>
|
|
17
|
+
</form>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
{% set is_ready = validation_results.ready_for_publication %}
|
|
22
|
+
|
|
23
|
+
<!-- Validation Results -->
|
|
24
|
+
<div class="row">
|
|
25
|
+
<!-- General Validation Results -->
|
|
26
|
+
<div class="col-md-6 mb-4 mb-lg-0">
|
|
27
|
+
<div class="bg-light rounded px-2 h-100">
|
|
28
|
+
<h2 class="fs-4 mb-3">Project Validation</h2>
|
|
29
|
+
<ul class="list-group">
|
|
30
|
+
<!-- OK Results -->
|
|
31
|
+
{% for message in validation_results.project.ok %}
|
|
32
|
+
<li class="list-group-item d-flex align-items-center">
|
|
33
|
+
<i class="bi bi-check-circle-fill text-success me-2"></i>
|
|
34
|
+
{{ message }}
|
|
35
|
+
</li>
|
|
36
|
+
{% endfor %}
|
|
37
|
+
|
|
38
|
+
<!-- Warnings -->
|
|
39
|
+
{% for message in validation_results.project.warning %}
|
|
40
|
+
<li class="list-group-item d-flex align-items-center">
|
|
41
|
+
<i class="bi bi-exclamation-triangle-fill text-warning me-2"></i>
|
|
42
|
+
{{ message }}
|
|
43
|
+
</li>
|
|
44
|
+
{% endfor %}
|
|
45
|
+
|
|
46
|
+
<!-- Errors -->
|
|
47
|
+
{% for message in validation_results.project.error %}
|
|
48
|
+
<li class="list-group-item d-flex align-items-center">
|
|
49
|
+
<i class="bi bi-x-circle-fill text-danger me-2"></i>
|
|
50
|
+
{{ message }}
|
|
51
|
+
</li>
|
|
52
|
+
{% endfor %}
|
|
53
|
+
</ul>
|
|
54
|
+
<div class="d-flex justify-content-end mt-3">
|
|
55
|
+
<button type="button" class="btn btn-sm btn-primary btn-next" data-next-target="#tab-edit-project"
|
|
56
|
+
data-additional-button="#tab-group-project">
|
|
57
|
+
<i class="bi bi-chevron-right"></i> Go To Project Settings
|
|
58
|
+
</button>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="col-md-6 mb-4 mb-lg-0">
|
|
63
|
+
<div class="bg-light rounded px-2 h-100 d-flex flex-column align-items-center justify-content-center">
|
|
64
|
+
<h2 class="fs-4 mb-4">Overall Status</h2>
|
|
65
|
+
|
|
66
|
+
<div class="d-flex flex-column align-items-center">
|
|
67
|
+
|
|
68
|
+
{% if is_ready %}
|
|
69
|
+
<div class="text-center mb-4">
|
|
70
|
+
<img src="{{ url_for('static', filename='img/owl_super.png') }}" alt="Ready for publication"
|
|
71
|
+
height="120">
|
|
72
|
+
</div>
|
|
73
|
+
<button class="badge bg-success p-3 mb-3 border-0 btn-next" style="font-size: 1.25rem;"
|
|
74
|
+
data-next-target="#tab-prepare-upload" data-additional-button="#tab-group-upload">
|
|
75
|
+
<i class="bi bi-check-circle-fill me-2"></i>
|
|
76
|
+
Ready for Upload & Publication
|
|
77
|
+
</button>
|
|
78
|
+
<div class="alert alert-success mt-4">
|
|
79
|
+
<i class="bi bi-check-circle-fill me-2"></i>
|
|
80
|
+
<strong>All requirements fulfilled!</strong> Your project is ready for upload & publication.
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
{% if validation_results.project.warning %}
|
|
84
|
+
<div class="alert alert-warning">
|
|
85
|
+
<i class="bi bi-exclamation-triangle-fill me-2"></i>
|
|
86
|
+
Some <strong>Warnings</strong> still occur, but they do not prevent upload & publication.
|
|
87
|
+
</div>
|
|
88
|
+
{% endif %}
|
|
89
|
+
|
|
90
|
+
{% else %}
|
|
91
|
+
<div class="text-center mb-4">
|
|
92
|
+
<img src="{{ url_for('static', filename='img/owl_book.png') }}" alt="Not ready for publication"
|
|
93
|
+
height="120">
|
|
94
|
+
</div>
|
|
95
|
+
<div class="badge bg-danger p-3 mb-3" style="font-size: 1.25rem;">
|
|
96
|
+
<i class="bi bi-x-circle-fill me-2"></i>
|
|
97
|
+
Not Ready for Publication
|
|
98
|
+
</div>
|
|
99
|
+
<div class="alert alert-warning mt-4">
|
|
100
|
+
<i class="bi bi-exclamation-triangle-fill me-2"></i>
|
|
101
|
+
<strong>Required actions:</strong> Please fix the validation errors before proceeding to
|
|
102
|
+
publication.
|
|
103
|
+
</div>
|
|
104
|
+
{% endif %}
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<!-- Subproject Validation Results -->
|
|
110
|
+
<div class="col-12">
|
|
111
|
+
<div class="bg-light rounded p-1 h-100">
|
|
112
|
+
<h2 class="fs-4 mb-2">Validation of Collection{{ 's' if len(subprojects) > 1 else '' }}</h2>
|
|
113
|
+
|
|
114
|
+
<!-- Accordion for Subproject Details -->
|
|
115
|
+
<div class="accordion" id="subprojectAccordion">
|
|
116
|
+
{% for subproject in validation_results.subprojects %}
|
|
117
|
+
<div class="card mb-3">
|
|
118
|
+
<!-- Card Header -->
|
|
119
|
+
<div class="card-header d-flex justify-content-between align-items-center"
|
|
120
|
+
id="heading-{{ loop.index }}">
|
|
121
|
+
<h5 class="mb-0">
|
|
122
|
+
<button class="btn btn-link text-decoration-none" type="button"
|
|
123
|
+
data-bs-toggle="collapse" data-bs-target="#collapse-{{ loop.index }}"
|
|
124
|
+
aria-expanded="true" aria-controls="collapse-{{ loop.index }}">
|
|
125
|
+
{{ subproject.title }}
|
|
126
|
+
</button>
|
|
127
|
+
</h5>
|
|
128
|
+
<div class="d-flex align-items-center">
|
|
129
|
+
<!-- CSV Export Button -->
|
|
130
|
+
<a href="{{ url_for('collection.export_tsv', projectname=projectname, collectionname=subproject.title) }}"
|
|
131
|
+
class="btn btn-sm btn-outline-secondary me-3"
|
|
132
|
+
title="Export validation results as CSV">
|
|
133
|
+
<i class="bi bi-filetype-csv me-1"></i> Export TSV
|
|
134
|
+
</a>
|
|
135
|
+
|
|
136
|
+
<!-- Statistics -->
|
|
137
|
+
{% set stats = subproject.stats %}
|
|
138
|
+
<div>
|
|
139
|
+
<span
|
|
140
|
+
class="badge bg-{{'success' if stats['success'] else 'secondary'}} me-2">Success:
|
|
141
|
+
{{ stats['success'] }}
|
|
142
|
+
</span>
|
|
143
|
+
<span class="badge bg-{{'danger' if stats['error'] else 'secondary'}}">Failed:
|
|
144
|
+
{{ stats['error'] }}
|
|
145
|
+
</span>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<!-- Card Body -->
|
|
151
|
+
<div id="collapse-{{ loop.index }}" class="collapse" aria-labelledby="heading-{{ loop.index }}"
|
|
152
|
+
data-bs-parent="#subprojectAccordion">
|
|
153
|
+
<div class="card-body">
|
|
154
|
+
<table class="table table-bordered table-hover">
|
|
155
|
+
<thead class="table-light">
|
|
156
|
+
<tr>
|
|
157
|
+
<th>File</th>
|
|
158
|
+
<th>Status</th>
|
|
159
|
+
<th>Details</th>
|
|
160
|
+
</tr>
|
|
161
|
+
</thead>
|
|
162
|
+
<tbody>
|
|
163
|
+
{% for file, errors in subproject.files.items() %}
|
|
164
|
+
<tr>
|
|
165
|
+
<!-- File Name -->
|
|
166
|
+
<td>{{ file }}</td>
|
|
167
|
+
|
|
168
|
+
<!-- Validation Status -->
|
|
169
|
+
<td>
|
|
170
|
+
{% if len(errors) == 0 %}
|
|
171
|
+
<span class="badge bg-success">Success</span>
|
|
172
|
+
{% else %}
|
|
173
|
+
<span class="badge bg-danger">Failed</span>
|
|
174
|
+
{% endif %}
|
|
175
|
+
</td>
|
|
176
|
+
|
|
177
|
+
<!-- Validation Details -->
|
|
178
|
+
<td>
|
|
179
|
+
{% if len(errors) > 0 %}
|
|
180
|
+
{% set file_stripped = file.split('.')[0] %}
|
|
181
|
+
<button class="btn btn-sm btn-outline-danger" type="button"
|
|
182
|
+
data-bs-toggle="collapse"
|
|
183
|
+
data-bs-target="#errors-{{ loop.index }}-{{ file_stripped }}"
|
|
184
|
+
aria-expanded="false"
|
|
185
|
+
aria-controls="errors-{{ loop.index }}-{{ file_stripped }}">
|
|
186
|
+
View Errors
|
|
187
|
+
</button>
|
|
188
|
+
<div class="collapse mt-2"
|
|
189
|
+
id="errors-{{ loop.index }}-{{ file_stripped }}">
|
|
190
|
+
<ul class="list-unstyled mb-0">
|
|
191
|
+
{% for error in errors %}
|
|
192
|
+
<li class="text-danger">
|
|
193
|
+
<i class="bi bi-x-circle-fill me-1"></i>{{ error }}
|
|
194
|
+
</li>
|
|
195
|
+
{% endfor %}
|
|
196
|
+
</ul>
|
|
197
|
+
</div>
|
|
198
|
+
{% else %}
|
|
199
|
+
<span class="text-muted">No errors</span>
|
|
200
|
+
{% endif %}
|
|
201
|
+
</td>
|
|
202
|
+
</tr>
|
|
203
|
+
{% endfor %}
|
|
204
|
+
</tbody>
|
|
205
|
+
</table>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
{% endfor %}
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="row">
|
|
215
|
+
<div class="col-12 d-flex justify-content-between">
|
|
216
|
+
<button type="button" class="btn btn-primary btn-next" data-next-target="#tab-set-collections">
|
|
217
|
+
<i class="bi bi-chevron-left"></i> Back
|
|
218
|
+
</button>
|
|
219
|
+
{% if is_ready %}
|
|
220
|
+
<button type="button" class="btn btn-primary btn-next" data-next-target="#tab-prepare-upload"
|
|
221
|
+
data-additional-button="#tab-group-upload">
|
|
222
|
+
Next <i class="bi bi-chevron-right"></i>
|
|
223
|
+
</button>
|
|
224
|
+
{% endif %}
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|