function views_data_export_plugin_display_export::preview in Views data export 6.3
Same name and namespace in other branches
- 6 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::preview()
- 6.2 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::preview()
- 7.4 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::preview()
- 7 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::preview()
- 7.3 plugins/views_data_export_plugin_display_export.inc \views_data_export_plugin_display_export::preview()
TBD - What does 'preview' mean for bulk exports? According to doc: "Fully render the display for the purposes of a live preview or some other AJAXy reason. [views_plugin_display.inc:1877]"
Not sure it makes sense for Bulk exports to be previewed in this manner? We need the user's full attention to run the batch. Suggestions: 1) Provide a link to execute the view? 2) Provide a link to the last file we generated?? 3) Show a table of the first 20 results?
File
- plugins/
views_data_export_plugin_display_export.inc, line 458 - Contains the bulk export display plugin.
Class
- views_data_export_plugin_display_export
- The plugin that batches its rendering.
Code
function preview() {
if (!$this
->is_batched()) {
// Can replace with return parent::preview() when views 2.12 lands.
if (!empty($this->view->live_preview)) {
// Change the items per page:
$this->view
->set_items_per_page(20);
return '<p>' . t('A maximum of 20 items will be shown here, all results will be shown on export.') . '</p><pre>' . check_plain($this->view
->render()) . '</pre>';
}
return $this->view
->render();
}
return '';
}