053d8cc Move the if outside the <script> block and use url_for() to build the url

Authored and Committed by pingou 8 years ago
    Move the if outside the <script> block and use url_for() to build the url