PageRenderTime 15ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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