From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 15 Nov 2020 18:18:26 +0000 (+0100)
Subject: Add editing option to single-card view.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/ledger2?a=commitdiff_plain;h=75c92056e742fc2d3066c7e239e1b718ddf5fd26;p=guiltcards

Add editing option to single-card view.
---

diff --git a/guiltcards.py b/guiltcards.py
index 7d900df..00f02f8 100755
--- a/guiltcards.py
+++ b/guiltcards.py
@@ -84,6 +84,7 @@ def show_card(deck_id, card_id):
     data = get_card_data(deck_id, card_id, None)
     return dict(web_path=web_path,
                 deck_id=deck_id,
+                card_id=card_id,
                 card=data)
 
 @post(web_path + '/decks/<deck_id>/cards/<card_id>')
diff --git a/views/card.tpl b/views/card.tpl
index f946b21..a4eb7b8 100644
--- a/views/card.tpl
+++ b/views/card.tpl
@@ -4,6 +4,14 @@
 </style>
 <body>
 % include('_card.tpl')
+<p>
+</p>
+<a href="{{ web_path }}/decks/{{deck_id}}/cards/{{ card_id }}/form">Change?</a>
+<p>
+</p>
+<a href="{{ web_path }}/decks/{{deck_id}}/cards/{{ card_id }}/delete">Delete?</a>
+<p>
 <a href="{{ web_path }}/decks/{{deck_id}}/cards">back to overview</a>
+</p>
 </body>
 % include('_meta_foot.tpl')