diff --git a/server/templates/collection_element.htm b/server/templates/collection_element.htm
index e7bf44c..e9bfb64 100644
--- a/server/templates/collection_element.htm
+++ b/server/templates/collection_element.htm
@@ -29,6 +29,7 @@
Next Episode:
{% set link = collection.next_episode %}
{% if link %}
+ {{ macros.media_element_buttons(link.element) }}
{{ link.element.title }}
{%- if link.season != 0 -%}
, Season {{ link.season }}
@@ -48,6 +49,7 @@
{% for link in media_links %}
-
+ {{ macros.media_element_buttons(link.element) }}
{{ link.element.release_date.strftime("%d.%m.%Y") }}
{{ link.element.title }}
{%- if link.season != 0 -%}
diff --git a/server/templates/macros.htm b/server/templates/macros.htm
index c8e3a7a..3937a59 100644
--- a/server/templates/macros.htm
+++ b/server/templates/macros.htm
@@ -38,3 +38,17 @@
{% endmacro %}
+
+{% macro media_element_buttons(element) %}
+ {% set api_uri = "/api/media/" + element.id|string %}
+ {% set fragment = "media_element_" + element.id|string %}
+ {{ element.uri | as_play_link }}
+ {% if element.watched %}
+ {{ post_form(api_uri, "watched", "false", "Unmark as Watched", fragment) }}
+ {% elif element.ignored %}
+ {{ post_form(api_uri, "ignored", "false", "Unmark as Ignored", fragment) }}
+ {% else %}
+ {{ post_form(api_uri, "watched", "true", "Watched", fragment) }}
+ {{ post_form(api_uri, "ignored", "true", "Ignore", fragment) }}
+ {% endif %}
+{% endmacro %}
diff --git a/server/templates/media_element.htm b/server/templates/media_element.htm
index 9ac616f..c4e05f7 100644
--- a/server/templates/media_element.htm
+++ b/server/templates/media_element.htm
@@ -15,7 +15,7 @@
Properties
-
- {{ element.uri | as_play_link }}
+ {{ macros.media_element_buttons(element) }}
- Can be considered: {{ element.can_considered | tenary("Yes", "no") }}
-
diff --git a/server/templates/media_list.htm b/server/templates/media_list.htm
index 5b73d73..1f73ca5 100644
--- a/server/templates/media_list.htm
+++ b/server/templates/media_list.htm
@@ -41,7 +41,7 @@
{{ media.length }} s |
{{ media.can_considered | tenary("Yes", "no") }} |
- {{ media.uri | as_play_link }}
+ {{ macros.media_element_buttons(media) }}
|
{% endfor %}