CMS  Version 3.9
glossaries.inc
Go to the documentation of this file.
1 <?php
2 Fakoli::using("glossary");
3 Fakoli::usingFeature("data_view", "filter_form");
4 
5 $menu_item = "Glossary";
6 $glossary = Query::create(Glossary, "ORDER BY term ASC")->execute();
7 
8 $table = new DataListView($glossary, "Glossaries");
9 $table->column("Term", "<a href='/admin/glossary_form?glossary_id={glossary_id}'>{term}</a>")
10 ->column("Description", "{definition}");
11 
12 $table->sortable = true;
13 $table->filter = true;
14 $table->cssStyle = "width: 100%";
15 $table->excelFile = "glossary.xls";
16 $table->emptyMessage = "There are no terms in the glossary.";
17 
18 $script .= $table->writeScript();
19 
20 $table->drawView();
21 ?>
22 <br/>
23 <a class='button' href='glossary_form'>Add a Term</a>
static usingFeature()
Uses the specified framework feature(s).
Definition: core.inc:388
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition: core.inc:116
$menu_item
Definition: glossaries.inc:5
$table
Definition: glossaries.inc:8
$script
Definition: glossaries.inc:18
$glossary
Definition: glossaries.inc:6