/templates/webapps/demo_sequencer/index.mako

https://bitbucket.org/cistrome/cistrome-harvard/ · Mako · 54 lines · 48 code · 5 blank · 1 comment · 3 complexity · 15f1a8a92bc7c658bc0c804796f8e877 MD5 · raw file

  1. <%inherit file="/base.mako"/>
  2. <%
  3. import galaxy.util
  4. titles_list = util.listify( titles )
  5. %>
  6. <%def name="javascripts()">
  7. ${parent.javascripts()}
  8. %if redirect_action != 'exit':
  9. <script type="text/javascript">
  10. function redirect(){
  11. top.location.href = "${h.url_for( controller='common', action='index', redirect_action=redirect_action, titles=titles, JobId=JobId, sample_id=sample_id )}";
  12. }
  13. function set_redirect(){
  14. %if redirect_delay:
  15. setTimeout("redirect()", ${int(redirect_delay)*1000});
  16. %else:
  17. setTimeout("redirect()", 2000);
  18. %endif
  19. }
  20. </script>
  21. %endif
  22. </%def>
  23. ## Render a message - can't import because we don't support language encoding here
  24. <%def name="render_message( message, status='done' )">
  25. <div class="${status}message">${message}</div>
  26. <br/>
  27. </%def>
  28. %if message:
  29. ${render_message( message, status )}
  30. %endif
  31. <body onload="set_redirect()">
  32. <table border="0" align="center" valign="center" cellpadding="5" cellspacing="5">
  33. <tr><td><img src='static/images/sequencer.png' alt="Sequencer" /></td></tr>
  34. <tr>
  35. <td align="center">
  36. %if titles_list:
  37. %for title in titles_list:
  38. <h2>${title}</h2>
  39. %endfor
  40. %else:
  41. <h2>&nbsp;</h2>
  42. %endif
  43. </td>
  44. </tr>
  45. </table>
  46. %if not trans.app.sequencer_actions_registry.authenticated and trans.app.sequencer_actions_registry.browser_login:
  47. <iframe name="login" id="login" frameborder="0" style="position: absolute; width: 0%; height: 0%;" src="${h.url_for( controller="common", action="login" )}"></iframe>
  48. %endif
  49. </body>