$def with (work, edition=None, redir_url=None, id='', show_modal_link=True) $ username = ctx.user and ctx.user.key.split('/')[-1] $ rating = work and username and work.get_users_rating(username) $ edition_key = edition.key if edition else "" $ form_id = "ratingsForm%s" % id