Merge pull request #4018 from TDT-AG/pr/20200506-luci-app-commands
luci-app-commands: show hint in status page if no entry defined yet
This commit is contained in:
commit
d59c28d5fc
1 changed files with 31 additions and 19 deletions
|
@ -136,7 +136,17 @@
|
|||
<form method="get" action="<%=pcdata(FULL_REQUEST_URI)%>">
|
||||
<div class="cbi-map">
|
||||
<h2 name="content"><%:Custom Commands%></h2>
|
||||
|
||||
<% if #commands == 0 then %>
|
||||
<div class="cbi-section">
|
||||
<div class="table cbi-section-table">
|
||||
<div class="tr cbi-section-table-row">
|
||||
<p>
|
||||
<em><%:This section contains no values yet%></em>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<fieldset class="cbi-section">
|
||||
<% local _, command; for _, command in ipairs(commands) do %>
|
||||
<div class="commandbox">
|
||||
|
@ -158,6 +168,8 @@
|
|||
<br style="clear:both" /><br />
|
||||
<a name="output"></a>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<fieldset class="cbi-section" style="display:none">
|
||||
|
|
Loading…
Reference in a new issue