Added detailed examples endpoint and modified results.
This commit is contained in:
76
templates/examples.html
Normal file
76
templates/examples.html
Normal file
@@ -0,0 +1,76 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block custom_css %}
|
||||
<link rel="stylesheet" href="/stark/static/css/test/style-vis.css"/>
|
||||
<link rel="stylesheet" href="/stark/static/css/test/turkunlp.css"/>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="container wider-container">
|
||||
<br>
|
||||
|
||||
|
||||
<!-- Your table with many columns -->
|
||||
<h6>{{ _('Examples') }}</h6>
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="table-wrapper2">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{% for h, h_t in head %}
|
||||
{% if not h == 'Grew-match URL' %}
|
||||
<th><span>{{ h_t }} </span></th>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in range(content['Tree']|length) %}
|
||||
<tr 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') %}
|
||||
<td>{{ content[col][i] }}</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="visualization-table">
|
||||
<table style="border: none;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ _('Examples') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in range(visualization['example_id']|length) %}
|
||||
<tr style="border-bottom: none;">
|
||||
<td >ID: {{visualization['example_id'][i]}}</td>
|
||||
</tr>
|
||||
<tr style="border-top: none;">
|
||||
<td ><div class="visualization" data-example-positions="{{visualization['example_positions'][i]}}" data-example-id="{{visualization['example_id'][i]}}"></div></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block custom_js %}
|
||||
<script src="/stark/static/js/annodoc/head.min.js"></script>
|
||||
<script src="/stark/static/js/annodoc/annodoc.js"></script>
|
||||
<script src="/stark/static/js/examples.js"></script>
|
||||
{% endblock %}
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user