X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=libs%2Fuvldoc%2Fluasrc%2Fuvldoc%2Fproto%2Fxhtml%2Fsection.xml;h=92625bc8a560b4f2d1f0c173afd2200fac4c7074;hb=ecf5ed021f5009e89830ccb14450075eebe089e2;hp=ed85c25ccea0200c3e7afeee7b0b2e3debf71ff5;hpb=e5cb252043e0f5350ba26702e89a73713088d2a3;p=project%2Fluci.git diff --git a/libs/uvldoc/luasrc/uvldoc/proto/xhtml/section.xml b/libs/uvldoc/luasrc/uvldoc/proto/xhtml/section.xml index ed85c25cc..92625bc8a 100644 --- a/libs/uvldoc/luasrc/uvldoc/proto/xhtml/section.xml +++ b/libs/uvldoc/luasrc/uvldoc/proto/xhtml/section.xml @@ -1,7 +1,36 @@ +<%- title = scheme .. "." .. type -%> <%+header.xml%> <% local table = require "table" +types = { + list = "List", + variable = "Variable", + lazylist = "Mixed", + enum = "Enumerator", + reference = "Reference" +} + +datatypes = { + boolean = "Boolean", + string = "String", + uint = "Unsigned Integer", + integer = "Integer", + float = "Real Number", + ipaddr = "IP-Address", + ip4addr = "IPv4-Address", + ip6addr = "IPv6-Address", + ip4prefix = "IPv4-Prefix", + ip6prefix = "IPv6-Prefix", + hostname = "Hostname", + host = "Host (Hostname or IP-Address)", + directory = "Filesystem path (to directory)", + file = "Filesystem path (to file)", + macaddr = "MAC-Address", + port = "Port", + portrange = "Single Port or Portrange (First-Last)" +} + function _parse_ref( r ) local k, v, h = r:match("([^.]+)%.([^.]+)%.([^.]+)") if not k then @@ -39,10 +68,11 @@ function _parse_dep( r, c, s, o ) end %> +

<%=scheme-%> -<%-if package.title then%>: <%=package.title%><%end%>

+<%-if package.title then%> - <%=package.title%><%end%>

<%=type-%> -<%-if section.title then%>: <%=section.title%><%end%>

+<%-if section.title then%> - <%=section.title%><%end%>
<%=section.description%>

Attributes:

@@ -74,7 +104,7 @@ if section.named then %> local t = _parse_dep(k2, scheme, type) %> <% if nf then %>and<% end %> - <%if t then%>
<%end%><%=k2%><%if t then%><%end%><%if v~="" then%>=<%=v%><%end%> + <%if t then%><%end%><%=k2%><%if t then%><%end%><%if v~=true then%>=<%=v%><%end%> <% nf = true end %> @@ -82,19 +112,19 @@ if section.named then %> <% end %> -

Options:

+

Overview:

<% for k, v in luci.util.kspairs(package.variables[type]) do if v.required then%> - + <% end end for k, v in luci.util.kspairs(package.variables[type]) do if not v.required then%> - + <% end end %> @@ -110,15 +140,19 @@ if (i==0) == v.required then

<%=k-%> - <%-if v.title then%>: <%=v.title%><%end%>

+ <%-if v.title then%> - <%=v.title%><%end%>
<%=v.description%>
+
Attributes:
    <% if v.required then %>
  • required
  • <% end %> -
  • Type: <%=v.type%>
  • -
  • Datatype: <%=v.datatype%>
  • +
  • Type: <%=types[v.type] or v.type%>
  • +
  • Datatype: <%=datatypes[v.datatype] or v.datatype%>
  • + <% if v.multival then %> +
  • multiple values: space-separated
  • + <% end %>
<% if v.depends then %>
Dependencies (one of):
@@ -130,7 +164,7 @@ if (i==0) == v.required then local t = _parse_dep(k2, scheme, type, k) %> <% if nf then %>and<% end %> - <%if t then%>
<%end%><%=k2%><%if t then%><%end%><%if v~="" then%>=<%=v%><%end%> + <%if t then%><%end%><%=k2%><%if t then%><%end%><%if v~=true then%>=<%=v%><%end%> <% nf = true end %> @@ -157,6 +191,8 @@ if (i==0) == v.required then <% end %> <% end %> +
+
<% end end end -%> <%+footer.xml%> \ No newline at end of file
<%=k%><%=k%> <%=v.title%>
<%=k%><%=k%> <%=v.title%>