PageRenderTime 21ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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