<tableedit>De CadedifUsing TableEditBasic usage
TableEdit provides a somewhat more friendly way to edit simple tables in mediawiki. TableEdit tables show up in a page with their own Edit link, which calls this page. Users who have editing privileges can then add rows and columns, rename headings, and change the style of the headings row. Adding a TableEdit table to a pageStep 1: Add a newTableEdit tag where you want the tableTo add a new table that can be edited by TableEdit, there are three options:
Step 2: Save the pageAn empty table with your headings appears when we save the page (Figure 2) Click on the Edit table link and use the table editor.Step 3: Edit the table
Example
Basic Table templates
For table formats that you plan to use on more than one page, you can define a template. To add a table based on a template. Put: <newTableEdit>Template:TemplateName lt;/newTableEdit> The template should be a Template page in the wiki that has a list of headings, where each heading is on a separate line. These will not be editable in the Special page, but changing the template page will change the headings on all tables that use that template. The changes won't be apparent until someone tries to edit the table and save it back to the page. Figure 8 shows a simple Template. To use this, you would put <newTableEdit>Template:TestBox lt;/newTableEdit> in your wiki page Advanced templatesUsing tags to specify more propertiesAttributes for the table can be wrapped in XML-like tags.
Programming the TableEdit interfaceHeading lists can have additional markup to modify the behavior of the Table Editor. Anything after a || in the headings list is considered part of a list of additional parameters for that heading. Individual parameters are delimited by single |s. The first parameter after the heading text is a unique column_name for the heading (this allows you to use non-unique names for the actual display). If this is not present, the heading name is assumed to be usable as the column_name. These are used for lookup and calculation fields as described below.Syntax: Heading||column_name|rule rule syntax text to use input type=text instead of textarea select|1|2|etc make a pulldown menu with choices 1, 2, etc lookup|sql|field sql statement|name of field to return sql statements use {{{column_name}}} in place of specific fields example: Aspect||aspect|lookup|SELECT namespace from go_archive.term WHERE go_id = '{{{1}}}' ORDER BY term_update DESC LIMIT 1|namespace currently available calcs split split|delimiter|x|y|z where x,y, and z are integers indicating which parts of the split to join into the result reqcomplete reqcomplete|column_name|column_name|column_name... where column names are required fields. returns "complete" or "required field needed" ExampleFigure 9 shows the kind of thing you can do with the programming interface
Here is the template code used to generate the editing interface shown above (the indented lines are actually all part of one line; I broke them up to make them easier to read): Qualifier||qualifier|select| |NOT GO ID||go_id|text GO term name||go_term|lookupcalc|SELECT page_title from go_archive.term WHERE go_id = '{{{go_id}}}' ORDER BY term_update DESC LIMIT 1|page_title|split|_!_|1 Reference(s)||refs Evidence Code||evidence|select | |IC: Inferred by Curator |IDA: Inferred from Direct Assay |IEA: Inferred from Electronic Annotation |IEP: Inferred from Expression Pattern |IGC: Inferred from Genomic Context |IGI: Inferred from Genetic Interaction |IMP: Inferred from Mutant Phenotype |IPI: Inferred from Physical Interaction |ISS: Inferred from Sequence or Structural Similarity |NAS: Non-traceable Author Statement |ND: No biological Data available |RCA: inferred from Reviewed Computational Analysis |TAS: Traceable Author Statement |NR: Not Recorded with/from||with|text Aspect||aspect|lookup|SELECT namespace from go_archive.term WHERE go_id = '{{{go_id}}}' ORDER BY term_update DESC LIMIT 1|namespace Notes Status||status|calc|reqcomplete|go_id|refs|go_term|evidence Additional DocumentationFor Known issues, ToDos, discussion of TableEdit, and other documentation, see (http://www.mediawiki.org/wiki/Extension:TableEdit) |