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