|  | @@ -390,6 +390,7 @@ function tripal_library_views_default_views() {
 | 
	
		
			
				|  |  |      ),
 | 
	
		
			
				|  |  |      'default' => 'uniquename',
 | 
	
		
			
				|  |  |    ));
 | 
	
		
			
				|  |  | +  $default_handler = $handler;
 | 
	
		
			
				|  |  |    $handler = $view->new_display('page', 'Page', 'page_1');
 | 
	
		
			
				|  |  |    $handler->override_option('path', 'chado/libraries');
 | 
	
		
			
				|  |  |    $handler->override_option('menu', array(
 | 
	
	
		
			
				|  | @@ -406,6 +407,69 @@ function tripal_library_views_default_views() {
 | 
	
		
			
				|  |  |      '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;
 | 
	
		
			
				|  |  | +    // Change analysis.name to have a link to the node
 | 
	
		
			
				|  |  | +    $fields['name_1']['alter']['make_link'] = 1;
 | 
	
		
			
				|  |  | +    $fields['name_1']['alter']['path'] = 'node/[nid]';
 | 
	
		
			
				|  |  | +    $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;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    return $views;
 |