* Reintroduced public pages
* Automatically replace nil template values with ''
This commit is contained in:
parent
5ae7b3ee9a
commit
69bc3fad1f
13 changed files with 51 additions and 37 deletions
|
@ -45,7 +45,7 @@ define Package/ffluci/install
|
||||||
$(INSTALL_DIR) $(1)/sbin
|
$(INSTALL_DIR) $(1)/sbin
|
||||||
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/core/dist/* $(1)/usr/lib/lua/ -R
|
$(CP) $(PKG_BUILD_DIR)/core/dist/* $(1)/usr/lib/lua/ -R
|
||||||
$(CP) $(PKG_BUILD_DIR)/core/contrib/uci/luci $(1)/etc/config/luci
|
$(CP) $(PKG_BUILD_DIR)/core/contrib/uci/* $(1)/etc/config/luci
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/ffluci $(1)/www/cgi-bin
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/ffluci $(1)/www/cgi-bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/ffluci-upload $(1)/www/cgi-bin
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/ffluci-upload $(1)/www/cgi-bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/index.cgi $(1)/www/cgi-bin
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/index.cgi $(1)/www/cgi-bin
|
||||||
|
|
16
core/contrib/uci/freifunk
Normal file
16
core/contrib/uci/freifunk
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
config public contact
|
||||||
|
option nickname
|
||||||
|
option name
|
||||||
|
option mail
|
||||||
|
option phone
|
||||||
|
option location
|
||||||
|
option geo
|
||||||
|
option note
|
||||||
|
|
||||||
|
config public community
|
||||||
|
option name "Freifunk Halle"
|
||||||
|
option homepage http://halle.freifunk.net
|
||||||
|
option essid halle.freifunk.net
|
||||||
|
option bssid 02:CA:FF:EE:BA:BE
|
||||||
|
option realm netz.freifunk-halle.net
|
||||||
|
option pool 104.62.0.0/16
|
|
@ -6,22 +6,13 @@ config core category_privileges
|
||||||
option public nobody:nogroup
|
option public nobody:nogroup
|
||||||
|
|
||||||
config extern flash_keep
|
config extern flash_keep
|
||||||
option uci "/etc/config"
|
option uci "/etc/config"
|
||||||
option dropbear "/etc/dropbear"
|
option dropbear "/etc/dropbear"
|
||||||
option openvpn "/etc/openvpn"
|
option openvpn "/etc/openvpn"
|
||||||
option passwd "/etc/passwd"
|
option passwd "/etc/passwd"
|
||||||
option ipkg "/etc/ipkg.conf"
|
option ipkg "/etc/ipkg.conf"
|
||||||
option httpd "/etc/httpd.conf"
|
option httpd "/etc/httpd.conf"
|
||||||
option firewall "/etc/firewall.user"
|
option firewall "/etc/firewall.user"
|
||||||
|
|
||||||
config public contact
|
|
||||||
option nickname
|
|
||||||
option name
|
|
||||||
option mail
|
|
||||||
option phone
|
|
||||||
option location
|
|
||||||
option geo
|
|
||||||
option note
|
|
||||||
|
|
||||||
config event uci_oncommit
|
config event uci_oncommit
|
||||||
option network "/etc/init.d/network restart"
|
option network "/etc/init.d/network restart"
|
||||||
|
|
|
@ -95,7 +95,7 @@ function compile(template)
|
||||||
local r_include = "')\ninclude('%s')\nwrite('"
|
local r_include = "')\ninclude('%s')\nwrite('"
|
||||||
local r_i18n = "'..translate('%1','%2')..'"
|
local r_i18n = "'..translate('%1','%2')..'"
|
||||||
local r_uci = "'..config('%1','%2','%3')..'"
|
local r_uci = "'..config('%1','%2','%3')..'"
|
||||||
local r_pexec = "'..%s..'"
|
local r_pexec = "'..(%s or '')..'"
|
||||||
local r_exec = "')\n%s\nwrite('"
|
local r_exec = "')\n%s\nwrite('"
|
||||||
|
|
||||||
-- Parse the expressions
|
-- Parse the expressions
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<%=self.value%>
|
<%=self.value%>
|
||||||
<% end
|
<% end
|
||||||
else %>
|
else %>
|
||||||
<%=(self:cfgvalue(section) or "")%>
|
<%=self:cfgvalue(section)%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%+cbi/valuefooter%>
|
<%+cbi/valuefooter%>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<%+cbi/valueheader%>
|
<%+cbi/valueheader%>
|
||||||
<input type="text" onchange="cbi_d_update(this.id)" <% if self.size then %>size="<%=self.size%>" <% end %><% if self.maxlength then %>maxlength="<%=self.maxlength%>" <% end %>name="cbid.<%=self.config.."."..section.."."..self.option%>" id="cbid.<%=self.config.."."..section.."."..self.option%>" value="<%=(self:cfgvalue(section) or "")%>" />
|
<input type="text" onchange="cbi_d_update(this.id)" <% if self.size then %>size="<%=self.size%>" <% end %><% if self.maxlength then %>maxlength="<%=self.maxlength%>" <% end %>name="cbid.<%=self.config.."."..section.."."..self.option%>" id="cbid.<%=self.config.."."..section.."."..self.option%>" value="<%=self:cfgvalue(section)%>" />
|
||||||
<%+cbi/valuefooter%>
|
<%+cbi/valuefooter%>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-- Todo: Translate
|
-- Todo: Translate
|
||||||
m = Map("luci", translate("contact", "Kontakt"), translate("contact1", [[Diese Daten sind
|
m = Map("freifunk", translate("contact", "Kontakt"), translate("contact1", [[Diese Daten sind
|
||||||
auf der öffentlichen Kontaktseite sichtbar. Bitte gib an, wie man dich am besten kontaktieren kann.
|
auf der öffentlichen Kontaktseite sichtbar. Bitte gib an, wie man dich am besten kontaktieren kann.
|
||||||
Diese Informationen sollten nach der Picopeering Vereinbarung mindestens deine E-Mail-Adresse enthalten.
|
Diese Informationen sollten nach der Picopeering Vereinbarung mindestens deine E-Mail-Adresse enthalten.
|
||||||
Damit dein Knoten durch Topographieprogramme erfasst werden kann, gib bitte deine Geokoordinaten oder
|
Damit dein Knoten durch Topographieprogramme erfasst werden kann, gib bitte deine Geokoordinaten oder
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<%+header%>
|
<%+header%>
|
||||||
<h1><%:texteditor Texteditor%></h1>
|
<h1><%:texteditor Texteditor%></h1>
|
||||||
<form method="post" action="<%=controller%>/admin/system/editor">
|
<form method="post" action="<%=controller%>/admin/system/editor">
|
||||||
<div><%:file Datei%>: <input type="text" name="file" size="30" value="<%=(fn or '')%>" />
|
<div><%:file Datei%>: <input type="text" name="file" size="30" value="<%=fn%>" />
|
||||||
<% if msg then %><span class="error"><%:error Fehler%>: <%=msg%></span><% end %></div>
|
<% if msg then %><span class="error"><%:error Fehler%>: <%=msg%></span><% end %></div>
|
||||||
<br />
|
<br />
|
||||||
<div><textarea style="width: 100%" rows="20" name="data"><%=(cnt or '')%></textarea></div>
|
<div><textarea style="width: 100%" rows="20" name="data"><%=cnt%></textarea></div>
|
||||||
<br />
|
<br />
|
||||||
<div>
|
<div>
|
||||||
<input type="submit" value="<%:save Speichern%>" />
|
<input type="submit" value="<%:save Speichern%>" />
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<form method="post" action="<%=controller%>/admin/system/ipkg">
|
<form method="post" action="<%=controller%>/admin/system/ipkg">
|
||||||
<fieldset class="cbi-section-node">
|
<fieldset class="cbi-section-node">
|
||||||
<div><textarea style="width: 100%" rows="10" name="data"><%=(cnt or '')%></textarea></div>
|
<div><textarea style="width: 100%" rows="10" name="data"><%=cnt%></textarea></div>
|
||||||
<br />
|
<br />
|
||||||
<div>
|
<div>
|
||||||
<input type="submit" value="<%:save Speichern%>" />
|
<input type="submit" value="<%:save Speichern%>" />
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<span class="bold"><%:filter Filter%>:</span>
|
<span class="bold"><%:filter Filter%>:</span>
|
||||||
<input type="text" name="query" size="20" value="<%=(query or '')%>" />
|
<input type="text" name="query" size="20" value="<%=query%>" />
|
||||||
<input type="submit" name="search" value="<%:packages_search Paket suchen%>" />
|
<input type="submit" name="search" value="<%:packages_search Paket suchen%>" />
|
||||||
<input type="submit" name="submit" value="<%:packages_do Aktionen ausführen%>" />
|
<input type="submit" name="submit" value="<%:packages_do Aktionen ausführen%>" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,10 +63,10 @@
|
||||||
<% for k, pkg in pairs(pkgs) do %>
|
<% for k, pkg in pairs(pkgs) do %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%=pkg.Package%></td>
|
<td><%=pkg.Package%></td>
|
||||||
<td><%=(pkg.Version or '')%></td>
|
<td><%=pkg.Version%></td>
|
||||||
<td><% if not pkg.Status or not pkg.Status.installed then %><input type="checkbox" name="install.<%=pkg.Package%>" value="1" /><% else %><%:installed installiert%><% end %></td>
|
<td><% if not pkg.Status or not pkg.Status.installed then %><input type="checkbox" name="install.<%=pkg.Package%>" value="1" /><% else %><%:installed installiert%><% end %></td>
|
||||||
<td><% if pkg.Status and pkg.Status.installed then %><input type="checkbox" name="remove.<%=pkg.Package%>" value="1" /><% else %><%:notinstalled nicht installiert%><% end %></td>
|
<td><% if pkg.Status and pkg.Status.installed then %><input type="checkbox" name="remove.<%=pkg.Package%>" value="1" /><% else %><%:notinstalled nicht installiert%><% end %></td>
|
||||||
<td><%=(pkg.Description or '')%></td>
|
<td><%=pkg.Description%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<form method="post" action="<%=controller%>/admin/system/sshkeys">
|
<form method="post" action="<%=controller%>/admin/system/sshkeys">
|
||||||
<fieldset class="cbi-section-node">
|
<fieldset class="cbi-section-node">
|
||||||
<div><textarea style="width: 100%" rows="10" name="data"><%=(cnt or '')%></textarea></div>
|
<div><textarea style="width: 100%" rows="10" name="data"><%=cnt%></textarea></div>
|
||||||
<br />
|
<br />
|
||||||
<div>
|
<div>
|
||||||
<input type="submit" value="<%:save Speichern%>" />
|
<input type="submit" value="<%:save Speichern%>" />
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
<%+header%>
|
<%+header%>
|
||||||
|
<% local contact = ffluci.model.uci.show("freifunk", "contact").freifunk.contact %>
|
||||||
<h1><%:contact Kontakt%></h1>
|
<h1><%:contact Kontakt%></h1>
|
||||||
<table class="contact">
|
<table class="contact">
|
||||||
<tr><th><%:nickname Pseudonym%>:</th><td><%~luci.contact.nickname%></td></tr>
|
<tr><th style="text-align: right"><%:nickname Pseudonym%>:</th><td><%=contact.nickname%></td></tr>
|
||||||
<tr><th><%:name Name%>:</th><td><%~luci.contact.name%></td></tr>
|
<tr><th style="text-align: right"><%:name Name%>:</th><td><%=contact.name%></td></tr>
|
||||||
<tr><th><%:mail E-Mail%>:</th><td><%~luci.contact.mail%></td></tr>
|
<tr><th style="text-align: right"><%:mail E-Mail%>:</th><td><%=contact.mail%></td></tr>
|
||||||
<tr><th><%:phone Telefon%>:</th><td><%~luci.contact.phone%></td></tr>
|
<tr><th style="text-align: right"><%:phone Telefon%>:</th><td><%=contact.phone%></td></tr>
|
||||||
<tr><th><%:location Standort%>:</th><td><%~luci.contact.location%></td></tr>
|
<tr><th style="text-align: right"><%:location Standort%>:</th><td><%=contact.location%></td></tr>
|
||||||
<tr><th><%:geocoord Geokoordinaten%>:</th><td><%~luci.contact.geo%></td></tr>
|
<tr><th style="text-align: right"><%:geocoord Geokoordinaten%>:</th><td><%=contact.geo%></td></tr>
|
||||||
<tr><th><%:note Notiz%>:</th><td><%~luci.contact.note%></td></tr>
|
<tr><th style="text-align: right"><%:note Notiz%>:</th><td><%=contact.note%></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<%+footer%>
|
<%+footer%>
|
|
@ -1,5 +1,11 @@
|
||||||
<%+header%>
|
<%+header%>
|
||||||
<h1><%:hello Hallo!%></h1>
|
<% local ff = ffluci.model.uci.show("freifunk").freifunk %>
|
||||||
<p><%:admin1 Dies ist der Administrationsbereich. %>
|
<h1><%:hellonet Hallo und willkommen im Netz von%> <%=ff.community.name%>!</h1>
|
||||||
<p><em>ToDo: Intelligenter Einleitungstext</em></p>
|
<p><%:public1 Wir sind eine Initiative zur Schaffung eines freien, offenen und unabhängigen Funknetzwerks auf WLAN-Basis.%><br />
|
||||||
|
<%:public2 Dies ist der Zugangspunkt %><%=ffluci.sys.hostname()%>. <%:public3 Er wird betrieben von %>
|
||||||
|
<a href="<%=controller%>/public/index/contact"><%=ff.contact.nickname%></a>.</p>
|
||||||
|
<p><%:public4 Weitere Informationen zur globalen Freifunkinitiative findest du unter%> <a href="http://freifunk.net">Freifunk.net</a>.<br />
|
||||||
|
<%:public5 Hast du Interesse an diesem Projekt, dann wende dich an deine lokale Gemeinschaft%> <a href="<%=ff.community.homepage%>"><%=ff.community.name%></a>.</p>
|
||||||
|
<p><strong><%:note Hinweis%></strong>:<%:public6 Der Internetzugang über das experimentelle Freifunknetz ist an technische und organisatorische Bedingungen geknüpft und deshalb möglicherweise
|
||||||
|
nicht (immer) gewährleistet.%></p>
|
||||||
<%+footer%>
|
<%+footer%>
|
Loading…
Reference in a new issue