listDocFieldsUI.inc
1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Presentation information for listing Documemnt Fields
*
* @author Omar Rahbeeni
* @date 19 May 2003
* @package presentation.lookAndFeel.knowledgeTree.
*
*/
function getDocumentFields() {
global $default;
$sQuery = "SELECT id as DocFieldID, name as DocFieldName, data_type, is_generic, has_lookup, " .
"'Edit', 'Delete', 'Edit Lookups' " .
"FROM " . $default->owl_fields_table . " " .
"ORDER BY name";
$aColumns = array("DocFieldName", "data_type", "is_generic", "has_lookup","Edit", "Delete", "Edit Lookups" );
$aColumnNames = array("Name", "Data type", "Generic?", "Lookup?", "Edit", "Delete", "Edit Lookups");
$aColumnTypes = array(1,1,2,2,3,3,3);
$aDBColumnArray = array("DocFieldID");
$aQueryStringVariableNames = array("fDocFieldID");
$aHyperLinkURL = array( 4=> "$default->rootUrl/control.php?action=editDocField",
5=> "$default->rootUrl/control.php?action=removeDocField",
6=> "$default->rootUrl/control.php?action=editDocFieldLookups");
$oSearchResults = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnNames, "100%", $aHyperLinkURL,$aDBColumnArray,$aQueryStringVariableNames);
$oSearchResults->setDisplayColumnHeadings(true);
return $oSearchResults->render() ;
}
function getPage() {
global $default;
$sToRender .= renderHeading("Current Document Fields");
// add user link
$sToRender .= getAddLink("addDocField", "Add A Document Field");
$sToRender .= getDocumentFields();
return $sToRender;
}
?>