| 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 = 1287725327.4199979 |
|---|
| 7 | _template_filename=u'templates/root/history_common.mako' |
|---|
| 8 | _template_uri=u'root/history_common.mako' |
|---|
| 9 | _template_cache=cache.Cache(__name__, _modified_time) |
|---|
| 10 | _source_encoding=None |
|---|
| 11 | _exports = ['render_dataset'] |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | def render_body(context,**pageargs): |
|---|
| 15 | context.caller_stack._push_frame() |
|---|
| 16 | try: |
|---|
| 17 | __M_locals = __M_dict_builtin(pageargs=pageargs) |
|---|
| 18 | n_ = context.get('n_', UNDEFINED) |
|---|
| 19 | __M_writer = context.writer() |
|---|
| 20 | # SOURCE LINE 1 |
|---|
| 21 | _=n_ |
|---|
| 22 | |
|---|
| 23 | __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin()[__M_key]) for __M_key in ['_'] if __M_key in __M_locals_builtin()])) |
|---|
| 24 | __M_writer(u'\n') |
|---|
| 25 | # SOURCE LINE 208 |
|---|
| 26 | __M_writer(u'\n') |
|---|
| 27 | return '' |
|---|
| 28 | finally: |
|---|
| 29 | context.caller_stack._pop_frame() |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | def render_render_dataset(context,data,hid,show_deleted_on_refresh=False,for_editing=True): |
|---|
| 33 | context.caller_stack._push_frame() |
|---|
| 34 | try: |
|---|
| 35 | h = context.get('h', UNDEFINED) |
|---|
| 36 | app = context.get('app', UNDEFINED) |
|---|
| 37 | def render_dataset(data,hid,show_deleted_on_refresh=False,for_editing=True): |
|---|
| 38 | return render_render_dataset(context,data,hid,show_deleted_on_refresh,for_editing) |
|---|
| 39 | request = context.get('request', UNDEFINED) |
|---|
| 40 | len = context.get('len', UNDEFINED) |
|---|
| 41 | enumerate = context.get('enumerate', UNDEFINED) |
|---|
| 42 | trans = context.get('trans', UNDEFINED) |
|---|
| 43 | _ = context.get('_', UNDEFINED) |
|---|
| 44 | __M_writer = context.writer() |
|---|
| 45 | # SOURCE LINE 3 |
|---|
| 46 | __M_writer(u'\n <a name="') |
|---|
| 47 | # SOURCE LINE 4 |
|---|
| 48 | __M_writer(unicode(trans.security.encode_id( data.id ))) |
|---|
| 49 | __M_writer(u'"></a>\n ') |
|---|
| 50 | # SOURCE LINE 5 |
|---|
| 51 | |
|---|
| 52 | if data.state in ['no state','',None]: |
|---|
| 53 | data_state = "queued" |
|---|
| 54 | else: |
|---|
| 55 | data_state = data.state |
|---|
| 56 | current_user_roles = trans.get_current_user_roles() |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | # SOURCE LINE 11 |
|---|
| 60 | __M_writer(u'\n') |
|---|
| 61 | # SOURCE LINE 12 |
|---|
| 62 | if not trans.user_is_admin() and not trans.app.security_agent.can_access_dataset( current_user_roles, data.dataset ): |
|---|
| 63 | # SOURCE LINE 13 |
|---|
| 64 | __M_writer(u' <div class="historyItemWrapper historyItem historyItem-') |
|---|
| 65 | __M_writer(unicode(data_state)) |
|---|
| 66 | __M_writer(u' historyItem-noPermission" id="historyItem-') |
|---|
| 67 | __M_writer(unicode(data.id)) |
|---|
| 68 | __M_writer(u'">\n') |
|---|
| 69 | # SOURCE LINE 14 |
|---|
| 70 | else: |
|---|
| 71 | # SOURCE LINE 15 |
|---|
| 72 | __M_writer(u' <div class="historyItemWrapper historyItem historyItem-') |
|---|
| 73 | __M_writer(unicode(data_state)) |
|---|
| 74 | __M_writer(u'" id="historyItem-') |
|---|
| 75 | __M_writer(unicode(data.id)) |
|---|
| 76 | __M_writer(u'">\n') |
|---|
| 77 | # SOURCE LINE 17 |
|---|
| 78 | __M_writer(u' \n') |
|---|
| 79 | # SOURCE LINE 18 |
|---|
| 80 | if data.deleted: |
|---|
| 81 | # SOURCE LINE 19 |
|---|
| 82 | __M_writer(u' <div class="warningmessagesmall">\n <strong>This dataset has been deleted. Click <a href="') |
|---|
| 83 | # SOURCE LINE 20 |
|---|
| 84 | __M_writer(unicode(h.url_for( controller='dataset', action='undelete', id=data.id ))) |
|---|
| 85 | __M_writer(u'" class="historyItemUndelete" id="historyItemUndeleter-') |
|---|
| 86 | __M_writer(unicode(data.id)) |
|---|
| 87 | __M_writer(u'" target="galaxy_history">here</a> to undelete.</strong>\n </div>\n') |
|---|
| 88 | # SOURCE LINE 23 |
|---|
| 89 | __M_writer(u'\n') |
|---|
| 90 | # SOURCE LINE 24 |
|---|
| 91 | if data.visible is False: |
|---|
| 92 | # SOURCE LINE 25 |
|---|
| 93 | __M_writer(u' <div class="warningmessagesmall">\n <strong>This dataset has been hidden. Click <a href="') |
|---|
| 94 | # SOURCE LINE 26 |
|---|
| 95 | __M_writer(unicode(h.url_for( controller='dataset', action='unhide', id=data.id ))) |
|---|
| 96 | __M_writer(u'" class="historyItemUnhide" id="historyItemUnhider-') |
|---|
| 97 | __M_writer(unicode(data.id)) |
|---|
| 98 | __M_writer(u'" target="galaxy_history">here</a> to unhide.</strong>\n </div>\n') |
|---|
| 99 | # SOURCE LINE 29 |
|---|
| 100 | __M_writer(u'\n\n') |
|---|
| 101 | # SOURCE LINE 32 |
|---|
| 102 | __M_writer(u' <div style="overflow: hidden;" class="historyItemTitleBar"> \n <div class="historyItemButtons">\n') |
|---|
| 103 | # SOURCE LINE 34 |
|---|
| 104 | if data_state == "upload": |
|---|
| 105 | # SOURCE LINE 38 |
|---|
| 106 | __M_writer(u" <img title='Display Data' class='icon-button display_disabled' />\n") |
|---|
| 107 | # SOURCE LINE 39 |
|---|
| 108 | if for_editing: |
|---|
| 109 | # SOURCE LINE 40 |
|---|
| 110 | __M_writer(u" <img title='Edit Attributes' class='icon-button edit_disabled' />\n") |
|---|
| 111 | # SOURCE LINE 42 |
|---|
| 112 | else: |
|---|
| 113 | # SOURCE LINE 43 |
|---|
| 114 | __M_writer(u' ') |
|---|
| 115 | |
|---|
| 116 | dataset_id = trans.security.encode_id( data.id ) |
|---|
| 117 | if for_editing: |
|---|
| 118 | display_url = h.url_for( controller='dataset', action='display', dataset_id=dataset_id, preview=True, filename='' ) |
|---|
| 119 | else: |
|---|
| 120 | # Get URL for display only. |
|---|
| 121 | if data.history.user and data.history.user.username: |
|---|
| 122 | display_url = h.url_for( controller='dataset', action='display_by_username_and_slug', |
|---|
| 123 | username=data.history.user.username, slug=dataset_id ) |
|---|
| 124 | else: |
|---|
| 125 | # HACK: revert to for_editing display URL when there is no user/username. This should only happen when |
|---|
| 126 | # there's no user/username because dataset is being displayed by history/view after error reported. |
|---|
| 127 | # There are no security concerns here because both dataset/display and dataset/display_by_username_and_slug |
|---|
| 128 | # check user permissions (to the same degree) before displaying. |
|---|
| 129 | display_url = h.url_for( controller='dataset', action='display', dataset_id=dataset_id, preview=True, filename='' ) |
|---|
| 130 | |
|---|
| 131 | |
|---|
| 132 | # SOURCE LINE 58 |
|---|
| 133 | __M_writer(u'\n <a class="icon-button display tooltip" title="Display data in browser" href="') |
|---|
| 134 | # SOURCE LINE 59 |
|---|
| 135 | __M_writer(unicode(display_url)) |
|---|
| 136 | __M_writer(u'"\n') |
|---|
| 137 | # SOURCE LINE 60 |
|---|
| 138 | if for_editing: |
|---|
| 139 | # SOURCE LINE 61 |
|---|
| 140 | __M_writer(u' target="galaxy_main"\n') |
|---|
| 141 | # SOURCE LINE 63 |
|---|
| 142 | __M_writer(u' ></a>\n') |
|---|
| 143 | # SOURCE LINE 64 |
|---|
| 144 | if for_editing: |
|---|
| 145 | # SOURCE LINE 65 |
|---|
| 146 | __M_writer(u' <a class="icon-button edit tooltip" title="Edit attributes" href="') |
|---|
| 147 | __M_writer(unicode(h.url_for( controller='root', action='edit', id=data.id ))) |
|---|
| 148 | __M_writer(u'" target="galaxy_main"></a>\n') |
|---|
| 149 | # SOURCE LINE 68 |
|---|
| 150 | if for_editing: |
|---|
| 151 | # SOURCE LINE 69 |
|---|
| 152 | __M_writer(u' <a class="icon-button delete tooltip" title="Delete" href="') |
|---|
| 153 | __M_writer(unicode(h.url_for( action='delete', id=data.id, show_deleted_on_refresh=show_deleted_on_refresh ))) |
|---|
| 154 | __M_writer(u'" id="historyItemDeleter-') |
|---|
| 155 | __M_writer(unicode(data.id)) |
|---|
| 156 | __M_writer(u'"></a>\n') |
|---|
| 157 | # SOURCE LINE 71 |
|---|
| 158 | __M_writer(u' </div>\n <span class="state-icon"></span>\n <span class="historyItemTitle">') |
|---|
| 159 | # SOURCE LINE 73 |
|---|
| 160 | __M_writer(unicode(hid)) |
|---|
| 161 | __M_writer(u': ') |
|---|
| 162 | __M_writer(unicode(data.display_name())) |
|---|
| 163 | __M_writer(u'</span>\n </div>\n \n') |
|---|
| 164 | # SOURCE LINE 77 |
|---|
| 165 | __M_writer(u' \n <div id="info') |
|---|
| 166 | # SOURCE LINE 78 |
|---|
| 167 | __M_writer(unicode(data.id)) |
|---|
| 168 | __M_writer(u'" class="historyItemBody">\n') |
|---|
| 169 | # SOURCE LINE 79 |
|---|
| 170 | if not trans.user_is_admin() and not trans.app.security_agent.can_access_dataset( current_user_roles, data.dataset ): |
|---|
| 171 | # SOURCE LINE 80 |
|---|
| 172 | __M_writer(u' <div>You do not have permission to view this dataset.</div>\n') |
|---|
| 173 | # SOURCE LINE 81 |
|---|
| 174 | elif data_state == "upload": |
|---|
| 175 | # SOURCE LINE 82 |
|---|
| 176 | __M_writer(u' <div>Dataset is uploading</div>\n') |
|---|
| 177 | # SOURCE LINE 83 |
|---|
| 178 | elif data_state == "queued": |
|---|
| 179 | # SOURCE LINE 84 |
|---|
| 180 | __M_writer(u' <div>') |
|---|
| 181 | __M_writer(unicode(_('Job is waiting to run'))) |
|---|
| 182 | __M_writer(u'</div>\n') |
|---|
| 183 | # SOURCE LINE 85 |
|---|
| 184 | elif data_state == "running": |
|---|
| 185 | # SOURCE LINE 86 |
|---|
| 186 | __M_writer(u' <div>') |
|---|
| 187 | __M_writer(unicode(_('Job is currently running'))) |
|---|
| 188 | __M_writer(u'</div>\n') |
|---|
| 189 | # SOURCE LINE 87 |
|---|
| 190 | elif data_state == "error": |
|---|
| 191 | # SOURCE LINE 88 |
|---|
| 192 | __M_writer(u' <div>\n An error occurred running this job: <i>') |
|---|
| 193 | # SOURCE LINE 89 |
|---|
| 194 | __M_writer(unicode(data.display_info().strip())) |
|---|
| 195 | __M_writer(u'</i>\n </div>\n <div>\n <a href="') |
|---|
| 196 | # SOURCE LINE 92 |
|---|
| 197 | __M_writer(unicode(h.url_for( controller='dataset', action='errors', id=data.id ))) |
|---|
| 198 | __M_writer(u'" target="galaxy_main" title="View or report this error" class="icon-button bug tooltip"></a>\n <a href="') |
|---|
| 199 | # SOURCE LINE 93 |
|---|
| 200 | __M_writer(unicode(h.url_for( controller='tool_runner', action='rerun', id=data.id ))) |
|---|
| 201 | __M_writer(u'" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>\n </div>\n') |
|---|
| 202 | # SOURCE LINE 95 |
|---|
| 203 | elif data_state == "discarded": |
|---|
| 204 | # SOURCE LINE 96 |
|---|
| 205 | __M_writer(u' <div>\n The job creating this dataset was cancelled before completion.\n </div>\n') |
|---|
| 206 | # SOURCE LINE 99 |
|---|
| 207 | elif data_state == 'setting_metadata': |
|---|
| 208 | # SOURCE LINE 100 |
|---|
| 209 | __M_writer(u' <div>') |
|---|
| 210 | __M_writer(unicode(_('Metadata is being Auto-Detected.'))) |
|---|
| 211 | __M_writer(u'</div>\n') |
|---|
| 212 | # SOURCE LINE 101 |
|---|
| 213 | elif data_state == "empty": |
|---|
| 214 | # SOURCE LINE 102 |
|---|
| 215 | __M_writer(u' <div>') |
|---|
| 216 | __M_writer(unicode(_('No data: '))) |
|---|
| 217 | __M_writer(u'<i>') |
|---|
| 218 | __M_writer(unicode(data.display_info())) |
|---|
| 219 | __M_writer(u'</i></div>\n') |
|---|
| 220 | # SOURCE LINE 103 |
|---|
| 221 | elif data_state in [ "ok", "failed_metadata" ]: |
|---|
| 222 | # SOURCE LINE 104 |
|---|
| 223 | if data_state == "failed_metadata": |
|---|
| 224 | # SOURCE LINE 105 |
|---|
| 225 | __M_writer(u' <div class="warningmessagesmall" style="margin: 4px 0 4px 0">\n An error occurred setting the metadata for this dataset. You may be able to <a href="') |
|---|
| 226 | # SOURCE LINE 106 |
|---|
| 227 | __M_writer(unicode(h.url_for( controller='root', action='edit', id=data.id ))) |
|---|
| 228 | __M_writer(u'" target="galaxy_main">set it manually or retry auto-detection</a>.\n </div>\n') |
|---|
| 229 | # SOURCE LINE 109 |
|---|
| 230 | __M_writer(u' <div>\n ') |
|---|
| 231 | # SOURCE LINE 110 |
|---|
| 232 | __M_writer(unicode(data.blurb)) |
|---|
| 233 | __M_writer(u',\n format: <span class="') |
|---|
| 234 | # SOURCE LINE 111 |
|---|
| 235 | __M_writer(unicode(data.ext)) |
|---|
| 236 | __M_writer(u'">') |
|---|
| 237 | __M_writer(unicode(data.ext)) |
|---|
| 238 | __M_writer(u'</span>, \n database:\n') |
|---|
| 239 | # SOURCE LINE 113 |
|---|
| 240 | if data.dbkey == '?': |
|---|
| 241 | # SOURCE LINE 114 |
|---|
| 242 | __M_writer(u' <a href="') |
|---|
| 243 | __M_writer(unicode(h.url_for( controller='root', action='edit', id=data.id ))) |
|---|
| 244 | __M_writer(u'" target="galaxy_main">') |
|---|
| 245 | __M_writer(unicode(_(data.dbkey))) |
|---|
| 246 | __M_writer(u'</a>\n') |
|---|
| 247 | # SOURCE LINE 115 |
|---|
| 248 | else: |
|---|
| 249 | # SOURCE LINE 116 |
|---|
| 250 | __M_writer(u' <span class="') |
|---|
| 251 | __M_writer(unicode(data.dbkey)) |
|---|
| 252 | __M_writer(u'">') |
|---|
| 253 | __M_writer(unicode(_(data.dbkey))) |
|---|
| 254 | __M_writer(u'</span>\n') |
|---|
| 255 | # SOURCE LINE 118 |
|---|
| 256 | __M_writer(u' </div>\n <div class="info">') |
|---|
| 257 | # SOURCE LINE 119 |
|---|
| 258 | __M_writer(unicode(_('Info: '))) |
|---|
| 259 | __M_writer(unicode(data.display_info())) |
|---|
| 260 | __M_writer(u'</div>\n <div> \n ') |
|---|
| 261 | # SOURCE LINE 121 |
|---|
| 262 | dataset_id=trans.security.encode_id( data.id ) |
|---|
| 263 | |
|---|
| 264 | __M_writer(u'\n') |
|---|
| 265 | # SOURCE LINE 122 |
|---|
| 266 | if data.has_data(): |
|---|
| 267 | # SOURCE LINE 123 |
|---|
| 268 | __M_writer(u' <a href="') |
|---|
| 269 | __M_writer(unicode(h.url_for( controller='dataset', action='display', dataset_id=dataset_id, to_ext=data.ext ))) |
|---|
| 270 | __M_writer(u'" title="Save" class="icon-button disk tooltip"></a>\n') |
|---|
| 271 | # SOURCE LINE 124 |
|---|
| 272 | if for_editing: |
|---|
| 273 | # SOURCE LINE 125 |
|---|
| 274 | __M_writer(u' <a href="') |
|---|
| 275 | __M_writer(unicode(h.url_for( controller='tool_runner', action='rerun', id=data.id ))) |
|---|
| 276 | __M_writer(u'" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>\n') |
|---|
| 277 | # SOURCE LINE 126 |
|---|
| 278 | if app.config.get_bool( 'enable_tracks', False ) and data.ext in app.datatypes_registry.get_available_tracks(): |
|---|
| 279 | # SOURCE LINE 127 |
|---|
| 280 | __M_writer(u' <a data-url="') |
|---|
| 281 | __M_writer(unicode(h.url_for( controller='tracks', action='list_tracks' ))) |
|---|
| 282 | __M_writer(u'" class="icon-button vis-chart tooltip trackster-add"\n action-url="') |
|---|
| 283 | # SOURCE LINE 128 |
|---|
| 284 | __M_writer(unicode(h.url_for( controller='tracks', action='browser', dataset_id=dataset_id))) |
|---|
| 285 | __M_writer(u'"\n new-url="') |
|---|
| 286 | # SOURCE LINE 129 |
|---|
| 287 | __M_writer(unicode(h.url_for( controller='tracks', action='index', dataset_id=dataset_id, default_dbkey=data.dbkey))) |
|---|
| 288 | __M_writer(u'" title="Visualize in Trackster"></a>\n') |
|---|
| 289 | # SOURCE LINE 131 |
|---|
| 290 | if trans.user: |
|---|
| 291 | # SOURCE LINE 132 |
|---|
| 292 | __M_writer(u' <div style="float: right">\n <a href="') |
|---|
| 293 | # SOURCE LINE 133 |
|---|
| 294 | __M_writer(unicode(h.url_for( controller='tag', action='retag', item_class=data.__class__.__name__, item_id=dataset_id ))) |
|---|
| 295 | __M_writer(u'" target="galaxy_main" title="Edit dataset tags" class="icon-button tags tooltip"></a>\n <a href="') |
|---|
| 296 | # SOURCE LINE 134 |
|---|
| 297 | __M_writer(unicode(h.url_for( controller='dataset', action='annotate', id=dataset_id ))) |
|---|
| 298 | __M_writer(u'" target="galaxy_main" title="Edit dataset annotation" class="icon-button annotate tooltip"></a>\n </div>\n <div style="clear: both"></div>\n <div class="tag-area" style="display: none">\n <strong>Tags:</strong>\n <div class="tag-elt"></div>\n </div>\n <div id="') |
|---|
| 299 | # SOURCE LINE 141 |
|---|
| 300 | __M_writer(unicode(dataset_id)) |
|---|
| 301 | __M_writer(u'-annotation-area" class="annotation-area" style="display: none">\n <strong>Annotation:</strong>\n <div id="') |
|---|
| 302 | # SOURCE LINE 143 |
|---|
| 303 | __M_writer(unicode(dataset_id)) |
|---|
| 304 | __M_writer(u'-annotation-elt" style="margin: 1px 0px 1px 0px" class="annotation-elt tooltip editable-text" title="Edit dataset annotation"></div>\n </div>\n \n') |
|---|
| 305 | # SOURCE LINE 147 |
|---|
| 306 | else: |
|---|
| 307 | # SOURCE LINE 150 |
|---|
| 308 | __M_writer(u' <div style="clear: both"></div>\n') |
|---|
| 309 | # SOURCE LINE 152 |
|---|
| 310 | __M_writer(u' \t\t <div style="clear: both"></div>\n') |
|---|
| 311 | # SOURCE LINE 153 |
|---|
| 312 | for display_app in data.datatype.get_display_types(): |
|---|
| 313 | # SOURCE LINE 154 |
|---|
| 314 | __M_writer(u' ') |
|---|
| 315 | target_frame, display_links = data.datatype.get_display_links( data, display_app, app, request.base ) |
|---|
| 316 | |
|---|
| 317 | __M_writer(u'\n') |
|---|
| 318 | # SOURCE LINE 155 |
|---|
| 319 | if len( display_links ) > 0: |
|---|
| 320 | # SOURCE LINE 156 |
|---|
| 321 | __M_writer(u' | ') |
|---|
| 322 | __M_writer(unicode(data.datatype.get_display_label(display_app))) |
|---|
| 323 | __M_writer(u'\n') |
|---|
| 324 | # SOURCE LINE 157 |
|---|
| 325 | for display_name, display_link in display_links: |
|---|
| 326 | # SOURCE LINE 158 |
|---|
| 327 | __M_writer(u' <a target="') |
|---|
| 328 | __M_writer(unicode(target_frame)) |
|---|
| 329 | __M_writer(u'" href="') |
|---|
| 330 | __M_writer(unicode(display_link)) |
|---|
| 331 | __M_writer(u'">') |
|---|
| 332 | __M_writer(unicode(_(display_name))) |
|---|
| 333 | __M_writer(u'</a> \n') |
|---|
| 334 | # SOURCE LINE 162 |
|---|
| 335 | for display_app in data.get_display_applications( trans ).itervalues(): |
|---|
| 336 | # SOURCE LINE 163 |
|---|
| 337 | __M_writer(u' | ') |
|---|
| 338 | __M_writer(unicode(display_app.name)) |
|---|
| 339 | __M_writer(u' \n') |
|---|
| 340 | # SOURCE LINE 164 |
|---|
| 341 | for link_app in display_app.links.itervalues(): |
|---|
| 342 | # SOURCE LINE 165 |
|---|
| 343 | __M_writer(u' <a target="') |
|---|
| 344 | __M_writer(unicode(link_app.url.get( 'target_frame', '_blank' ))) |
|---|
| 345 | __M_writer(u'" href="') |
|---|
| 346 | __M_writer(unicode(link_app.get_display_url( data, trans ))) |
|---|
| 347 | __M_writer(u'">') |
|---|
| 348 | __M_writer(unicode(_(link_app.name))) |
|---|
| 349 | __M_writer(u'</a> \n') |
|---|
| 350 | # SOURCE LINE 168 |
|---|
| 351 | elif for_editing: |
|---|
| 352 | # SOURCE LINE 169 |
|---|
| 353 | __M_writer(u' <a href="') |
|---|
| 354 | __M_writer(unicode(h.url_for( controller='tool_runner', action='rerun', id=data.id ))) |
|---|
| 355 | __M_writer(u'" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>\n') |
|---|
| 356 | # SOURCE LINE 171 |
|---|
| 357 | __M_writer(u' \n </div>\n') |
|---|
| 358 | # SOURCE LINE 173 |
|---|
| 359 | if data.peek != "no peek": |
|---|
| 360 | # SOURCE LINE 174 |
|---|
| 361 | __M_writer(u' <div><pre id="peek') |
|---|
| 362 | __M_writer(unicode(data.id)) |
|---|
| 363 | __M_writer(u'" class="peek">') |
|---|
| 364 | __M_writer(unicode(_(data.display_peek()))) |
|---|
| 365 | __M_writer(u'</pre></div>\n') |
|---|
| 366 | # SOURCE LINE 176 |
|---|
| 367 | else: |
|---|
| 368 | # SOURCE LINE 177 |
|---|
| 369 | __M_writer(u' <div>') |
|---|
| 370 | __M_writer(unicode(_('Error: unknown dataset state "%s".') % data_state)) |
|---|
| 371 | __M_writer(u'</div>\n') |
|---|
| 372 | # SOURCE LINE 179 |
|---|
| 373 | __M_writer(u' \n') |
|---|
| 374 | # SOURCE LINE 181 |
|---|
| 375 | __M_writer(u' \n') |
|---|
| 376 | # SOURCE LINE 182 |
|---|
| 377 | if len( data.children ) > 0: |
|---|
| 378 | # SOURCE LINE 185 |
|---|
| 379 | __M_writer(u' ') |
|---|
| 380 | |
|---|
| 381 | children = [] |
|---|
| 382 | for child in data.children: |
|---|
| 383 | if child.visible: |
|---|
| 384 | children.append( child ) |
|---|
| 385 | |
|---|
| 386 | |
|---|
| 387 | # SOURCE LINE 190 |
|---|
| 388 | __M_writer(u'\n') |
|---|
| 389 | # SOURCE LINE 191 |
|---|
| 390 | if len( children ) > 0: |
|---|
| 391 | # SOURCE LINE 192 |
|---|
| 392 | __M_writer(u' <div>\n There are ') |
|---|
| 393 | # SOURCE LINE 193 |
|---|
| 394 | __M_writer(unicode(len( children ))) |
|---|
| 395 | __M_writer(u' secondary datasets.\n') |
|---|
| 396 | # SOURCE LINE 194 |
|---|
| 397 | for idx, child in enumerate(children): |
|---|
| 398 | # SOURCE LINE 195 |
|---|
| 399 | __M_writer(u' ') |
|---|
| 400 | __M_writer(unicode(render_dataset( child, idx + 1, show_deleted_on_refresh = show_deleted_on_refresh ))) |
|---|
| 401 | __M_writer(u'\n') |
|---|
| 402 | # SOURCE LINE 197 |
|---|
| 403 | __M_writer(u' </div>\n') |
|---|
| 404 | # SOURCE LINE 200 |
|---|
| 405 | __M_writer(u'\n <div style="clear: both;"></div>\n\n </div>\n \n \n </div>\n\n') |
|---|
| 406 | return '' |
|---|
| 407 | finally: |
|---|
| 408 | context.caller_stack._pop_frame() |
|---|
| 409 | |
|---|
| 410 | |
|---|