summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash/luasrc/view/splash
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-12-03 15:17:05 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-08 16:26:20 +0100
commit1bb4822dca6113f73e3bc89e2acf15935e6f8e92 (patch)
tree35e16f100466e4e00657199b38bb3d87d52bf73f /applications/luci-splash/luasrc/view/splash
parent9edd0e46c3f880727738ce8ca6ff1c8b85f99ef4 (diff)
Rework LuCI build system
* Rename subdirectories to their repective OpenWrt package names * Make each LuCI module its own standalone package * Deploy a shared luci.mk which is used by each module Makefile Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'applications/luci-splash/luasrc/view/splash')
-rw-r--r--applications/luci-splash/luasrc/view/splash/blocked.htm25
-rw-r--r--applications/luci-splash/luasrc/view/splash/splash.htm139
2 files changed, 0 insertions, 164 deletions
diff --git a/applications/luci-splash/luasrc/view/splash/blocked.htm b/applications/luci-splash/luasrc/view/splash/blocked.htm
deleted file mode 100644
index de61ecf01..000000000
--- a/applications/luci-splash/luasrc/view/splash/blocked.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
--%>
-<%
-local contacturl = luci.dispatcher.build_url("freifunk", "contact")
-%>
-
-<%+header%>
-
-<h2><a id="content" name="content"><%:Blocked%></a></h2>
-
-<p><%:Your access to this network has been blocked, most likely because you did something that our rules explicitly forbid.%></p>
-<p><%:To ask for the reason why you have been blocked or ask for access again you can try to contact the owner of this access point:%> <a href="<%=contacturl%>"><%:Contact%></a></p>
-
-<%+footer%>
-
-
-
diff --git a/applications/luci-splash/luasrc/view/splash/splash.htm b/applications/luci-splash/luasrc/view/splash/splash.htm
deleted file mode 100644
index 2ebee273b..000000000
--- a/applications/luci-splash/luasrc/view/splash/splash.htm
+++ /dev/null
@@ -1,139 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
--%>
-<%
-local fs = require "luci.fs"
-local has_custom_splash = fs.access("/usr/lib/luci-splash/splashtext.html")
-local has_custom_splashinclude = fs.access("/usr/lib/luci-splash/splashtextinclude.html")
-
-function expand (e, R)
- return (string.gsub(e, "###([A-Z_]+)###", R))
-end
-
-local community, homepage, leasetime, limit_up, limit_down
-
-local contacturl = luci.dispatcher.build_url("freifunk", "contact")
-
-local c = luci.model.uci.cursor():get_all("freifunk", "community")
-if c and c.name then
- name = luci.model.uci.cursor():get('profile_' .. c.name, 'profile', 'name')
- if name then
- community = name
- else
- community = c.name
- end
-else
- community = "Freifunk"
-end
-
-if c and c.homepage then
- homepage = c.homepage
-else
- homepage = "http://freifunk.net"
-end
-
-local s = luci.model.uci.cursor():get_all("luci_splash", "general")
-if s then
- leasetime = s.leasetime or ""
- limit_up = s.limit_up or nil
- limit_down = s.limit_down or nil
-end
-
-local limit_text = ""
-if limit_up and limit_down then
- limit_text = "<p>" .. translate("Your bandwidth is limited to") .. " " .. limit_down .. "/" .. limit_up ..
- " " .. translate("KB/s (Download/Upload). You may be able to remove this limit by actively contributing " ..
- "to this project.") .. "</p>"
-end
-
-local contact = translate('Get in %s with the operator of this access point.')
-contact = contact % ('<a href="' .. contacturl .. '">' .. translatef('Contact') .. '</a>')
-
-local accepttext = translate('By accepting these rules you can use this network for %s hour(s). After this time you need to accept these rules again.')
-accepttext = accepttext % leasetime
-
-
-if has_custom_splash then
- local R = {
- COMMUNITY = community,
- COMMUNITY_URL = homepage,
- LEASETIME = leasetime,
- ACCEPT = tostring(translate("Accept")),
- LIMIT = limit_text,
- CONTACTURL = contacturl
- }
- local splashtext = expand(fs.readfile("/usr/lib/luci-splash/splashtext.html"), R)
- %>
- <%=splashtext%>
-
-<% else %>
-
- <h2><a id="content" name="content"><%:Welcome%></a></h2>
-
- <p><%:You are now connected to the free wireless mesh network%> <a href="<%=homepage%>"><%=community%></a>.
- <%:Please note that we are not an internet service provider but an experimental community network.%></p>
- <p><%:Access to the internet might be possible nevertheless, because some activists of this project share their
- private internet connections. These few connections are shared between all users. That means available bandwidth
- is limited and because of this we ask you not to do any of the following:%></p>
- <ul>
- <li><%:use filesharing applications on this network%></li>
- <li><%:waste bandwidth with unneccesary downloads or streams%></li>
- <li><%:perform any kind of illegal activities%></li>
- </ul>
- <br />
-
- <% if limit_up and limit_down then %>
- <%=limit_text%>
- <% end %>
-
- <p><%:If you use this network on a regular basis we ask for your support:%></p>
- <ul>
- <li><a href="<%=homepage%>"><%:Become an active member of this community and help by operating your own node%></a></li>
- <li><%=contact%></li>
- <li><%:Donate some money to help us keep this project alive.%></li>
- <li><%:If you operate your own wifi equipment use channels different from ours.%></li>
- </ul>
-
- <%
- if has_custom_splashinclude then
- local splashtextinclude = fs.readfile("/usr/lib/luci-splash/splashtextinclude.html")
- %>
- <%=splashtextinclude%>
- <% end %>
-
- <h2><%:Usage Agreement%></h2>
- <p>
- <%:The open and free wireless network of volunteers ("Operators") provides the necessary equipment and Internet connections ("Infrastructure") at their own expense.%>
- <%:These Terms of Use govern the use of the network by its participants' computer, PDA, or similar device ("Devices") within the network.%>
- <%:Access to the network is not guaranteed. It can be interrupted at any time without notice for any reason, for certain devices, and/or may be blocked for certain users.%>
- </p>
-
- <h3><%:Legally Prohibited Activities%></h3>
- <p><%:The participant agrees to not perform any action and refrain from acts which may violate the law or infringe upon the rights of third parties.%></p>
-
- <h3><%:Legally Prohibited content%></h3>
- <p><%:The participant agrees to not transfer content over the network which violates the law.%></p>
-
- <h3><%:Fair Use Policy%></h3>
- <p><%:The participant agrees to not use the network in any way which will harm the infrastructure, the network itself, its operators or other participants.%></p>
-
- <h3><%:Safety%></h3>
- <p><%:The network, like the Internet, is unencrypted and open. Each participant is responsible for the safety of their own connections and devices.%></p>
-
- <h3>Disclaimer</h3>
- <p><%:The operator claims no liability for loss of data, unauthorized access/damage to devices, or financial losses that participants may suffer from the use of the network.%></p>
-
- <br /><p><b><%=accepttext%></b></p>
-<% end %>
-
-
-