Permalink
Browse files

Add rulings to the card text display

  • Loading branch information...
1 parent afc2892 commit 35fb68e033652b71a34587cf4a6424b387b6754c Neil committed Mar 7, 2012
Showing with 17 additions and 1 deletion.
  1. +7 −1 sutekhweb.py
  2. +10 −0 templates/card.html
View
@@ -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)
View
@@ -122,6 +122,16 @@
</ul>
</div>
{% endif %}
+{% if rulings %}
+<div id="rulings">
+ <h2>Rulings</h2>
+ <ul>
+ {% for line in rulings %}
+ <li>{{ line }}</li>
+ {% endfor %}
+ </ul>
+</div>
+{% endif %}
{% endblock %}
{% block navigation %}
<p>Return to <a href="/">Main page</a></p>

0 comments on commit 35fb68e

Please sign in to comment.