Commit af60df0e authored by Dave Reid's avatar Dave Reid

Added export sorts for uploaded date and total use count.

parent 5663f4d6
<?php <?php
/**
* @file
* The default view for the media browser library tab.
*/
$view = new view; $view = new view;
$view->name = 'media_default'; $view->name = 'media_default';
$view->description = 'Default view for the media browser library'; $view->description = 'Default view for the media browser library tab.';
$view->tag = 'default, media'; $view->tag = 'media, default';
$view->base_table = 'file_managed'; $view->base_table = 'file_managed';
$view->human_name = 'Media browser'; $view->human_name = 'Media browser';
$view->core = 7; $view->core = 7;
...@@ -12,6 +18,7 @@ $view->disabled = FALSE; /* Edit this to true to make a default view disabled in ...@@ -12,6 +18,7 @@ $view->disabled = FALSE; /* Edit this to true to make a default view disabled in
/* Display: Master */ /* Display: Master */
$handler = $view->new_display('default', 'Master', 'default'); $handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['use_ajax'] = TRUE; $handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['group_by'] = TRUE;
$handler->display->display_options['access']['type'] = 'perm'; $handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['type'] = 'views_query';
...@@ -49,6 +56,20 @@ $handler->display->display_options['fields']['filename']['alter']['html'] = 0; ...@@ -49,6 +56,20 @@ $handler->display->display_options['fields']['filename']['alter']['html'] = 0;
$handler->display->display_options['fields']['filename']['hide_empty'] = 0; $handler->display->display_options['fields']['filename']['hide_empty'] = 0;
$handler->display->display_options['fields']['filename']['empty_zero'] = 0; $handler->display->display_options['fields']['filename']['empty_zero'] = 0;
$handler->display->display_options['fields']['filename']['link_to_file'] = 1; $handler->display->display_options['fields']['filename']['link_to_file'] = 1;
/* Sort criterion: File: Upload date */
$handler->display->display_options['sorts']['timestamp']['id'] = 'timestamp';
$handler->display->display_options['sorts']['timestamp']['table'] = 'file_managed';
$handler->display->display_options['sorts']['timestamp']['field'] = 'timestamp';
$handler->display->display_options['sorts']['timestamp']['order'] = 'DESC';
$handler->display->display_options['sorts']['timestamp']['exposed'] = TRUE;
$handler->display->display_options['sorts']['timestamp']['expose']['label'] = 'Upload date';
/* Sort criterion: SUM(File Usage: Use count) */
$handler->display->display_options['sorts']['count']['id'] = 'count';
$handler->display->display_options['sorts']['count']['table'] = 'file_usage';
$handler->display->display_options['sorts']['count']['field'] = 'count';
$handler->display->display_options['sorts']['count']['group_type'] = 'sum';
$handler->display->display_options['sorts']['count']['exposed'] = TRUE;
$handler->display->display_options['sorts']['count']['expose']['label'] = 'Use count';
/* Filter criterion: File: Name */ /* Filter criterion: File: Name */
$handler->display->display_options['filters']['filename']['id'] = 'filename'; $handler->display->display_options['filters']['filename']['id'] = 'filename';
$handler->display->display_options['filters']['filename']['table'] = 'file_managed'; $handler->display->display_options['filters']['filename']['table'] = 'file_managed';
...@@ -88,6 +109,8 @@ $translatables['media_default'] = array( ...@@ -88,6 +109,8 @@ $translatables['media_default'] = array(
t('- All -'), t('- All -'),
t('Offset'), t('Offset'),
t('No files available.'), t('No files available.'),
t('Upload date'),
t('Use count'),
t('File name'), t('File name'),
t('Type'), t('Type'),
t('Media browser'), t('Media browser'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment