X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-commands%2Fluasrc%2Fview%2Fcommands.htm;fp=applications%2Fluci-app-commands%2Fluasrc%2Fview%2Fcommands.htm;h=83792a91fda95c476ada5684b1a339f8d7fc537f;hp=0000000000000000000000000000000000000000;hb=1bb4822dca6113f73e3bc89e2acf15935e6f8e92;hpb=9edd0e46c3f880727738ce8ca6ff1c8b85f99ef4 diff --git a/applications/luci-app-commands/luasrc/view/commands.htm b/applications/luci-app-commands/luasrc/view/commands.htm new file mode 100644 index 000000000..83792a91f --- /dev/null +++ b/applications/luci-app-commands/luasrc/view/commands.htm @@ -0,0 +1,176 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2012 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/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%>