49 lines
1.3 KiB
PHP
49 lines
1.3 KiB
PHP
<% /*
|
|
$Revision$
|
|
$Id$
|
|
|
|
File: model_doc.inc
|
|
|
|
Description: Doc model.
|
|
Parameters:
|
|
Context: Dit bestand loopt 1-op-1 met model_doc.xsl
|
|
(Alleen) wat je hier in this stopt kun je opvragen
|
|
|
|
Notes: Met trunk/api2/doc.doc?debug=1 kun je eventueel de XML bekijken
|
|
*/
|
|
|
|
%>
|
|
<!-- #include file="model_apis.inc"-->
|
|
<%
|
|
function model_doc()
|
|
{
|
|
this.table = "apis";
|
|
this.primary = "id";
|
|
this.records_name = "apis";
|
|
this.record_name = "api";
|
|
this.autfunction = "WEB_APIDOC";
|
|
|
|
var apis = model_apis.REST_GET({});
|
|
|
|
// Met XSLT 1.0 kun je niet lekker groeperen (op modulenaam) dus
|
|
// maar gewoon hier in JavaScript
|
|
this.modules = { };
|
|
for (var i = 0; i < apis.length; i++)
|
|
{
|
|
if (apis[i].nodoc)
|
|
continue;
|
|
|
|
var modulecode = apis[i].modulecode || "XXX";
|
|
if (!(modulecode in this.modules))
|
|
this.modules[modulecode] = { name: apis[i].module, apis: { } };
|
|
var apidata = { label: apis[i].name };
|
|
if (apis[i].docparam )
|
|
apidata.docparam = apis[i].docparam;
|
|
this.modules[modulecode].apis[ apis[i].id ] = apidata;
|
|
}
|
|
|
|
this.REST_GET = generic_REST_GET(this, {});
|
|
|
|
this.xslname = "model_doc.xsl";
|
|
}
|
|
%> |