home · contact · privacy
Add editing option to single-card view.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 15 Nov 2020 18:18:26 +0000 (19:18 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 15 Nov 2020 18:18:26 +0000 (19:18 +0100)
guiltcards.py
views/card.tpl

index 7d900df1e3fca444d26f334e0e7c4c7a9387e71b..00f02f8344bb0e0bfd4927d86ff1ed66132084c2 100755 (executable)
@@ -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,
     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>')
                 card=data)
 
 @post(web_path + '/decks/<deck_id>/cards/<card_id>')
index f946b210ab7fea3945979d7d53ca9a8f42d6f46e..a4eb7b80dc7c5cd2fdf9f53849e0e5d351edbd40 100644 (file)
@@ -4,6 +4,14 @@
 </style>
 <body>
 % include('_card.tpl')
 </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>
 <a href="{{ web_path }}/decks/{{deck_id}}/cards">back to overview</a>
+</p>
 </body>
 % include('_meta_foot.tpl')
 </body>
 % include('_meta_foot.tpl')