diff --git a/sutekhweb.py b/sutekhweb.py index 9598d83..d9f387d 100644 --- a/sutekhweb.py +++ b/sutekhweb.py @@ -211,8 +211,14 @@ def print_card(sCardName): for x in sorted(dExp)] else: aExpansions = [] + if oCard.rulings: + aRulings = [oR.text.replace("\n", " ") + " " + oR.code + for oR in oCard.rulings] + else: + aRulings = [] return render_template('card.html', card=oCard, text=aText, - icons=dIcons, expansions=aExpansions) + icons=dIcons, expansions=aExpansions, + rulings=aRulings) else: return render_template('invalid.html', type='Card Name', requested=sCardName) diff --git a/templates/card.html b/templates/card.html index 8cd569e..ecba9cf 100644 --- a/templates/card.html +++ b/templates/card.html @@ -122,6 +122,16 @@

Artists

{% endif %} +{% if rulings %} +
+

Rulings

+ +
+{% endif %} {% endblock %} {% block navigation %}

Return to Main page