projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8c246e8
)
modules/admin-core: Added several cross-references to relevant configuration pages
author
Steven Barth
<steven@midlink.org>
Thu, 14 Aug 2008 14:51:06 +0000
(14:51 +0000)
committer
Steven 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
patch
|
blob
|
history
applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua
patch
|
blob
|
history
applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua
patch
|
blob
|
history
applications/luci-samba/luasrc/model/cbi/samba.lua
patch
|
blob
|
history
i18n/english/luasrc/i18n/cbi.en.lua
patch
|
blob
|
history
i18n/german/luasrc/i18n/cbi.de.lua
patch
|
blob
|
history
libs/cbi/htdocs/luci-static/resources/cbi/link.gif
patch
|
blob
|
history
libs/cbi/luasrc/view/cbi/full_valueheader.htm
patch
|
blob
|
history
libs/cbi/luasrc/view/cbi/tblsection.htm
patch
|
blob
|
history
libs/cbi/luasrc/view/cbi/tvalue.htm
patch
|
blob
|
history
modules/admin-core/luasrc/tools/webadmin.lua
patch
|
blob
|
history
modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
patch
|
blob
|
history
modules/admin-full/luasrc/model/cbi/admin_network/network.lua
patch
|
blob
|
history
modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
patch
|
blob
|
history
themes/fledermaus/htdocs/luci-static/fledermaus/cascade.css
patch
|
blob
|
history
themes/openwrt-light/htdocs/luci-static/openwrt-light/cascade.css
patch
|
blob
|
history
themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css
patch
|
blob
|
history
diff --git
a/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
b/applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
index
1c88579
..
a8ba0c7
100644
(file)
--- a/
applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
+++ b/
applications/luci-ddns/luasrc/model/cbi/ddns/ddns.lua
@@
-12,6
+12,7
@@
You may obtain a copy of the License at
$Id$
]]--
$Id$
]]--
+require("luci.tools.webadmin")
m = Map("ddns", translate("ddns"), translate("ddns_desc"))
s = m:section(TypedSection, "service", "")
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
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")
iface = s:option(ListValue, "ip_interface", translate("interface"))
iface:depends("ip_source", "interface")
diff --git
a/applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua
b/applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua
index
1a765ab
..
3ef3275
100644
(file)
--- a/
applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua
+++ b/
applications/luci-fw/luasrc/model/cbi/luci_fw/general.lua
@@
-11,6
+11,7
@@
You may obtain a copy of the License at
$Id$
]]--
$Id$
]]--
+require("luci.tools.webadmin")
m = Map("firewall", translate("fw_fw"), translate("fw_fw1"))
s = m:section(TypedSection, "defaults")
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
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)
function net.cfgvalue(self, section)
local value = MultiValue.cfgvalue(self, section)
diff --git
a/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua
b/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua
index
c57d3c8
..
824b2b5
100644
(file)
--- a/
applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua
+++ b/
applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua
@@
-11,6
+11,7
@@
You may obtain a copy of the License at
$Id$
]]--
$Id$
]]--
+require("luci.tools.webadmin")
require("luci.fs")
m = Map("olsr", "OLSR")
require("luci.fs")
m = Map("olsr", "OLSR")
@@
-85,13
+86,7
@@
i.addremove = true
i.dynamic = true
network = i:option(ListValue, "Interface", translate("network"))
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")
i:option(Value, "Ip4Broadcast")
i:option(Value, "HelloInterval")
diff --git
a/applications/luci-samba/luasrc/model/cbi/samba.lua
b/applications/luci-samba/luasrc/model/cbi/samba.lua
index
3fe7006
..
7ef9d23
100644
(file)
--- a/
applications/luci-samba/luasrc/model/cbi/samba.lua
+++ b/
applications/luci-samba/luasrc/model/cbi/samba.lua
@@
-30,7
+30,7
@@
s.addremove = true
s.template = "cbi/tblsection"
s:option(Value, "name", translate("name"))
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
s:option(Value, "users").rmempty = true
diff --git
a/i18n/english/luasrc/i18n/cbi.en.lua
b/i18n/english/luasrc/i18n/cbi.en.lua
index
9c84a89
..
2171690
100644
(file)
--- a/
i18n/english/luasrc/i18n/cbi.en.lua
+++ b/
i18n/english/luasrc/i18n/cbi.en.lua
@@
-7,3
+7,4
@@
cbi_optional = " (optional)"
cbi_sectempty = "This section contains no values yet"
cbi_manual = "-- custom --"
cbi_select = "-- Please choose --"
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
diff --git
a/i18n/german/luasrc/i18n/cbi.de.lua
b/i18n/german/luasrc/i18n/cbi.de.lua
index
8b32650
..
eb3e1a5
100644
(file)
--- a/
i18n/german/luasrc/i18n/cbi.de.lua
+++ b/
i18n/german/luasrc/i18n/cbi.de.lua
@@
-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_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
diff --git
a/libs/cbi/htdocs/luci-static/resources/cbi/link.gif
b/libs/cbi/htdocs/luci-static/resources/cbi/link.gif
index
1b2a923
..
f0bb78d
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
diff --git
a/libs/cbi/luasrc/view/cbi/full_valueheader.htm
b/libs/cbi/luasrc/view/cbi/full_valueheader.htm
index
ce079ca
..
5b890ed
100644
(file)
--- a/
libs/cbi/luasrc/view/cbi/full_valueheader.htm
+++ b/
libs/cbi/luasrc/view/cbi/full_valueheader.htm
@@
-15,7
+15,7
@@
$Id$
<div class="cbi-value" id="cbi-<%=self.config.."-"..section.."-"..self.option%>">
<label class="cbi-value-title"<%= attr("for", cbid) %>>
<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>
<%-=self.title-%>
<%- if self.titleref then -%></a><%- end -%>
</label>
diff --git
a/libs/cbi/luasrc/view/cbi/tblsection.htm
b/libs/cbi/luasrc/view/cbi/tblsection.htm
index
a397762
..
a694488
100644
(file)
--- a/
libs/cbi/luasrc/view/cbi/tblsection.htm
+++ b/
libs/cbi/luasrc/view/cbi/tblsection.htm
@@
-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">
<%- 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>
<%-=k.title-%>
<%- if k.titleref then -%></a><%- end -%>
</th>
diff --git
a/libs/cbi/luasrc/view/cbi/tvalue.htm
b/libs/cbi/luasrc/view/cbi/tvalue.htm
index
dcf6b8b
..
6a13968
100644
(file)
--- a/
libs/cbi/luasrc/view/cbi/tvalue.htm
+++ b/
libs/cbi/luasrc/view/cbi/tvalue.htm
@@
-13,7
+13,7
@@
$Id$
-%>
<%+cbi/valueheader%>
-%>
<%+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%>
<%-=luci.util.pcdata(self:cfgvalue(section))-%>
</textarea>
<%+cbi/valuefooter%>
diff --git
a/modules/admin-core/luasrc/tools/webadmin.lua
b/modules/admin-core/luasrc/tools/webadmin.lua
index
ac11845
..
d6d9521
100644
(file)
--- a/
modules/admin-core/luasrc/tools/webadmin.lua
+++ b/
modules/admin-core/luasrc/tools/webadmin.lua
@@
-76,6
+76,7
@@
function cbi_add_networks(field)
end
end
)
end
end
)
+ field.titleref = luci.dispatcher.build_url("admin", "network", "network")
end
function cbi_add_knownips(field)
end
function cbi_add_knownips(field)
diff --git
a/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
b/modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
index
1c9ae39
..
f2f2e47
100644
(file)
--- a/
modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
+++ b/
modules/admin-full/luasrc/model/cbi/admin_network/dhcp.lua
@@
-11,6
+11,7
@@
You may obtain a copy of the License at
$Id$
]]--
$Id$
]]--
+require("luci.tools.webadmin")
require("luci.model.uci")
require("luci.sys")
require("luci.util")
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"))
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"]
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)
s:depends("interface", section[".name"])
end
end)
diff --git
a/modules/admin-full/luasrc/model/cbi/admin_network/network.lua
b/modules/admin-full/luasrc/model/cbi/admin_network/network.lua
index
228efc4
..
d2ccb9b
100644
(file)
--- a/
modules/admin-full/luasrc/model/cbi/admin_network/network.lua
+++ b/
modules/admin-full/luasrc/model/cbi/admin_network/network.lua
@@
-52,9
+52,11
@@
end
ifname = s:option(DummyValue, "ifname", translate("device"))
ifname.stateful = true
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"))
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)
function zone.cfgvalue(self, section)
local zones = luci.tools.webadmin.network_get_zones(section)
diff --git
a/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
b/modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
index
4b2179a
..
0c62b58
100644
(file)
--- a/
modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
+++ b/
modules/admin-full/luasrc/model/cbi/admin_wifi/networks.lua
@@
-11,6
+11,7
@@
You may obtain a copy of the License at
$Id$
]]--
$Id$
]]--
+require("luci.tools.webadmin")
m = Map("wireless", translate("networks"), translate("a_w_networks1"))
s = m:section(TypedSection, "wifi-iface", "")
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("")
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"))
mode = s:option(ListValue, "mode", translate("mode"))
mode:value("ap", translate("a_w_ap"))
diff --git
a/themes/fledermaus/htdocs/luci-static/fledermaus/cascade.css
b/themes/fledermaus/htdocs/luci-static/fledermaus/cascade.css
index
537b2ea
..
8fbdf31
100644
(file)
--- a/
themes/fledermaus/htdocs/luci-static/fledermaus/cascade.css
+++ b/
themes/fledermaus/htdocs/luci-static/fledermaus/cascade.css
@@
-221,6
+221,14
@@
div#content ul {
font-size: 95%;
}
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],
input[type=submit],
input[type=reset],
input[type=image],
diff --git
a/themes/openwrt-light/htdocs/luci-static/openwrt-light/cascade.css
b/themes/openwrt-light/htdocs/luci-static/openwrt-light/cascade.css
index
ddc3bdc
..
9a83623
100644
(file)
--- a/
themes/openwrt-light/htdocs/luci-static/openwrt-light/cascade.css
+++ b/
themes/openwrt-light/htdocs/luci-static/openwrt-light/cascade.css
@@
-206,6
+206,14
@@
div#content ul {
font-size: 95%;
}
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],
input[type=submit],
input[type=reset],
input[type=image],
diff --git
a/themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css
b/themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css
index
f86a837
..
22c9d1f
100644
(file)
--- a/
themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css
+++ b/
themes/openwrt.org/htdocs/luci-static/openwrt.org/cascade.css
@@
-214,6
+214,14
@@
div#content ul {
font-size: 95%;
}
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],
input[type=submit],
input[type=reset],
input[type=image],