a | b | |
---|
| 0 | + | % for child in attributes['node'].children: |
---|
| 0 | + | % if child.tagname == 'author': |
---|
| 0 | + | <img class="subst" src="http://cnd.faitmain.org/media/pen.png" /> |
---|
| 0 | + | <a href="/auteurs/${strip_accents(child.astext()).lower().replace(' ', '_')}.html">${child.astext()}</a> |
---|
| 0 | + | % elif child.tagname == 'date': |
---|
| 0 | + | nope |
---|
| 0 | + | % else: |
---|
| 0 | + | <% |
---|
| 0 | + | name = child.children[0].astext() |
---|
| 0 | + | value = child.children[1].astext() |
---|
| 0 | + | %> |
---|
| 0 | + | % if name == 'category': |
---|
| 0 | + | <img class="subst" src="http://cnd.faitmain.org/media/info.png" /> |
---|
| 0 | + | <% |
---|
| 0 | + | cats = ['<a href="/%s.html">%s</a>' % (cat, cat.capitalize()) |
---|
| 0 | + | for cat in value.split(',')] |
---|
| 0 | + | %> |
---|
| 0 | + | ${' | '.join(cats)} |
---|
| 0 | + | % elif name == 'level': |
---|
| 0 | + | <img class="subst" src="http://cnd.faitmain.org/media/flash.png" /> |
---|
| 0 | + | <strong>Niveau</strong>: ${value.capitalize()} |
---|
| 0 | + | % elif name == 'translator': |
---|
| 0 | + | <img class="subst" src="http://cnd.faitmain.org/media/translation.png" /> |
---|
| 0 | + | author_id = strip_accents(value).lower().replace(' ', '_') |
---|
| 0 | + | <strong>Traduction</strong>: <a href="/auteurs/${author_id}.html">${value}</a> |
---|
| 0 | + | % endif |
---|
| 0 | + | % endif |
---|
| 0 | + | % endfor |
---|
... | |
---|