function tft_content_table in Taxonomy File Tree 7
Same name and namespace in other branches
- 7.2 tft.module \tft_content_table()
Get the folder content in HTML table form
Parameters
int $tid: The folder taxonomy term tid
Return value
string The HTML table
2 calls to tft_content_table()
- tft in ./
tft.pages.inc - Menu callback function the file explorer
- tft_ajax_get_folder in ./
tft.ajax.inc - Menu function callback for getting the forlder content via AJAX. Returns a JSON object with a 'data' key for the HTML table and a 'parent' key for the parent taxonomy term tid. A 'ops_links' key stores the folder menu.
File
- ./
tft.module, line 593 - Module hooks.
Code
function tft_content_table($tid, $gid = NULL) {
$headers = array(
array(
'data' => '<span>' . t("Name") . '</span>',
'id' => 'table-th-name',
),
array(
'data' => '<span>' . t("Loaded by") . '</span>',
'id' => 'table-th-loaded-by',
),
array(
'data' => '<span>' . t("Last modified") . '</span>',
'id' => 'table-th-date',
),
array(
'data' => '<span>' . t("Type") . '</span>',
'id' => 'table-th-type',
),
array(
'data' => '<span>' . t("Operations") . '</span>',
'id' => 'table-th-ops',
),
);
$rows = tft_get_content($tid, $gid);
return theme('table', array(
'header' => $headers,
'rows' => $rows,
)) . tft_add_content_links($tid, $gid);
}