laceysanderson 7e1bc55016 Tripal Views: Added count (counts the number of records in another table) and t/f field handlers 14 years ago
..
handlers 9522c82fc7 Changed get Node ID method: Now you can access 1+ Node ID field for 1+ table without conflict 14 years ago
README 680e07b8d0 Added views integration templates and instructions to all tripal modules 14 years ago
chado_library.views.inc 733f3c597b Added support for internal chado to views (including joining to node table) for organism, library, feature & analysis 14 years ago
library.views.inc ba0d41a291 Added a Filter Handler for Chado Booleans: Supports both 0/1 (ie: cvterm:is_obsolete) and f/t (ie: feature.is_obsolete) booleans and changed handler of all booleans 14 years ago
misc_tables.views.inc 7e1bc55016 Tripal Views: Added count (counts the number of records in another table) and t/f field handlers 14 years ago
template.node_join.views.inc 680e07b8d0 Added views integration templates and instructions to all tripal modules 14 years ago
template.table_defn.views.inc a2ce6c7498 Update to views template files 14 years ago

README


This directory contains all additional views code needed to integrate this module with views2.

FILE/FOLDER DESCRIPTIONS
---------------------------
.views.inc:
contains a single function retrieve__views_data()
which describes that table to views. This function is called by
tripal_library_views_data() in ../tripal_library.views.inc.
For more information on the form of this data array look up the
views2 documentation for hook_views_data()
-http://views2.logrus.com/doc/html/index.html

handlers/
Each file contained within this folder defines a views handler. Only custom
handlers are included in this folder and each must be described in
hook_views_handlers() in ../tripal_library.views.inc.
A views handler does one of the following:
1) describe the type of a field and how it should be displayed
2) describe a method to sort this field
3) describe a method to filter this field


STANDARDS TO FOLLOW
---------------------------

1. All table definition files should be named tablename.views.inc
2. All handlers should be in a handlers sub-directory and follow the naming convention of
views handlers (ie: views_handler_field/filter/sort_handlername.inc )

Views Table Definitions:
- Please use the template files provided whenever you are describing a new table to views.
For any table in chado simply copy template.table_defn.views.inc to tablename.views.inc and
follow the instructions listed at the top of the template file.
- ONLY ONE TABLE DEFINITION PER FILE
- To join a chado table to it's drupal node simply copy template.node_join.views.inc to
basetablename.views.inc and replace all XXX with basetablename.

NOTE: Creating the table definition file is not enough. You also need to call the
retrieve_XXX_views_data() function from ../tripal_library.views.inc:tripal_library_views_data()
by adding the following line:
$data = array_merge($data, retrieve_XXX_views_data());
to the function and including the file directly above the function (blow the function
header by adding:
require_once('views/XXX.views.inc');