34 lines
1.9 KiB
HTML
34 lines
1.9 KiB
HTML
|
<tr id={{ movie["id"] }}>
|
||
|
{%if manage %}
|
||
|
<td>
|
||
|
<button onclick="changePosition({{ movie["id"] }})">Move</button>
|
||
|
</td>{% endif %}
|
||
|
<td {%if manage %}onfocusout="changeTitle(this,{{ movie["id"] }})" contenteditable{% endif %}>{% if movie["title"] %}
|
||
|
{% autoescape false %}
|
||
|
{{ movie["title"]|replace("\n","<br>")}}
|
||
|
{% endautoescape %}
|
||
|
{% endif %}
|
||
|
</td>
|
||
|
<td {%if manage %}onfocusout="changeYear(this,{{ movie["id"] }})" contenteditable{% endif %}>{% if movie["year"] %}
|
||
|
{{ movie["year"] }}
|
||
|
{% endif %}
|
||
|
</td>
|
||
|
<td {%if manage %}onclick="changePoster(this,{{ movie["id"] }})"{% endif %}>
|
||
|
{% if movie["poster"] %}
|
||
|
<img src="/posters/{{ movie['poster'] }}" width={{ w }}>
|
||
|
{% else %}
|
||
|
<img src="" width={{ w }}>
|
||
|
{% endif %}
|
||
|
</td>
|
||
|
<td {%if manage %}onfocusout="changePlot(this,{{ movie["id"] }})" contenteditable{% endif %}>{% if movie["plot"] %}
|
||
|
{% autoescape false %}
|
||
|
{{ movie["plot"]|replace("\n","<br>")}}
|
||
|
{% endautoescape %}
|
||
|
{% endif %}
|
||
|
</td>
|
||
|
{%if manage %}<td {% if not movie["watched"] %}colspan="3"{% endif %} onclick="changeWatched(this,{{ movie["id"] }})">{%if movie["watched"] %}✔{% else %}✘{% endif %}</td>{% endif %}
|
||
|
{%if manage or watched %}<td {%if manage %}onfocusout="changeWatchDate(this,{{ movie["id"] }})"{% endif %} {% if not movie["watched"] %}hidden{% endif %}>{%if manage %}<input type="date" id="date{{ movie["id"] }}" name="date{{ movie["id"] }}" value="{% if movie["watchDate"] %}{{ movie["watchDate"] }}{% endif %}">{% else %}{% if movie["watchDate"] %}{{ movie["watchDate"] }}{% endif %}{% endif %}</td>
|
||
|
<td {%if manage %}onfocusout="changeScore(this,{{ movie["id"] }})" contenteditable{% endif %} {% if not movie["watched"] %}hidden{% endif %}>{% if movie["score"] %}{{ movie["score"] }}{% endif %}</td>{% endif %}
|
||
|
{% if manage %}<td><button onclick="deleteRow({{ movie["id"] }})">Delete</button></td>{% endif %}
|
||
|
</tr>
|