2024-04-19 01:03:54 +00:00
|
|
|
{% match quest %}
|
|
|
|
{% when Some with (q) %}
|
|
|
|
|
|
|
|
{% let public %}
|
|
|
|
{% let np %}
|
|
|
|
{% if q.public -%}
|
|
|
|
{% let public = "public" %}
|
|
|
|
{% let np = "private" %}
|
|
|
|
{% else %}
|
|
|
|
{% let public = "private" %}
|
|
|
|
{% let np = "public" %}
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
{% let status %}
|
|
|
|
{% if q.watched -%}
|
|
|
|
{% let status = "want to watch" %}
|
|
|
|
{% else %}
|
|
|
|
{% let status = "watched" %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>Added</td>
|
|
|
|
<td>{{- public -}}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<form id="edit-quest-{{self.watch}}">
|
|
|
|
<button hx-post="/edit/quest" hx-target="#add-watch-{{self.watch}}" hx-trigger="click"
|
|
|
|
hx-swap="outerHTML">remove</button>
|
|
|
|
<input type="hidden" name="watch" value="{{self.watch}}">
|
|
|
|
<input type="hidden" name="act" value="remove">
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<form id="edit-visibility-{{self.watch}}">
|
|
|
|
<button hx-post="/edit/quest" hx-target="#add-watch-{{self.watch}}" hx-trigger="click"
|
|
|
|
hx-swap="outerHTML">mark as {{ np }}</button>
|
|
|
|
<input type="hidden" name="watch" value="{{self.watch}}">
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
{% when None %}
|
|
|
|
|
2024-01-02 01:27:17 +00:00
|
|
|
<form id="add-watch-{{self.watch}}">
|
2024-04-19 01:03:54 +00:00
|
|
|
<button hx-post="/add/watch" hx-target="#add-watch-{{self.watch}}" hx-trigger="click"
|
|
|
|
hx-swap="outerHTML">add</button>
|
2024-01-02 06:44:29 +00:00
|
|
|
<select name="public" id="add-public-watch">
|
|
|
|
<option value="true">public</option>
|
|
|
|
<option value="false">private</option>
|
|
|
|
</select>
|
2024-01-02 01:27:17 +00:00
|
|
|
<input type="hidden" name="watch" value="{{self.watch}}">
|
|
|
|
</form>
|
2024-04-19 01:03:54 +00:00
|
|
|
|
|
|
|
{% endmatch %}
|