OXYGEN #1: Added index-marks
authorSteven Barth <steven@midlink.org>
Thu, 9 Oct 2008 20:28:07 +0000 (20:28 +0000)
committerSteven Barth <steven@midlink.org>
Thu, 9 Oct 2008 20:28:07 +0000 (20:28 +0000)
13 files changed:
applications/luci-coovachilli/luasrc/controller/coovachilli.lua
applications/luci-fw/luasrc/controller/luci_fw/luci_fw.lua
applications/luci-olsr/luasrc/controller/olsr.lua
applications/luci-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
modules/admin-full/luasrc/controller/admin/index.lua
modules/admin-full/luasrc/controller/admin/network.lua
modules/admin-full/luasrc/controller/admin/services.lua
modules/admin-full/luasrc/controller/admin/status.lua
modules/admin-full/luasrc/controller/admin/system.lua
modules/admin-mini/luasrc/controller/mini/index.lua
modules/admin-mini/luasrc/controller/mini/network.lua
modules/admin-mini/luasrc/controller/mini/system.lua
modules/freifunk/luasrc/controller/freifunk/freifunk.lua

index 6f0a89e0045ba6561bb5962e8d5f057360b94d43..ac1f5f93a0cd62b4b2b3613917d810c30b9a544f 100644 (file)
@@ -18,7 +18,10 @@ function index()
        require("luci.i18n")
        local i18n = luci.i18n.translate
 
-       entry( { "admin", "services", "coovachilli" },            cbi("coovachilli"),         i18n("coovachilli",         "CoovaChilli"),                90).i18n = "coovachilli"
+       local cc = entry( { "admin", "services", "coovachilli" },            cbi("coovachilli"),         i18n("coovachilli",         "CoovaChilli"),                90)
+       cc.i18n = "coovachilli"
+       cc.subindex = true
+       
        entry( { "admin", "services", "coovachilli", "network" }, cbi("coovachilli_network"), i18n("coovachilli_network", "Network Configuration"),      10)
        entry( { "admin", "services", "coovachilli", "radius"  }, cbi("coovachilli_radius"),  i18n("coovachilli_radius",  "Radius Configuration"),       20)
        entry( { "admin", "services", "coovachilli", "auth"    }, cbi("coovachilli_auth"),    i18n("coovachilli_auth",    "UAM and MAC Authentication"), 30)
index 4d8c13840e7ac30caf61e7a19e4308a0cfe64253..d952b6043d8d751db03b6082b7aebc9ca1d92f5a 100644 (file)
@@ -7,14 +7,16 @@ function index()
        local nodes = {}
 
        table.insert(nodes, entry({"admin", "network", "firewall"}, alias("admin", "network", "firewall", "zones"), i18n("fw_fw"), 60))
+       nodes[#nodes].index = true
+       
        table.insert(nodes, entry({"admin", "network", "firewall", "zones"}, cbi("luci_fw/zones"), i18n("fw_zones"), 10))
        table.insert(nodes, entry({"admin", "network", "firewall", "redirection"}, cbi("luci_fw/redirect"), i18n("fw_redirect"), 30))   
        table.insert(nodes, entry({"admin", "network", "firewall", "traffic"}, cbi("luci_fw/traffic"), i18n("fw_traffic"), 20))
                
        table.insert(nodes, entry({"admin", "network", "firewall", "rule"}, cbi("luci_fw/trule")))
-       nodes[#nodes].leaf = true               
+       nodes[#nodes].leaf = true
        table.insert(nodes, entry({"admin", "network", "firewall", "redirect"}, cbi("luci_fw/rrule")))
-       nodes[#nodes].leaf = true       
+       nodes[#nodes].leaf = true
        
        table.insert(nodes, entry({"mini", "network", "portfw"}, cbi("luci_fw/miniportfw"), i18n("fw_portfw", "Portweiterleitung"), 70))
        
index c80a75cc1ec18a4fd48233f9bcfb41510a12ab53..97e5061b9bf5f625a3b523f510460135beadd16c 100644 (file)
@@ -12,6 +12,7 @@ function index()
        page.target = call("action_index")
        page.title  = "OLSR"
        page.i18n   = "olsr"
+       page.subindex = true
 
        local page  = node("admin", "status", "olsr", "routes")
        page.target = call("action_routes")
@@ -33,15 +34,17 @@ function index()
        page.title  = "MID"
        page.order  = 50
 
-       entry(
+       local ol = entry(
                {"admin", "services", "olsrd"},
                cbi("olsr/olsrd"), "OLSR"
-       ).i18n = "olsr"
+       )
+       ol.i18n = "olsr"
+       ol.subindex = true
 
        entry(
                {"admin", "services", "olsrd", "hna"},
                cbi("olsr/olsrdhna"), "HNA Announcements"
-       ).i18n = "olsr"
+       )
 
        oplg = entry(
                {"admin", "services", "olsrd", "plugins"},
@@ -49,6 +52,7 @@ function index()
        )
        oplg.i18n = "olsr"
        oplg.leaf = true
+       oplg.subindex = true
 
        local uci = require("luci.model.uci").cursor()
        uci:foreach("olsrd", "LoadPlugin",
index 7ca8a5aa374f734bcf4f1c3c5e00136fbe710bf9..0aa66362bdd88348f59202221b34f5bcdcaace99 100644 (file)
@@ -50,8 +50,12 @@ function index()
        }
 
        -- create toplevel menu nodes
-       entry({"admin", "statistics"},             call("statistics_index"),        _i18n("statistics"), 80).i18n = "statistics"
-       entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), _i18n("collectd"),   10)
+       local st = entry({"admin", "statistics"},             call("statistics_index"),        _i18n("statistics"), 80)
+       st.i18n = "statistics"
+       st.index = true
+       
+       entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), _i18n("collectd"),   10).subindex = true
+       
 
        -- populate collectd plugin menu
        local index = 1
@@ -61,7 +65,7 @@ function index()
                        call( "statistics_" .. section .. "plugins" ),
                        _i18n( section .. "plugins" ),
                        index * 10
-               )
+               ).index = true
 
                for j, plugin in luci.util.vspairs( plugins ) do
                        _entry(
index cab9441d02d45ee887bfa4235dddda253d032926..071dd595d38f0049e432d69b0b71dee52987fc63 100644 (file)
@@ -20,6 +20,7 @@ function index()
        local root = node()
        if not root.target then
                root.target = alias("admin")
+               root.index = true
        end
        
        entry({"about"}, template("about")).i18n = "admin-core"
@@ -32,11 +33,13 @@ function index()
        page.sysauth = "root"
        page.sysauth_authenticator = "htmlauth"
        page.ucidata = true
+       page.index = true
        
        local page  = node("admin", "index")
        page.target = template("admin_index/index")
        page.title  = i18n("overview", "Übersicht")
        page.order  = 10
+       page.index = true
        
        local page  = node("admin", "index", "luci")
        page.target = cbi("admin_index/luci")
index e3f80a1b1e0c1c976a6a3d22005415b73d46898f..778a70fb96b22b703c8f13103e67ca76d30e127e 100644 (file)
@@ -22,6 +22,7 @@ function index()
        page.target = alias("admin", "network", "network")
        page.title  = i18n("network")
        page.order  = 50
+       page.index  = true
 
        local page  = node("admin", "network", "vlan")
        page.target = cbi("admin_network/vlan")
@@ -33,6 +34,7 @@ function index()
        page.title  = i18n("wifi")
        page.i18n   = "wifi"
        page.order  = 15
+       page.subindex = true
        uci:foreach("wireless", "wifi-device",
                function (section)
                        local ifc = section[".name"]
@@ -51,6 +53,7 @@ function index()
        page.target = cbi("admin_network/network")
        page.title  = i18n("interfaces", "Schnittstellen")
        page.order  = 10
+       page.subindex = true
        uci:foreach("network", "interface",
                function (section)
                        local ifc = section[".name"]
@@ -70,6 +73,7 @@ function index()
        page.target = cbi("admin_network/dhcp")
        page.title  = "DHCP"
        page.order  = 30
+       page.subindex = true
 
        entry(
         {"admin", "network", "dhcp", "leases"},
index ea875854484d398b504fd91d1547973b4271d5ec..f7bdb02d56a6dca37b9e69a158fadb4d1a93c5aa 100644 (file)
@@ -26,6 +26,7 @@ function index()
        page.target = template("admin_services/index")
        page.title  = i18n("services", "Dienste")  
        page.order  = 40
+       page.index  = true
        
        local page  = node("admin", "services", "httpd")
        page.target = cbi("admin_services/httpd")
index 0eb3c1964645c83825f03f08a2b7dae41b0dfeea..addc3ca7439667af7190f2f04cc142ae10fdfddd 100644 (file)
@@ -17,7 +17,7 @@ function index()
        luci.i18n.loadc("admin-core")
        local i18n = luci.i18n.translate
 
-       entry({"admin", "status"}, template("admin_status/index"), i18n("status", "Status"), 20)
+       entry({"admin", "status"}, template("admin_status/index"), i18n("status", "Status"), 20).index = true
        entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "Systemprotokoll"))
 end
 
index 5d6037151e711aa6098269c61ead21a53f62ba15..1afdfc55ef2928c1c686b1937223ee22aecf5ac9 100644 (file)
@@ -17,7 +17,7 @@ function index()
        luci.i18n.loadc("admin-core")
        local i18n = luci.i18n.translate
        
-       entry({"admin", "system"}, alias("admin", "system", "system"), i18n("system"), 30)
+       entry({"admin", "system"}, alias("admin", "system", "system"), i18n("system"), 30).index = true
        entry({"admin", "system", "system"}, cbi("admin_system/system"), i18n("system"), 1)
        entry({"admin", "system", "packages"}, call("action_packages"), i18n("a_s_packages"), 10)
        entry({"admin", "system", "packages", "ipkg"}, form("admin_system/ipkg"), i18n("a_s_p_ipkg"))
index 77847dccca3bc585f1f93fa74a61ca82fee8e759..4813b838ef3b8900cec2940e1263b912ad8b48f2 100644 (file)
@@ -22,6 +22,7 @@ function index()
        local root = node()
        if not root.lock then
                root.target = alias("mini")
+               root.index = true
        end
        
        entry({"about"}, template("about")).i18n = "admin-core"
@@ -31,9 +32,10 @@ function index()
        page.sysauth = "root"
        page.sysauth_authenticator = "htmlauth"
        page.ucidata = true
+       page.index = true
        
-       entry({"mini", "index"}, alias("mini", "index", "index"), i18n("overview"), 10)
-       entry({"mini", "index", "index"}, form("mini/index"), i18n("general"), 1)
+       entry({"mini", "index"}, alias("mini", "index", "index"), i18n("overview"), 10).index = true
+       entry({"mini", "index", "index"}, form("mini/index"), i18n("general"), 1).ignoreindex = true
        entry({"mini", "index", "luci"}, cbi("mini/luci"), i18n("settings"), 10)
        entry({"mini", "index", "logout"}, call("action_logout"), i18n("logout"))
 end
index e1a82e6c5a1c30f5ac6970bfdf1e3aed23a7bfc7..56ffc30f2c830deef05336b59727e4f72719a745 100644 (file)
@@ -19,7 +19,7 @@ function index()
        luci.i18n.loadc("admin-core")
        local i18n = luci.i18n.translate
 
-       entry({"mini", "network"}, alias("mini", "network", "index"), i18n("network"), 20)
+       entry({"mini", "network"}, alias("mini", "network", "index"), i18n("network"), 20).index = true
        entry({"mini", "network", "index"}, cbi("mini/network"), i18n("general"), 1)
        entry({"mini", "network", "wifi"}, cbi("mini/wifi"), i18n("wifi"), 10).i18n="wifi"
        entry({"mini", "network", "dhcp"}, cbi("mini/dhcp"), "DHCP", 20)
index ac6d64b32bbba2f4fa1d0759e9fe35d20f58b7f3..9d0ef0c639a039d14cba96cadc3c8b470a915900 100644 (file)
@@ -19,7 +19,7 @@ function index()
        luci.i18n.loadc("admin-core")
        local i18n = luci.i18n.translate
 
-       entry({"mini", "system"}, alias("mini", "system", "index"), i18n("system"), 40)
+       entry({"mini", "system"}, alias("mini", "system", "index"), i18n("system"), 40).index = true
        entry({"mini", "system", "index"}, cbi("mini/system"), i18n("general"), 1)
        entry({"mini", "system", "passwd"}, form("mini/passwd"), i18n("a_s_changepw"), 10)
        entry({"mini", "system", "backup"}, call("action_backup"), i18n("a_s_backup"), 80)
index 3d4bf1cb75b3480cb61de8d7a82cb4f9e319cb46..9399d50930f016b76130da9323078056ce9e3c7b 100644 (file)
@@ -19,6 +19,8 @@ function index()
        local page  = node()
        page.lock   = true
        page.target = alias("freifunk")
+       page.subindex = true
+       page.index = false
 
        local page    = node("freifunk")
        page.title    = "Freifunk"
@@ -27,11 +29,13 @@ function index()
        page.setuser  = "nobody"
        page.setgroup = "nogroup"
        page.i18n     = "freifunk"
+       page.index    = true
        
        local page  = node("freifunk", "index")
        page.target = template("freifunk/index")
        page.title  = "Übersicht"
        page.order  = 10
+       page.indexignore = true
        
        local page  = node("freifunk", "index", "contact")
        page.target = template("freifunk/contact")