laceysanderson 680e07b8d0 Added views integration templates and instructions to all tripal modules há 14 anos atrás
..
handlers b819e70f9f Updated Tripal stock to new Tripal API functions & created some needed API functions for cv, db, organism há 14 anos atrás
README 680e07b8d0 Added views integration templates and instructions to all tripal modules há 14 anos atrás
chado_stock.views.inc d5b2eed13d Make tripal_stock views work when chado is internal -allow joining to node há 14 anos atrás
stock.views.inc 27b5b8ab91 Added filter by stock external dbxref accession há 14 anos atrás
template.node_join.views.inc 680e07b8d0 Added views integration templates and instructions to all tripal modules há 14 anos atrás
template.table_defn.views.inc 680e07b8d0 Added views integration templates and instructions to all tripal modules há 14 anos atrás

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_stock_views_data() in ../tripal_stock.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_stock.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_stock.views.inc:tripal_stock_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');