File: /home/mmickelson/theflexguy_com_trac_trac/trac/templates/macros.rss
<?xml version="1.0"?>
<rss version="2.0" xmlns:py="http://genshi.edgewall.org/"
xmlns:dc="http://purl.org/dc/elements/1.1/" py:strip="">
<!--!
WARNING: this file and the corresponding <py:def>s are going to be phased
out soon. Please DON'T include macros.rss in your own templates.
See http://trac.edgewall.org/ticket/6374
-->
<!--! Generate an <author> or a <dc:creator> tag, based on the presence
- of an email or not in the author's information.
-
- Assume 'show_email_addresses' to be available in the global data.
-->
<py:def function="author_or_creator(author, email_map=None)">
<py:if test="author">
<!--! Try our best to retrieve an email address if wanted and possible -->
<py:with vars="author = show_email_addresses and email_map and '@' not in author and email_map[author] or author">
<py:choose>
<author py:when="show_email_addresses and '@' in author">${format_author(author)}</author>
<dc:creator py:otherwise="">${format_author(author)}</dc:creator>
</py:choose>
</py:with>
</py:if>
</py:def>
</rss>