Added detailed examples endpoint and modified results.

This commit is contained in:
2024-12-26 15:30:00 +01:00
parent fb3acbda78
commit e6b57ce789
5 changed files with 253 additions and 24 deletions

View File

@@ -25,6 +25,29 @@
</form>
</div>
</div>
<div class="visualization-table">
<table style="border: none;">
<thead>
<tr>
<th>{{ _('Visualization') }}</th>
</tr>
</thead>
<tbody>
<tr >
<td ><div class="visualization"></div></td>
</tr>
</tbody>
</table>
<table style="border: none;">
<tbody>
<tr >
<td width="50%"><div class="grew-link"></div></td>
<td style="border-left: none;"><div class="other-examples"></div></td>
</tr>
</tbody>
</table>
</div>
<br/>
<div class="table-wrapper">
<table>
<thead>
@@ -38,9 +61,9 @@
</thead>
<tbody>
{% for i in range(content['Tree']|length) %}
<tr data-exid="{{content['example_id'][i]}}" data-expositions="{{content['example_positions'][i]}}" class="tr-link" data-toggle="tooltip" title="See an example" data-href={% if 'Grew-match URL' in content %}{{ content['Grew-match URL'][i] }}{% else %}unknown{% endif %}>
<tr data-other-examples-text="{{_('Other examples')}}" data-grew-link-text="{{_('GREW link')}}" data-exid="{{content['example_id'][i]}}" data-expositions="{{content['example_positions'][i]}}" data-subtree-hash="{{content['subtree_hash'][i]}}" class="tr-link" data-toggle="tooltip" title="See an example" data-href={% if 'Grew-match URL' in content %}{{ content['Grew-match URL'][i] }}{% else %}unknown{% endif %}>
{% for col in content %}
{% if not (col == 'Grew-match URL' or col == 'example_id' or col == 'example_positions') %}
{% if not (col == 'Grew-match URL' or col == 'example_id' or col == 'example_positions' or col == 'subtree_hash') %}
<td>{{ content[col][i] }}</td>
{% endif %}
{% endfor %}
@@ -49,23 +72,6 @@
</tbody>
</table>
</div>
<br/>
<div class="visualization-table">
<table style="border: none;">
<thead>
<tr>
<th width="80%">Visualization</th>
<th>Grew</th>
</tr>
</thead>
<tbody>
<tr >
<td style="border-right: none"><div class="visualization"></div></td>
<td style="border-left: none;"><div class="grew-link"></div></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>