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 | ## TODO: Clean up these styles and move into panel_layout.css (they are |
---|
7 | ## used here and in the editor). |
---|
8 | <style type="text/css"> |
---|
9 | #left { |
---|
10 | background: #C1C9E5 url(${h.url_for('/static/style/menu_bg.png')}) top repeat-x; |
---|
11 | } |
---|
12 | div.toolMenu { |
---|
13 | margin: 5px; |
---|
14 | margin-left: 10px; |
---|
15 | margin-right: 10px; |
---|
16 | } |
---|
17 | div.toolSectionPad { |
---|
18 | margin: 0; |
---|
19 | padding: 0; |
---|
20 | height: 5px; |
---|
21 | font-size: 0px; |
---|
22 | } |
---|
23 | div.toolSectionDetailsInner { |
---|
24 | margin-left: 5px; |
---|
25 | margin-right: 5px; |
---|
26 | } |
---|
27 | div.toolSectionTitle { |
---|
28 | padding-bottom: 0px; |
---|
29 | font-weight: bold; |
---|
30 | } |
---|
31 | div.toolMenuGroupHeader { |
---|
32 | font-weight: bold; |
---|
33 | padding-top: 0.5em; |
---|
34 | padding-bottom: 0.5em; |
---|
35 | color: #333; |
---|
36 | font-style: italic; |
---|
37 | border-bottom: dotted #333 1px; |
---|
38 | margin-bottom: 0.5em; |
---|
39 | } |
---|
40 | div.toolTitle { |
---|
41 | padding-top: 5px; |
---|
42 | padding-bottom: 5px; |
---|
43 | margin-left: 16px; |
---|
44 | margin-right: 10px; |
---|
45 | display: list-item; |
---|
46 | list-style: square outside; |
---|
47 | } |
---|
48 | a:link, a:visited, a:active |
---|
49 | { |
---|
50 | color: #303030; |
---|
51 | } |
---|
52 | </style> |
---|
53 | </%def> |
---|
54 | |
---|
55 | <%def name="init()"> |
---|
56 | <% |
---|
57 | self.has_left_panel=True |
---|
58 | self.has_right_panel=False |
---|
59 | self.active_view="tools" |
---|
60 | %> |
---|
61 | %if trans.app.config.require_login and not trans.user: |
---|
62 | <script type="text/javascript"> |
---|
63 | if ( window != top ) { |
---|
64 | top.location.href = location.href; |
---|
65 | } |
---|
66 | </script> |
---|
67 | %endif |
---|
68 | </%def> |
---|
69 | |
---|
70 | <%def name="left_panel()"> |
---|
71 | <div class="unified-panel-header" unselectable="on"> |
---|
72 | <div class='unified-panel-header-inner'>Community</div> |
---|
73 | </div> |
---|
74 | <div class="page-container" style="padding: 10px;"> |
---|
75 | <div class="toolMenu"> |
---|
76 | <div class="toolSectionList"> |
---|
77 | <div class="toolSectionPad"></div> |
---|
78 | <div class="toolSectionTitle"> |
---|
79 | <span>Tools</span> |
---|
80 | </div> |
---|
81 | <div class="toolSectionBody"> |
---|
82 | <div class="toolSectionBg"> |
---|
83 | <div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='tool', action='browse_categories', webapp='community' )}">Browse by category</a></div> |
---|
84 | <div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='tool', action='browse_tools', operation='approved_tools', webapp='community' )}">Browse all tools</a></div> |
---|
85 | %if trans.user: |
---|
86 | <div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='tool', action='browse_tools', operation='my_tools', webapp='community' )}">Browse your tools</a></div> |
---|
87 | %endif |
---|
88 | </div> |
---|
89 | </div> |
---|
90 | <div class="toolSectionBody"> |
---|
91 | <div class="toolSectionBg"> |
---|
92 | <div class="toolTitle"> |
---|
93 | %if trans.user: |
---|
94 | <a target="galaxy_main" href="${h.url_for( controller='upload', action='upload', type='tool', webapp='community' )}">Upload a tool</a> |
---|
95 | %else: |
---|
96 | <a target="galaxy_main" href="${h.url_for( controller='/user', action='login', webapp='community' )}">Login to upload</a> |
---|
97 | %endif |
---|
98 | </div> |
---|
99 | </div> |
---|
100 | </div> |
---|
101 | </div> |
---|
102 | </div> |
---|
103 | </div> |
---|
104 | </%def> |
---|
105 | |
---|
106 | <%def name="center_panel()"> |
---|
107 | <% |
---|
108 | if trans.app.config.require_login and not trans.user: |
---|
109 | center_url = h.url_for( controller='user', action='login', message=message, status=status, webapp='community' ) |
---|
110 | else: |
---|
111 | center_url = h.url_for( controller='tool', action='browse_categories', message=message, status=status, webapp='community' ) |
---|
112 | %> |
---|
113 | <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${center_url}"> </iframe> |
---|
114 | </%def> |
---|