From 68d142e79287e9b5e9f980f37b546070a38fc478 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Wed, 26 Mar 2008 20:55:14 +0000 Subject: * CBI update * Added some configuration pages * Introduced contact site * Introduced luci UCI config file --- src/ffluci/view/admin_uci/apply.htm | 6 ++++++ src/ffluci/view/admin_uci/changes.htm | 11 +++++++++++ src/ffluci/view/admin_uci/revert.htm | 5 +++++ src/ffluci/view/cbi/footer.htm | 5 ++--- src/ffluci/view/cbi/fvalue.htm | 2 +- src/ffluci/view/cbi/lvalue.htm | 10 ++++------ src/ffluci/view/cbi/nsection.htm | 8 ++++---- src/ffluci/view/cbi/tsection.htm | 10 +++++----- src/ffluci/view/cbi/value.htm | 8 +++----- src/ffluci/view/footer.htm | 2 +- src/ffluci/view/header.htm | 26 +++++++++++++++++++++----- src/ffluci/view/public_index/contact.htm | 12 ++++++++++++ 12 files changed, 75 insertions(+), 30 deletions(-) create mode 100644 src/ffluci/view/admin_uci/apply.htm create mode 100644 src/ffluci/view/admin_uci/changes.htm create mode 100644 src/ffluci/view/admin_uci/revert.htm create mode 100644 src/ffluci/view/public_index/contact.htm (limited to 'src/ffluci/view') diff --git a/src/ffluci/view/admin_uci/apply.htm b/src/ffluci/view/admin_uci/apply.htm new file mode 100644 index 0000000000..43777c6c6d --- /dev/null +++ b/src/ffluci/view/admin_uci/apply.htm @@ -0,0 +1,6 @@ +<%+header%> +

<%:config Konfiguration%>

+

<%:uci_applied Die folgenden Änderungen wurden übernommen:%>

+<%=(changes or "-")%> +<%=output%> +<%+footer%> \ No newline at end of file diff --git a/src/ffluci/view/admin_uci/changes.htm b/src/ffluci/view/admin_uci/changes.htm new file mode 100644 index 0000000000..3bbcd0e5fb --- /dev/null +++ b/src/ffluci/view/admin_uci/changes.htm @@ -0,0 +1,11 @@ +<%+header%> +

<%:config Konfiguration%>

+

<%:changes Änderungen%>

+<%=(ffluci.model.uci.changes() or "-")%> +
+ +
+
+ +
+<%+footer%> \ No newline at end of file diff --git a/src/ffluci/view/admin_uci/revert.htm b/src/ffluci/view/admin_uci/revert.htm new file mode 100644 index 0000000000..f5eabc71b7 --- /dev/null +++ b/src/ffluci/view/admin_uci/revert.htm @@ -0,0 +1,5 @@ +<%+header%> +

<%:config Konfiguration%>

+

<%:uci_reverted Die folgenden Änderungen wurden verworfen:%>

+<%=(changes or "-")%> +<%+footer%> \ No newline at end of file diff --git a/src/ffluci/view/cbi/footer.htm b/src/ffluci/view/cbi/footer.htm index 230a17da86..d6e49678eb 100644 --- a/src/ffluci/view/cbi/footer.htm +++ b/src/ffluci/view/cbi/footer.htm @@ -1,5 +1,4 @@ -
- - + + <%+footer%> \ No newline at end of file diff --git a/src/ffluci/view/cbi/fvalue.htm b/src/ffluci/view/cbi/fvalue.htm index 8c8a2dfba0..6cf9a8d87c 100644 --- a/src/ffluci/view/cbi/fvalue.htm +++ b/src/ffluci/view/cbi/fvalue.htm @@ -4,7 +4,7 @@
<%=self.description%>
- "<% if self:ucivalue(section) == self.enabled then %> checked="checked"<% end %> value="1" /> + "<% if self:cfgvalue(section) == self.enabled then %> checked="checked"<% end %> value="1" />
\ No newline at end of file diff --git a/src/ffluci/view/cbi/lvalue.htm b/src/ffluci/view/cbi/lvalue.htm index abe5080174..f2a5ff9750 100644 --- a/src/ffluci/view/cbi/lvalue.htm +++ b/src/ffluci/view/cbi/lvalue.htm @@ -1,20 +1,18 @@
-
-
<%=self.title%>
-
<%=self.description%>
-
+
<%=self.title%>
+
<%=self.description%>
<% if self.widget == "select" then %> <% elseif self.widget == "radio" then local c = 0; for i, key in pairs(self.keylist) do c = c + 1%> - <%=self.vallist[i]%>"<% if self:ucivalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" /> + <%=self.vallist[i]%>"<% if self:cfgvalue(section) == key then %> checked="checked"<% end %> value="<%=key%>" /> <% if c == self.size then c = 0 %>
<% end end %> <% end %> diff --git a/src/ffluci/view/cbi/nsection.htm b/src/ffluci/view/cbi/nsection.htm index 80dcefc07c..7615104ad7 100644 --- a/src/ffluci/view/cbi/nsection.htm +++ b/src/ffluci/view/cbi/nsection.htm @@ -1,17 +1,17 @@ -<% if self:ucivalue(self.section) then %> +<% if self:cfgvalue(self.section) then %>

<%=self.title%>

<%=self.description%>
<% self:render_children(self.section) %> - <% if #self.optionals > 0 or self.dynamic then %> + <% if #self.optionals[self.section] > 0 or self.dynamic then %>
<% if self.dynamic then %> <% else %> diff --git a/src/ffluci/view/cbi/tsection.htm b/src/ffluci/view/cbi/tsection.htm index 26f8b198e8..9205095313 100644 --- a/src/ffluci/view/cbi/tsection.htm +++ b/src/ffluci/view/cbi/tsection.htm @@ -1,18 +1,18 @@

<%=self.title%>

<%=self.description%>
-<% for k, v in pairs(self:ucisections()) do%> +<% for k, v in pairs(self:cfgsections()) do%>
- <% if not self.anonymous then %><%=k%><% end %> + <% if not self.anonymous then %>

<%=k%>

<% end %> <% self:render_children(k) %> - <% if #self.optionals > 0 or self.dynamic then %> + <% if #self.optionals[k] > 0 or self.dynamic then %>
<% if self.dynamic then %> <% else %> diff --git a/src/ffluci/view/cbi/value.htm b/src/ffluci/view/cbi/value.htm index 54ca720d90..ae4cd0eb59 100644 --- a/src/ffluci/view/cbi/value.htm +++ b/src/ffluci/view/cbi/value.htm @@ -1,10 +1,8 @@
-
-
<%=self.title%>
-
<%=self.description%>
-
+
<%=self.title%>
+
<%=self.description%>
- size="<%=self.size%>" <% end %><% if self.maxlength then %>maxlength="<%=self.maxlength%>" <% end %>name="cbid.<%=self.config.."."..section.."."..self.option%>" value="<%=(self:ucivalue(section) or "")%>" /> + size="<%=self.size%>" <% end %><% if self.maxlength then %>maxlength="<%=self.maxlength%>" <% end %>name="cbid.<%=self.config.."."..section.."."..self.option%>" value="<%=(self:cfgvalue(section) or "")%>" />
<% if self.tag_invalid[section] then %>
<%:cbi_invalid Fehler: Ungültige Eingabe%>
<% end %> diff --git a/src/ffluci/view/footer.htm b/src/ffluci/view/footer.htm index c43cbb7e42..8d48c5fac4 100644 --- a/src/ffluci/view/footer.htm +++ b/src/ffluci/view/footer.htm @@ -2,6 +2,6 @@
-
FFLuCI 0.1 - Freifunk Lua Configuration Interface
+
FFLuCI 0.2 - Freifunk Lua Configuration Interface
\ No newline at end of file diff --git a/src/ffluci/view/header.htm b/src/ffluci/view/header.htm index cd2a64b55c..db5570515b 100644 --- a/src/ffluci/view/header.htm +++ b/src/ffluci/view/header.htm @@ -11,7 +11,6 @@ require("ffluci.http").htmlheader() - FFLuCI @@ -49,12 +48,29 @@ require("ffluci.http").htmlheader()
\ No newline at end of file diff --git a/src/ffluci/view/public_index/contact.htm b/src/ffluci/view/public_index/contact.htm new file mode 100644 index 0000000000..ded0a94af0 --- /dev/null +++ b/src/ffluci/view/public_index/contact.htm @@ -0,0 +1,12 @@ +<%+header%> +

<%:contact Kontakt%>

+ + + + + + + + +
<%:nickname Pseudonym%>:<%~luci.contact.nickname%>
<%:name Name%>:<%~luci.contact.name%>
<%:mail E-Mail%>:<%~luci.contact.mail%>
<%:phone Telefon%>:<%~luci.contact.phone%>
<%:location Standort%>:<%~luci.contact.location%>
<%:geocoord Geokoordinaten%>:<%~luci.contact.geo%>
<%:note Notiz%>:<%~luci.contact.note%>
+<%+footer%> \ No newline at end of file -- cgit v1.2.3