bodhi/mail.py | 4 ++-- bodhi/templates/mine.kid | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-)
New commits: commit 6ff1b3247f1aed824bdf6a864069ce371ef59b82 Author: Luke Macken lmacken@redhat.com Date: Tue Mar 16 13:48:30 2010 -0400
Add the paginator to the bottom of the My Updates section
diff --git a/bodhi/templates/mine.kid b/bodhi/templates/mine.kid index 84ae2ae..cb38bc0 100644 --- a/bodhi/templates/mine.kid +++ b/bodhi/templates/mine.kid @@ -77,5 +77,13 @@ </tr> </table>
+ <div py:if="num_items" class="list"> + <span py:for="page in tg.paginate.pages"> + <a py:if="page != tg.paginate.current_page" + href="${tg.paginate.get_href(page)}">${page}</a> + <b py:if="page == tg.paginate.current_page">${page}</b> + </span> + </div> + </body> </html>
commit 7761170e36c8b0f97b7f7af3874fa8af1cbfe3b1 Author: Luke Macken lmacken@redhat.com Date: Tue Mar 16 13:48:09 2010 -0400
Fix the karma icons in the 'My Updates' section
diff --git a/bodhi/templates/mine.kid b/bodhi/templates/mine.kid index a119047..84ae2ae 100644 --- a/bodhi/templates/mine.kid +++ b/bodhi/templates/mine.kid @@ -62,7 +62,12 @@ </td> <td class="list"> <center> - <img src="${tg.url('/static/images/karma%d.png' % update.karma)}" /> ${update.karma} + <?python + if update.karma < 0: karma = -1 + elif update.karma > 0: karma = 1 + else: karma = 0 + ?> + <img src="${tg.url('/static/images/karma%d.png' % karma)}" /> ${update.karma} </center> </td> <td class="list">
commit 963d12465548f949dcd91aa422aa0d4f07c5694e Author: Luke Macken lmacken@redhat.com Date: Tue Mar 16 13:47:48 2010 -0400
Spit out TurboMail's exception instead of printing our own message
diff --git a/bodhi/mail.py b/bodhi/mail.py index 78a83a8..e9dafe6 100644 --- a/bodhi/mail.py +++ b/bodhi/mail.py @@ -416,8 +416,8 @@ def send_mail(sender, to, subject, body): try: log.debug("Sending mail: %r" % message.plain) turbomail.enqueue(message) - except MailNotEnabledException: - log.warning("TurboMail is not enabled!") + except MailNotEnabledException, e: + log.warning(str(e)) except Exception, e: log.exception(e) log.error("Exception thrown when trying to send mail: %s" % str(e))