|
@@ -8,415 +8,207 @@
|
|
|
function tripal_analysis_views_default_views() {
|
|
|
$views = array();
|
|
|
|
|
|
- if (!module_exists('tripal_views')) {
|
|
|
- return $views;
|
|
|
- }
|
|
|
+ $view = tripal_analysis_defaultvalue_admin_analysis();
|
|
|
+ $views[$view->name] = $view;
|
|
|
+
|
|
|
+ return $views;
|
|
|
+}
|
|
|
+
|
|
|
+function tripal_analysis_defaultvalue_admin_analysis() {
|
|
|
|
|
|
- // Main default view
|
|
|
- $view = new view;
|
|
|
- $view->name = 'analysis_listing';
|
|
|
- $view->description = 'A default listing of analyses provided by Tripal';
|
|
|
- $view->tag = 'chado default';
|
|
|
+ $view = new view();
|
|
|
+ $view->name = 'tripal_analysis_admin_analyses';
|
|
|
+ $view->description = 'DO NOT DISABLE';
|
|
|
+ $view->tag = 'tripal admin';
|
|
|
$view->base_table = 'analysis';
|
|
|
+ $view->human_name = 'Analysis Admin';
|
|
|
$view->core = 0;
|
|
|
- $view->api_version = '2';
|
|
|
+ $view->api_version = '3.0';
|
|
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
|
|
+
|
|
|
+ /* Display: Defaults */
|
|
|
$handler = $view->new_display('default', 'Defaults', 'default');
|
|
|
- $handler->override_option('fields', array(
|
|
|
+ $handler->display->display_options['title'] = 'Analysis';
|
|
|
+ $handler->display->display_options['use_more_always'] = FALSE;
|
|
|
+ $handler->display->display_options['access']['type'] = 'perm';
|
|
|
+ $handler->display->display_options['access']['perm'] = 'access chado_analysis content';
|
|
|
+ $handler->display->display_options['cache']['type'] = 'none';
|
|
|
+ $handler->display->display_options['query']['type'] = 'views_query';
|
|
|
+ $handler->display->display_options['exposed_form']['type'] = 'basic';
|
|
|
+ $handler->display->display_options['pager']['type'] = 'full';
|
|
|
+ $handler->display->display_options['pager']['options']['items_per_page'] = '25';
|
|
|
+ $handler->display->display_options['pager']['options']['offset'] = '0';
|
|
|
+ $handler->display->display_options['pager']['options']['id'] = '0';
|
|
|
+ $handler->display->display_options['pager']['options']['quantity'] = '9';
|
|
|
+ $handler->display->display_options['style_plugin'] = 'table';
|
|
|
+ $handler->display->display_options['style_options']['grouping'] = '';
|
|
|
+ $handler->display->display_options['style_options']['columns'] = array(
|
|
|
+ 'name' => 'name',
|
|
|
+ 'program' => 'program',
|
|
|
+ 'sourcename' => 'sourcename',
|
|
|
+ 'num_features' => 'num_features',
|
|
|
+ 'timeexecuted' => 'timeexecuted',
|
|
|
+ );
|
|
|
+ $handler->display->display_options['style_options']['default'] = 'name';
|
|
|
+ $handler->display->display_options['style_options']['info'] = array(
|
|
|
'name' => array(
|
|
|
- 'label' => 'Name',
|
|
|
- 'alter' => array(
|
|
|
- 'alter_text' => 0,
|
|
|
- 'text' => '',
|
|
|
- 'make_link' => 0,
|
|
|
- 'path' => '',
|
|
|
- 'absolute' => 0,
|
|
|
- 'link_class' => '',
|
|
|
- 'alt' => '',
|
|
|
- 'rel' => '',
|
|
|
- 'prefix' => '',
|
|
|
- 'suffix' => '',
|
|
|
- 'target' => '',
|
|
|
- 'help' => '',
|
|
|
- 'trim' => 0,
|
|
|
- 'max_length' => '',
|
|
|
- 'word_boundary' => 1,
|
|
|
- 'ellipsis' => 1,
|
|
|
- 'html' => 0,
|
|
|
- 'strip_tags' => 0,
|
|
|
- ),
|
|
|
- 'empty' => '',
|
|
|
- 'hide_empty' => 0,
|
|
|
- 'empty_zero' => 0,
|
|
|
- 'hide_alter_empty' => 1,
|
|
|
- 'type' => 'separator',
|
|
|
- 'separator' => ', ',
|
|
|
- 'exclude' => 0,
|
|
|
- 'link_to_node' => 1,
|
|
|
- 'id' => 'name',
|
|
|
- 'table' => 'analysis',
|
|
|
- 'field' => 'name',
|
|
|
- 'relationship' => 'none',
|
|
|
+ 'sortable' => 1,
|
|
|
+ 'separator' => '',
|
|
|
),
|
|
|
'program' => array(
|
|
|
- 'label' => 'Program',
|
|
|
- 'alter' => array(
|
|
|
- 'alter_text' => 0,
|
|
|
- 'text' => '',
|
|
|
- 'make_link' => 0,
|
|
|
- 'path' => '',
|
|
|
- 'absolute' => 0,
|
|
|
- 'link_class' => '',
|
|
|
- 'alt' => '',
|
|
|
- 'rel' => '',
|
|
|
- 'prefix' => '',
|
|
|
- 'suffix' => '',
|
|
|
- 'target' => '',
|
|
|
- 'help' => '',
|
|
|
- 'trim' => 0,
|
|
|
- 'max_length' => '',
|
|
|
- 'word_boundary' => 1,
|
|
|
- 'ellipsis' => 1,
|
|
|
- 'html' => 0,
|
|
|
- 'strip_tags' => 0,
|
|
|
- ),
|
|
|
- 'empty' => '',
|
|
|
- 'hide_empty' => 0,
|
|
|
- 'empty_zero' => 0,
|
|
|
- 'hide_alter_empty' => 1,
|
|
|
- 'exclude' => 0,
|
|
|
- 'id' => 'program',
|
|
|
- 'table' => 'analysis',
|
|
|
- 'field' => 'program',
|
|
|
- 'relationship' => 'none',
|
|
|
+ 'sortable' => 1,
|
|
|
+ 'separator' => '',
|
|
|
),
|
|
|
'sourcename' => array(
|
|
|
- 'label' => 'Source',
|
|
|
- 'alter' => array(
|
|
|
- 'alter_text' => 0,
|
|
|
- 'text' => '',
|
|
|
- 'make_link' => 0,
|
|
|
- 'path' => '',
|
|
|
- 'absolute' => 0,
|
|
|
- 'link_class' => '',
|
|
|
- 'alt' => '',
|
|
|
- 'rel' => '',
|
|
|
- 'prefix' => '',
|
|
|
- 'suffix' => '',
|
|
|
- 'target' => '',
|
|
|
- 'help' => '',
|
|
|
- 'trim' => 0,
|
|
|
- 'max_length' => '',
|
|
|
- 'word_boundary' => 1,
|
|
|
- 'ellipsis' => 1,
|
|
|
- 'html' => 0,
|
|
|
- 'strip_tags' => 0,
|
|
|
- ),
|
|
|
- 'empty' => '',
|
|
|
- 'hide_empty' => 0,
|
|
|
- 'empty_zero' => 0,
|
|
|
- 'hide_alter_empty' => 1,
|
|
|
- 'exclude' => 0,
|
|
|
- 'id' => 'sourcename',
|
|
|
- 'table' => 'analysis',
|
|
|
- 'field' => 'sourcename',
|
|
|
- 'relationship' => 'none',
|
|
|
- ),
|
|
|
- 'timeexecuted' => array(
|
|
|
- 'label' => 'Time Executed',
|
|
|
- 'alter' => array(
|
|
|
- 'alter_text' => 0,
|
|
|
- 'text' => '',
|
|
|
- 'make_link' => 0,
|
|
|
- 'path' => '',
|
|
|
- 'absolute' => 0,
|
|
|
- 'link_class' => '',
|
|
|
- 'alt' => '',
|
|
|
- 'rel' => '',
|
|
|
- 'prefix' => '',
|
|
|
- 'suffix' => '',
|
|
|
- 'target' => '',
|
|
|
- 'help' => '',
|
|
|
- 'trim' => 0,
|
|
|
- 'max_length' => '',
|
|
|
- 'word_boundary' => 1,
|
|
|
- 'ellipsis' => 1,
|
|
|
- 'html' => 0,
|
|
|
- 'strip_tags' => 0,
|
|
|
- ),
|
|
|
- 'empty' => '',
|
|
|
- 'hide_empty' => 0,
|
|
|
- 'empty_zero' => 0,
|
|
|
- 'hide_alter_empty' => 1,
|
|
|
- 'date_format' => 'custom',
|
|
|
- 'custom_date_format' => 'F j, Y',
|
|
|
- 'exclude' => 0,
|
|
|
- 'id' => 'timeexecuted',
|
|
|
- 'table' => 'analysis',
|
|
|
- 'field' => 'timeexecuted',
|
|
|
- 'override' => array(
|
|
|
- 'button' => 'Override',
|
|
|
- ),
|
|
|
- 'relationship' => 'none',
|
|
|
+ 'sortable' => 1,
|
|
|
+ 'separator' => '',
|
|
|
),
|
|
|
- ));
|
|
|
- $handler->override_option('filters', array(
|
|
|
- 'search_results' => array(
|
|
|
- 'operator' => '=',
|
|
|
- 'value' => '',
|
|
|
- 'group' => '0',
|
|
|
- 'exposed' => FALSE,
|
|
|
- 'expose' => array(
|
|
|
- 'operator' => FALSE,
|
|
|
- 'label' => '',
|
|
|
- ),
|
|
|
- 'id' => 'search_results',
|
|
|
- 'table' => 'views',
|
|
|
- 'field' => 'search_results',
|
|
|
- 'relationship' => 'none',
|
|
|
- 'apply_button' => 'Show ',
|
|
|
- 'no_results_text' => 'Click "Show" to see a list of all analysis matching the entered criteria. If you leave a any of the criteria blank then the analysis will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all analysis will be listed.',
|
|
|
- ),
|
|
|
- 'program' => array(
|
|
|
- 'operator' => '=',
|
|
|
- 'value' => '',
|
|
|
- 'group' => '0',
|
|
|
- 'exposed' => TRUE,
|
|
|
- 'expose' => array(
|
|
|
- 'use_operator' => 0,
|
|
|
- 'operator' => 'program_op',
|
|
|
- 'identifier' => 'program',
|
|
|
- 'label' => 'Program',
|
|
|
- 'remember' => 0,
|
|
|
- ),
|
|
|
- 'case' => 1,
|
|
|
- 'id' => 'program',
|
|
|
- 'table' => 'analysis',
|
|
|
- 'field' => 'program',
|
|
|
- 'relationship' => 'none',
|
|
|
- 'values_form_type' => 'select',
|
|
|
- 'multiple' => 1,
|
|
|
- 'optional' => 0,
|
|
|
- 'agg' => array(
|
|
|
- 'records_with' => 1,
|
|
|
- 'aggregates_with' => 0,
|
|
|
- ),
|
|
|
+ 'num_features' => array(
|
|
|
+ 'separator' => '',
|
|
|
),
|
|
|
'timeexecuted' => array(
|
|
|
- 'operator' => '>',
|
|
|
- 'value' => array(
|
|
|
- 'type' => 'date',
|
|
|
- 'value' => '',
|
|
|
- 'min' => '',
|
|
|
- 'max' => '',
|
|
|
- ),
|
|
|
- 'group' => '0',
|
|
|
- 'exposed' => TRUE,
|
|
|
- 'expose' => array(
|
|
|
- 'use_operator' => 1,
|
|
|
- 'operator' => 'timeexecuted_op',
|
|
|
- 'identifier' => 'timeexecuted',
|
|
|
- 'label' => 'Time Executed',
|
|
|
- 'optional' => 1,
|
|
|
- 'remember' => 0,
|
|
|
- ),
|
|
|
- 'id' => 'timeexecuted',
|
|
|
- 'table' => 'analysis',
|
|
|
- 'field' => 'timeexecuted',
|
|
|
- 'relationship' => 'none',
|
|
|
- 'agg' => array(
|
|
|
- 'records_with' => 1,
|
|
|
- 'aggregates_with' => 0,
|
|
|
- ),
|
|
|
+ 'sortable' => 1,
|
|
|
+ 'separator' => '',
|
|
|
),
|
|
|
- 'name' => array(
|
|
|
- 'operator' => '~',
|
|
|
- 'value' => '',
|
|
|
- 'group' => '0',
|
|
|
- 'exposed' => TRUE,
|
|
|
- 'expose' => array(
|
|
|
- 'use_operator' => 0,
|
|
|
- 'operator' => 'name_op',
|
|
|
- 'identifier' => 'name',
|
|
|
- 'label' => 'Name Contains',
|
|
|
- 'bef_filter_description' => '',
|
|
|
- 'remember' => 0,
|
|
|
- ),
|
|
|
- 'case' => 0,
|
|
|
- 'id' => 'name',
|
|
|
- 'table' => 'analysis',
|
|
|
- 'field' => 'name',
|
|
|
- 'relationship' => 'none',
|
|
|
- 'values_form_type' => 'textfield',
|
|
|
- 'multiple' => 0,
|
|
|
- 'optional' => 0,
|
|
|
- ),
|
|
|
- 'sourcename' => array(
|
|
|
- 'operator' => '~',
|
|
|
- 'value' => '',
|
|
|
- 'group' => '0',
|
|
|
- 'exposed' => TRUE,
|
|
|
- 'expose' => array(
|
|
|
- 'use_operator' => 0,
|
|
|
- 'operator' => 'sourcename_op',
|
|
|
- 'identifier' => 'sourcename',
|
|
|
- 'label' => 'Source Contains',
|
|
|
- 'bef_filter_description' => '',
|
|
|
- 'remember' => 0,
|
|
|
- ),
|
|
|
- 'case' => 0,
|
|
|
- 'id' => 'sourcename',
|
|
|
- 'table' => 'analysis',
|
|
|
- 'field' => 'sourcename',
|
|
|
- 'relationship' => 'none',
|
|
|
- ),
|
|
|
- ));
|
|
|
- $handler->override_option('access', array(
|
|
|
- 'type' => 'perm',
|
|
|
- 'perm' => 'access chado_analysis content',
|
|
|
- ));
|
|
|
- $handler->override_option('cache', array(
|
|
|
- 'type' => 'none',
|
|
|
- ));
|
|
|
- $handler->override_option('title', 'Analysis');
|
|
|
- $handler->override_option('header', 'Click "Show" to see a list of all analysis matching the entered criteria. If you leave a any of the criteria blank then the analysis will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all analysis will be listed.');
|
|
|
- $handler->override_option('header_format', '2');
|
|
|
- $handler->override_option('header_empty', 1);
|
|
|
- $handler->override_option('empty', 'No analyses match the supplied criteria.');
|
|
|
- $handler->override_option('empty_format', '1');
|
|
|
- $handler->override_option('items_per_page', 50);
|
|
|
- $handler->override_option('use_pager', '1');
|
|
|
- $handler->override_option('style_plugin', 'table');
|
|
|
- $handler->override_option('style_options', array(
|
|
|
- 'grouping' => '',
|
|
|
- 'override' => 1,
|
|
|
- 'sticky' => 0,
|
|
|
- 'order' => 'asc',
|
|
|
- 'summary' => '',
|
|
|
- 'columns' => array(
|
|
|
- 'name' => 'name',
|
|
|
- 'program' => 'program',
|
|
|
- 'sourcename' => 'sourcename',
|
|
|
- 'num_features' => 'num_features',
|
|
|
- 'timeexecuted' => 'timeexecuted',
|
|
|
- ),
|
|
|
- 'info' => array(
|
|
|
- 'name' => array(
|
|
|
- 'sortable' => 1,
|
|
|
- 'separator' => '',
|
|
|
- ),
|
|
|
- 'program' => array(
|
|
|
- 'sortable' => 1,
|
|
|
- 'separator' => '',
|
|
|
- ),
|
|
|
- 'sourcename' => array(
|
|
|
- 'sortable' => 1,
|
|
|
- 'separator' => '',
|
|
|
- ),
|
|
|
- 'num_features' => array(
|
|
|
- 'separator' => '',
|
|
|
- ),
|
|
|
- 'timeexecuted' => array(
|
|
|
- 'sortable' => 1,
|
|
|
- 'separator' => '',
|
|
|
- ),
|
|
|
- ),
|
|
|
- 'default' => 'name',
|
|
|
- ));
|
|
|
- // this is needed so that fields/filters can be added to the default display later
|
|
|
- $default_handler = $handler;
|
|
|
+ );
|
|
|
+ /* Header: Global: Action Links */
|
|
|
+ $handler->display->display_options['header']['action_links_area']['id'] = 'action_links_area';
|
|
|
+ $handler->display->display_options['header']['action_links_area']['table'] = 'views';
|
|
|
+ $handler->display->display_options['header']['action_links_area']['field'] = 'action_links_area';
|
|
|
+ $handler->display->display_options['header']['action_links_area']['label'] = 'Action Links';
|
|
|
+ $handler->display->display_options['header']['action_links_area']['empty'] = TRUE;
|
|
|
+ $handler->display->display_options['header']['action_links_area']['link-1'] = array(
|
|
|
+ 'label-1' => 'Add Analysis',
|
|
|
+ 'path-1' => 'node/add/tripal-analysis',
|
|
|
+ );
|
|
|
+ $handler->display->display_options['header']['action_links_area']['link-2'] = array(
|
|
|
+ 'label-2' => '',
|
|
|
+ 'path-2' => '',
|
|
|
+ );
|
|
|
+ $handler->display->display_options['header']['action_links_area']['link-3'] = array(
|
|
|
+ 'label-3' => '',
|
|
|
+ 'path-3' => '',
|
|
|
+ );
|
|
|
+ $handler->display->display_options['header']['action_links_area']['link-4'] = array(
|
|
|
+ 'label-4' => '',
|
|
|
+ 'path-4' => '',
|
|
|
+ );
|
|
|
+ /* No results behavior: Global: Text area */
|
|
|
+ $handler->display->display_options['empty']['text']['id'] = 'text';
|
|
|
+ $handler->display->display_options['empty']['text']['table'] = 'views';
|
|
|
+ $handler->display->display_options['empty']['text']['field'] = 'area';
|
|
|
+ $handler->display->display_options['empty']['text']['empty'] = TRUE;
|
|
|
+ $handler->display->display_options['empty']['text']['content'] = 'No analyses match the supplied criteria.';
|
|
|
+ $handler->display->display_options['empty']['text']['format'] = 'full_html';
|
|
|
+ /* Relationship: Analysis: Analysis => Node */
|
|
|
+ $handler->display->display_options['relationships']['analysis_id']['id'] = 'analysis_id';
|
|
|
+ $handler->display->display_options['relationships']['analysis_id']['table'] = 'chado_analysis';
|
|
|
+ $handler->display->display_options['relationships']['analysis_id']['field'] = 'analysis_id';
|
|
|
+ /* Field: Content: Nid */
|
|
|
+ $handler->display->display_options['fields']['nid']['id'] = 'nid';
|
|
|
+ $handler->display->display_options['fields']['nid']['table'] = 'node';
|
|
|
+ $handler->display->display_options['fields']['nid']['field'] = 'nid';
|
|
|
+ $handler->display->display_options['fields']['nid']['relationship'] = 'analysis_id';
|
|
|
+ $handler->display->display_options['fields']['nid']['exclude'] = TRUE;
|
|
|
+ /* Field: Chado Analysis: Name */
|
|
|
+ $handler->display->display_options['fields']['name']['id'] = 'name';
|
|
|
+ $handler->display->display_options['fields']['name']['table'] = 'analysis';
|
|
|
+ $handler->display->display_options['fields']['name']['field'] = 'name';
|
|
|
+ /* Field: Chado Analysis: Program */
|
|
|
+ $handler->display->display_options['fields']['program']['id'] = 'program';
|
|
|
+ $handler->display->display_options['fields']['program']['table'] = 'analysis';
|
|
|
+ $handler->display->display_options['fields']['program']['field'] = 'program';
|
|
|
+ /* Field: Chado Analysis: Sourcename */
|
|
|
+ $handler->display->display_options['fields']['sourcename']['id'] = 'sourcename';
|
|
|
+ $handler->display->display_options['fields']['sourcename']['table'] = 'analysis';
|
|
|
+ $handler->display->display_options['fields']['sourcename']['field'] = 'sourcename';
|
|
|
+ $handler->display->display_options['fields']['sourcename']['label'] = 'Source';
|
|
|
+ /* Field: Chado Analysis: Timeexecuted */
|
|
|
+ $handler->display->display_options['fields']['timeexecuted']['id'] = 'timeexecuted';
|
|
|
+ $handler->display->display_options['fields']['timeexecuted']['table'] = 'analysis';
|
|
|
+ $handler->display->display_options['fields']['timeexecuted']['field'] = 'timeexecuted';
|
|
|
+ $handler->display->display_options['fields']['timeexecuted']['label'] = 'Time Executed';
|
|
|
+ $handler->display->display_options['fields']['timeexecuted']['date_format'] = 'custom';
|
|
|
+ $handler->display->display_options['fields']['timeexecuted']['custom_date_format'] = 'F j, Y';
|
|
|
+ /* Field: Content: Delete link */
|
|
|
+ $handler->display->display_options['fields']['delete_node']['id'] = 'delete_node';
|
|
|
+ $handler->display->display_options['fields']['delete_node']['table'] = 'views_entity_node';
|
|
|
+ $handler->display->display_options['fields']['delete_node']['field'] = 'delete_node';
|
|
|
+ $handler->display->display_options['fields']['delete_node']['relationship'] = 'analysis_id';
|
|
|
+ $handler->display->display_options['fields']['delete_node']['exclude'] = TRUE;
|
|
|
+ /* Field: Content: Edit link */
|
|
|
+ $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
|
|
|
+ $handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
|
|
|
+ $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
|
|
|
+ $handler->display->display_options['fields']['edit_node']['relationship'] = 'analysis_id';
|
|
|
+ $handler->display->display_options['fields']['edit_node']['exclude'] = TRUE;
|
|
|
+ /* Field: Global: Custom text */
|
|
|
+ $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
|
|
|
+ $handler->display->display_options['fields']['nothing']['table'] = 'views';
|
|
|
+ $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
|
|
|
+ $handler->display->display_options['fields']['nothing']['label'] = '';
|
|
|
+ $handler->display->display_options['fields']['nothing']['alter']['text'] = '[edit_node] [delete_node]';
|
|
|
+ $handler->display->display_options['fields']['nothing']['element_label_colon'] = FALSE;
|
|
|
+ /* Filter criterion: Chado Analysis: Name */
|
|
|
+ $handler->display->display_options['filters']['name']['id'] = 'name';
|
|
|
+ $handler->display->display_options['filters']['name']['table'] = 'analysis';
|
|
|
+ $handler->display->display_options['filters']['name']['field'] = 'name';
|
|
|
+ $handler->display->display_options['filters']['name']['operator'] = '~';
|
|
|
+ $handler->display->display_options['filters']['name']['group'] = 1;
|
|
|
+ $handler->display->display_options['filters']['name']['exposed'] = TRUE;
|
|
|
+ $handler->display->display_options['filters']['name']['expose']['operator_id'] = 'name_op';
|
|
|
+ $handler->display->display_options['filters']['name']['expose']['label'] = 'Name Contains';
|
|
|
+ $handler->display->display_options['filters']['name']['expose']['operator'] = 'name_op';
|
|
|
+ $handler->display->display_options['filters']['name']['expose']['identifier'] = 'name';
|
|
|
+ /* Filter criterion: Chado Analysis: Program */
|
|
|
+ $handler->display->display_options['filters']['program']['id'] = 'program';
|
|
|
+ $handler->display->display_options['filters']['program']['table'] = 'analysis';
|
|
|
+ $handler->display->display_options['filters']['program']['field'] = 'program';
|
|
|
+ $handler->display->display_options['filters']['program']['operator'] = 'contains';
|
|
|
+ $handler->display->display_options['filters']['program']['group'] = 1;
|
|
|
+ $handler->display->display_options['filters']['program']['exposed'] = TRUE;
|
|
|
+ $handler->display->display_options['filters']['program']['expose']['operator_id'] = 'program_op';
|
|
|
+ $handler->display->display_options['filters']['program']['expose']['label'] = 'Program Name Contains';
|
|
|
+ $handler->display->display_options['filters']['program']['expose']['operator'] = 'program_op';
|
|
|
+ $handler->display->display_options['filters']['program']['expose']['identifier'] = 'program';
|
|
|
+ $handler->display->display_options['filters']['program']['expose']['remember_roles'] = array(
|
|
|
+ 2 => '2',
|
|
|
+ 1 => 0,
|
|
|
+ 3 => 0,
|
|
|
+ );
|
|
|
+ /* Filter criterion: Chado Analysis: Sourcename */
|
|
|
+ $handler->display->display_options['filters']['sourcename']['id'] = 'sourcename';
|
|
|
+ $handler->display->display_options['filters']['sourcename']['table'] = 'analysis';
|
|
|
+ $handler->display->display_options['filters']['sourcename']['field'] = 'sourcename';
|
|
|
+ $handler->display->display_options['filters']['sourcename']['operator'] = '~';
|
|
|
+ $handler->display->display_options['filters']['sourcename']['group'] = 1;
|
|
|
+ $handler->display->display_options['filters']['sourcename']['exposed'] = TRUE;
|
|
|
+ $handler->display->display_options['filters']['sourcename']['expose']['operator_id'] = 'sourcename_op';
|
|
|
+ $handler->display->display_options['filters']['sourcename']['expose']['label'] = 'Source Contains';
|
|
|
+ $handler->display->display_options['filters']['sourcename']['expose']['operator'] = 'sourcename_op';
|
|
|
+ $handler->display->display_options['filters']['sourcename']['expose']['identifier'] = 'sourcename';
|
|
|
+ /* Filter criterion: Chado Analysis: Timeexecuted */
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['id'] = 'timeexecuted';
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['table'] = 'analysis';
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['field'] = 'timeexecuted';
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['operator'] = '>';
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['group'] = 1;
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['exposed'] = TRUE;
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['expose']['operator_id'] = 'timeexecuted_op';
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['expose']['label'] = 'Time Executed';
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['expose']['use_operator'] = TRUE;
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['expose']['operator'] = 'timeexecuted_op';
|
|
|
+ $handler->display->display_options['filters']['timeexecuted']['expose']['identifier'] = 'timeexecuted';
|
|
|
+
|
|
|
+ /* Display: Page */
|
|
|
$handler = $view->new_display('page', 'Page', 'page_1');
|
|
|
- $handler->override_option('path', 'chado/analyses');
|
|
|
- $handler->override_option('menu', array(
|
|
|
- 'type' => 'normal',
|
|
|
- 'title' => 'Analyses',
|
|
|
- 'description' => 'An analysis is a particular type of a computational analysis; it may be a blast of one sequence against another, or an all by all blast, or a different kind of analysis altogether. It is a single unit of computation.',
|
|
|
- 'weight' => '10',
|
|
|
- 'name' => 'navigation',
|
|
|
- ));
|
|
|
- $handler->override_option('tab_options', array(
|
|
|
- 'type' => 'none',
|
|
|
- 'title' => '',
|
|
|
- 'description' => '',
|
|
|
- 'weight' => 0,
|
|
|
- 'name' => 'navigation',
|
|
|
- ));
|
|
|
- // Add code specific to a local chado installation
|
|
|
- // NOTE: Edit $handler above to $default_handler for the default display
|
|
|
- if (tripal_core_chado_schema_exists()) {
|
|
|
- // Add nid field
|
|
|
- $fields = $view->get_items('field', 'default');
|
|
|
- $new_fields = array(
|
|
|
- 'nid' => array(
|
|
|
- 'label' => 'Nid',
|
|
|
- 'alter' => array(
|
|
|
- 'alter_text' => 0,
|
|
|
- 'text' => '',
|
|
|
- 'make_link' => 0,
|
|
|
- 'path' => '',
|
|
|
- 'absolute' => 0,
|
|
|
- 'link_class' => '',
|
|
|
- 'alt' => '',
|
|
|
- 'rel' => '',
|
|
|
- 'prefix' => '',
|
|
|
- 'suffix' => '',
|
|
|
- 'target' => '',
|
|
|
- 'help' => '',
|
|
|
- 'trim' => 0,
|
|
|
- 'max_length' => '',
|
|
|
- 'word_boundary' => 1,
|
|
|
- 'ellipsis' => 1,
|
|
|
- 'html' => 0,
|
|
|
- 'strip_tags' => 0,
|
|
|
- ),
|
|
|
- 'empty' => '',
|
|
|
- 'hide_empty' => 0,
|
|
|
- 'empty_zero' => 0,
|
|
|
- 'hide_alter_empty' => 1,
|
|
|
- 'link_to_node' => 0,
|
|
|
- 'exclude' => 1,
|
|
|
- 'id' => 'nid',
|
|
|
- 'table' => 'node',
|
|
|
- 'field' => 'nid',
|
|
|
- 'relationship' => 'none',
|
|
|
- )
|
|
|
- );
|
|
|
- $fields = $new_fields + $fields;
|
|
|
- // Adds analysis => Node relationship
|
|
|
- $default_handler->override_option('relationships', array(
|
|
|
- 'nid' => array(
|
|
|
- 'label' => 'Analysis to Node',
|
|
|
- 'required' => 0,
|
|
|
- 'id' => 'nid',
|
|
|
- 'table' => 'chado_analysis',
|
|
|
- 'field' => 'nid',
|
|
|
- 'relationship' => 'none',
|
|
|
- ),
|
|
|
- ));
|
|
|
- // Change analysis.name to have a link to the node
|
|
|
- $fields['name']['link_to_node'] = 1;
|
|
|
- $default_handler->override_option('fields', $fields);
|
|
|
- // Only show records with published nodes
|
|
|
- /**
|
|
|
- $filters = $view->get_items('filter', 'default');
|
|
|
- $filters['status'] = array(
|
|
|
- 'operator' => '=',
|
|
|
- 'value' => '1',
|
|
|
- 'group' => '0',
|
|
|
- 'exposed' => FALSE,
|
|
|
- 'expose' => array(
|
|
|
- 'operator' => FALSE,
|
|
|
- 'label' => '',
|
|
|
- ),
|
|
|
- 'id' => 'status',
|
|
|
- 'table' => 'node',
|
|
|
- 'field' => 'status',
|
|
|
- 'relationship' => 'none',
|
|
|
- );
|
|
|
- $default_handler->override_option('filters', $filters);
|
|
|
- */
|
|
|
- }
|
|
|
- $views[$view->name] = $view;
|
|
|
+ $handler->display->display_options['path'] = 'admin/tripal/chado/tripal_analysis/analysis';
|
|
|
+ $handler->display->display_options['menu']['type'] = 'default tab';
|
|
|
+ $handler->display->display_options['menu']['title'] = 'Analyses';
|
|
|
+ $handler->display->display_options['menu']['weight'] = '-10';
|
|
|
+ $handler->display->display_options['menu']['context'] = 0;
|
|
|
+ $handler->display->display_options['menu']['context_only_inline'] = 0;
|
|
|
+ $handler->display->display_options['tab_options']['weight'] = '0';
|
|
|
|
|
|
- return $views;
|
|
|
-}
|
|
|
+ return $view;
|
|
|
+}
|