<%# Copyright 2012 Jo-Philipp Wich Licensed to the public under the Apache License 2.0. -%> <% css = [[ .commandbox { height: 12em; width: 30%; float: left; height: 12em; margin: 5px; position: relative; } .commandbox h3 { font-size: 1.5em !important; line-height: 2em !important; margin: 0 !important; } .commandbox input[type="text"] { width: 50% !important; } .commandbox div { position: absolute; left: 0; bottom: 1.5em; } ]] -%> <%+header%> <% local uci = require "luci.model.uci".cursor() local commands = { } uci:foreach("luci", "command", function(s) commands[#commands+1] = s end) %>

<%:Custom Commands%>

<% local _, command; for _, command in ipairs(commands) do %>

<%=pcdata(command.name)%>

<%:Command:%> <%=pcdata(command.command)%>

<% if command.param == "1" then %>

<%:Arguments:%>

<% end %>
<% if command.public == "1" then %> <% end %>
<% end %>

<%+footer%>