From fa75292e22ead9c9de700a440750f45d7844eac1 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 25 Sep 2019 14:28:03 +0100 Subject: [PATCH] Add remove option for new depicts list. --- static/js/app.js | 3 +++ templates/item.html | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index a195ec2..0585498 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -6,6 +6,9 @@ var app = new Vue({ new_depicts: [], }, methods: { + remove(index) { + this.$delete(this.new_depicts, index); + }, add_depicts(hit) { this.new_depicts.push(hit); this.hits = []; diff --git a/templates/item.html b/templates/item.html index 8a32a57..eea38f2 100644 --- a/templates/item.html +++ b/templates/item.html @@ -62,10 +62,11 @@

what can you see in this painting?

-
+
{{ hit.label }} ({{ hit.alt_label }}) + remove — {{ hit.count }} existing paintings ({{ hit.qid }}) view on Wikidata @@ -79,7 +80,7 @@
- {{ hit.label }} + {{ hit.label }} ({{ hit.alt_label }}) — {{ hit.count }} existing paintings ({{ hit.qid }})