From 6ec0353201435e0d0d7d32820d8ba600b4ca7b5b Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Thu, 2 Aug 2018 09:39:48 -0400 Subject: modules: Make luci-base sufficient to use luci apps Per the discussion in https://github.com/openwrt/luci/issues/869, make luci-base sufficient to login, logout, and review and apply or revert uci changes. This allows most luci-app-xxx to work without having luci-mod-admin-full installed. It has been tested with some apps and not luci-mod-admin-full, as well as with luci-mod-admin-full (to make sure the usual case doesn't break). Instead of creating a new module namespace (e.g. 'Base') we reduce the opportunities for breakage by having luci-base take over the 'shell' of the 'Administration' (admin/....) namespace. Since admin is assumed by all current building LuCI components (including Freifunk), this doesn't introduce the 'Administration' tab into any situation where it would not already be present (but includes it where it was before). We also add a "Component not installed" page to avoid fatal errors and backtrace when e.g. luci-mod-admin-full is not installed. Signed-off-by: Daniel F. Dickinson --- themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'themes/luci-theme-openwrt/luasrc') diff --git a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm index 6fc657ddc..1d2161168 100644 --- a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm +++ b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm @@ -257,6 +257,8 @@

<%:No password set!%>

<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%>

- + <% if disp.lookup("admin/system/admin") then %> + + <% end %>
<%- end -%> -- cgit v1.2.3