From: Helge Mader Date: Tue, 5 May 2020 13:01:56 +0000 (+0200) Subject: luci-app-commands: show hint in status page if no entry defined yet X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F4018%2Fhead;p=oweals%2Fluci.git luci-app-commands: show hint in status page if no entry defined yet Signed-off-by: Helge Mader --- diff --git a/applications/luci-app-commands/luasrc/view/commands.htm b/applications/luci-app-commands/luasrc/view/commands.htm index d60a97c5b..28b7701fa 100644 --- a/applications/luci-app-commands/luasrc/view/commands.htm +++ b/applications/luci-app-commands/luasrc/view/commands.htm @@ -136,28 +136,40 @@

<%: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 %> + <% if #commands == 0 then %> +
+
+
+

+ <%:This section contains no values yet%> +

+
- <% end %> + <% else %> +
+ <% 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 %> + +

+ +
+ <% end %> -

- -