Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow commotion-splash to run without other commotion packages #10

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion luasrc/controller/commotion-splash/splash.lua
Expand Up @@ -10,7 +10,7 @@ function index()
entry({"admin", "services", "splash"}, call("config_splash"), _("Captive Portal"), 90).dependent=true
entry({"admin", "services", "splash", "splashtext" }, form("commotion-splash/splashtext"), _("Splashtext"), 10).dependent=true
entry({"admin", "services", "splash", "submit" }, call("config_submit")).dependent=true
entry({"commotion","splash"}, template("commotion-splash/splash"))
entry({"commotion","splash"}, template("commotion-splash/splash")).dependent=false
end

function config_splash(error_info, bad_settings)
Expand Down
9 changes: 7 additions & 2 deletions luasrc/view/commotion-splash/splash.htm
Expand Up @@ -11,15 +11,20 @@

<div style="width:100%">

<% require "luci.model.ipkg"
if luci.model.ipkg.installed("commotion-apps") then %>
<div style="width:49%;display:inline-block;text-align:center" id="local">
<a href="<%=server .. splash .. 'redir=' .. newredir .. '%2Fapps&' .. tok%>">
<a href="<%=server .. splash .. 'redir=' .. newredir .. '%2Fapps&amp;' .. tok%>">
<img src="<%=media%>/apps.128.png" alt="<%:Local Applications%>" title="<%:Local Applications%>" />
<p><%:Local Applications%></p>
</a>
</div>

<% end %>


<div style="width:49%;display:inline-block;text-align:center" id="internet">
<a href="<% require "luci.http" %><%= luci.http.formvalue("authtarget") %>">
<a href="<% require "luci.http" %><%=server .. splash .. redir .. '&amp;' .. tok%>">
<img src="<%=media%>/internet.128.png" alt="<%:Internet%>" title="<%:Internet%>" />
<p><%:Internet%></p>
</a>
Expand Down