crud with conditions
This commit is contained in:
+19
-8
@@ -11,30 +11,41 @@
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Conditions</h1>
|
||||
<dialog>
|
||||
<iframe frameborder="0"></iframe>
|
||||
</dialog>
|
||||
<table id="conditionTable">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for key, value in data.conditions.model.items() %}
|
||||
<th>{{ value.name }}</th>
|
||||
{% endfor %}
|
||||
<td colspan="5"><h2>Conditions</h2></td>
|
||||
</tr>
|
||||
{% if data.conditions %}
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Symbol</th>
|
||||
<th>Condition</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<th class="nodata">No Data</th>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in data.conditions.data %}
|
||||
{% for item in data.conditions %}
|
||||
<tr onclick="document.querySelector('dialog iframe').contentWindow.location='/conditions/{{ item.id }}'">
|
||||
{% for key, value in item.items() %}
|
||||
<td>{{ value }}</td>
|
||||
|
||||
{% set order = ["id", "symbol", "condition", "value"] %}
|
||||
{% for key in order %}
|
||||
<td>{{ item[key] }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: right;"> <!-- Adjust colspan as per your total columns -->
|
||||
<td colspan="5" style="text-align: right;"> <!-- Adjust colspan as per your total columns -->
|
||||
<button onclick="document.querySelector('dialog iframe').contentWindow.location='/conditions/create'">Add Item</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user