/templates/webapps/community/index.mako

https://bitbucket.org/cistrome/cistrome-harvard/ · Mako · 90 lines · 81 code · 7 blank · 2 comment · 7 complexity · bc2d7e4d3ad0d47d14d24709c0c256d0 MD5 · raw file

  1. <%inherit file="/webapps/community/base_panels.mako"/>
  2. <%namespace file="/message.mako" import="render_msg" />
  3. <%def name="stylesheets()">
  4. ${parent.stylesheets()}
  5. ## Include "base.css" for styling tool menu and forms (details)
  6. ${h.css( "base", "autocomplete_tagging", "tool_menu" )}
  7. ## But make sure styles for the layout take precedence
  8. ${parent.stylesheets()}
  9. <style type="text/css">
  10. body { margin: 0; padding: 0; overflow: hidden; }
  11. #left {
  12. background: #C1C9E5 url(${h.url_for('/static/style/menu_bg.png')}) top repeat-x;
  13. }
  14. </style>
  15. </%def>
  16. <%def name="javascripts()">
  17. ${parent.javascripts()}
  18. ${h.js( "jquery", "galaxy.base" )}
  19. </%def>
  20. <%def name="init()">
  21. <%
  22. self.has_left_panel=True
  23. self.has_right_panel=False
  24. self.active_view="tools"
  25. %>
  26. %if trans.app.config.require_login and not trans.user:
  27. <script type="text/javascript">
  28. if ( window != top ) {
  29. top.location.href = location.href;
  30. }
  31. </script>
  32. %endif
  33. </%def>
  34. <%def name="left_panel()">
  35. <div class="unified-panel-header" unselectable="on">
  36. <div class='unified-panel-header-inner'>Galaxy Tool Shed</div>
  37. </div>
  38. <div class="page-container" style="padding: 10px;">
  39. <div class="toolMenu">
  40. <div class="toolSectionList">
  41. <div class="toolSectionPad"></div>
  42. <div class="toolSectionTitle">
  43. Repositories
  44. </div>
  45. <div class="toolSectionBody">
  46. <div class="toolSectionBg">
  47. <div class="toolTitle">
  48. <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_categories', webapp='community' )}">Browse by category</a>
  49. </div>
  50. <div class="toolTitle">
  51. <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_repositories', webapp='community' )}">Browse all repositories</a>
  52. </div>
  53. %if trans.user:
  54. <div class="toolTitle">
  55. <a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_repositories', operation='my_repositories', webapp='community' )}">Browse my repositories</a>
  56. </div>
  57. %endif
  58. </div>
  59. </div>
  60. <div class="toolSectionBody">
  61. <div class="toolSectionBg">
  62. <div class="toolTitle">
  63. %if trans.user:
  64. <a target="galaxy_main" href="${h.url_for( controller='repository', action='create_repository', webapp='community' )}">Create new repository</a>
  65. %else:
  66. <a target="galaxy_main" href="${h.url_for( controller='/user', action='login', webapp='community' )}">Login to create a repository</a>
  67. %endif
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </%def>
  75. <%def name="center_panel()">
  76. <%
  77. if trans.app.config.require_login and not trans.user:
  78. center_url = h.url_for( controller='user', action='login', message=message, status=status, webapp='community' )
  79. else:
  80. center_url = h.url_for( controller='repository', action='browse_categories', message=message, status=status, webapp='community' )
  81. %>
  82. <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${center_url}"> </iframe>
  83. </%def>