diff --git a/src/ontology/src/resources/table.html b/src/ontology/src/resources/table.html new file mode 100644 index 0000000..7d3cc1e --- /dev/null +++ b/src/ontology/src/resources/table.html @@ -0,0 +1,364 @@ +{# +## This template is derived from https://github.com/ontodev/nanobot.rs/blob/main/src/resources/table.html +## This only redirects to another form template when adding a new row, which is the same as when editing a row. +## Issue requested in https://github.com/ontodev/nanobot.rs/issues/76 +#} + +{% extends "page.html" %} +{% block content %} +

{{ table.table }}

+ + + +{% for name, value in column|items -%} + +{% endfor %} + +
+
+ + + {# range #} + + Showing + {{ table.start }}-{{ table.end }} of + {% if table.counts.count == 1 %} + 1 row + {% else %} + {{ table.counts.count }} + {% endif %} + {% if table.counts.total > table.counts.count %} + rows filtered from {{ table.counts.total }}. + {% else %} + rows. + {% endif %} + + + {# message_rows #} + + {% if table.counts.message_row == 1 %} + 1 + row + has + {% elif table.counts.message_row > 1 %} + {{ table.counts.message_row }} + rows + have + {% endif %} + + + {# message counts #} + + {% if table.counts.message == 1 %} + 1 + message: + {% elif table.counts.message > 1 %} + {{ table.counts.message }} + messages: + {% endif %} + + + {# message types #} + + {% if table.counts.message %} + {% if table.counts.error %} + {{ table.counts.error }} + + {% endif %} + {% if table.counts.warn %} + {{ table.counts.warn }} + + {% endif %} + {% if table.counts.info %} + {{ table.counts.info}} + + {% endif %} + {% if table.counts.update %} + {{ table.counts.update}} + + {% endif %} + {% endif %} + + + Reset + + + + + + + {% if table.table != "message" %} + Add row + {% endif %} + +
+
+ + + + + + {% endfor %} + + + + {% for r in row -%} + + {% for column, cell in r|items -%} + {% if column == "row_number" %} + + {% else %} + + {% endif %} + + {% endif %} + {% endfor %} + + {% endfor %} + +
+ {% for name, value in column|items -%} + + + {{ value.label or name }} + + {% if value.filtered_operator %} + + {% elif value.sorted == "asc" %} + + {% elif value.sorted == "desc" %} + + {% endif %} +
+ + + {% if cell.nulltype %} + {% elif cell.href %} + {{ cell.value }} + {% else %} + {{ cell.value }} + {% endif %} + {% if cell.messages or cell.history %} + +
+{% endblock %} \ No newline at end of file