diff options
| author | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-12 14:32:48 +0000 |
|---|---|---|
| committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-12 14:32:48 +0000 |
| commit | d883578e1e7616c8a16983bb0afe5a9f147c4b6b (patch) | |
| tree | 28b3d0172416cb3389086d0c2801e4b87dcdbca2 | |
| parent | 4c15e9d73fcb3b8111b8afecf42ac6c18bce2020 (diff) | |
luci-0.10: merge r7924
| -rw-r--r-- | modules/admin-full/luasrc/view/admin_uci/changelog.htm | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/modules/admin-full/luasrc/view/admin_uci/changelog.htm b/modules/admin-full/luasrc/view/admin_uci/changelog.htm index 43f7bd1962..e195befb3e 100644 --- a/modules/admin-full/luasrc/view/admin_uci/changelog.htm +++ b/modules/admin-full/luasrc/view/admin_uci/changelog.htm @@ -35,7 +35,16 @@ $Id$ ret[#ret+1] = "<ins>%s.%s=<strong>%s</strong>" %{ r, s, os['.type'] } for o, v in util.kspairs(os) do if o:sub(1,1) ~= "." then - ret[#ret+1] = "<br />%s.%s.%s=<strong>%s</strong>" %{ r, s, o, util.pcdata(v) } + if type(v) == "table" then + local i + for i = 1, #v do + ret[#ret+1] = "<br />%s.%s.%s+=<strong>%s</strong>" + %{ r, s, o, util.pcdata(v[i]) } + end + else + ret[#ret+1] = "<br />%s.%s.%s=<strong>%s</strong>" + %{ r, s, o, util.pcdata(v) } + end end end ret[#ret+1] = "</ins><br />" @@ -49,8 +58,20 @@ $Id$ ret[#ret+1] = "<var>%s.%s<br />" %{ r, s } for o, v in util.kspairs(os) do if o:sub(1,1) ~= "." then - if v and v ~= "" then - ret[#ret+1] = "<ins>%s.%s.%s=<strong>%s</strong><br /></ins>" %{ r, s, o, util.pcdata(v) } + if v and #v > 0 then + ret[#ret+1] = "<ins>" + if type(v) == "table" then + local i + for i = 1, #v do + ret[#ret+1] = "%s.%s.%s+=<strong>%s</strong><br />" + %{ r, s, o, util.pcdata(v[i]) } + end + + else + ret[#ret+1] = "%s.%s.%s=<strong>%s</strong><br />" + %{ r, s, o, util.pcdata(v) } + end + ret[#ret+1] = "</ins>" else ret[#ret+1] = "<del>%s.%s.<strong>%s</strong><br /></del>" %{ r, s, o } end |
