modules/admin-core: Added several cross-references to relevant configuration pages
authorSteven Barth <steven@midlink.org>
Thu, 14 Aug 2008 14:51:06 +0000 (14:51 +0000)
committerSteven Barth <steven@midlink.org>
Thu, 14 Aug 2008 14:51:06 +0000 (14:51 +0000)
17 files changed:
applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua
applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua
applications/luci-samba/luasrc/model/cbi/samba.lua
i18n/english/luasrc/i18n/cbi.en.lua
i18n/german/luasrc/i18n/cbi.de.lua
libs/cbi/htdocs/luci-static/resources/cbi/link.gif
libs/cbi/luasrc/view/cbi/full_valueheader.htm
libs/cbi/luasrc/view/cbi/tblsection.htm
libs/cbi/luasrc/view/cbi/tvalue.htm
modules/admin-core/luasrc/tools/webadmin.lua
modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
modules/admin-full/luasrc/model/cbi/admin_network/network.lua
modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
themes/fledermaus/htdocs/luci-static/fledermaus/cascade.css
themes/openwrt-light/htdocs/luci-static/openwrt-light/cascade.css
themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css

index 1c88579b3751cd95b217aebbcc8c7a13809c11e5..a8ba0c73c5cfd221b9fa1200243cb6615eb7de7f 100644 (file)
@@ -12,6 +12,7 @@ You may obtain a copy of the License at
 
 $Id$
 ]]--
+require("luci.tools.webadmin")
 m = Map("ddns", translate("ddns"), translate("ddns_desc"))
 
 s = m:section(TypedSection, "service", "")
@@ -40,12 +41,7 @@ src:value("web", "URL")
 iface = s:option(ListValue, "ip_network", translate("network"))
 iface:depends("ip_source", "network")
 iface.rmempty = true
-luci.model.uci.foreach("network", "interface",
-       function (section)
-               if section[".name"] ~= "loopback" then
-                       iface:value(section[".name"])
-               end
-       end)
+luci.tools.webadmin.cbi_add_networks(iface)
 
 iface = s:option(ListValue, "ip_interface", translate("interface"))
 iface:depends("ip_source", "interface")
index 1a765abb74f20d0f6ece3f1b48c504a7ceeca711..3ef3275cad2022ff59b82882302d0cdb7c9a28b1 100644 (file)
@@ -11,6 +11,7 @@ You may obtain a copy of the License at
 
 $Id$
 ]]--
+require("luci.tools.webadmin")
 m = Map("firewall", translate("fw_fw"), translate("fw_fw1"))
 
 s = m:section(TypedSection, "defaults")
@@ -52,12 +53,7 @@ s:option(Flag, "masq")
 net = s:option(MultiValue, "network")
 net.widget = "select"
 net.rmempty = true
-luci.model.uci.foreach("network", "interface",
-       function (section)
-               if section[".name"] ~= "loopback" then
-                       net:value(section[".name"])
-               end
-       end)
+luci.tools.webadmin.cbi_add_networks(net)
        
 function net.cfgvalue(self, section)
        local value = MultiValue.cfgvalue(self, section)
index c57d3c8cb75760d720571767b2bc090fc1b5d22c..824b2b513fc98787515f810f39ae1a48f15e68ca 100644 (file)
@@ -11,6 +11,7 @@ You may obtain a copy of the License at
 
 $Id$
 ]]--
+require("luci.tools.webadmin")
 require("luci.fs")
 
 m = Map("olsr", "OLSR")
@@ -85,13 +86,7 @@ i.addremove = true
 i.dynamic = true
 
 network = i:option(ListValue, "Interface", translate("network"))
-network:value("")
-luci.model.uci.foreach("network", "interface",
-       function (section)
-               if section[".name"] ~= "loopback" then
-                       network:value(section[".name"])
-               end
-       end)
+luci.tools.webadmin.cbi_add_networks(network)
 
 i:option(Value, "Ip4Broadcast")
 i:option(Value, "HelloInterval")
index 3fe7006e3e62f84389b00f3cb013916fcb2f58e5..7ef9d239b2891057e3f8057e5a603c8581b4e692 100644 (file)
@@ -30,7 +30,7 @@ s.addremove = true
 s.template = "cbi/tblsection"
 
 s:option(Value, "name", translate("name"))
-s:option(Value, "path")
+s:option(Value, "path").titleref = luci.dispatcher.build_url("admin", "system", "fstab")
 
 s:option(Value, "users").rmempty = true
 
index 9c84a8950f67b0cdfd0dd771e6a6d2723aaa17db..2171690fd19fbcc144422a6f308f3ad266ef9cf8 100644 (file)
@@ -7,3 +7,4 @@ cbi_optional = " (optional)"
 cbi_sectempty = "This section contains no values yet"
 cbi_manual = "-- custom --"
 cbi_select = "-- Please choose --"
+cbi_gorel = "Go to relevant configuration page"
\ No newline at end of file
index 8b3265061a7c81bee4a709f993381ffd4e705be9..eb3e1a545cfee3a33d5e9d3351d1e1598d1fa7f0 100644 (file)
@@ -5,4 +5,5 @@ cbi_missing = "Fehler: Dieses Feld muss ausgefüllt werden"
 cbi_addopt = "-- Zusätzliches Feld --"
 cbi_sectempty = "Diese Sektion enthält noch keine Einträge"
 cbi_manual = "-- benutzerdefiniert --"
-cbi_select = "-- Bitte auswählen --"
\ No newline at end of file
+cbi_select = "-- Bitte auswählen --"
+cbi_gorel = "Gehe zu relevanter Konfigurationsseite"
\ No newline at end of file
index 1b2a923a5ae58535adacd1fd5cf3012689d47ce9..f0bb78da6b1e2cb17aa1a0e21c80e02979f6321a 100644 (file)
Binary files a/libs/cbi/htdocs/luci-static/resources/cbi/link.gif and b/libs/cbi/htdocs/luci-static/resources/cbi/link.gif differ
index ce079ca57365d265d8560006cf40846d6d31c014..5b890ed0beda5881c844fe8b41f9aa6ba560b750 100644 (file)
@@ -15,7 +15,7 @@ $Id$
 
 <div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
        <label class="cbi-value-title"<%= attr("for", cbid) %>>
-       <%- if self.titleref then -%><a class="cbi-title-ref" href="<%=self.titleref%>"><%- end -%>
+       <%- if self.titleref then -%><a title="<%=self.titledesc or translate('cbi_gorel')%>" class="cbi-title-ref" href="<%=self.titleref%>"><%- end -%>
                <%-=self.title-%>
        <%- if self.titleref then -%></a><%- end -%>
        </label>
index a397762f46699c5dd1ce9accb4ed80deb6f5c765..a6944881ac8b43d0bc30ce0515e869f13b24a2d6 100644 (file)
@@ -35,7 +35,7 @@ end
                        <%- end -%>
                        <%- for i, k in pairs(self.children) do if not k.optional then -%>
                                <th class="cbi-section-table-cell">
-                               <%- if k.titleref then -%><a class="cbi-title-ref" href="<%=k.titleref%>"><%- end -%>
+                               <%- if k.titleref then -%><a title="<%=self.titledesc or translate('cbi_gorel')%>" class="cbi-title-ref" href="<%=k.titleref%>"><%- end -%>
                                        <%-=k.title-%>
                                <%- if k.titleref then -%></a><%- end -%>
                                </th>
index dcf6b8bfb31d6afcfcc53c236ab46f439ce08172..6a1396886c9d27bdf18d65fa572763526064ffc1 100644 (file)
@@ -13,7 +13,7 @@ $Id$
 
 -%>
 <%+cbi/valueheader%>
-       <textarea onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.size, "cols") .. ifattr(self.rows, "rows") %>>
+       <textarea onchange="cbi_d_update(this.id)"<%= attr("name", cbid) .. attr("id", cbid) .. ifattr(self.size, "cols") .. ifattr(self.rows, "rows") .. ifattr(self.wrap, "wrap") %>>
        <%-=luci.util.pcdata(self:cfgvalue(section))-%>
        </textarea>
 <%+cbi/valuefooter%>
index ac11845d4ddbbb7caedcc38ecb455a7fd83b78e7..d6d952117e7661c7f6b980ca7b442b0a566b0772 100644 (file)
@@ -76,6 +76,7 @@ function cbi_add_networks(field)
                        end
                end
        )
+       field.titleref = luci.dispatcher.build_url("admin", "network", "network")
 end
 
 function cbi_add_knownips(field)
index 1c9ae396ae08a30c2cd248e3308f77b02053d1c5..f2f2e4742af84adec7f6de1966a7ef1820b29362 100644 (file)
@@ -11,6 +11,7 @@ You may obtain a copy of the License at
 
 $Id$
 ]]--
+require("luci.tools.webadmin")
 require("luci.model.uci")
 require("luci.sys")
 require("luci.util")
@@ -22,11 +23,12 @@ s.addremove = true
 s.anonymous = true
 
 iface = s:option(ListValue, "interface", translate("interface"))
+luci.tools.webadmin.cbi_add_networks(iface)
+
 luci.model.uci.foreach("network", "interface",
        function (section)
                if section[".name"] ~= "loopback" then
                        iface.default = iface.default or section[".name"]
-                       iface:value(section[".name"])
                        s:depends("interface", section[".name"])
                end
        end)
index 228efc42d95d4f710dc5a6c5f2c90c40842322db..d2ccb9b95e7297fee738782708d29e81b71b7e93 100644 (file)
@@ -52,9 +52,11 @@ end
 
 ifname = s:option(DummyValue, "ifname", translate("device"))
 ifname.stateful = true
+ifname.titleref = luci.dispatcher.build_url("admin", "network", "vlan")
 
 if luci.model.uci.load("firewall") then
        zone = s:option(DummyValue, "_zone", translate("zone"))
+       zone.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "zones")
 
        function zone.cfgvalue(self, section)
                local zones = luci.tools.webadmin.network_get_zones(section)
index 4b2179a8f4fe56cc916bea06a52e8aeba7a4af08..0c62b58e960976840b719aaef88131de8960b2a3 100644 (file)
@@ -11,6 +11,7 @@ You may obtain a copy of the License at
 
 $Id$
 ]]--
+require("luci.tools.webadmin")
 m = Map("wireless", translate("networks"), translate("a_w_networks1"))
 
 s = m:section(TypedSection, "wifi-iface", "")
@@ -27,12 +28,7 @@ luci.model.uci.foreach("wireless", "wifi-device",
 
 network = s:option(ListValue, "network", translate("network"), translate("a_w_network1"))
 network:value("")
-luci.model.uci.foreach("network", "interface",
-       function (section)
-               if section[".name"] ~= "loopback" then
-                       network:value(section[".name"])
-               end
-       end)
+luci.tools.webadmin.cbi_add_networks(network)
 
 mode = s:option(ListValue, "mode", translate("mode"))
 mode:value("ap", translate("a_w_ap"))
index 537b2ea8e63ee7d379fd5e37b495f2109e2dc56b..8fbdf318fe0e4d4d29d17017c59c0a4cdf5ef635 100644 (file)
@@ -221,6 +221,14 @@ div#content ul {
        font-size: 95%;
 }
 
+.cbi-title-ref {
+       color: inherit;
+       text-decoration: none;
+       padding-right: 18px;
+       background: url('../resources/cbi/link.gif') no-repeat scroll right center;
+       background-color: inherit;
+}
+
 input[type=submit],
 input[type=reset],
 input[type=image],
index ddc3bdc06f3d4ca0255acd957f0c7f4b035e373c..9a83623ba9dbb6875c9d9c88c2e48031c901a02a 100644 (file)
@@ -206,6 +206,14 @@ div#content ul {
        font-size: 95%;
 }
 
+.cbi-title-ref {
+       color: inherit;
+       text-decoration: none;
+       padding-right: 18px;
+       background: url('../resources/cbi/link.gif') no-repeat scroll right center;
+       background-color: inherit;
+}
+
 input[type=submit],
 input[type=reset],
 input[type=image],
index f86a837ee10460d8b6185a8569727b5bbe4883c4..22c9d1ff39190801c446c9396c8a839e78c9767e 100644 (file)
@@ -214,6 +214,14 @@ div#content ul {
        font-size: 95%;
 }
 
+.cbi-title-ref {
+       color: inherit;
+       text-decoration: none;
+       padding-right: 18px;
+       background: url('../resources/cbi/link.gif') no-repeat scroll right center;
+       background-color: inherit;
+}
+
 input[type=submit],
 input[type=reset],
 input[type=image],