1 | from mako import runtime, filters, cache |
---|
2 | UNDEFINED = runtime.UNDEFINED |
---|
3 | __M_dict_builtin = dict |
---|
4 | __M_locals_builtin = locals |
---|
5 | _magic_number = 5 |
---|
6 | _modified_time = 1287725326.7005551 |
---|
7 | _template_filename='templates/root/index.mako' |
---|
8 | _template_uri='root/index.mako' |
---|
9 | _template_cache=cache.Cache(__name__, _modified_time) |
---|
10 | _source_encoding=None |
---|
11 | _exports = ['init', 'left_panel', 'center_panel', 'late_javascripts', 'right_panel'] |
---|
12 | |
---|
13 | |
---|
14 | def _mako_get_namespace(context, name): |
---|
15 | try: |
---|
16 | return context.namespaces[(__name__, name)] |
---|
17 | except KeyError: |
---|
18 | _mako_generate_namespaces(context) |
---|
19 | return context.namespaces[(__name__, name)] |
---|
20 | def _mako_generate_namespaces(context): |
---|
21 | pass |
---|
22 | def _mako_inherit(template, context): |
---|
23 | _mako_generate_namespaces(context) |
---|
24 | return runtime._inherit_from(context, u'/webapps/galaxy/base_panels.mako', _template_uri) |
---|
25 | def render_body(context,**pageargs): |
---|
26 | context.caller_stack._push_frame() |
---|
27 | try: |
---|
28 | __M_locals = __M_dict_builtin(pageargs=pageargs) |
---|
29 | __M_writer = context.writer() |
---|
30 | # SOURCE LINE 1 |
---|
31 | __M_writer(u'\n\n') |
---|
32 | # SOURCE LINE 156 |
---|
33 | __M_writer(u'\n\n') |
---|
34 | # SOURCE LINE 176 |
---|
35 | __M_writer(u'\n\n') |
---|
36 | # SOURCE LINE 190 |
---|
37 | __M_writer(u'\n\n') |
---|
38 | # SOURCE LINE 212 |
---|
39 | __M_writer(u'\n\n') |
---|
40 | # SOURCE LINE 226 |
---|
41 | __M_writer(u'\n') |
---|
42 | return '' |
---|
43 | finally: |
---|
44 | context.caller_stack._pop_frame() |
---|
45 | |
---|
46 | |
---|
47 | def render_init(context): |
---|
48 | context.caller_stack._push_frame() |
---|
49 | try: |
---|
50 | self = context.get('self', UNDEFINED) |
---|
51 | trans = context.get('trans', UNDEFINED) |
---|
52 | __M_writer = context.writer() |
---|
53 | # SOURCE LINE 158 |
---|
54 | __M_writer(u'\n') |
---|
55 | # SOURCE LINE 159 |
---|
56 | |
---|
57 | if trans.app.config.cloud_controller_instance: |
---|
58 | self.has_left_panel=False |
---|
59 | self.has_right_panel=False |
---|
60 | self.active_view="cloud" |
---|
61 | else: |
---|
62 | self.has_left_panel=True |
---|
63 | self.has_right_panel=True |
---|
64 | self.active_view="analysis" |
---|
65 | |
---|
66 | |
---|
67 | # SOURCE LINE 168 |
---|
68 | __M_writer(u'\n') |
---|
69 | # SOURCE LINE 169 |
---|
70 | if trans.app.config.require_login and not trans.user: |
---|
71 | # SOURCE LINE 170 |
---|
72 | __M_writer(u' <script type="text/javascript">\n if ( window != top ) {\n top.location.href = location.href;\n }\n </script>\n') |
---|
73 | return '' |
---|
74 | finally: |
---|
75 | context.caller_stack._pop_frame() |
---|
76 | |
---|
77 | |
---|
78 | def render_left_panel(context): |
---|
79 | context.caller_stack._push_frame() |
---|
80 | try: |
---|
81 | h = context.get('h', UNDEFINED) |
---|
82 | _ = context.get('_', UNDEFINED) |
---|
83 | n_ = context.get('n_', UNDEFINED) |
---|
84 | __M_writer = context.writer() |
---|
85 | # SOURCE LINE 178 |
---|
86 | __M_writer(u'\n <div class="unified-panel-header" unselectable="on">\n <div class=\'unified-panel-header-inner\'>\n <div style="float: right">\n <a class=\'panel-header-button popup\' id="tools-options-button" href="#">') |
---|
87 | # SOURCE LINE 182 |
---|
88 | __M_writer(unicode(_('Options'))) |
---|
89 | __M_writer(u'</a>\n </div>\n ') |
---|
90 | # SOURCE LINE 184 |
---|
91 | __M_writer(unicode(n_('Tools'))) |
---|
92 | __M_writer(u'\n </div>\n </div>\n <div class="unified-panel-body" style="overflow: hidden;">\n <iframe name="galaxy_tools" id="galaxy_tools" src="') |
---|
93 | # SOURCE LINE 188 |
---|
94 | __M_writer(unicode(h.url_for( controller='root', action='tool_menu' ))) |
---|
95 | __M_writer(u'" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%; width: 100%;"> </iframe>\n </div>\n') |
---|
96 | return '' |
---|
97 | finally: |
---|
98 | context.caller_stack._pop_frame() |
---|
99 | |
---|
100 | |
---|
101 | def render_center_panel(context): |
---|
102 | context.caller_stack._push_frame() |
---|
103 | try: |
---|
104 | tool_id = context.get('tool_id', UNDEFINED) |
---|
105 | m_c = context.get('m_c', UNDEFINED) |
---|
106 | h = context.get('h', UNDEFINED) |
---|
107 | m_a = context.get('m_a', UNDEFINED) |
---|
108 | workflow_id = context.get('workflow_id', UNDEFINED) |
---|
109 | trans = context.get('trans', UNDEFINED) |
---|
110 | __M_writer = context.writer() |
---|
111 | # SOURCE LINE 192 |
---|
112 | __M_writer(u'\n\n') |
---|
113 | # SOURCE LINE 195 |
---|
114 | __M_writer(u' ') |
---|
115 | |
---|
116 | if trans.app.config.require_login and not trans.user: |
---|
117 | center_url = h.url_for( controller='user', action='login' ) |
---|
118 | elif tool_id is not None: |
---|
119 | center_url = h.url_for( 'tool_runner', tool_id=tool_id, from_noframe=True ) |
---|
120 | elif workflow_id is not None: |
---|
121 | center_url = h.url_for( controller='workflow', action='run', id=workflow_id ) |
---|
122 | elif m_c is not None: |
---|
123 | center_url = h.url_for( controller=m_c, action=m_a ) |
---|
124 | elif trans.app.config.cloud_controller_instance: |
---|
125 | center_url = h.url_for( controller='cloud', action='list' ) |
---|
126 | else: |
---|
127 | center_url = h.url_for( '/static/welcome.html' ) |
---|
128 | |
---|
129 | |
---|
130 | # SOURCE LINE 208 |
---|
131 | __M_writer(u'\n \n <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="') |
---|
132 | # SOURCE LINE 210 |
---|
133 | __M_writer(unicode(center_url)) |
---|
134 | __M_writer(u'"> </iframe>\n\n') |
---|
135 | return '' |
---|
136 | finally: |
---|
137 | context.caller_stack._pop_frame() |
---|
138 | |
---|
139 | |
---|
140 | def render_late_javascripts(context): |
---|
141 | context.caller_stack._push_frame() |
---|
142 | try: |
---|
143 | h = context.get('h', UNDEFINED) |
---|
144 | trans = context.get('trans', UNDEFINED) |
---|
145 | parent = context.get('parent', UNDEFINED) |
---|
146 | __M_writer = context.writer() |
---|
147 | # SOURCE LINE 3 |
---|
148 | __M_writer(u'\n ') |
---|
149 | # SOURCE LINE 4 |
---|
150 | __M_writer(unicode(parent.late_javascripts())) |
---|
151 | __M_writer(u'\n <script type="text/javascript">\n // Set up GalaxyAsync object.\n var galaxy_async = new GalaxyAsync();\n galaxy_async.set_func_url(galaxy_async.set_user_pref, "') |
---|
152 | # SOURCE LINE 8 |
---|
153 | __M_writer(unicode(h.url_for( controller='user', action='set_user_pref_async' ))) |
---|
154 | __M_writer(u'");\n \n $(function(){\n // Init history options.\n $("#history-options-button").css( "position", "relative" );\n make_popupmenu( $("#history-options-button"), {\n "History Lists": null,\n "Saved Histories": function() {\n galaxy_main.location = "') |
---|
155 | # SOURCE LINE 16 |
---|
156 | __M_writer(unicode(h.url_for( controller='history', action='list'))) |
---|
157 | __M_writer(u'";\n },\n "Histories Shared with Me": function() {\n galaxy_main.location = "') |
---|
158 | # SOURCE LINE 19 |
---|
159 | __M_writer(unicode(h.url_for( controller='history', action='list_shared'))) |
---|
160 | __M_writer(u'";\n },\n "Current History": null,\n "Create New": function() {\n galaxy_history.location = "') |
---|
161 | # SOURCE LINE 23 |
---|
162 | __M_writer(unicode(h.url_for( controller='root', action='history_new' ))) |
---|
163 | __M_writer(u'";\n },\n "Clone": function() {\n galaxy_main.location = "') |
---|
164 | # SOURCE LINE 26 |
---|
165 | __M_writer(unicode(h.url_for( controller='history', action='clone'))) |
---|
166 | __M_writer(u'";\n },\n "Share or Publish": function() {\n galaxy_main.location = "') |
---|
167 | # SOURCE LINE 29 |
---|
168 | __M_writer(unicode(h.url_for( controller='history', action='sharing' ))) |
---|
169 | __M_writer(u'";\n },\n "Extract Workflow": function() {\n galaxy_main.location = "') |
---|
170 | # SOURCE LINE 32 |
---|
171 | __M_writer(unicode(h.url_for( controller='workflow', action='build_from_current_history' ))) |
---|
172 | __M_writer(u'";\n },\n "Dataset Security": function() {\n galaxy_main.location = "') |
---|
173 | # SOURCE LINE 35 |
---|
174 | __M_writer(unicode(h.url_for( controller='root', action='history_set_default_permissions' ))) |
---|
175 | __M_writer(u'";\n },\n "Show Deleted Datasets": function() {\n galaxy_history.location = "') |
---|
176 | # SOURCE LINE 38 |
---|
177 | __M_writer(unicode(h.url_for( controller='root', action='history', show_deleted=True))) |
---|
178 | __M_writer(u'";\n },\n "Show Hidden Datasets": function() {\n galaxy_history.location = "') |
---|
179 | # SOURCE LINE 41 |
---|
180 | __M_writer(unicode(h.url_for( controller='root', action='history', show_hidden=True))) |
---|
181 | __M_writer(u'";\n },\n "Show structure": function() {\n galaxy_main.location = "') |
---|
182 | # SOURCE LINE 44 |
---|
183 | __M_writer(unicode(h.url_for( controller='history', action='display_structured' ))) |
---|
184 | __M_writer(u'";\n },\n "Export to File": function() {\n galaxy_main.location = "') |
---|
185 | # SOURCE LINE 47 |
---|
186 | __M_writer(unicode(h.url_for( controller='history', action='export_archive' ))) |
---|
187 | __M_writer(u'";\n },\n "Delete": function()\n {\n if ( confirm( "Really delete the current history?" ) )\n {\n galaxy_main.location = "') |
---|
188 | # SOURCE LINE 53 |
---|
189 | __M_writer(unicode(h.url_for( controller='history', action='delete_current' ))) |
---|
190 | __M_writer(u'";\n }\n },\n') |
---|
191 | # SOURCE LINE 60 |
---|
192 | __M_writer(u' });\n \n // Init tool options.\n make_popupmenu( $("#tools-options-button"), {\n') |
---|
193 | # SOURCE LINE 65 |
---|
194 | if trans.app.toolbox_search.enabled: |
---|
195 | # SOURCE LINE 66 |
---|
196 | __M_writer(u' ') |
---|
197 | |
---|
198 | show_tool_search = False |
---|
199 | if trans.user: |
---|
200 | show_tool_search = trans.user.preferences.get( "show_tool_search", "False" ) |
---|
201 | |
---|
202 | if show_tool_search == "True": |
---|
203 | initial_text = "Hide Search" |
---|
204 | else: |
---|
205 | initial_text = "Search Tools" |
---|
206 | |
---|
207 | |
---|
208 | # SOURCE LINE 75 |
---|
209 | __M_writer(u'\n "') |
---|
210 | # SOURCE LINE 76 |
---|
211 | __M_writer(unicode(initial_text)) |
---|
212 | __M_writer(u'": function() {\n // Show/hide menu and update vars, user preferences.\n var menu = $("#galaxy_tools").contents().find(\'#tool-search\');\n if (menu.is(":visible"))\n {\n // Hide menu.\n pref_value = "False";\n menu_option_text = "Search Tools";\n menu.toggle();\n \n // Reset search.\n reset_tool_search(true);\n }\n else\n {\n // Show menu.\n pref_value = "True";\n menu_option_text = "Hide Search";\n menu.toggle();\n }\n \n // Update menu option.\n $("#tools-options-button-menu").find("li").eq(0).text(menu_option_text);\n \n galaxy_async.set_user_pref("show_tool_search", pref_value);\n },\n') |
---|
213 | # SOURCE LINE 104 |
---|
214 | if trans.user: |
---|
215 | # SOURCE LINE 105 |
---|
216 | __M_writer(u' ') |
---|
217 | |
---|
218 | if trans.user.preferences.get( 'show_recently_used_menu', 'False' ) == 'True': |
---|
219 | action = "Hide" |
---|
220 | else: |
---|
221 | action = "Show" |
---|
222 | |
---|
223 | |
---|
224 | # SOURCE LINE 110 |
---|
225 | __M_writer(u'\n "') |
---|
226 | # SOURCE LINE 111 |
---|
227 | __M_writer(unicode(action)) |
---|
228 | __M_writer(u' Recently Used": function() {\n // Show/hide menu.\n var ru_menu = $(\'#galaxy_tools\').contents().find(\'#recently_used_wrapper\');\n var ru_menu_body = ru_menu.find(".toolSectionBody");\n var pref_value = null;\n var menu_option_text = null;\n if (ru_menu.hasClass("user_pref_visible"))\n {\n // Hide menu.\n ru_menu_body.slideUp();\n ru_menu.slideUp();\n \n // Set vars used below and in tool menu frame.\n pref_value = "False";\n menu_option_text = "Show Recently Used";\n }\n else\n {\n // "Show" menu.\n if (!$(\'#galaxy_tools\').contents().find(\'#tool-search-query\').hasClass("search_active"))\n // Default.\n ru_menu.slideDown();\n else\n // Search active: tf there are matching tools in RU menu, show menu.\n if ( ru_menu.find(".toolTitle.search_match").length != 0 )\n {\n ru_menu.slideDown();\n ru_menu_body.slideDown();\n }\n \n // Set vars used below and in tool menu frame.\n pref_value = "True";\n menu_option_text = "Hide Recently Used";\n }\n \n // Update menu class and option.\n ru_menu.toggleClass("user_pref_hidden user_pref_visible");\n $("#tools-options-button-menu").find("li").eq(1).text(menu_option_text);\n\n galaxy_async.set_user_pref("show_recently_used_menu", pref_value);\n }\n') |
---|
229 | # SOURCE LINE 153 |
---|
230 | __M_writer(u' });\n });\n </script>\n') |
---|
231 | return '' |
---|
232 | finally: |
---|
233 | context.caller_stack._pop_frame() |
---|
234 | |
---|
235 | |
---|
236 | def render_right_panel(context): |
---|
237 | context.caller_stack._push_frame() |
---|
238 | try: |
---|
239 | h = context.get('h', UNDEFINED) |
---|
240 | _ = context.get('_', UNDEFINED) |
---|
241 | __M_writer = context.writer() |
---|
242 | # SOURCE LINE 214 |
---|
243 | __M_writer(u'\n <div class="unified-panel-header" unselectable="on">\n <div class="unified-panel-header-inner">\n <div style="float: right">\n <a id="history-options-button" class=\'panel-header-button popup\' href="') |
---|
244 | # SOURCE LINE 218 |
---|
245 | __M_writer(unicode(h.url_for( controller='root', action='history_options' ))) |
---|
246 | __M_writer(u'" target="galaxy_main">') |
---|
247 | __M_writer(unicode(_('Options'))) |
---|
248 | __M_writer(u'</a>\n </div>\n <div class="panel-header-text">') |
---|
249 | # SOURCE LINE 220 |
---|
250 | __M_writer(unicode(_('History'))) |
---|
251 | __M_writer(u'</div>\n </div>\n </div>\n <div class="unified-panel-body" style="overflow: hidden;">\n <iframe name="galaxy_history" width="100%" height="100%" frameborder="0" style="position: absolute; margin: 0; border: 0 none; height: 100%;" src="') |
---|
252 | # SOURCE LINE 224 |
---|
253 | __M_writer(unicode(h.url_for( controller='root', action='history' ))) |
---|
254 | __M_writer(u'"></iframe>\n </div>\n') |
---|
255 | return '' |
---|
256 | finally: |
---|
257 | context.caller_stack._pop_frame() |
---|
258 | |
---|
259 | |
---|