PageRenderTime 18ms CodeModel.GetById 12ms app.highlight 5ms RepoModel.GetById 0ms app.codeStats 0ms

/templates/root/index.mako

https://bitbucket.org/ialbert/galaxy-genetrack
Mako | 101 lines | 92 code | 8 blank | 1 comment | 6 complexity | 9799a7027b1b0c922e6dc8cdc16acbf6 MD5 | raw file
  1<%inherit file="/base_panels.mako"/>
  2
  3<%def name="late_javascripts()">
  4    ${parent.late_javascripts()}
  5    <script type="text/javascript">
  6    $(function(){
  7        $("#history-options-button").css( "position", "relative" );
  8        make_popupmenu( $("#history-options-button"), {
  9            "List your histories": null,
 10            "Stored by you": function() {
 11                galaxy_main.location = "${h.url_for( controller='history', action='list')}";
 12            },
 13            "Shared with you": function() {
 14                galaxy_main.location = "${h.url_for( controller='history', action='list_shared')}";
 15            },
 16            "Current History": null,
 17            "Create new": function() {
 18                galaxy_history.location = "${h.url_for( controller='root', action='history_new' )}";
 19            },
 20            "Clone": function() {
 21                galaxy_main.location = "${h.url_for( controller='history', action='clone')}";
 22            },
 23            "Share": function() {
 24                galaxy_main.location = "${h.url_for( controller='history', action='share' )}";
 25            },
 26            "Extract workflow": function() {
 27                galaxy_main.location = "${h.url_for( controller='workflow', action='build_from_current_history' )}";
 28            },
 29            "Dataset security": function() {
 30                galaxy_main.location = "${h.url_for( controller='root', action='history_set_default_permissions' )}";
 31            },
 32            "Show deleted datasets": function() {
 33                galaxy_history.location = "${h.url_for( controller='root', action='history', show_deleted=True)}";
 34            },
 35            "Delete": function() {
 36                if ( confirm( "Really delete the current history?" ) ) {
 37                    galaxy_main.location = "${h.url_for( controller='history', action='delete_current' )}";
 38                }
 39            }
 40        });
 41    });
 42    </script>
 43</%def>
 44
 45<%def name="init()">
 46<%
 47    self.has_left_panel=True
 48    self.has_right_panel=True
 49    self.active_view="analysis"
 50%>
 51%if trans.app.config.require_login and not trans.user:
 52    <script type="text/javascript">
 53        if ( window != top ) {
 54            top.location.href = location.href;
 55        }
 56    </script>
 57%endif
 58</%def>
 59
 60<%def name="left_panel()">
 61    <div class="unified-panel-header" unselectable="on">
 62        <div class='unified-panel-header-inner'>${n_('Tools')}</div>
 63    </div>
 64    <div class="unified-panel-body" style="overflow: hidden;">
 65        <iframe name="galaxy_tools" src="${h.url_for( controller='root', action='tool_menu' )}" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%; width: 100%;"> </iframe>
 66    </div>
 67</%def>
 68
 69<%def name="center_panel()">
 70
 71    ## If a specific tool id was specified, load it in the middle frame
 72    <%
 73    if trans.app.config.require_login and not trans.user:
 74        center_url = h.url_for( controller='user', action='login' )
 75    elif tool_id is not None:
 76        center_url = h.url_for( 'tool_runner', tool_id=tool_id, from_noframe=True )
 77    elif workflow_id is not None:
 78        center_url = h.url_for( controller='workflow', action='run', id=workflow_id )
 79    elif m_c is not None:
 80        center_url = h.url_for( controller=m_c, action=m_a )
 81    else:
 82        center_url = h.url_for( '/static/welcome.html' )
 83    %>
 84    
 85    <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${center_url}"> </iframe>
 86
 87</%def>
 88
 89<%def name="right_panel()">
 90    <div class="unified-panel-header" unselectable="on">
 91        <div class="unified-panel-header-inner">
 92            <div style="float: right">
 93                <a id="history-options-button" class='panel-header-button' href="${h.url_for( controller='root', action='history_options' )}" target="galaxy_main"><span>${_('Options')}<span>&#9660;</span></span></a>
 94            </div>
 95            <div class="panel-header-text">${_('History')}</div>
 96        </div>
 97    </div>
 98    <div class="unified-panel-body" style="overflow: hidden;">
 99        <iframe name="galaxy_history" width="100%" height="100%" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%;" src="${h.url_for( controller='root', action='history' )}"></iframe>
100    </div>
101</%def>