From 2c0886b5a74417c8a683d2186dbc3dd9370e2dfa Mon Sep 17 00:00:00 2001 From: Helge Mader Date: Tue, 5 May 2020 15:01:56 +0200 Subject: [PATCH] luci-app-commands: show hint in status page if no entry defined yet Signed-off-by: Helge Mader --- .../luasrc/view/commands.htm | 50 ++++++++++++------- 1 file changed, 31 insertions(+), 19 deletions(-) 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 %> -

- -