X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=build%2Fluadoc%2Fluadoc%2Fdoclet%2Fhtml%2Fmodule.lp;fp=build%2Fluadoc%2Fluadoc%2Fdoclet%2Fhtml%2Fmodule.lp;h=0798c1be07f95a7359aee3983ed0bf80c42ca905;hp=0000000000000000000000000000000000000000;hb=c669c01cea36ce09b64a53dc0e597d27411e9c88;hpb=e6e74b712fe6fd87cb19e89203e4ef45d7459458 diff --git a/build/luadoc/luadoc/doclet/html/module.lp b/build/luadoc/luadoc/doclet/html/module.lp new file mode 100644 index 000000000..0798c1be0 --- /dev/null +++ b/build/luadoc/luadoc/doclet/html/module.lp @@ -0,0 +1,155 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

<%=( oop and "Object Instance" or "Class" )%> <%=module_doc.name%>

+ +

<%=module_doc.description%>

+<%if module_doc.author then%> +

<%= #module_doc.author>1 and "Authors" or "Author" %>: + +<%for _, author in ipairs(module_doc.author) do%> + +<%end%> +
<%= author %>
+

+<%end%> +<%if module_doc.copyright then%> +

Copyright© <%=module_doc.copyright%>

+<%end%> +<%if module_doc.release then%> +

Release: <%=module_doc.release%>

+<%end%> + +<%if #module_doc.constants > 0 then %> +

Constants

+ +<%for _, const_name in ipairs(module_doc.constants) do + local const_data = module_doc.constants[const_name]%> + + + + +<%end%> +
<%=const_data.private and "local " or ""%><%=(const_name:gsub(".+%.",""))%><%=const_data.summary%>
+<%end%> + +<% local funcs = { }; if #module_doc.functions > 0 then %> +

Functions

+ +<% +for _, func_name in ipairs(module_doc.functions) do + funcs[#funcs+1] = func_name +end + +table.sort(funcs, function(a, b) + local func_data_a = module_doc.functions[a] + local func_data_b = module_doc.functions[b] + local x = func_data_a.sort or a + local y = func_data_b.sort or b + return x < y +end) + +for _, func_name in ipairs(funcs) do + local func_data = module_doc.functions[func_name] + + func_data.printname = func_name:gsub("^%d+#", "") + if oop then + func_data.printname = func_data.printname:gsub("%.", ":") + else + func_data.printname = func_data.printname:gsub("^.+%.", "") + end +%> + + + + +<%end%> +
<%=func_data.private and "local " or ""%><%=func_data.printname%> (<%=table.concat(module_doc.functions[func_name].param or {}, ", ")%>)<%=module_doc.functions[func_name].summary%>
+<%end%> + + +<% local tabs = { }; if #module_doc.tables > 0 then%> +

Tables

+ +<% +for _, tab_name in ipairs(module_doc.tables) do + tabs[#tabs+1] = tab_name +end + +table.sort(tabs, function(a, b) + local tab_data_a = module_doc.tables[a] + local tab_data_b = module_doc.tables[b] + local x = tab_data_a.sort or a + local y = tab_data_b.sort or b + return x < y +end) + +for _, tab_name in ipairs(tabs) do +%> + + + + +<%end%> +
<%=tab_name%><%=module_doc.tables[tab_name].summary%>
+<%end%> + + +
+
+ +<%if #module_doc.functions > 0 then%> +

Functions

+
+<%for _, func_name in ipairs(funcs) do%> +<%=luadoc.doclet.html.include("function.lp", { doc=doc, module_doc=module_doc, func=module_doc.functions[func_name], oop=oop })%> +<%end%> +
+<%end%> + +<%if #module_doc.tables > 0 then%> +

Tables

+
+<%for _, tab_name in ipairs(tabs) do%> +<%=luadoc.doclet.html.include("table.lp", { doc=doc, module_doc=module_doc, tab=module_doc.tables[tab_name] })%> +<%end%> +
+<%end%> + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ +