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 = 1287725818.341774 |
---|
7 | _template_filename=u'templates/message.mako' |
---|
8 | _template_uri=u'/message.mako' |
---|
9 | _template_cache=cache.Cache(__name__, _modified_time) |
---|
10 | _source_encoding=None |
---|
11 | _exports = ['body', 'render_msg', 'center_panel', 'init', 'render_large_message', 'javascripts'] |
---|
12 | |
---|
13 | |
---|
14 | # SOURCE LINE 1 |
---|
15 | |
---|
16 | def inherit(context): |
---|
17 | if context.get('use_panels'): |
---|
18 | if context.get('webapp'): |
---|
19 | webapp = context.get('webapp') |
---|
20 | else: |
---|
21 | webapp = 'galaxy' |
---|
22 | return '/webapps/%s/base_panels.mako' % webapp |
---|
23 | else: |
---|
24 | return '/base.mako' |
---|
25 | |
---|
26 | |
---|
27 | def _mako_get_namespace(context, name): |
---|
28 | try: |
---|
29 | return context.namespaces[(__name__, name)] |
---|
30 | except KeyError: |
---|
31 | _mako_generate_namespaces(context) |
---|
32 | return context.namespaces[(__name__, name)] |
---|
33 | def _mako_generate_namespaces(context): |
---|
34 | pass |
---|
35 | def _mako_inherit(template, context): |
---|
36 | _mako_generate_namespaces(context) |
---|
37 | return runtime._inherit_from(context, (inherit(context)), _template_uri) |
---|
38 | def render_body(context,**pageargs): |
---|
39 | context.caller_stack._push_frame() |
---|
40 | try: |
---|
41 | __M_locals = __M_dict_builtin(pageargs=pageargs) |
---|
42 | n_ = context.get('n_', UNDEFINED) |
---|
43 | __M_writer = context.writer() |
---|
44 | # SOURCE LINE 11 |
---|
45 | __M_writer(u'\n') |
---|
46 | # SOURCE LINE 12 |
---|
47 | __M_writer(u'\n') |
---|
48 | # SOURCE LINE 13 |
---|
49 | _=n_ |
---|
50 | |
---|
51 | __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['_'] if __M_key in __M_locals_builtin()])) |
---|
52 | __M_writer(u'\n\n') |
---|
53 | # SOURCE LINE 22 |
---|
54 | __M_writer(u'\n\n') |
---|
55 | # SOURCE LINE 66 |
---|
56 | __M_writer(u'\n\n') |
---|
57 | # SOURCE LINE 71 |
---|
58 | __M_writer(u'\n') |
---|
59 | # SOURCE LINE 74 |
---|
60 | __M_writer(u'\n\n') |
---|
61 | # SOURCE LINE 78 |
---|
62 | __M_writer(u'\n\n') |
---|
63 | # SOURCE LINE 83 |
---|
64 | __M_writer(u'\n\n') |
---|
65 | # SOURCE LINE 89 |
---|
66 | __M_writer(u'\n\n') |
---|
67 | return '' |
---|
68 | finally: |
---|
69 | context.caller_stack._pop_frame() |
---|
70 | |
---|
71 | |
---|
72 | def render_body(context): |
---|
73 | context.caller_stack._push_frame() |
---|
74 | try: |
---|
75 | status = context.get('status', UNDEFINED) |
---|
76 | message = context.get('message', UNDEFINED) |
---|
77 | def render_large_message(message,status): |
---|
78 | return render_render_large_message(context,message,status) |
---|
79 | __M_writer = context.writer() |
---|
80 | # SOURCE LINE 76 |
---|
81 | __M_writer(u'\n ') |
---|
82 | # SOURCE LINE 77 |
---|
83 | __M_writer(unicode(render_large_message( message, status ))) |
---|
84 | __M_writer(u'\n') |
---|
85 | return '' |
---|
86 | finally: |
---|
87 | context.caller_stack._pop_frame() |
---|
88 | |
---|
89 | |
---|
90 | def render_render_msg(context,msg,status='done'): |
---|
91 | context.caller_stack._push_frame() |
---|
92 | try: |
---|
93 | _ = context.get('_', UNDEFINED) |
---|
94 | __M_writer = context.writer() |
---|
95 | # SOURCE LINE 86 |
---|
96 | __M_writer(u'\n <div class="') |
---|
97 | # SOURCE LINE 87 |
---|
98 | __M_writer(unicode(status)) |
---|
99 | __M_writer(u'message">') |
---|
100 | __M_writer(unicode(_(msg))) |
---|
101 | __M_writer(u'</div>\n <br/>\n') |
---|
102 | return '' |
---|
103 | finally: |
---|
104 | context.caller_stack._pop_frame() |
---|
105 | |
---|
106 | |
---|
107 | def render_center_panel(context): |
---|
108 | context.caller_stack._push_frame() |
---|
109 | try: |
---|
110 | status = context.get('status', UNDEFINED) |
---|
111 | message = context.get('message', UNDEFINED) |
---|
112 | def render_large_message(message,status): |
---|
113 | return render_render_large_message(context,message,status) |
---|
114 | __M_writer = context.writer() |
---|
115 | # SOURCE LINE 72 |
---|
116 | __M_writer(u'\n ') |
---|
117 | # SOURCE LINE 73 |
---|
118 | __M_writer(unicode(render_large_message( message, status ))) |
---|
119 | __M_writer(u'\n') |
---|
120 | return '' |
---|
121 | finally: |
---|
122 | context.caller_stack._pop_frame() |
---|
123 | |
---|
124 | |
---|
125 | def render_init(context): |
---|
126 | context.caller_stack._push_frame() |
---|
127 | try: |
---|
128 | self = context.get('self', UNDEFINED) |
---|
129 | active_view = context.get('active_view', UNDEFINED) |
---|
130 | __M_writer = context.writer() |
---|
131 | # SOURCE LINE 15 |
---|
132 | __M_writer(u'\n') |
---|
133 | # SOURCE LINE 16 |
---|
134 | |
---|
135 | self.has_left_panel=False |
---|
136 | self.has_right_panel=False |
---|
137 | self.active_view=active_view |
---|
138 | self.message_box_visible=False |
---|
139 | |
---|
140 | |
---|
141 | # SOURCE LINE 21 |
---|
142 | __M_writer(u'\n') |
---|
143 | return '' |
---|
144 | finally: |
---|
145 | context.caller_stack._pop_frame() |
---|
146 | |
---|
147 | |
---|
148 | def render_render_large_message(context,message,status): |
---|
149 | context.caller_stack._push_frame() |
---|
150 | try: |
---|
151 | _ = context.get('_', UNDEFINED) |
---|
152 | __M_writer = context.writer() |
---|
153 | # SOURCE LINE 81 |
---|
154 | __M_writer(u'\n <div class="') |
---|
155 | # SOURCE LINE 82 |
---|
156 | __M_writer(unicode(status)) |
---|
157 | __M_writer(u'messagelarge" style="margin: 1em">') |
---|
158 | __M_writer(unicode(_(message))) |
---|
159 | __M_writer(u'</div>\n') |
---|
160 | return '' |
---|
161 | finally: |
---|
162 | context.caller_stack._pop_frame() |
---|
163 | |
---|
164 | |
---|
165 | def render_javascripts(context): |
---|
166 | context.caller_stack._push_frame() |
---|
167 | try: |
---|
168 | parent = context.get('parent', UNDEFINED) |
---|
169 | int = context.get('int', UNDEFINED) |
---|
170 | h = context.get('h', UNDEFINED) |
---|
171 | app = context.get('app', UNDEFINED) |
---|
172 | refresh_frames = context.get('refresh_frames', UNDEFINED) |
---|
173 | trans = context.get('trans', UNDEFINED) |
---|
174 | __M_writer = context.writer() |
---|
175 | # SOURCE LINE 24 |
---|
176 | __M_writer(u'\n ') |
---|
177 | # SOURCE LINE 25 |
---|
178 | __M_writer(unicode(parent.javascripts())) |
---|
179 | __M_writer(u'\n <script type="text/javascript">\n') |
---|
180 | # SOURCE LINE 27 |
---|
181 | if 'masthead' in refresh_frames: |
---|
182 | # SOURCE LINE 34 |
---|
183 | __M_writer(u' \n') |
---|
184 | # SOURCE LINE 36 |
---|
185 | __M_writer(u' if ( parent.user_changed ) {\n') |
---|
186 | # SOURCE LINE 37 |
---|
187 | if trans.user: |
---|
188 | # SOURCE LINE 38 |
---|
189 | __M_writer(u' parent.user_changed( "') |
---|
190 | __M_writer(unicode(trans.user.email)) |
---|
191 | __M_writer(u'", ') |
---|
192 | __M_writer(unicode(int( app.config.is_admin_user( trans.user ) ))) |
---|
193 | __M_writer(u' );\n') |
---|
194 | # SOURCE LINE 39 |
---|
195 | else: |
---|
196 | # SOURCE LINE 40 |
---|
197 | __M_writer(u' parent.user_changed( null, false );\n') |
---|
198 | # SOURCE LINE 42 |
---|
199 | __M_writer(u' }\n') |
---|
200 | # SOURCE LINE 44 |
---|
201 | if 'history' in refresh_frames: |
---|
202 | # SOURCE LINE 45 |
---|
203 | __M_writer(u' if ( parent.frames && parent.frames.galaxy_history ) {\n parent.frames.galaxy_history.location.href="') |
---|
204 | # SOURCE LINE 46 |
---|
205 | __M_writer(unicode(h.url_for( controller='root', action='history'))) |
---|
206 | __M_writer(u'";\n if ( parent.force_right_panel ) {\n parent.force_right_panel( \'show\' );\n }\n }\n') |
---|
207 | # SOURCE LINE 52 |
---|
208 | if 'tools' in refresh_frames: |
---|
209 | # SOURCE LINE 53 |
---|
210 | __M_writer(u' if ( parent.frames && parent.frames.galaxy_tools ) {\n parent.frames.galaxy_tools.location.href="') |
---|
211 | # SOURCE LINE 54 |
---|
212 | __M_writer(unicode(h.url_for( controller='root', action='tool_menu'))) |
---|
213 | __M_writer(u'";\n if ( parent.force_left_panel ) {\n parent.force_left_panel( \'show\' );\n }\n }\n') |
---|
214 | # SOURCE LINE 60 |
---|
215 | __M_writer(u'\n if ( parent.handle_minwidth_hint )\n {\n parent.handle_minwidth_hint( -1 );\n }\n </script>\n') |
---|
216 | return '' |
---|
217 | finally: |
---|
218 | context.caller_stack._pop_frame() |
---|
219 | |
---|
220 | |
---|